@yankeguo/dsh-client-ui-devlead 0.4.3-rc.1 → 0.4.3-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
@@ -30,10 +30,13 @@ Browser half of the DevLead suite, loaded on the DSH **Web** platform.
30
30
  when this page instance never registered the board surfaces. A collapsed section joins the
31
31
  authoritative Workspace/Session projections to show registered Workspaces absent from the board.
32
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
33
+ (`{ boardFilePath, schemaVersion, pathPlatform, leadSessionId, override }`); otherwise it is derived
34
+ from the Session's *original* workspace root as `<cwd>/.dsh/devlead/board.json`. Deployment Config
35
+ `statePath` is a host-wide relative state directory defaulting to `.dsh/devlead`; the Host resolves
36
+ `<workspace>/<statePath>/board.json` against that original root before publishing the absolute
37
+ `boardFilePath` global, with notes under `<workspace>/<statePath>/notes/`. Exact board JSON paths and
38
+ independent notes paths are not accepted. A page loaded before the lead existed still needs a refresh
39
+ to see a custom `statePath`. Turning mode off or switching to a non-lead Session disposes every
37
40
  board registration and closes the on-screen Session's lingering board tab, so the panel never
38
41
  keeps reading a previous lead's file. The required services follow the default Web composition,
39
42
  and this package has no runtime dependency on the Host package.
@@ -53,7 +56,8 @@ Browser half of the DevLead suite, loaded on the DSH **Web** platform.
53
56
  keyboard-native disclosures, narrow-pane focus order, and read-only operation are part of the
54
57
  browser acceptance checklist.
55
58
 
56
- The client derives `dirname(boardPath)/notes/index.json` from the already-resolved board config;
59
+ The client derives `dirname(boardFilePath)/notes/index.json` from the already-resolved absolute
60
+ `boardFilePath` global, equivalently `<workspace>/<statePath>/notes/index.json`;
57
61
  it never accepts a user path and performs all index/body I/O through the same read-only Workspace
58
62
  Files state machine (`stat`, `readBytes`, `changes`, watch + poll). Cards show note count and
59
63
  latest-title chips from index metadata; bodies are not embedded in the index. Opening a note loads
@@ -112,8 +116,10 @@ guide 卡片、标题与 Session 头部按钮(头部按钮本身静态注册
112
116
  冻结 module table,无额外运行期依赖)。恢复出来但当前 on-screen Session 已非合规 lead 的 board tab
113
117
  会在首次 sync 时被关闭(即使本页从未注册过看板 surface)。
114
118
  路径优先取 Host global `__DSH_DEVLEAD_BOARD__`(新 Host 带 `leadSessionId` 与 `override`),否则由
115
- Session 原始 workspace root 派生 `<cwd>/.dsh/devlead/board.json`;配置 `boardPath` 仍是部署级覆盖,
116
- 但页面若在 lead 出现之前加载,需要刷新才能看到覆盖路径。模式关闭或切换到非 lead Session 会注销全部
119
+ Session 原始 workspace root 派生 `<cwd>/.dsh/devlead/board.json`;部署配置 `statePath` 是默认
120
+ `.dsh/devlead` 的 Host 级相对状态目录,Host 相对该原始根解析 `<workspace>/<statePath>/board.json` 后才
121
+ 发布绝对 `boardFilePath` global,notes 位于 `<workspace>/<statePath>/notes/`。不接受精确 board JSON 路径或
122
+ 独立 notes 路径。页面若在 lead 出现之前加载,自定义 `statePath` 仍需刷新才能看到覆盖路径。模式关闭或切换到非 lead Session 会注销全部
117
123
  看板注册并关闭当前 Session 遗留的看板 tab,绝不继续读上一个 lead 的文件。所需服务由默认 Web 组合
118
124
  提供,本包不依赖 Host 包运行期代码。
119
125
 
