@yankeguo/dsh-client-ui-devlead 0.4.1 → 0.4.2-rc.2
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 +39 -2
- package/lib/client.js +1487 -66
- package/lib/index.js +23 -2
- package/locale/en.json +1 -1
- package/locale/zh.json +1 -1
- package/package.json +11 -4
package/README.md
CHANGED
|
@@ -16,10 +16,34 @@ 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 — the
|
|
27
|
+
panel keeps polling on a bounded backoff (4s growing to 30s) until the first Host write appears —
|
|
28
|
+
and the decoder is the same protocol schema implementation the Host validates with (the browser
|
|
29
|
+
uses DSH's frozen `zod` platform singleton; no extra runtime dependency). A restored right-Sidebar
|
|
30
|
+
board tab whose on-screen Session is no longer an eligible lead is closed on the first sync even
|
|
31
|
+
when this page instance never registered the board surfaces. A collapsed section
|
|
32
|
+
joins the authoritative Workspace/Session projections to show registered Workspaces absent from
|
|
33
|
+
the board.
|
|
34
|
+
The path comes from the Host global `__DSH_DEVLEAD_BOARD__` when it names this lead
|
|
35
|
+
(`{ boardPath, schemaVersion, pathPlatform, leadSessionId, override }`); otherwise it is derived
|
|
36
|
+
from the Session's *original* workspace root as `<cwd>/.dsh/devlead/board.json`. A deployment
|
|
37
|
+
Config `boardPath` still wins as a host-wide override, but a page loaded before the lead existed
|
|
38
|
+
needs a refresh to see it. Turning mode off or switching to a non-lead Session disposes every
|
|
39
|
+
board registration and closes the on-screen Session's lingering board tab, so the panel never
|
|
40
|
+
keeps reading a previous lead's file. The required services follow the default Web composition,
|
|
41
|
+
and this package has no runtime dependency on the Host package.
|
|
19
42
|
|
|
20
43
|
The browser bundle only registers into DSH client slots and sends `/devlead` commands from the
|
|
21
44
|
toolbar toggle. It has no custom Remote API, no optimistic state flips, and no direct Host access;
|
|
22
|
-
|
|
45
|
+
DevLead mode state comes from projections, while the board uses DSH's existing read-only Workspace
|
|
46
|
+
Files Remote and Workspace/Session catalogs. The locale namespace is
|
|
23
47
|
`devlead` with `zh` and `en` dictionaries.
|
|
24
48
|
|
|
25
49
|
Style injection is reference-counted across **module instances** (`Symbol.for(...)` key on `globalThis`):
|
|
@@ -51,7 +75,20 @@ dsh plugin --profile desktop add @yankeguo/dsh-devlead-bundle
|
|
|
51
75
|
`@yankeguo/dsh-client-ui-devlead` 是浏览器半边:composer 工具条里两态都存在的 DevLead
|
|
52
76
|
图标 + 文本开关(关闭态发 `/devlead on`、开启态发 `/devlead off`)、开启后的只读 DevLeadBar 状态条、
|
|
53
77
|
侧边栏激活 lead 的强调色行环(无行尾图标)与已关注会话的弱化准星;只读 `devLead`/`devLeadMode`/
|
|
54
|
-
`devLeadWatch` projection 并发送 `/devlead`
|
|
78
|
+
`devLeadWatch` projection 并发送 `/devlead` 命令。看板默认开启,但只属于「当前屏幕上的合规 lead」
|
|
79
|
+
(top-level Session 且 summary 里 DevLead 模式开启):只有这时才注册右侧栏只读项目看板 tab、
|
|
80
|
+
guide 卡片、标题与 Session 头部按钮(头部按钮本身静态注册,其他 Session 下不渲染)。看板严格
|
|
81
|
+
校验 schema v1、跟随文件变更、分组展示项目与任务,并从未看板 workspace 的 Host 投影生成折叠清单。
|
|
82
|
+
面板直接经 Workspace Files Remote 读取看板文件(schema 的 256 KiB 文件上限;模型工具另有的
|
|
83
|
+
64 KiB 读取裁剪不作用于面板);文件尚不存在时按有界退避轮询(4s 起、上限 30s)等待首次写入,
|
|
84
|
+
解码器与 Host 共用同一份 protocol schema(浏览器侧 `zod` 来自 DSH 冻结 module table,无额外运行期
|
|
85
|
+
依赖)。恢复出来但当前 on-screen Session 已非合规 lead 的 board tab 会在首次 sync 时被关闭
|
|
86
|
+
(即使本页从未注册过看板 surface)。
|
|
87
|
+
路径优先取 Host global `__DSH_DEVLEAD_BOARD__`(新 Host 带 `leadSessionId` 与 `override`),否则由
|
|
88
|
+
Session 原始 workspace root 派生 `<cwd>/.dsh/devlead/board.json`;配置 `boardPath` 仍是部署级覆盖,
|
|
89
|
+
但页面若在 lead 出现之前加载,需要刷新才能看到覆盖路径。模式关闭或切换到非 lead Session 会注销全部
|
|
90
|
+
看板注册并关闭当前 Session 遗留的看板 tab,绝不继续读上一个 lead 的文件。所需服务由默认 Web 组合
|
|
91
|
+
提供,本包不依赖 Host 包运行期代码。
|
|
55
92
|
0.2.0 起样式注入用跨模块实例引用计数(HMR 新旧实例交替不误删标签),组件与准入 hook 用
|
|
56
93
|
`react-test-renderer` 做渲染测试。已知 mark 回填与 blank 行限制见根 README。完整中文文档见
|
|
57
94
|
[根 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)。
|