From aaa12c3e23aed389384ff57b1cdb6645f93e97a2 Mon Sep 17 00:00:00 2001 From: Jokin Date: Sun, 16 Aug 2026 03:56:19 +0200 Subject: [PATCH] Workspace tabs are a real 7.css tablist MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The tab strip was a hand-rolled lookalike: bg-accent for the active tab and an absolutely-positioned bg-primary underline, competing with a tab component 7.css already ships. Replaced with its actual contract — menu[role=tablist] plus one button[role=tab][aria-selected] per workspace — so 7.css draws the joined inactive tabs and the raised white active one. Per the agreed design the per-tab X is gone: real Win7 tab controls had none, and a button nested in a button is invalid HTML. Closing keeps Ctrl/Cmd+W and gains middle-click (auxclick, guarded on button 1 so the right button never closes a tab). Drag-reorder moved onto the tab button itself and still works. Three things 7.css does that had to be accommodated, each found by looking rather than by reasoning: - Its selector is the DESCENDANT `menu[role=tablist] button`, so the +, update pill and right-hand tools deliberately stay outside the menu. - The strip is a .w7-toolbar, whose neutralizer strips background, border and both pseudo-elements to make toolbar buttons flat. That flattened the tabs to nothing, so the rule now exempts :not([role=tab]) — tabs want the full Aero slab, their neighbours want flat. - overflow-x:auto on the scroller forces computed overflow-y from visible to auto, so the strip clips vertically. 7.css raises the active tab with margin-top:-2px, which put its top border outside the scroll box and silently deleted it. The strip now reserves 2px of padding-top, mirroring the padding-left:3px 7.css already reserves for the same tab's -3px left margin. Caught by pixel-scanning the tab's top edge against 7.css's own reference markup in the harness: reference had #8e8f8f, ours jumped straight from toolbar grey to tab fill. Also: tabs.css hardcodes color:#222 on every tablist button, outside 7.css's var system, leaving labels near-invisible in dark. Routed through a new --w7-tab-c token declared light in :root.win7 and overridden in BOTH dark blocks (attribute and prefers-color-scheme), matching the ListView and menu literals. And its `display: block` outranks Tailwind's .flex, which jammed the icon against the label — flex/gap restored in skinfix. role="tabpanel" on the panel area was considered and skipped: 7.css gives it padding:14px, margin-bottom:9px and its own border, which would fight the split-pane layout for a join that cannot read anyway with the panel toolbar row in between. The harness grew a section 5 mirroring this markup, because the live app starts with exactly one workspace and there is no way to click "+" from a headless capture — multi-tab state is only checkable there. Verified in both themes headless and on a live window capture. Co-Authored-By: Claude --- ui/dev/harness.html | 47 +++++++++++++++++++- ui/src/app/tab-bar/tab-bar.ts | 82 +++++++++++++++++++---------------- ui/src/styles.css | 53 ++++++++++++++++++++-- 3 files changed, 140 insertions(+), 42 deletions(-) diff --git a/ui/dev/harness.html b/ui/dev/harness.html index 20b288e..faef17c 100644 --- a/ui/dev/harness.html +++ b/ui/dev/harness.html @@ -231,7 +231,7 @@
-
tabs — menu[role=tablist]
+
reference — menu[role=tablist]
@@ -240,5 +240,50 @@
Tab body
+ +

5 — Workspace tab strip (ours, as tab-bar.ts renders it)

+ +
+
+
ours — 3 workspaces, 2nd active
+
+ + + + + + +
+ +
+
+
+
+
ours — single workspace (the live startup state)
+
+ + + + +
+ +
+
+
+
diff --git a/ui/src/app/tab-bar/tab-bar.ts b/ui/src/app/tab-bar/tab-bar.ts index 6b87bd2..7a060e4 100644 --- a/ui/src/app/tab-bar/tab-bar.ts +++ b/ui/src/app/tab-bar/tab-bar.ts @@ -45,55 +45,51 @@ const CONCURRENCY_CHOICES = [2, 3, 4, 6, 8] as const;
-
+ @for (ws of panels.workspaces(); track ws.id; let i = $index) { -
+ - @if (panels.workspaces().length > 1) { - - } @else { - - } - @if (ws.id === panels.activeWorkspaceId()) { -
- } -
+ + {{ panels.workspaceName(ws) }} + } -
+