@yankeguo/dsh-client-ui-devlead 0.2.5 → 0.3.0-rc.1
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 +11 -7
- package/lib/client.js +162 -44
- package/locale/en.json +1 -1
- package/locale/zh.json +1 -1
- package/package.json +2 -2
package/README.md
CHANGED
|
@@ -11,13 +11,15 @@ Browser half of the DevLead suite, loaded on the DSH **Web** platform.
|
|
|
11
11
|
watched/running counts, and the newest retained notification or mid-turn report (or the help
|
|
12
12
|
hint). Reports show sender, localized kind, and summary/message; the strip is display-only and
|
|
13
13
|
owns no switch.
|
|
14
|
-
- **Sidebar marks:**
|
|
15
|
-
|
|
16
|
-
`
|
|
14
|
+
- **Sidebar marks:** the active DevLead row gets a business-accent ring (scoped by the shell's
|
|
15
|
+
stable `data-row-key` row attribute through `:has`) and deliberately no trailing glyph; watched
|
|
16
|
+
non-lead rows get a quieter target glyph (`IconGoalOutlineRegular`, `sidebar.session.row.trailing`).
|
|
17
|
+
The mark predicates read the summary-sized `devLeadMode` / `devLeadWatch` projections; the row
|
|
18
|
+
hover card (`sidebar.session.row.hover`) restates active/watched for accessibility.
|
|
17
19
|
|
|
18
20
|
The browser bundle only registers into DSH client slots and sends `/devlead` commands from the
|
|
19
21
|
toolbar toggle. It has no custom Remote API, no optimistic state flips, and no direct Host access;
|
|
20
|
-
all durable state comes from the `devLead` / `devLeadMode` projections. The locale namespace is
|
|
22
|
+
all durable state comes from the `devLead` / `devLeadMode` / `devLeadWatch` projections. The locale namespace is
|
|
21
23
|
`devlead` with `zh` and `en` dictionaries.
|
|
22
24
|
|
|
23
25
|
Style injection is reference-counted across **module instances** (`Symbol.for(...)` key on `globalThis`):
|
|
@@ -26,8 +28,9 @@ still uses. The two surfaces and `useDevLeadAdmission` have React render tests u
|
|
|
26
28
|
`react-test-renderer` (devDependency only, pure node, no jsdom); the style-tag refcount is covered
|
|
27
29
|
by a second-module-instance test (`vi.resetModules()` + dynamic import).
|
|
28
30
|
|
|
29
|
-
Known UI limits: the
|
|
30
|
-
README
|
|
31
|
+
Known UI limits: the marks are subject to the projection-cache backfill described in the repository
|
|
32
|
+
README; DSH 0.2.2-rc.1 does not render the trailing seat on a blank (no-turn-yet) Session row; and
|
|
33
|
+
search results use a separate row surface without that seat, so marks are absent while searching.
|
|
31
34
|
|
|
32
35
|
## Install
|
|
33
36
|
|
|
@@ -47,7 +50,8 @@ dsh plugin --profile desktop add @yankeguo/dsh-devlead-bundle
|
|
|
47
50
|
|
|
48
51
|
`@yankeguo/dsh-client-ui-devlead` 是浏览器半边:composer 工具条里两态都存在的 DevLead
|
|
49
52
|
图标 + 文本开关(关闭态发 `/devlead on`、开启态发 `/devlead off`)、开启后的只读 DevLeadBar 状态条、
|
|
50
|
-
|
|
53
|
+
侧边栏激活 lead 的强调色行环(无行尾图标)与已关注会话的弱化准星;只读 `devLead`/`devLeadMode`/
|
|
54
|
+
`devLeadWatch` projection 并发送 `/devlead` 命令。
|
|
51
55
|
0.2.0 起样式注入用跨模块实例引用计数(HMR 新旧实例交替不误删标签),组件与准入 hook 用
|
|
52
56
|
`react-test-renderer` 做渲染测试。已知 mark 回填与 blank 行限制见根 README。完整中文文档见
|
|
53
57
|
[根 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)。
|
package/lib/client.js
CHANGED
|
@@ -36,9 +36,16 @@ window.__ModuleLoader__.load({
|
|
|
36
36
|
// packages/protocol/src/types.ts
|
|
37
37
|
var DEVLEAD_PROJECTION_KEY = "devLead";
|
|
38
38
|
var DEVLEAD_MODE_PROJECTION_KEY = "devLeadMode";
|
|
39
|
+
var DEVLEAD_WATCH_PROJECTION_KEY = "devLeadWatch";
|
|
39
40
|
var DEVLEAD_COMMAND_NAME = "devlead";
|
|
40
41
|
var DEVLEAD_ERROR_EXCERPT_MAX = 240;
|
|
41
|
-
var DEVLEAD_REPORT_KINDS = [
|
|
42
|
+
var DEVLEAD_REPORT_KINDS = [
|
|
43
|
+
"progress",
|
|
44
|
+
"blocked",
|
|
45
|
+
"decision",
|
|
46
|
+
"question",
|
|
47
|
+
"fyi"
|
|
48
|
+
];
|
|
42
49
|
|
|
43
50
|
// packages/protocol/src/format.ts
|
|
44
51
|
var DEVLEAD_TRANSITIONS = [
|
|
@@ -76,12 +83,15 @@ window.__ModuleLoader__.load({
|
|
|
76
83
|
return TRANSITION_LABELS[transition];
|
|
77
84
|
}
|
|
78
85
|
function presentLine(value) {
|
|
79
|
-
if (value
|
|
86
|
+
if (typeof value !== "string") return void 0;
|
|
80
87
|
return excerptLine(value, DEVLEAD_ERROR_EXCERPT_MAX);
|
|
81
88
|
}
|
|
89
|
+
function sessionRefLabel(sessionId, title) {
|
|
90
|
+
const line = presentLine(title);
|
|
91
|
+
return line === void 0 ? sessionId : `${line} (${sessionId})`;
|
|
92
|
+
}
|
|
82
93
|
function notificationLine(notification) {
|
|
83
|
-
const
|
|
84
|
-
const who = title === void 0 ? notification.sessionId : `${title} (${notification.sessionId})`;
|
|
94
|
+
const who = sessionRefLabel(notification.sessionId, notification.sessionTitle);
|
|
85
95
|
const error = presentLine(notification.error);
|
|
86
96
|
const detail = error ?? presentLine(notification.summary);
|
|
87
97
|
const suffix = detail === void 0 ? "" : `: ${detail}`;
|
|
@@ -91,17 +101,18 @@ window.__ModuleLoader__.load({
|
|
|
91
101
|
progress: "progress",
|
|
92
102
|
blocked: "blocked",
|
|
93
103
|
decision: "decision needed",
|
|
104
|
+
question: "question",
|
|
94
105
|
fyi: "fyi"
|
|
95
106
|
};
|
|
96
107
|
function isDevLeadReportKind(value) {
|
|
97
108
|
return typeof value === "string" && DEVLEAD_REPORT_KINDS.includes(value);
|
|
98
109
|
}
|
|
99
110
|
function reportLine(report) {
|
|
100
|
-
const
|
|
101
|
-
const
|
|
102
|
-
const detail = presentLine(report.summary) ?? excerptLine(report.message, DEVLEAD_ERROR_EXCERPT_MAX);
|
|
111
|
+
const who = sessionRefLabel(report.senderSessionId, report.senderSessionTitle);
|
|
112
|
+
const detail = presentLine(report.summary) ?? presentLine(report.message);
|
|
103
113
|
const suffix = detail === void 0 ? "" : `: ${detail}`;
|
|
104
|
-
|
|
114
|
+
const kind = REPORT_KIND_LABELS[report.kind] ?? String(report.kind);
|
|
115
|
+
return `${who} \u2014 report ${kind}${suffix}`;
|
|
105
116
|
}
|
|
106
117
|
|
|
107
118
|
// packages/client-ui/src/client/format.ts
|
|
@@ -143,7 +154,7 @@ window.__ModuleLoader__.load({
|
|
|
143
154
|
if (typeof candidate !== "string" || candidate.length === 0) continue;
|
|
144
155
|
if (seen.has(candidate)) continue;
|
|
145
156
|
seen.add(candidate);
|
|
146
|
-
const row = rows[candidate];
|
|
157
|
+
const row = Object.hasOwn(rows, candidate) ? rows[candidate] : void 0;
|
|
147
158
|
if (row === void 0) missing += 1;
|
|
148
159
|
const status = statuses?.get(candidate);
|
|
149
160
|
if (status?.running ?? row?.running ?? false) running += 1;
|
|
@@ -154,11 +165,15 @@ window.__ModuleLoader__.load({
|
|
|
154
165
|
progress: "report.kind.progress",
|
|
155
166
|
blocked: "report.kind.blocked",
|
|
156
167
|
decision: "report.kind.decision",
|
|
168
|
+
question: "report.kind.question",
|
|
157
169
|
fyi: "report.kind.fyi"
|
|
158
170
|
};
|
|
159
171
|
function reportLabelKey(kind) {
|
|
160
172
|
return isDevLeadReportKind(kind) ? REPORT_LABEL_KEYS[kind] : "report.kind.unknown";
|
|
161
173
|
}
|
|
174
|
+
function epochMillis(value) {
|
|
175
|
+
return typeof value === "number" && Number.isFinite(value) ? value : 0;
|
|
176
|
+
}
|
|
162
177
|
function reportSummary(report) {
|
|
163
178
|
const title = typeof report.senderSessionTitle === "string" ? excerptLine(report.senderSessionTitle, DEVLEAD_ERROR_EXCERPT_MAX) : void 0;
|
|
164
179
|
const who = title ?? report.senderSessionId;
|
|
@@ -169,7 +184,7 @@ window.__ModuleLoader__.load({
|
|
|
169
184
|
kind: String(report.kind),
|
|
170
185
|
labelKey: reportLabelKey(report.kind),
|
|
171
186
|
detail,
|
|
172
|
-
at:
|
|
187
|
+
at: epochMillis(report.at)
|
|
173
188
|
};
|
|
174
189
|
}
|
|
175
190
|
function latestReport(reports) {
|
|
@@ -192,7 +207,7 @@ window.__ModuleLoader__.load({
|
|
|
192
207
|
const summary = summarizeWatched(projection.sessions, rows, statuses);
|
|
193
208
|
const latest = latestNotification(projection.notifications);
|
|
194
209
|
const latestRep = latestReport(projection.reports ?? []);
|
|
195
|
-
const showReport = latestRep !== null && (latest === null || latestRep.at >= latest.at);
|
|
210
|
+
const showReport = latestRep !== null && (latest === null || epochMillis(latestRep.at) >= epochMillis(latest.at));
|
|
196
211
|
const notice = !showReport && latest !== null ? notificationSummary(latest) : null;
|
|
197
212
|
const reportNotice = showReport && latestRep !== null ? reportSummary(latestRep) : null;
|
|
198
213
|
const tooltip = reportNotice?.tooltip ?? notice?.tooltip ?? t("hint.enabled");
|
|
@@ -245,7 +260,7 @@ window.__ModuleLoader__.load({
|
|
|
245
260
|
),
|
|
246
261
|
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("span", { className: "devlead-notification-who", children: reportNotice.who }),
|
|
247
262
|
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("span", { className: "devlead-notification-label", children: t(reportNotice.labelKey) }),
|
|
248
|
-
reportNotice.detail !== void 0 && /* @__PURE__ */ (0, import_jsx_runtime.jsx)("span", { className: "devlead-notification-
|
|
263
|
+
reportNotice.detail !== void 0 && /* @__PURE__ */ (0, import_jsx_runtime.jsx)("span", { className: "devlead-notification-detail", children: reportNotice.detail })
|
|
249
264
|
] }) : notice === null ? (
|
|
250
265
|
// An enabled Session with no retained notification keeps the help
|
|
251
266
|
// hint visible instead of leaving the row visually empty.
|
|
@@ -317,23 +332,20 @@ window.__ModuleLoader__.load({
|
|
|
317
332
|
};
|
|
318
333
|
var ALREADY_ACTIVE_PREFIX = "Another Session is already in DevLead mode: ";
|
|
319
334
|
var ALREADY_ACTIVE_INSTRUCTION = ". Run /devlead off there first";
|
|
320
|
-
var ALREADY_ACTIVE_ARCHIVED_INSTRUCTION = ". That Session is archived and could not be released automatically;";
|
|
321
335
|
function alreadyActiveDetails(message) {
|
|
322
336
|
if (!message.startsWith(ALREADY_ACTIVE_PREFIX)) return void 0;
|
|
323
337
|
const rest = message.slice(ALREADY_ACTIVE_PREFIX.length);
|
|
324
|
-
const
|
|
325
|
-
const marker = archived ? ALREADY_ACTIVE_ARCHIVED_INSTRUCTION : ALREADY_ACTIVE_INSTRUCTION;
|
|
326
|
-
const end = rest.indexOf(marker);
|
|
338
|
+
const end = rest.indexOf(ALREADY_ACTIVE_INSTRUCTION);
|
|
327
339
|
if (end <= 0) return void 0;
|
|
328
340
|
const session = rest.slice(0, end).trim();
|
|
329
|
-
return session.length === 0 ? void 0 : { session
|
|
341
|
+
return session.length === 0 ? void 0 : { session };
|
|
330
342
|
}
|
|
331
343
|
function failureMessage(failure, t) {
|
|
332
344
|
if (failure.kind === "unresolved") return t("error.fallback.unresolved");
|
|
333
345
|
if (failure.kind === "rejected" && failure.message !== void 0) {
|
|
334
346
|
const active = alreadyActiveDetails(failure.message);
|
|
335
347
|
if (active !== void 0) {
|
|
336
|
-
return t(
|
|
348
|
+
return t("error.alreadyActive", { session: active.session });
|
|
337
349
|
}
|
|
338
350
|
}
|
|
339
351
|
return failure.message ?? t(FAILURE_FALLBACK_KEYS[failure.kind]);
|
|
@@ -375,16 +387,20 @@ window.__ModuleLoader__.load({
|
|
|
375
387
|
aliveRef.current = false;
|
|
376
388
|
};
|
|
377
389
|
}, []);
|
|
390
|
+
const resetKeyRef = (0, import_react.useRef)(resetKey);
|
|
378
391
|
(0, import_react.useEffect)(() => {
|
|
392
|
+
resetKeyRef.current = resetKey;
|
|
379
393
|
dispatch({ type: "reset" });
|
|
380
394
|
}, [resetKey]);
|
|
381
395
|
const run = (line) => {
|
|
382
396
|
if (!gate.tryEnter()) return;
|
|
397
|
+
const admittedKey = resetKeyRef.current;
|
|
383
398
|
dispatch({ type: "begin" });
|
|
384
399
|
void admitCommand(executeCommand, line).then((failure) => {
|
|
385
400
|
gate.leave();
|
|
386
401
|
if (!aliveRef.current) return;
|
|
387
|
-
|
|
402
|
+
const stale = resetKeyRef.current !== admittedKey;
|
|
403
|
+
dispatch({ type: "settle", failure: stale ? null : failure ?? null });
|
|
388
404
|
});
|
|
389
405
|
};
|
|
390
406
|
return { pending: state.pending, failure: state.failure, run };
|
|
@@ -457,15 +473,46 @@ window.__ModuleLoader__.load({
|
|
|
457
473
|
function devLeadRowEnabled(summary) {
|
|
458
474
|
return summary?.projectionValues?.[DEVLEAD_MODE_PROJECTION_KEY]?.enabled === true;
|
|
459
475
|
}
|
|
476
|
+
function devLeadRowSummaryOf(byId, sessionId) {
|
|
477
|
+
return Object.hasOwn(byId, sessionId) ? byId[sessionId] : void 0;
|
|
478
|
+
}
|
|
479
|
+
var watchedIdsCache = /* @__PURE__ */ new WeakMap();
|
|
480
|
+
function watchedIdsOf(byId) {
|
|
481
|
+
const cached = watchedIdsCache.get(byId);
|
|
482
|
+
if (cached !== void 0) return cached;
|
|
483
|
+
const watched = /* @__PURE__ */ new Set();
|
|
484
|
+
for (const [leadId, lead] of Object.entries(byId)) {
|
|
485
|
+
if (!devLeadRowEnabled(lead)) continue;
|
|
486
|
+
const sessions = lead?.projectionValues?.[DEVLEAD_WATCH_PROJECTION_KEY]?.sessions;
|
|
487
|
+
if (!Array.isArray(sessions)) continue;
|
|
488
|
+
for (const candidate of sessions) {
|
|
489
|
+
if (typeof candidate !== "string" || candidate.length === 0 || candidate === leadId) continue;
|
|
490
|
+
watched.add(candidate);
|
|
491
|
+
}
|
|
492
|
+
}
|
|
493
|
+
watchedIdsCache.set(byId, watched);
|
|
494
|
+
return watched;
|
|
495
|
+
}
|
|
496
|
+
function devLeadRowWatched(sessionId, byId) {
|
|
497
|
+
if (devLeadRowEnabled(devLeadRowSummaryOf(byId, sessionId))) return false;
|
|
498
|
+
return watchedIdsOf(byId).has(sessionId);
|
|
499
|
+
}
|
|
460
500
|
|
|
461
501
|
// packages/client-ui/src/client/DevLeadSessionHoverMark.tsx
|
|
462
502
|
var import_jsx_runtime3 = require("react/jsx-runtime");
|
|
463
503
|
function DevLeadSessionHoverMark({ sessionId, useSessions, t }) {
|
|
464
|
-
const enabled = useSessions((state) => devLeadRowEnabled(state.byId
|
|
465
|
-
|
|
466
|
-
|
|
467
|
-
/* @__PURE__ */ (0, import_jsx_runtime3.
|
|
468
|
-
|
|
504
|
+
const enabled = useSessions((state) => devLeadRowEnabled(devLeadRowSummaryOf(state.byId, sessionId)));
|
|
505
|
+
const watched = useSessions((state) => devLeadRowWatched(sessionId, state.byId));
|
|
506
|
+
if (enabled) {
|
|
507
|
+
return /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)("div", { className: "devlead-row-hover", "data-devlead-row-hover": "true", children: [
|
|
508
|
+
/* @__PURE__ */ (0, import_jsx_runtime3.jsx)("span", { className: "devlead-row-hover-glyph", "aria-hidden": "true", children: /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("span", { className: "devlead-row-hover-active-dot" }) }),
|
|
509
|
+
/* @__PURE__ */ (0, import_jsx_runtime3.jsx)("span", { children: t("row.hover.enabled") })
|
|
510
|
+
] });
|
|
511
|
+
}
|
|
512
|
+
if (!watched) return null;
|
|
513
|
+
return /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)("div", { className: "devlead-row-hover", "data-devlead-row-hover": "true", "data-devlead-row-watched": "true", children: [
|
|
514
|
+
/* @__PURE__ */ (0, import_jsx_runtime3.jsx)("span", { className: "devlead-row-hover-glyph", "aria-hidden": "true", children: /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(import_dsh_client_ui_primitives3.IconGoalOutlineRegular, { size: 14 }) }),
|
|
515
|
+
/* @__PURE__ */ (0, import_jsx_runtime3.jsx)("span", { children: t("row.hover.watched") })
|
|
469
516
|
] });
|
|
470
517
|
}
|
|
471
518
|
|
|
@@ -473,16 +520,28 @@ window.__ModuleLoader__.load({
|
|
|
473
520
|
var import_dsh_client_ui_primitives4 = require("@deepseek-ai/dsh-client-ui-primitives");
|
|
474
521
|
var import_jsx_runtime4 = require("react/jsx-runtime");
|
|
475
522
|
function DevLeadSessionMark({ sessionId, useSessions, t }) {
|
|
476
|
-
const enabled = useSessions((state) => devLeadRowEnabled(state.byId
|
|
477
|
-
|
|
523
|
+
const enabled = useSessions((state) => devLeadRowEnabled(devLeadRowSummaryOf(state.byId, sessionId)));
|
|
524
|
+
const watched = useSessions((state) => devLeadRowWatched(sessionId, state.byId));
|
|
525
|
+
if (enabled) {
|
|
526
|
+
return /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(
|
|
527
|
+
"span",
|
|
528
|
+
{
|
|
529
|
+
className: "devlead-sr-only",
|
|
530
|
+
role: "img",
|
|
531
|
+
"aria-label": t("row.mark.aria"),
|
|
532
|
+
"data-devlead-active-mark": "true"
|
|
533
|
+
}
|
|
534
|
+
);
|
|
535
|
+
}
|
|
536
|
+
if (!watched) return null;
|
|
478
537
|
return /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(
|
|
479
538
|
"span",
|
|
480
539
|
{
|
|
481
|
-
className: "devlead-row-mark",
|
|
540
|
+
className: "devlead-row-mark devlead-row-mark-watched",
|
|
482
541
|
role: "img",
|
|
483
|
-
"aria-label": t("row.
|
|
484
|
-
"data-devlead-row-mark": "
|
|
485
|
-
children: /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(import_dsh_client_ui_primitives4.
|
|
542
|
+
"aria-label": t("row.watched.aria"),
|
|
543
|
+
"data-devlead-row-mark": "watched",
|
|
544
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(import_dsh_client_ui_primitives4.IconGoalOutlineRegular, { size: 13 })
|
|
486
545
|
}
|
|
487
546
|
);
|
|
488
547
|
}
|
|
@@ -490,15 +549,17 @@ window.__ModuleLoader__.load({
|
|
|
490
549
|
// packages/client-ui/src/client/locales.ts
|
|
491
550
|
var zh = {
|
|
492
551
|
"meta.title": "DevLead \u754C\u9762",
|
|
493
|
-
"meta.description": "DevLead \u6A21\u5F0F\u7684 Web \u754C\u9762\uFF1A\u8F93\u5165\u6846\u5DE5\u5177\u6761\u7684 DevLead \u5F00\u5173\uFF08\u4E24\u6001\u5747\u53EF\u5207\u6362\uFF09\u3001\u6A21\u5F0F\u5F00\u542F\u540E\u663E\u793A\u7684\u72B6\u6001\u6761\uFF0C\u4EE5\u53CA\u4FA7\u8FB9\u680F\u4E2D\u5DF2\
|
|
552
|
+
"meta.description": "DevLead \u6A21\u5F0F\u7684 Web \u754C\u9762\uFF1A\u8F93\u5165\u6846\u5DE5\u5177\u6761\u7684 DevLead \u5F00\u5173\uFF08\u4E24\u6001\u5747\u53EF\u5207\u6362\uFF09\u3001\u6A21\u5F0F\u5F00\u542F\u540E\u663E\u793A\u7684\u72B6\u6001\u6761\uFF0C\u4EE5\u53CA\u4FA7\u8FB9\u680F\u4E2D\u6FC0\u6D3B DevLead \u884C\u4E0E\u5DF2\u5173\u6CE8\u4F1A\u8BDD\u7684\u6807\u8BB0\u3002",
|
|
494
553
|
"bar.aria": "DevLead \u72B6\u6001\u680F",
|
|
495
554
|
"label": "DevLead",
|
|
496
|
-
"hint.enabled": "DevLead \u5DF2\u5F00\u542F\uFF1A\
|
|
497
|
-
"count.watched": "\
|
|
555
|
+
"hint.enabled": "DevLead \u5DF2\u5F00\u542F\uFF1A\u5DF2\u5173\u6CE8\u4F1A\u8BDD\u7684\u8F6E\u6B21\u7ED3\u675F\u4E0E\u4E2D\u9014\u6C47\u62A5\uFF08\u542B\u63D0\u95EE\uFF09\u4F1A\u901A\u77E5\u5E76\u5524\u9192\u672C\u4F1A\u8BDD\u3002",
|
|
556
|
+
"count.watched": "\u5DF2\u5173\u6CE8 {count} \u4E2A\u4F1A\u8BDD",
|
|
498
557
|
"count.running": "\u8FD0\u884C\u4E2D {count}",
|
|
499
558
|
"count.missing": "{count} \u4E2A\u5DF2\u4E0D\u53EF\u7528",
|
|
500
|
-
"row.mark.aria": "
|
|
501
|
-
"row.
|
|
559
|
+
"row.mark.aria": "\u5F53\u524D\u6FC0\u6D3B\u7684 DevLead \u4F1A\u8BDD",
|
|
560
|
+
"row.watched.aria": "\u88AB\u5F53\u524D DevLead \u5173\u6CE8",
|
|
561
|
+
"row.hover.enabled": "\u5F53\u524D\u6FC0\u6D3B\u7684 DevLead \u4F1A\u8BDD\uFF1A\u53EF\u8C03\u5EA6\u5E76\u5173\u6CE8\u5176\u4ED6\u4F1A\u8BDD\u3002",
|
|
562
|
+
"row.hover.watched": "\u88AB\u5F53\u524D DevLead \u5173\u6CE8\uFF1A\u5B83\u7684\u8F6E\u6B21\u7ED3\u675F\u4E0E\u4E2D\u9014\u6C47\u62A5\uFF08\u542B\u63D0\u95EE\uFF09\u4F1A\u901A\u77E5\u5E76\u5524\u9192 lead\u3002",
|
|
502
563
|
"toggle.label": "DevLead",
|
|
503
564
|
"toggle.enable": "\u5F00\u542F DevLead \u6A21\u5F0F",
|
|
504
565
|
"toggle.disable": "\u5173\u95ED DevLead \u6A21\u5F0F",
|
|
@@ -511,6 +572,7 @@ window.__ModuleLoader__.load({
|
|
|
511
572
|
"report.kind.progress": "\u8FDB\u5EA6",
|
|
512
573
|
"report.kind.blocked": "\u963B\u585E",
|
|
513
574
|
"report.kind.decision": "\u5F85\u51B3\u7B56",
|
|
575
|
+
"report.kind.question": "\u63D0\u95EE",
|
|
514
576
|
"report.kind.fyi": "\u544A\u77E5",
|
|
515
577
|
"report.kind.unknown": "\u62A5\u544A",
|
|
516
578
|
"transition.completed": "\u5B8C\u6210",
|
|
@@ -522,7 +584,6 @@ window.__ModuleLoader__.load({
|
|
|
522
584
|
"transition.forked": "\u5DF2\u5206\u53C9",
|
|
523
585
|
"transition.unknown": "\u672A\u77E5\u72B6\u6001",
|
|
524
586
|
"error.alreadyActive": "\u53E6\u4E00\u4E2A\u4F1A\u8BDD\u5DF2\u5904\u4E8E DevLead \u6A21\u5F0F\uFF1A{session}\u3002\u8BF7\u5148\u5728\u90A3\u91CC\u6267\u884C /devlead off\uFF0C\u518D\u5F00\u542F\u672C\u4F1A\u8BDD\u3002",
|
|
525
|
-
"error.alreadyActive.archived": "\u53E6\u4E00\u4E2A\u4F1A\u8BDD\u5DF2\u5904\u4E8E DevLead \u6A21\u5F0F\uFF1A{session}\u3002\u8BE5\u4F1A\u8BDD\u5DF2\u5F52\u6863\u4E14\u65E0\u6CD5\u81EA\u52A8\u91CA\u653E\uFF1B\u8BF7\u6253\u5F00\u5B83\uFF0C\u6267\u884C /devlead off \u540E\u91CD\u8BD5\u3002",
|
|
526
587
|
"error.fallback.transport": "\u547D\u4EE4\u5931\u8D25",
|
|
527
588
|
"error.fallback.rejected": "\u547D\u4EE4\u88AB\u62D2\u7EDD",
|
|
528
589
|
"error.fallback.unknown": "\u672A\u77E5\u9519\u8BEF",
|
|
@@ -530,15 +591,17 @@ window.__ModuleLoader__.load({
|
|
|
530
591
|
};
|
|
531
592
|
var en = {
|
|
532
593
|
"meta.title": "DevLead UI",
|
|
533
|
-
"meta.description": "Web UI for DevLead mode: the composer-toolbar toggle that switches the mode on or off, the status strip shown while the mode is on, and the DevLead
|
|
594
|
+
"meta.description": "Web UI for DevLead mode: the composer-toolbar toggle that switches the mode on or off, the status strip shown while the mode is on, and the active-DevLead and watched-session marks in the sidebar.",
|
|
534
595
|
"bar.aria": "DevLead status bar",
|
|
535
596
|
"label": "DevLead",
|
|
536
|
-
"hint.enabled": "DevLead is on: watched-session turn
|
|
597
|
+
"hint.enabled": "DevLead is on: watched-session turn ends and mid-turn reports (including questions) notify and wake this session.",
|
|
537
598
|
"count.watched": "{count} watched",
|
|
538
599
|
"count.running": "{count} running",
|
|
539
600
|
"count.missing": "{count} unavailable",
|
|
540
|
-
"row.mark.aria": "DevLead
|
|
541
|
-
"row.
|
|
601
|
+
"row.mark.aria": "Active DevLead Session",
|
|
602
|
+
"row.watched.aria": "Watched by the active DevLead",
|
|
603
|
+
"row.hover.enabled": "Active DevLead Session: this session can dispatch and watch other Sessions.",
|
|
604
|
+
"row.hover.watched": "Watched by the active DevLead: its turn ends and mid-turn reports (including questions) notify and wake the lead.",
|
|
542
605
|
"toggle.label": "DevLead",
|
|
543
606
|
"toggle.enable": "Turn on DevLead mode",
|
|
544
607
|
"toggle.disable": "Turn off DevLead mode",
|
|
@@ -551,6 +614,7 @@ window.__ModuleLoader__.load({
|
|
|
551
614
|
"report.kind.progress": "progress",
|
|
552
615
|
"report.kind.blocked": "blocked",
|
|
553
616
|
"report.kind.decision": "decision",
|
|
617
|
+
"report.kind.question": "question",
|
|
554
618
|
"report.kind.fyi": "fyi",
|
|
555
619
|
"report.kind.unknown": "report",
|
|
556
620
|
"transition.completed": "completed",
|
|
@@ -562,7 +626,6 @@ window.__ModuleLoader__.load({
|
|
|
562
626
|
"transition.forked": "forked",
|
|
563
627
|
"transition.unknown": "unknown state",
|
|
564
628
|
"error.alreadyActive": "Another Session is already in DevLead mode: {session}. Run /devlead off there first, then enable this Session.",
|
|
565
|
-
"error.alreadyActive.archived": "Another Session is already in DevLead mode: {session}. That Session is archived and could not be released automatically; open it, run /devlead off, then retry.",
|
|
566
629
|
"error.fallback.transport": "command failed",
|
|
567
630
|
"error.fallback.rejected": "command rejected",
|
|
568
631
|
"error.fallback.unknown": "unknown error",
|
|
@@ -816,7 +879,8 @@ window.__ModuleLoader__.load({
|
|
|
816
879
|
background: var(--dsw-alias-state-error-primary, #c0392b);
|
|
817
880
|
}
|
|
818
881
|
|
|
819
|
-
.devlead-notification-dot[data-report-kind="decision"]
|
|
882
|
+
.devlead-notification-dot[data-report-kind="decision"],
|
|
883
|
+
.devlead-notification-dot[data-report-kind="question"] {
|
|
820
884
|
background: var(--dsw-alias-state-warn-primary, #a15c00);
|
|
821
885
|
}
|
|
822
886
|
|
|
@@ -833,15 +897,26 @@ window.__ModuleLoader__.load({
|
|
|
833
897
|
flex: none;
|
|
834
898
|
}
|
|
835
899
|
|
|
836
|
-
|
|
900
|
+
/* A turn failure excerpt keeps the error ink; a report's summary/message
|
|
901
|
+
detail is neutral copy \u2014 the kind dot and localized label carry the
|
|
902
|
+
semantics, so progress/fyi/question text must not read as a failure. */
|
|
903
|
+
.devlead-notification-error,
|
|
904
|
+
.devlead-notification-detail {
|
|
837
905
|
flex: 0 1 auto;
|
|
838
906
|
min-width: 0;
|
|
839
907
|
overflow: hidden;
|
|
840
|
-
color: var(--dsw-alias-label-error, #c0392b);
|
|
841
908
|
font-size: 12px;
|
|
842
909
|
text-overflow: ellipsis;
|
|
843
910
|
}
|
|
844
911
|
|
|
912
|
+
.devlead-notification-error {
|
|
913
|
+
color: var(--dsw-alias-label-error, #c0392b);
|
|
914
|
+
}
|
|
915
|
+
|
|
916
|
+
.devlead-notification-detail {
|
|
917
|
+
color: var(--dsw-alias-label-secondary, GrayText);
|
|
918
|
+
}
|
|
919
|
+
|
|
845
920
|
/* Visually hidden but announced: the compact toolbar surface has no inline
|
|
846
921
|
error seat, so its failure text is mirrored into a live region through this
|
|
847
922
|
class (the shipped visually-hidden idiom used by the chat surfaces). */
|
|
@@ -864,8 +939,51 @@ window.__ModuleLoader__.load({
|
|
|
864
939
|
color: var(--dsw-alias-label-secondary, GrayText);
|
|
865
940
|
}
|
|
866
941
|
|
|
942
|
+
/* The active lead row gets the same business accent as the toolbar toggle,
|
|
943
|
+
painted as an overlay ring so the 32px row box, padding, and title lane never
|
|
944
|
+
move. Do not color or resize the shell row's border: it has a 3px transparent
|
|
945
|
+
border-inline (paint inset) but no top/bottom border, and an inset box-shadow
|
|
946
|
+
is clipped to the padding box, so either would look thicker/deeper on the
|
|
947
|
+
left/right than on top/bottom. The ::after overlay is positioned against the
|
|
948
|
+
row's border box (negative inline offsets cancel the transparent paint inset)
|
|
949
|
+
and draws one 1px border plus a light outer halo on all four sides at the
|
|
950
|
+
row's own radius. The row owns a stable data-row-key; :has scopes the
|
|
951
|
+
decoration to exactly the active row. The status hook stays mounted while the
|
|
952
|
+
shell hides the resting seat on hover, so the overlay survives hover/focus. */
|
|
953
|
+
[data-row-key^="session:"]:has([data-devlead-active-mark="true"]) {
|
|
954
|
+
position: relative;
|
|
955
|
+
}
|
|
956
|
+
|
|
957
|
+
[data-row-key^="session:"]:has([data-devlead-active-mark="true"])::after {
|
|
958
|
+
content: '';
|
|
959
|
+
position: absolute;
|
|
960
|
+
inset: 0 calc(-1 * var(--dsh-sidebar-paint-inset, 3px));
|
|
961
|
+
border: 1px solid var(--dsw-alias-state-business-primary, #4176e6);
|
|
962
|
+
border-radius: inherit;
|
|
963
|
+
box-shadow: 0 0 0 2px var(--dsw-alias-state-business-tertiary, rgba(65, 118, 230, 0.12));
|
|
964
|
+
pointer-events: none;
|
|
965
|
+
}
|
|
966
|
+
|
|
967
|
+
/* A watched row uses a quieter shield than the active lead's mark: secondary
|
|
968
|
+
ink at reduced opacity stays legible in both palettes without competing with
|
|
969
|
+
the active ring. */
|
|
970
|
+
.devlead-row-mark-watched {
|
|
971
|
+
color: var(--dsw-alias-label-secondary, GrayText);
|
|
972
|
+
opacity: 0.62;
|
|
973
|
+
}
|
|
974
|
+
|
|
867
975
|
/* Hover-card line explaining the mark; mirrors the shell's hover status rows
|
|
868
976
|
(12px text on a 20px line) so the card keeps one rhythm. */
|
|
977
|
+
.devlead-row-hover-active-dot {
|
|
978
|
+
display: inline-block;
|
|
979
|
+
flex: none;
|
|
980
|
+
box-sizing: border-box;
|
|
981
|
+
width: 8px;
|
|
982
|
+
height: 8px;
|
|
983
|
+
border: 1px solid var(--dsw-alias-state-business-primary, #4176e6);
|
|
984
|
+
border-radius: 999px;
|
|
985
|
+
}
|
|
986
|
+
|
|
869
987
|
.devlead-row-hover {
|
|
870
988
|
display: flex;
|
|
871
989
|
align-items: center;
|
package/locale/en.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"meta": {
|
|
3
3
|
"title": "DevLead UI",
|
|
4
|
-
"description": "Web UI for DevLead mode: the composer-toolbar toggle that switches the mode on or off, the status strip shown while the mode is on, and the DevLead
|
|
4
|
+
"description": "Web UI for DevLead mode: the composer-toolbar toggle that switches the mode on or off, the status strip shown while the mode is on, and the active-DevLead and watched-session marks in the sidebar."
|
|
5
5
|
}
|
|
6
6
|
}
|
package/locale/zh.json
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@yankeguo/dsh-client-ui-devlead",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.3.0-rc.1",
|
|
4
4
|
"description": "DevLead surfaces: the composer-toolbar toggle that switches the mode on or off, the status strip above the composer while the mode is on, and a DevLead mark on the Session's sidebar row.",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"type": "module",
|
|
@@ -35,7 +35,7 @@
|
|
|
35
35
|
"@deepseek-ai/cordis": "~4.1.0"
|
|
36
36
|
},
|
|
37
37
|
"dependencies": {
|
|
38
|
-
"@yankeguo/dsh-devlead-protocol": "0.
|
|
38
|
+
"@yankeguo/dsh-devlead-protocol": "0.3.0-rc.1"
|
|
39
39
|
},
|
|
40
40
|
"engines": {
|
|
41
41
|
"dsh": ">=0.2.2-rc.1 <0.3.0"
|