Skip to content

AI media harness for planning, generating, and editing locally

TypeScript

Title bar: project name reads as a control, selected view semibold on a fill

Bitti873acdeb28b0
diff --git a/src/components/ProjectWorkspace.tsx b/src/components/ProjectWorkspace.tsx
index 3511d07..738a6bf 100644
--- a/src/components/ProjectWorkspace.tsx
+++ b/src/components/ProjectWorkspace.tsx
@@ -1,4 +1,4 @@
-import { ArrowLeft, BookOpen, Bot, Download, Film, Image, Redo2, Save, Sparkles, Undo2 } from "lucide-react";
+import { ArrowLeft, BookOpen, Bot, ChevronDown, Download, Film, Image, Redo2, Save, Sparkles, Undo2 } from "lucide-react";
import { ImageEditor } from "./workspace/ImageEditor";
import { useEffect, useId, useMemo, useRef, useState, useSyncExternalStore, type ReactNode } from "react";
import type { GenerationJob, ProjectConfig, ProjectRecord } from "../lib/project";
@@ -246,7 +246,7 @@ export function ProjectWorkspace({ project, initialView = "timeline", runtime =
<TitleBar
className="project-titlebar"
leading={<button type="button" className="icon-button" onClick={goBack} aria-label="Back to project library" data-tooltip="Back to projects" data-tooltip-shortcut="Alt+Left" aria-keyshortcuts="Alt+ArrowLeft"><ArrowLeft size={16} /></button>}
- title={<button type="button" className="project-title" aria-label={`Edit project settings for ${config.name}`} aria-haspopup="dialog" aria-expanded={editingProject} data-tooltip="Project settings" onClick={() => { session.dismissError(); setEditingProject(true); }}>{config.name}</button>}
+ title={<button type="button" className="project-title" aria-label={`Edit project settings for ${config.name}`} aria-haspopup="dialog" aria-expanded={editingProject} data-tooltip="Project settings" onClick={() => { session.dismissError(); setEditingProject(true); }}><span className="project-title__name">{config.name}</span><ChevronDown size={12} aria-hidden="true" /></button>}
actions={<>
<button type="button" className="icon-button" disabled={!canUndo} onClick={() => session.undo()} aria-label="Undo" data-tooltip="Undo" data-tooltip-shortcut="Ctrl+Z" aria-keyshortcuts="Control+Z"><Undo2 size={16} /></button>
<button type="button" className="icon-button" disabled={!canRedo} onClick={() => session.redo()} aria-label="Redo" data-tooltip="Redo" data-tooltip-shortcut="Ctrl+Y" aria-keyshortcuts="Control+Y Control+Shift+Z"><Redo2 size={16} /></button>
@@ -278,8 +278,8 @@ export function ProjectWorkspace({ project, initialView = "timeline", runtime =
value: id,
controls: `${panelId}-view`,
label: id === "generator" && running > 0
- ? <span className="project-views__label" data-tooltip={`${running} generation${running === 1 ? "" : "s"} running or queued`} data-tooltip-shortcut={shortcutOf(views.indexOf(id))}>{VIEW_LABELS[id]}<InfoBadge value={running} severity="informational" /></span>
- : <span className="project-views__label" data-tooltip={VIEW_LABELS[id]} data-tooltip-shortcut={shortcutOf(views.indexOf(id))}>{VIEW_LABELS[id]}</span>,
+ ? <span className="project-views__label" data-tooltip={`${running} generation${running === 1 ? "" : "s"} running or queued`} data-tooltip-shortcut={shortcutOf(views.indexOf(id))}><span className="project-views__name" data-label={VIEW_LABELS[id]}>{VIEW_LABELS[id]}</span><InfoBadge value={running} severity="informational" /></span>
+ : <span className="project-views__label" data-tooltip={VIEW_LABELS[id]} data-tooltip-shortcut={shortcutOf(views.indexOf(id))}><span className="project-views__name" data-label={VIEW_LABELS[id]}>{VIEW_LABELS[id]}</span></span>,
icon: viewIcon(id),
}))}
/>
diff --git a/src/styles/workspace.css b/src/styles/workspace.css
index f7e3f12..651e342 100644
--- a/src/styles/workspace.css
+++ b/src/styles/workspace.css
@@ -26,31 +26,46 @@
/* --- Title bar -------------------------------------------------------------- */
-/* The project name is the caption text and a button: it opens Project
- settings. Caption-sized, like any window title, with a subtle hover. */
+/* The project name is a button that opens Project settings, and looks like
+ one: a control fill with a hairline, the name in semibold and a 12px
+ chevron saying there is more behind it. Caption-sized, like any window
+ title; the name ellipsises, the chevron never does. */
.project-title {
- display: block;
+ display: inline-flex;
+ align-items: center;
+ gap: var(--space-1);
max-width: 280px;
min-width: 0;
height: var(--control-md);
padding: 0 var(--space-2);
- overflow: hidden;
border: 0;
border-radius: var(--radius-sm);
- background: transparent;
+ background: var(--fill-control);
+ box-shadow: inset 0 0 0 1px var(--stroke-control);
color: inherit;
font: inherit;
+ font-weight: var(--weight-semibold);
white-space: nowrap;
- text-overflow: ellipsis;
transition: var(--transition-control);
}
+.project-title__name {
+ min-width: 0;
+ overflow: hidden;
+ text-overflow: ellipsis;
+}
+
+.project-title > svg {
+ flex: none;
+ color: var(--text-secondary);
+}
+
.project-title:hover {
- background: var(--fill-subtle-hover);
+ background: var(--fill-control-hover);
}
.project-title:active {
- background: var(--fill-subtle-pressed);
+ background: var(--fill-control-pressed);
}
.project-titlebar .titlebar__identity {
@@ -63,19 +78,42 @@
}
/* The views. Tabs, not links: arrow keys move between them, Ctrl+1…4 jump.
- The selected one is marked by the accent pill under it and nothing else —
- no weight change, so the row never shifts when the selection moves. */
+ The pill alone is easy to miss at this height, so the selected one is also
+ semibold on a subtle control fill. Each name reserves its semibold width
+ (a hidden bold copy under it), so the row never shifts when the selection
+ moves. */
.project-views {
min-width: 0;
overflow: hidden;
}
+.project-views .ui-selector-bar__item--selected {
+ background: var(--fill-control);
+ font-weight: var(--weight-semibold);
+}
+
+.project-views .ui-selector-bar__item--selected:hover:not(:disabled) {
+ background: var(--fill-control-hover);
+}
+
.project-views__label {
display: inline-flex;
align-items: center;
gap: var(--space-2);
}
+.project-views__name {
+ display: inline-grid;
+}
+
+.project-views__name::after {
+ content: attr(data-label);
+ height: 0;
+ overflow: hidden;
+ visibility: hidden;
+ font-weight: var(--weight-semibold);
+}
+
.project-commands {
display: flex;
align-items: center;