@@ -128,8 +134,9 @@ Live 自动状态;blocked 强警示置顶,active 主区响应式 2/3 列(
128
134
  field label,但保留 focus/next/blocker 与任务进度,非自明图标有可访问 tooltip;paused/done/unlisted
129
135
  为次级折叠。light/dark、aria、窄栏焦点顺序、键盘 disclosure 与只读行为均纳入浏览器人工验收。
130
136
 
131
- client 从已解析的 board config 派生 `dirname(boardPath)/notes/index.json`,不接受用户路径,index
132
- 与正文 I/O 都只经既有 Workspace Files `stat/readBytes/changes` 和 watch+poll 状态机。卡片从 metadata
137
+ client 从已解析的绝对 `boardFilePath` global 派生 `dirname(boardFilePath)/notes/index.json`,等价于
138
+ `<workspace>/<statePath>/notes/index.json`;不接受用户路径,index 与正文 I/O 都只经既有 Workspace Files
139
+ `stat/readBytes/changes` 和 watch+poll 状态机。卡片从 metadata
133
140
  显示 note 数与最近标题 chip,index 不含正文;打开 note 时才读取经过校验的
134
141
  `<project.directory>/<note.id>.md`,并用全栏只读 reader 展示。index 与当前 note 都会在外部/原生修改后
135
142
  自动刷新;ready reader 标题栏优先显示当前文件成功 stat 的观察时间并保留 live bytes,绝不把 DSH opaque
package/lib/client.js CHANGED
@@ -701,14 +701,14 @@ window.__ModuleLoader__.load({
701
701
  const record = value;
702
702
  if (record.schemaVersion !== DEVLEAD_BOARD_SCHEMA_VERSION) return void 0;
703
703
  if (record.pathPlatform !== "posix" && record.pathPlatform !== "win32") return void 0;
704
- if (typeof record.boardPath !== "string" || record.boardPath.trim().length === 0) return void 0;
705
- if (record.boardPath.length > DEVLEAD_BOARD_PATH_MAX || !isAbsoluteWorkspacePath(record.boardPath, record.pathPlatform)) return void 0;
704
+ if (typeof record.boardFilePath !== "string" || record.boardFilePath.trim().length === 0) return void 0;
705
+ if (record.boardFilePath.length > DEVLEAD_BOARD_PATH_MAX || !isAbsoluteWorkspacePath(record.boardFilePath, record.pathPlatform)) return void 0;
706
706
  if (record.leadSessionId !== void 0) {
707
707
  if (typeof record.leadSessionId !== "string" || record.leadSessionId.length === 0) return void 0;
708
708
  }
709
709
  if (record.override !== void 0 && typeof record.override !== "boolean") return void 0;
710
710
  return {
711
- boardPath: record.boardPath,
711
+ boardFilePath: record.boardFilePath,
712
712
  schemaVersion: DEVLEAD_BOARD_SCHEMA_VERSION,
713
713
  pathPlatform: record.pathPlatform,
714
714
  ...record.leadSessionId === void 0 ? {} : { leadSessionId: record.leadSessionId },
@@ -767,7 +767,7 @@ window.__ModuleLoader__.load({
767
767
  }
768
768
  function boardConfigOf(global) {
769
769
  return {
770
- boardPath: global.boardPath,
770
+ boardFilePath: global.boardFilePath,
771
771
  schemaVersion: DEVLEAD_BOARD_SCHEMA_VERSION,
772
772
  pathPlatform: global.pathPlatform
773
773
  };
@@ -786,7 +786,7 @@ window.__ModuleLoader__.load({
786
786
  const platform = global?.pathPlatform ?? detectDevLeadBoardPathPlatform(root);
787
787
  if (platform === void 0 || !isAbsoluteWorkspacePath(root, platform)) return void 0;
788
788
  return {
789
- boardPath: joinDevLeadBoardPath(root, platform),
789
+ boardFilePath: joinDevLeadBoardPath(root, platform),
790
790
  schemaVersion: DEVLEAD_BOARD_SCHEMA_VERSION,
791
791
  pathPlatform: platform
792
792
  };
@@ -1207,7 +1207,7 @@ window.__ModuleLoader__.load({
1207
1207
  now = Date.now
1208
1208
  }) {
1209
1209
  const fileConfig = (0, import_react2.useMemo)(() => config === void 0 ? void 0 : {
1210
- path: config.boardPath,
1210
+ path: config.boardFilePath,
1211
1211
  maxBytes: DEVLEAD_BOARD_MAX_BYTES,
1212
1212
  fileLabel: "board file",
1213
1213
  parse: (bytes) => parseDevLeadBoardBytes(bytes, config.pathPlatform),
@@ -1274,8 +1274,8 @@ window.__ModuleLoader__.load({
1274
1274
  function deriveDevLeadNotesPaths(config) {
1275
1275
  const separator = config.pathPlatform === "win32" ? "\\" : "/";
1276
1276
  const alternate = config.pathPlatform === "win32" ? "/" : "\\";
1277
- const cut = Math.max(config.boardPath.lastIndexOf(separator), config.boardPath.lastIndexOf(alternate));
1278
- let directory = config.boardPath.slice(0, Math.max(0, cut));
1277
+ const cut = Math.max(config.boardFilePath.lastIndexOf(separator), config.boardFilePath.lastIndexOf(alternate));
1278
+ let directory = config.boardFilePath.slice(0, Math.max(0, cut));
1279
1279
  if (directory.length === 0 && config.pathPlatform === "posix") directory = "/";
1280
1280
  const root = `${directory}${directory.endsWith(separator) ? "" : separator}${DEVLEAD_NOTES_DIR_NAME}`;
1281
1281
  return { root, indexPath: `${root}${separator}${DEVLEAD_NOTES_INDEX_FILE_NAME}`, pathPlatform: config.pathPlatform };
@@ -1500,14 +1500,14 @@ window.__ModuleLoader__.load({
1500
1500
  const visible = useTabInfo().tab.visible;
1501
1501
  const summary = sessions.byId[sessionId];
1502
1502
  const resolved = resolveDevLeadBoardSessionConfig(sessionId, summary, currentDevLeadBoardConfig());
1503
- const config = (0, import_react5.useMemo)(() => resolved, [resolved?.boardPath, resolved?.pathPlatform]);
1503
+ const config = (0, import_react5.useMemo)(() => resolved, [resolved?.boardFilePath, resolved?.pathPlatform]);
1504
1504
  const { refresh, watch, autoRefresh, ...state } = useBoardFile({ sessionId, config, files, visible });
1505
1505
  const notesPaths = (0, import_react5.useMemo)(() => config === void 0 ? void 0 : deriveDevLeadNotesPaths(config), [config]);
1506
1506
  const notesIndex = useDevLeadNotesIndex({ sessionId, config, files, visible });
1507
1507
  const [selection, setSelection] = (0, import_react5.useState)();
1508
1508
  (0, import_react5.useEffect)(() => {
1509
1509
  setSelection(void 0);
1510
- }, [config?.boardPath]);
1510
+ }, [config?.boardFilePath]);
1511
1511
  const readerProjectId = selection?.projectId;
1512
1512
  const previousReaderProject = (0, import_react5.useRef)(void 0);
1513
1513
  (0, import_react5.useEffect)(() => {
package/lib/index.js CHANGED
@@ -5,20 +5,20 @@ import { DEVLEAD_BOARD_SCHEMA_VERSION } from "@yankeguo/dsh-devlead-protocol";
5
5
  var inject = ["devLead"];
6
6
  function apply(ctx) {
7
7
  ctx.on("webserver/index-inject", (table) => {
8
- const boardPath = ctx.devLead.board.path;
8
+ const boardFilePath = ctx.devLead.board.path;
9
9
  const leadSessionId = ctx.devLead.boardLeadSessionId;
10
- if (boardPath === void 0 || leadSessionId === void 0) return;
10
+ if (boardFilePath === void 0 || leadSessionId === void 0) return;
11
11
  table.push({
12
12
  kind: "global",
13
13
  name: "__DSH_DEVLEAD_BOARD__",
14
14
  value: {
15
- boardPath,
15
+ boardFilePath,
16
16
  schemaVersion: DEVLEAD_BOARD_SCHEMA_VERSION,
17
17
  // Browser schema validation must use the Host's node:path semantics,
18
18
  // not an operating-system guess from the path string or user agent.
19
19
  pathPlatform: process.platform === "win32" ? "win32" : "posix",
20
20
  leadSessionId,
21
- override: ctx.devLead.boardPathOverride === true
21
+ override: ctx.devLead.statePathOverride === true
22
22
  }
23
23
  });
24
24
  });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@yankeguo/dsh-client-ui-devlead",
3
- "version": "0.4.3-rc.1",
3
+ "version": "0.4.3-rc.3",
4
4
  "description": "DevLead surfaces: the mode toggle and status strip, Session sidebar marks, and a read-only right-Sidebar project board.",
5
5
  "license": "MIT",
6
6
  "type": "module",
@@ -43,7 +43,7 @@
43
43
  "@deepseek-ai/dsh-host-webserver": ">=0.2.2-rc.1 <0.3.0"
44
44
  },
45
45
  "dependencies": {
46
- "@yankeguo/dsh-devlead-protocol": "0.4.3-rc.1"
46
+ "@yankeguo/dsh-devlead-protocol": "0.4.3-rc.3"
47
47
  },
48
48
  "engines": {
49
49
  "dsh": ">=0.2.2-rc.1 <0.3.0"