From be36c87f2f34330e9d421f5e70aee46c48fef09e Mon Sep 17 00:00:00 2001 From: DTALEX66 <151195992+DTALEX66@users.noreply.github.com> Date: Thu, 29 Oct 2026 04:23:15 +0800 Subject: [PATCH 1/2] =?UTF-8?q?feat(observer):=20=E5=AF=BC=E8=BD=A8?= =?UTF-8?q?=E7=94=BB=E6=AF=8F=E6=9D=A1=E6=B3=B3=E9=81=93=E8=87=AA=E5=B7=B1?= =?UTF-8?q?=E5=A3=B0=E6=98=8E=E7=9A=84=E8=8A=B1=E7=AC=A6=EF=BC=88WUI-03=20?= =?UTF-8?q?gap=2010=20=E7=9A=84=E5=9B=BE=E6=A0=87=E5=8D=8A=E7=89=87?= =?UTF-8?q?=EF=BC=89?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit viewRegistry 的 32 条泳道行一直各自声明一枚 Lucide 花符,而那个字段零消费者: 导轨画的是 31 枚一模一样的 .nav-dot,所以任何源码级 grep 都读成「已交付」。 花符替换装饰点而不是并列加一枚——gap 10 记录的旧尝试为了变窄藏起 .truncate, 结果是 23 个无法区分的点;加第二枚 15px 方块会挤掉标签,删装饰点不会。 实测:31/31 行有花符、标签截断 0→0、几何/可读性/按下态/窄条四门读数不变。 守卫 laneIcons.contract.test.tsx 5 例,反证(删掉行内图形)转出 2 例具名 FAIL。 DESIGN.md gap 10 与 WUI-03 状态位按实测改判;导轨宽度是否收窄仍是 owner 决定,本轮不动。 --- apps/observer/frontend/DESIGN.md | 17 +++- .../src/components/layout/Sidebar.tsx | 24 ++++-- .../frontend/src/laneIcons.contract.test.tsx | 85 +++++++++++++++++++ .../observer/frontend/src/lib/viewRegistry.ts | 8 ++ taskpacks/current/OPEN-TASK-REGISTER.md | 43 +++++++++- 5 files changed, 168 insertions(+), 9 deletions(-) create mode 100644 apps/observer/frontend/src/laneIcons.contract.test.tsx diff --git a/apps/observer/frontend/DESIGN.md b/apps/observer/frontend/DESIGN.md index 1ed007f2..26672778 100644 --- a/apps/observer/frontend/DESIGN.md +++ b/apps/observer/frontend/DESIGN.md @@ -525,9 +525,22 @@ each one declared at the sentence rather than excused repo-wide: `.project-local/artifacts/NARROW_BAND_ATTEMPT_20261008.diff`. **The standard row was the defect**, so SCREEN_SPEC now states window surfaces instead of a phone band, the target rule reads 24×24 (WCAG 2.5.8) rather than the 44px figure that came with the deleted row, and the gate measures the real - floor. ERR-219 records it. What remains genuinely open is a design question the deleted row was - papering over: the rail has no per-lane icon set, so it cannot be made narrow on purpose — only by + floor. ERR-219 records it. What remained genuinely open was a design question the deleted row was + papering over: the rail had no per-lane icon set, so it could not be made narrow on purpose — only by removing information. + **Closed on the picture half 2026-10-29, and the diagnosis changed.** `src/lib/viewRegistry.ts` had + declared one Lucide glyph per lane all along (32 rows, 30 distinct glyphs, the two repeats being the + registry's own pairing convention: `executions`/`execution-detail` share `PlayCircle`, `privacy`/`trust` + share `ShieldCheck`); the field simply had **no consumer**, so the rail painted 31 identical `.nav-dot` + circles and every source-level grep read as delivered. `src/components/layout/Sidebar.tsx` now renders + each lane's declared glyph in place of the dot. Measured on the built bundle at 1280×820: 31/31 rows + paint a glyph, label truncation 0 before and 0 after (`truncated=0` in + `.project-local/runs/live-probe-20261029/rail-before-main.json` and `rail-after-icons.json`), and the + geometry, legibility and pressed-state gates are unchanged — the glyph replaces a 10px decoration with a + 15px one instead of adding to it, which is the difference between this attempt and the discarded one. + `src/laneIcons.contract.test.tsx` binds the painted row to the registry row and fails if a lane loses + its name. **What is still open is the width decision, not the icon set**: the rail may now be narrowed + on purpose, and whether to do that is an owner call about the professional shell. 11. **One role, two literals, kept equal by a guard rather than by one definition.** `--color-bg / -sidebar / -panel / -panel2 / -border / -ink / -muted` in `src/index.css` repeat, character for character, what `src/skins/b10.css` (`:root`) and `src/skins/l10b-shell.css` (`html.light`) declare for diff --git a/apps/observer/frontend/src/components/layout/Sidebar.tsx b/apps/observer/frontend/src/components/layout/Sidebar.tsx index daf5c3b2..9ec3bedc 100644 --- a/apps/observer/frontend/src/components/layout/Sidebar.tsx +++ b/apps/observer/frontend/src/components/layout/Sidebar.tsx @@ -1,6 +1,7 @@ import * as React from 'react' +import type { LucideIcon } from 'lucide-react' import { cn } from '@/lib/utils' -import { VIEW_REGISTRY, OVERVIEW_ID, OVERVIEW_LABEL } from '@/lib/viewRegistry' +import { VIEW_REGISTRY, OVERVIEW_ID, OVERVIEW_LABEL, OVERVIEW_ICON } from '@/lib/viewRegistry' // WUI-01/WUI-02: the grouping is data now, and it lives in `lib/navigation` next to the statement of // which lanes are daily destinations and which left the default nav. The rail renders that model; it no // longer owns it, because a grouping that only a component can read cannot be asserted, searched or @@ -16,7 +17,7 @@ import { NAV_GROUPS, DAILY_DESTINATION_IDS, isOnDefaultNav } from '@/lib/navigat *