@yankeguo/dsh-client-ui-devlead 0.4.1 → 0.4.2-rc.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -16,10 +16,45 @@ Browser half of the DevLead suite, loaded on the DSH **Web** platform.
16
16
  non-lead rows get a quieter target glyph (`IconGoalOutlineRegular`, `sidebar.session.row.trailing`).
17
17
  The mark predicates read the summary-sized `devLeadMode` / `devLeadWatch` projections; the row
18
18
  hover card (`sidebar.session.row.hover`) restates active/watched for accessibility.
19
+ - **Read-only project board:** the board is enabled by default for the *eligible lead* — the
20
+ on-screen top-level Session whose summary says DevLead mode is on. Only then does this package
21
+ register the right-Sidebar page (`devlead-board`), its guide card, live tab title, and Session
22
+ header action; the header action itself stays registered statically and renders nothing for any
23
+ other Session. The page strictly validates schema v1 bytes, follows `workspaceFiles.changes`,
24
+ groups/sorts project cards, and exposes only refresh/disclosure controls. The page reads the
25
+ board file directly through the Workspace Files Remote: the schema's 256 KiB file cap applies and
26
+ the model tool's separate 64 KiB read cap does not. A not-yet-existing file is not an error, and
27
+ the decoder is the same protocol schema implementation the Host validates with (the browser uses
28
+ DSH's frozen `zod` platform singleton; no extra runtime dependency). A restored right-Sidebar
29
+ board tab whose on-screen Session is no longer an eligible lead is closed on the first sync even
30
+ when this page instance never registered the board surfaces. A collapsed section joins the
31
+ authoritative Workspace/Session projections to show registered Workspaces absent from the board.
32
+ The path comes from the Host global `__DSH_DEVLEAD_BOARD__` when it names this lead
33
+ (`{ boardPath, schemaVersion, pathPlatform, leadSessionId, override }`); otherwise it is derived
34
+ from the Session's *original* workspace root as `<cwd>/.dsh/devlead/board.json`. A deployment
35
+ Config `boardPath` still wins as a host-wide override, but a page loaded before the lead existed
36
+ needs a refresh to see it. Turning mode off or switching to a non-lead Session disposes every
37
+ board registration and closes the on-screen Session's lingering board tab, so the panel never
38
+ keeps reading a previous lead's file. The required services follow the default Web composition,
39
+ and this package has no runtime dependency on the Host package.
40
+
41
+ Automatic refresh retains the 120 ms change debounce and polls **every** file state: ready/loading
42
+ use a fixed 5 s cadence by default, while empty/error back off exponentially from 5 s to a 30 s
43
+ ceiling. Timers run only while the document is visible and focused. Visibility/focus resume
44
+ triggers an immediate coalesced read; blur, hidden, unmount, and path changes clear timers. Watch,
45
+ poll, and resume triggers share one in-flight read. A watch ready/change received during that read schedules
46
+ at most one trailing refresh; poll/focus triggers only coalesce, so later changes are neither duplicated nor dropped. Manual refresh can still force a fresh read
47
+ and reconnect the watch; an ended watch never reconnects silently, but polling continues. The
48
+ redesigned header shows active/blocked/paused/done KPIs, revision/updated time, and Live refresh
49
+ health. Blocked projects lead with a strong warning; active cards use a responsive two-column
50
+ main area (one column when narrow), with focus/next/blockers and task progress. Paused/done and
51
+ unlisted projects are secondary disclosures. Light/dark styling, aria labelling, keyboard-native
52
+ disclosures, and read-only operation are part of the browser acceptance checklist.
19
53
 
20
54
  The browser bundle only registers into DSH client slots and sends `/devlead` commands from the
21
55
  toolbar toggle. It has no custom Remote API, no optimistic state flips, and no direct Host access;
22
- all durable state comes from the `devLead` / `devLeadMode` / `devLeadWatch` projections. The locale namespace is
56
+ DevLead mode state comes from projections, while the board uses DSH's existing read-only Workspace
57
+ Files Remote and Workspace/Session catalogs. The locale namespace is
23
58
  `devlead` with `zh` and `en` dictionaries.
24
59
 
25
60
  Style injection is reference-counted across **module instances** (`Symbol.for(...)` key on `globalThis`):
@@ -51,7 +86,29 @@ dsh plugin --profile desktop add @yankeguo/dsh-devlead-bundle
51
86
  `@yankeguo/dsh-client-ui-devlead` 是浏览器半边:composer 工具条里两态都存在的 DevLead
52
87
  图标 + 文本开关(关闭态发 `/devlead on`、开启态发 `/devlead off`)、开启后的只读 DevLeadBar 状态条、
53
88
  侧边栏激活 lead 的强调色行环(无行尾图标)与已关注会话的弱化准星;只读 `devLead`/`devLeadMode`/
54
- `devLeadWatch` projection 并发送 `/devlead` 命令。
89
+ `devLeadWatch` projection 并发送 `/devlead` 命令。看板默认开启,但只属于「当前屏幕上的合规 lead」
90
+ (top-level Session 且 summary 里 DevLead 模式开启):只有这时才注册右侧栏只读项目看板 tab、
91
+ guide 卡片、标题与 Session 头部按钮(头部按钮本身静态注册,其他 Session 下不渲染)。看板严格
92
+ 校验 schema v1、跟随文件变更、分组展示项目与任务,并从未看板 workspace 的 Host 投影生成折叠清单。
93
+ 面板直接经 Workspace Files Remote 读取看板文件(schema 的 256 KiB 文件上限;模型工具另有的
94
+ 64 KiB 读取裁剪不作用于面板),解码器与 Host 共用同一份 protocol schema(浏览器侧 `zod` 来自 DSH
95
+ 冻结 module table,无额外运行期依赖)。恢复出来但当前 on-screen Session 已非合规 lead 的 board tab
96
+ 会在首次 sync 时被关闭(即使本页从未注册过看板 surface)。
97
+ 路径优先取 Host global `__DSH_DEVLEAD_BOARD__`(新 Host 带 `leadSessionId` 与 `override`),否则由
98
+ Session 原始 workspace root 派生 `<cwd>/.dsh/devlead/board.json`;配置 `boardPath` 仍是部署级覆盖,
99
+ 但页面若在 lead 出现之前加载,需要刷新才能看到覆盖路径。模式关闭或切换到非 lead Session 会注销全部
100
+ 看板注册并关闭当前 Session 遗留的看板 tab,绝不继续读上一个 lead 的文件。所需服务由默认 Web 组合
101
+ 提供,本包不依赖 Host 包运行期代码。
102
+
103
+ 自动刷新保留 120ms change debounce,并覆盖**所有**文件状态:ready/loading 默认固定 5s 一轮,
104
+ empty/error 从 5s 起指数退避到 30s 上限。只有 document visible 且 focused 时才运行 timer;
105
+ visibility/focus 恢复立即 coalesced read,blur/hidden/unmount/path change 清理 timer;watch、poll 与
106
+ 恢复触发共享 in-flight 读取;在途期间新到的 watch ready/change 合并为一次 trailing refresh(poll/focus
107
+ 只共享当前读取),避免叠发或丢失后续 change。
108
+ 手动刷新仍可强制重读并重连 watch;watch ended 不静默重连,但轮询
109
+ 继续。重做后的顶部显示 active/blocked/paused/done KPI、revision/updated 与 Live 自动状态;blocked
110
+ 强警示置顶,active 主区响应式 2 列(窄栏 1 列),卡片含 focus/next/blocker 与任务进度,paused/done/
111
+ unlisted 为次级折叠。light/dark、aria、键盘 disclosure 与只读行为均纳入浏览器人工验收。
55
112
  0.2.0 起样式注入用跨模块实例引用计数(HMR 新旧实例交替不误删标签),组件与准入 hook 用
56
113
  `react-test-renderer` 做渲染测试。已知 mark 回填与 blank 行限制见根 README。完整中文文档见
57
114
  [根 README.zh.md](https://github.com/yankeguo/dsh-devlead/blob/main/README.zh.md)与[设计说明](https://github.com/yankeguo/dsh-devlead/blob/main/docs/DESIGN.md)。