@yankeguo/dsh-client-ui-devlead 0.4.2-rc.6 → 0.4.2-rc.7
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 +9 -4
- package/lib/client.js +6 -2
- package/package.json +2 -2
package/README.md
CHANGED
|
@@ -58,7 +58,10 @@ Browser half of the DevLead suite, loaded on the DSH **Web** platform.
|
|
|
58
58
|
Files state machine (`stat`, `readBytes`, `changes`, watch + poll). Cards show note count and
|
|
59
59
|
latest-title chips from index metadata; bodies are not embedded in the index. Opening a note loads
|
|
60
60
|
only that validated `<project.directory>/<note.id>.md` body into a full-pane, read-only reader.
|
|
61
|
-
Both the index and current note refresh automatically after external
|
|
61
|
+
Both the index and current note refresh automatically after external/native edits. The ready reader
|
|
62
|
+
header prefers the current file's successful-stat observation time and exposes its live byte count;
|
|
63
|
+
DSH's opaque stat `version` is never parsed as an mtime. List ordering/times and chips still use index
|
|
64
|
+
metadata, whose stale bytes/updatedAt never gate body freshness or reopen the watch. Empty/missing,
|
|
62
65
|
loading, read, malformed, oversized, and watch-ended states remain distinct; a bad index or note
|
|
63
66
|
degrades only its notes surface, not the board. The dependency-free Markdown subset renders
|
|
64
67
|
headings, paragraphs, lists, quotes, fenced/inline code, emphasis, strikethrough, and explicit
|
|
@@ -128,9 +131,11 @@ field label,但保留 focus/next/blocker 与任务进度,非自明图标有
|
|
|
128
131
|
client 从已解析的 board config 派生 `dirname(boardPath)/notes/index.json`,不接受用户路径,index
|
|
129
132
|
与正文 I/O 都只经既有 Workspace Files `stat/readBytes/changes` 和 watch+poll 状态机。卡片从 metadata
|
|
130
133
|
显示 note 数与最近标题 chip,index 不含正文;打开 note 时才读取经过校验的
|
|
131
|
-
`<project.directory>/<note.id>.md`,并用全栏只读 reader 展示。index 与当前 note
|
|
132
|
-
|
|
133
|
-
|
|
134
|
+
`<project.directory>/<note.id>.md`,并用全栏只读 reader 展示。index 与当前 note 都会在外部/原生修改后
|
|
135
|
+
自动刷新;ready reader 标题栏优先显示当前文件成功 stat 的观察时间并保留 live bytes,绝不把 DSH opaque
|
|
136
|
+
version 当 mtime 解析。list 排序/时间与 chip 仍用 index metadata,过期的 bytes/updatedAt 不决定正文代际,
|
|
137
|
+
也不触发 watch 重建。缺失/空、加载、读取/解析错误、超限与 watch ended 分开呈现,坏 index/note 只降级
|
|
138
|
+
对应 notes 区域,不影响 board。无依赖 Markdown 子集以 React 元素/文本渲染标题、段落、列表、引用、
|
|
134
139
|
fenced/inline code、强调、删除线与显式 HTTP(S) 链接;raw HTML 和危险 scheme 保持惰性文本,不使用
|
|
135
140
|
`dangerouslySetInnerHTML`,浏览器没有写路径。
|
|
136
141
|
0.2.0 起样式注入用跨模块实例引用计数(HMR 新旧实例交替不误删标签),组件与准入 hook 用
|
package/lib/client.js
CHANGED
|
@@ -998,6 +998,7 @@ window.__ModuleLoader__.load({
|
|
|
998
998
|
else fail("read", metadata.error);
|
|
999
999
|
return;
|
|
1000
1000
|
}
|
|
1001
|
+
const observedAt = new Date(now()).toISOString();
|
|
1001
1002
|
if (metadata.value.bytes !== void 0 && metadata.value.bytes > config.maxBytes) {
|
|
1002
1003
|
fail("parse", config.parseError(`${config.fileLabel} exceeds ${config.maxBytes} bytes`));
|
|
1003
1004
|
return;
|
|
@@ -1025,6 +1026,8 @@ window.__ModuleLoader__.load({
|
|
|
1025
1026
|
value,
|
|
1026
1027
|
valuePath: config.path,
|
|
1027
1028
|
lastSuccessAt: new Date(now()).toISOString(),
|
|
1029
|
+
observedAt,
|
|
1030
|
+
...metadata.value.bytes === void 0 ? {} : { observedBytes: metadata.value.bytes },
|
|
1028
1031
|
refreshing: false
|
|
1029
1032
|
});
|
|
1030
1033
|
} catch (error) {
|
|
@@ -1271,7 +1274,7 @@ window.__ModuleLoader__.load({
|
|
|
1271
1274
|
parse: parseDevLeadNoteBytes,
|
|
1272
1275
|
parseError: (message, options) => new DevLeadNotesParseError(message, options)
|
|
1273
1276
|
};
|
|
1274
|
-
}, [metadata?.id, metadata?.path,
|
|
1277
|
+
}, [metadata?.id, metadata?.path, paths?.root, paths?.pathPlatform]);
|
|
1275
1278
|
return useWorkspaceFile({ sessionId, config: fileConfig, files, visible: visible && metadata !== void 0, debounceMs, pollMs, pollMaxMs, now });
|
|
1276
1279
|
}
|
|
1277
1280
|
|
|
@@ -1726,6 +1729,7 @@ window.__ModuleLoader__.load({
|
|
|
1726
1729
|
const metadata = sorted.find((note) => note.id === notes.selection?.noteId) ?? sorted[0];
|
|
1727
1730
|
const expectedPath = metadata === void 0 ? void 0 : resolveDevLeadNotePath(notes.paths, metadata);
|
|
1728
1731
|
const documentReady = notes.note.status === "ready" && notes.note.value !== void 0 && notes.note.valuePath === expectedPath;
|
|
1732
|
+
const liveObservedAt = documentReady ? notes.note.observedAt : void 0;
|
|
1729
1733
|
return /* @__PURE__ */ (0, import_jsx_runtime4.jsxs)("section", { className: "devlead-notes-reader", "data-devlead-notes-reader": project.id, "aria-labelledby": `${idPrefix}-title`, children: [
|
|
1730
1734
|
/* @__PURE__ */ (0, import_jsx_runtime4.jsxs)("header", { className: "devlead-notes-reader-header", children: [
|
|
1731
1735
|
/* @__PURE__ */ (0, import_jsx_runtime4.jsx)(import_dsh_client_ui_primitives3.Tooltip, { label: t("board.notes.back"), side: "right", delayMs: 300, children: /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(import_dsh_client_ui_primitives3.Button, { variant: "ghost", size: "sm", className: "devlead-notes-back", "aria-label": t("board.notes.back"), onClick: notes.onClose, children: /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(import_dsh_client_ui_primitives3.IconChevronLeftOutlineRegular, { size: 16 }) }) }),
|
|
@@ -1740,7 +1744,7 @@ window.__ModuleLoader__.load({
|
|
|
1740
1744
|
/* @__PURE__ */ (0, import_jsx_runtime4.jsxs)("header", { children: [
|
|
1741
1745
|
/* @__PURE__ */ (0, import_jsx_runtime4.jsx)("h4", { title: metadata.title, children: metadata.title }),
|
|
1742
1746
|
metadata.summary.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime4.jsx)("p", { children: metadata.summary }),
|
|
1743
|
-
/* @__PURE__ */ (0, import_jsx_runtime4.jsx)(RelativeTime, { iso: metadata.updatedAt, now, t, label: t("board.project.updated") })
|
|
1747
|
+
/* @__PURE__ */ (0, import_jsx_runtime4.jsx)(RelativeTime, { iso: liveObservedAt ?? metadata.updatedAt, now, t, label: t("board.project.updated") })
|
|
1744
1748
|
] }),
|
|
1745
1749
|
notes.note.status === "error" ? /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(NotesState, { kind: "error", t, message: notes.note.error?.message }) : notes.note.status === "empty" ? /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(NotesState, { kind: "note-empty", t }) : !documentReady ? /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(NotesState, { kind: "loading", t }) : /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(DevLeadMarkdown, { markdown: notes.note.value?.markdown ?? "" })
|
|
1746
1750
|
] })
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@yankeguo/dsh-client-ui-devlead",
|
|
3
|
-
"version": "0.4.2-rc.
|
|
3
|
+
"version": "0.4.2-rc.7",
|
|
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.2-rc.
|
|
46
|
+
"@yankeguo/dsh-devlead-protocol": "0.4.2-rc.7"
|
|
47
47
|
},
|
|
48
48
|
"engines": {
|
|
49
49
|
"dsh": ">=0.2.2-rc.1 <0.3.0"
|