@yankeguo/dsh-client-ui-devlead 0.3.0-rc.1 → 0.4.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.
Files changed (2) hide show
  1. package/lib/client.js +223 -48
  2. package/package.json +3 -2
package/lib/client.js CHANGED
@@ -62,7 +62,7 @@ window.__ModuleLoader__.load({
62
62
  return typeof value === "string" && TRANSITION_SET.has(value);
63
63
  }
64
64
  function excerptLine(text, max) {
65
- const collapsed = text.replace(/\s+/gu, " ").trim();
65
+ const collapsed = text.replace(/\s+/gu, " ").replace(/[\u0000-\u001f\u007f-\u009f]/gu, "").trim();
66
66
  if (collapsed.length === 0) return void 0;
67
67
  const budget = Number.isFinite(max) ? Math.floor(max) : Number.POSITIVE_INFINITY;
68
68
  if (budget < 1) return void 0;
@@ -128,25 +128,41 @@ window.__ModuleLoader__.load({
128
128
  function transitionLabelKey(transition) {
129
129
  return isDevLeadTransition(transition) ? TRANSITION_LABEL_KEYS[transition] : "transition.unknown";
130
130
  }
131
+ var WAKE_SUPPRESSION_KEYS = {
132
+ "merged-into-pending-wake": "notification.wake.merged",
133
+ "included-in-sent-wake": "notification.wake.included"
134
+ };
135
+ var WAKE_SUPPRESSION_SET = new Set(Object.keys(WAKE_SUPPRESSION_KEYS));
136
+ function wakeSuppressionReasonKey(reason) {
137
+ return typeof reason === "string" && WAKE_SUPPRESSION_SET.has(reason) ? WAKE_SUPPRESSION_KEYS[reason] : "notification.wake.unknown";
138
+ }
131
139
  function notificationSummary(notification) {
132
140
  const title = typeof notification.sessionTitle === "string" ? excerptLine(notification.sessionTitle, DEVLEAD_ERROR_EXCERPT_MAX) : void 0;
133
141
  const who = title ?? notification.sessionId;
134
142
  const turn = Number.isInteger(notification.turn) && notification.turn > 0 ? notification.turn : 0;
135
- const tooltip = isDevLeadTransition(notification.transition) ? notificationLine(notification) : `${who} \u2014 ${String(notification.transition)}`;
143
+ const baseTooltip = isDevLeadTransition(notification.transition) ? notificationLine(notification) : `${who} \u2014 ${String(notification.transition)}`;
144
+ const wakeSuppressedBy = typeof notification.wakeSuppressedByReportId === "string" ? excerptLine(notification.wakeSuppressedByReportId, DEVLEAD_ERROR_EXCERPT_MAX) : void 0;
145
+ const tooltip = wakeSuppressedBy === void 0 ? baseTooltip : `${baseTooltip} (wake suppressed by ${wakeSuppressedBy})`;
136
146
  const error = typeof notification.error === "string" ? excerptLine(notification.error, DEVLEAD_ERROR_EXCERPT_MAX) : void 0;
147
+ const summary = typeof notification.summary === "string" ? excerptLine(notification.summary, DEVLEAD_ERROR_EXCERPT_MAX) : void 0;
137
148
  return {
138
149
  tooltip,
139
150
  who,
140
151
  turn,
141
152
  transition: String(notification.transition),
142
153
  labelKey: transitionLabelKey(notification.transition),
143
- error
154
+ error,
155
+ summary,
156
+ wakeSuppressedBy,
157
+ wakeSuppressionKey: wakeSuppressedBy === void 0 ? void 0 : wakeSuppressionReasonKey(notification.wakeSuppressionReason)
144
158
  };
145
159
  }
146
160
  function latestNotification(notifications) {
161
+ if (!Array.isArray(notifications)) return null;
147
162
  return notifications.at(-1) ?? null;
148
163
  }
149
164
  function summarizeWatched(watchedSessions, rows, statuses) {
165
+ if (!Array.isArray(watchedSessions)) return { watched: 0, running: 0, missing: 0 };
150
166
  const seen = /* @__PURE__ */ new Set();
151
167
  let running = 0;
152
168
  let missing = 0;
@@ -171,42 +187,95 @@ window.__ModuleLoader__.load({
171
187
  function reportLabelKey(kind) {
172
188
  return isDevLeadReportKind(kind) ? REPORT_LABEL_KEYS[kind] : "report.kind.unknown";
173
189
  }
190
+ var REPORT_LANES = {
191
+ progress: "background",
192
+ blocked: "action-required",
193
+ decision: "action-required",
194
+ question: "action-required",
195
+ fyi: "background"
196
+ };
197
+ function reportLane(kind) {
198
+ return isDevLeadReportKind(kind) ? REPORT_LANES[kind] : "unknown";
199
+ }
200
+ var QUESTION_STATUS_LABEL_KEYS = {
201
+ open: "report.question.open",
202
+ answered: "report.question.answered",
203
+ expired: "report.question.expired",
204
+ cancelled: "report.question.cancelled"
205
+ };
206
+ var QUESTION_STATUS_SET = new Set(Object.keys(QUESTION_STATUS_LABEL_KEYS));
207
+ function questionStatusLabelKey(status) {
208
+ return QUESTION_STATUS_SET.has(status) ? QUESTION_STATUS_LABEL_KEYS[status] : "report.question.unknown";
209
+ }
210
+ var ANSWER_STATUS_LABEL_KEYS = {
211
+ admitted: "report.answer.admitted",
212
+ claimed: "report.answer.claimed",
213
+ presented: "report.answer.presented",
214
+ discarded: "report.answer.discarded",
215
+ failed: "report.answer.failed"
216
+ };
217
+ var ANSWER_STATUS_SET = new Set(Object.keys(ANSWER_STATUS_LABEL_KEYS));
218
+ function answerStatusLabelKey(status) {
219
+ return ANSWER_STATUS_SET.has(status) ? ANSWER_STATUS_LABEL_KEYS[status] : "report.answer.unknown";
220
+ }
174
221
  function epochMillis(value) {
175
222
  return typeof value === "number" && Number.isFinite(value) ? value : 0;
176
223
  }
224
+ function statusLine(value) {
225
+ return typeof value === "string" ? excerptLine(value, DEVLEAD_ERROR_EXCERPT_MAX) : void 0;
226
+ }
177
227
  function reportSummary(report) {
178
228
  const title = typeof report.senderSessionTitle === "string" ? excerptLine(report.senderSessionTitle, DEVLEAD_ERROR_EXCERPT_MAX) : void 0;
179
229
  const who = title ?? report.senderSessionId;
180
230
  const detail = typeof report.summary === "string" ? excerptLine(report.summary, DEVLEAD_ERROR_EXCERPT_MAX) : typeof report.message === "string" ? excerptLine(report.message, DEVLEAD_ERROR_EXCERPT_MAX) : void 0;
231
+ const isQuestion = report.kind === "question";
232
+ const questionStatus = isQuestion ? statusLine(report.questionStatus) : void 0;
233
+ const answerStatus = isQuestion ? statusLine(report.answerStatus) : void 0;
234
+ const repairPending = isQuestion && "repairPending" in report && report.repairPending === true;
235
+ const lifecycle = [questionStatus, answerStatus, repairPending ? "provisional" : void 0].filter((value) => value !== void 0).join(" \xB7 ");
236
+ const baseTooltip = isDevLeadReportKind(report.kind) ? reportLine(report) : `${who} \u2014 report ${String(report.kind)}`;
181
237
  return {
182
- tooltip: isDevLeadReportKind(report.kind) ? reportLine(report) : `${who} \u2014 report ${String(report.kind)}`,
238
+ tooltip: lifecycle.length === 0 ? baseTooltip : `${baseTooltip} (${lifecycle})`,
183
239
  who,
184
240
  kind: String(report.kind),
185
241
  labelKey: reportLabelKey(report.kind),
242
+ lane: reportLane(report.kind),
186
243
  detail,
187
- at: epochMillis(report.at)
244
+ at: epochMillis(report.at),
245
+ questionStatus,
246
+ questionStatusKey: questionStatus === void 0 ? void 0 : questionStatusLabelKey(questionStatus),
247
+ answerStatus,
248
+ answerStatusKey: answerStatus === void 0 ? void 0 : answerStatusLabelKey(answerStatus),
249
+ repairPending
188
250
  };
189
251
  }
190
252
  function latestReport(reports) {
253
+ if (!Array.isArray(reports)) return null;
191
254
  return reports.at(-1) ?? null;
192
255
  }
193
256
 
194
257
  // packages/client-ui/src/client/DevLeadBar.tsx
195
258
  var import_jsx_runtime = require("react/jsx-runtime");
196
259
  function DevLeadBar({
260
+ useSession,
197
261
  useProjection,
198
262
  useSessions,
199
263
  useSessionStatus,
200
264
  t
201
265
  }) {
266
+ const subagent = useSession((snapshot) => snapshot.subagent !== null) ?? false;
202
267
  const projection = useProjection(DEVLEAD_PROJECTION_KEY);
203
268
  const rows = useSessions((state) => state.byId);
204
269
  const statuses = useSessionStatus((current) => current);
205
270
  const enabled = projection?.enabled ?? false;
271
+ if (subagent) return null;
206
272
  if (projection === void 0 || !enabled) return null;
207
- const summary = summarizeWatched(projection.sessions, rows, statuses);
208
- const latest = latestNotification(projection.notifications);
209
- const latestRep = latestReport(projection.reports ?? []);
273
+ const watchedSessions = Array.isArray(projection.sessions) ? projection.sessions : [];
274
+ const notifications = Array.isArray(projection.notifications) ? projection.notifications : [];
275
+ const reports = Array.isArray(projection.reports) ? projection.reports : [];
276
+ const summary = summarizeWatched(watchedSessions, rows, statuses);
277
+ const latest = latestNotification(notifications);
278
+ const latestRep = latestReport(reports);
210
279
  const showReport = latestRep !== null && (latest === null || epochMillis(latestRep.at) >= epochMillis(latest.at));
211
280
  const notice = !showReport && latest !== null ? notificationSummary(latest) : null;
212
281
  const reportNotice = showReport && latestRep !== null ? reportSummary(latestRep) : null;
@@ -249,36 +318,78 @@ window.__ModuleLoader__.load({
249
318
  "aria-live": "polite",
250
319
  "aria-atomic": "true",
251
320
  title: tooltip,
252
- children: reportNotice !== null ? /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("span", { className: "devlead-notification", "data-report": "true", children: [
253
- /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
254
- "span",
255
- {
256
- className: "devlead-notification-dot",
257
- "data-report-kind": reportNotice.kind,
258
- "aria-hidden": "true"
259
- }
260
- ),
261
- /* @__PURE__ */ (0, import_jsx_runtime.jsx)("span", { className: "devlead-notification-who", children: reportNotice.who }),
262
- /* @__PURE__ */ (0, import_jsx_runtime.jsx)("span", { className: "devlead-notification-label", children: t(reportNotice.labelKey) }),
263
- reportNotice.detail !== void 0 && /* @__PURE__ */ (0, import_jsx_runtime.jsx)("span", { className: "devlead-notification-detail", children: reportNotice.detail })
264
- ] }) : notice === null ? (
321
+ children: reportNotice !== null ? (
322
+ // The lane attribute carries the delivery semantics to CSS:
323
+ // action-required kinds wear the warning ink, background kinds
324
+ // read one step quieter, and a drifted kind stays neutral.
325
+ /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("span", { className: "devlead-notification", "data-report": "true", "data-lane": reportNotice.lane, children: [
326
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
327
+ "span",
328
+ {
329
+ className: "devlead-notification-dot",
330
+ "data-report-kind": reportNotice.kind,
331
+ "aria-hidden": "true"
332
+ }
333
+ ),
334
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)("span", { className: "devlead-notification-who", children: reportNotice.who }),
335
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)("span", { className: "devlead-notification-label", children: t(reportNotice.labelKey) }),
336
+ (reportNotice.questionStatusKey !== void 0 || reportNotice.answerStatusKey !== void 0 || reportNotice.repairPending) && // Fold-derived question lifecycle (question reports only): a
337
+ // compact "answered · presented" suffix. A repair-pending row
338
+ // adds "provisional" so a stale status is not read as final.
339
+ // Raw literals ride data attributes so a drifted status stays
340
+ // inspectable while its label degrades to neutral copy.
341
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
342
+ "span",
343
+ {
344
+ className: "devlead-notification-status",
345
+ "data-question-status": reportNotice.questionStatus,
346
+ "data-answer-status": reportNotice.answerStatus,
347
+ "data-repair-pending": reportNotice.repairPending ? "true" : void 0,
348
+ children: [
349
+ reportNotice.questionStatusKey === void 0 ? void 0 : t(reportNotice.questionStatusKey),
350
+ reportNotice.answerStatusKey === void 0 ? void 0 : t(reportNotice.answerStatusKey),
351
+ reportNotice.repairPending ? t("report.question.provisional") : void 0
352
+ ].filter((part) => part !== void 0).join(" \xB7 ")
353
+ }
354
+ ),
355
+ reportNotice.detail !== void 0 && /* @__PURE__ */ (0, import_jsx_runtime.jsx)("span", { className: "devlead-notification-detail", children: reportNotice.detail })
356
+ ] })
357
+ ) : notice === null ? (
265
358
  // An enabled Session with no retained notification keeps the help
266
359
  // hint visible instead of leaving the row visually empty.
267
360
  /* @__PURE__ */ (0, import_jsx_runtime.jsx)("span", { className: "devlead-hint", children: t("hint.enabled") })
268
- ) : /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("span", { className: "devlead-notification", children: [
269
- /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
270
- "span",
271
- {
272
- className: "devlead-notification-dot",
273
- "data-transition": notice.transition,
274
- "aria-hidden": "true"
275
- }
276
- ),
277
- /* @__PURE__ */ (0, import_jsx_runtime.jsx)("span", { className: "devlead-notification-who", children: notice.who }),
278
- notice.turn > 0 && /* @__PURE__ */ (0, import_jsx_runtime.jsx)("span", { className: "devlead-notification-turn", children: t("notification.turn", { turn: notice.turn }) }),
279
- /* @__PURE__ */ (0, import_jsx_runtime.jsx)("span", { className: "devlead-notification-label", children: t(notice.labelKey) }),
280
- notice.error !== void 0 && /* @__PURE__ */ (0, import_jsx_runtime.jsx)("span", { className: "devlead-notification-error", children: notice.error })
281
- ] })
361
+ ) : /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(
362
+ "span",
363
+ {
364
+ className: "devlead-notification",
365
+ "data-wake-suppressed": notice.wakeSuppressedBy === void 0 ? void 0 : "true",
366
+ "data-wake-suppressed-by": notice.wakeSuppressedBy,
367
+ children: [
368
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
369
+ "span",
370
+ {
371
+ className: "devlead-notification-dot",
372
+ "data-transition": notice.transition,
373
+ "aria-hidden": "true"
374
+ }
375
+ ),
376
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)("span", { className: "devlead-notification-who", children: notice.who }),
377
+ notice.turn > 0 && /* @__PURE__ */ (0, import_jsx_runtime.jsx)("span", { className: "devlead-notification-turn", children: t("notification.turn", { turn: notice.turn }) }),
378
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)("span", { className: "devlead-notification-label", children: t(notice.labelKey) }),
379
+ notice.wakeSuppressionKey !== void 0 && // The separate turn-end wake was merged into an action-required
380
+ // report wake; the muted marker's title explains which rule hit.
381
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)("span", { className: "devlead-notification-wake", title: t(notice.wakeSuppressionKey), children: t("notification.wake.suppressed") }),
382
+ notice.error !== void 0 ? (
383
+ // Only a real Host failure excerpt wears the error ink.
384
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)("span", { className: "devlead-notification-error", children: notice.error })
385
+ ) : notice.summary !== void 0 ? (
386
+ // A settled turn's assistant excerpt is neutral detail, like a
387
+ // report's summary: the dot and label carry the outcome.
388
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)("span", { className: "devlead-notification-detail", children: notice.summary })
389
+ ) : null
390
+ ]
391
+ }
392
+ )
282
393
  }
283
394
  )
284
395
  ]
@@ -332,11 +443,13 @@ window.__ModuleLoader__.load({
332
443
  };
333
444
  var ALREADY_ACTIVE_PREFIX = "Another Session is already in DevLead mode: ";
334
445
  var ALREADY_ACTIVE_INSTRUCTION = ". Run /devlead off there first";
446
+ var ALREADY_ACTIVE_TAIL = `${ALREADY_ACTIVE_INSTRUCTION}, then enable this Session.`;
335
447
  function alreadyActiveDetails(message) {
336
448
  if (!message.startsWith(ALREADY_ACTIVE_PREFIX)) return void 0;
337
449
  const rest = message.slice(ALREADY_ACTIVE_PREFIX.length);
338
- const end = rest.indexOf(ALREADY_ACTIVE_INSTRUCTION);
450
+ const end = rest.lastIndexOf(ALREADY_ACTIVE_INSTRUCTION);
339
451
  if (end <= 0) return void 0;
452
+ if (rest.slice(end) !== ALREADY_ACTIVE_TAIL) return void 0;
340
453
  const session = rest.slice(0, end).trim();
341
454
  return session.length === 0 ? void 0 : { session };
342
455
  }
@@ -408,11 +521,13 @@ window.__ModuleLoader__.load({
408
521
 
409
522
  // packages/client-ui/src/client/DevLeadIconToggle.tsx
410
523
  var import_jsx_runtime2 = require("react/jsx-runtime");
411
- function DevLeadIconToggle({ useProjection, executeCommand, t }) {
524
+ function DevLeadIconToggle({ useSession, useProjection, executeCommand, t }) {
525
+ const subagent = useSession((snapshot) => snapshot.subagent !== null) ?? false;
412
526
  const projection = useProjection(DEVLEAD_PROJECTION_KEY);
413
527
  const enabled = projection?.enabled ?? false;
414
528
  const { pending, failure, run } = useDevLeadAdmission(executeCommand, enabled);
415
529
  const [attempt, setAttempt] = (0, import_react2.useState)("on");
530
+ if (subagent) return null;
416
531
  if (projection === void 0) return null;
417
532
  const direction = enabled ? "off" : "on";
418
533
  const failureText = failure === null ? null : failureMessage(failure, t);
@@ -552,14 +667,14 @@ window.__ModuleLoader__.load({
552
667
  "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",
553
668
  "bar.aria": "DevLead \u72B6\u6001\u680F",
554
669
  "label": "DevLead",
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",
670
+ "hint.enabled": "DevLead \u5DF2\u5F00\u542F\uFF1A\u5DF2\u5173\u6CE8\u4F1A\u8BDD\u7684\u8F6E\u6B21\u7ED3\u675F\u4E0E\u4E2D\u9014\u6C47\u62A5\u4F1A\u901A\u77E5\u672C\u4F1A\u8BDD\uFF1B\u963B\u585E/\u5F85\u51B3\u7B56/\u63D0\u95EE\u4F1A\u8BF7\u6C42\u5524\u9192\uFF0C\u8FDB\u5EA6/\u544A\u77E5\u4EC5\u4F5C\u80CC\u666F\u3001\u4E0D\u5524\u9192\u3002",
556
671
  "count.watched": "\u5DF2\u5173\u6CE8 {count} \u4E2A\u4F1A\u8BDD",
557
672
  "count.running": "\u8FD0\u884C\u4E2D {count}",
558
673
  "count.missing": "{count} \u4E2A\u5DF2\u4E0D\u53EF\u7528",
559
674
  "row.mark.aria": "\u5F53\u524D\u6FC0\u6D3B\u7684 DevLead \u4F1A\u8BDD",
560
675
  "row.watched.aria": "\u88AB\u5F53\u524D DevLead \u5173\u6CE8",
561
676
  "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",
677
+ "row.hover.watched": "\u88AB\u5F53\u524D DevLead \u5173\u6CE8\uFF1A\u5B83\u7684\u8F6E\u6B21\u7ED3\u675F\u4E0E\u4E2D\u9014\u6C47\u62A5\u4F1A\u901A\u77E5 lead\uFF1B\u963B\u585E/\u5F85\u51B3\u7B56/\u63D0\u95EE\u4F1A\u8BF7\u6C42\u5524\u9192\uFF0C\u8FDB\u5EA6/\u544A\u77E5\u4EC5\u4F5C\u80CC\u666F\u3001\u4E0D\u5524\u9192\u3002",
563
678
  "toggle.label": "DevLead",
564
679
  "toggle.enable": "\u5F00\u542F DevLead \u6A21\u5F0F",
565
680
  "toggle.disable": "\u5173\u95ED DevLead \u6A21\u5F0F",
@@ -575,6 +690,22 @@ window.__ModuleLoader__.load({
575
690
  "report.kind.question": "\u63D0\u95EE",
576
691
  "report.kind.fyi": "\u544A\u77E5",
577
692
  "report.kind.unknown": "\u62A5\u544A",
693
+ "report.question.open": "\u5F85\u56DE\u7B54",
694
+ "report.question.answered": "\u5DF2\u56DE\u7B54",
695
+ "report.question.expired": "\u5DF2\u8FC7\u671F",
696
+ "report.question.cancelled": "\u5DF2\u53D6\u6D88",
697
+ "report.question.unknown": "\u72B6\u6001\u672A\u77E5",
698
+ "report.question.provisional": "\u6682\u5B9A",
699
+ "report.answer.admitted": "\u5DF2\u63A5\u6536",
700
+ "report.answer.claimed": "\u5DF2\u8BA4\u9886",
701
+ "report.answer.presented": "\u5DF2\u5448\u73B0",
702
+ "report.answer.discarded": "\u5DF2\u4E22\u5F03",
703
+ "report.answer.failed": "\u6295\u9012\u5931\u8D25",
704
+ "report.answer.unknown": "\u72B6\u6001\u672A\u77E5",
705
+ "notification.wake.suppressed": "\u5E76\u5165\u62A5\u544A\u5524\u9192",
706
+ "notification.wake.merged": "\u672C\u6B21\u8F6E\u6B21\u7ED3\u675F\u5DF2\u5E76\u5165\u5C1A\u672A\u53D1\u9001\u7684\u9700\u5904\u7406\u62A5\u544A\u5524\u9192\uFF0C\u4E0D\u518D\u5355\u72EC\u5524\u9192\u3002",
707
+ "notification.wake.included": "\u5DF2\u53D1\u9001\u7684\u9700\u5904\u7406\u62A5\u544A\u5524\u9192\u5DF2\u5305\u542B\u672C\u6B21\u8F6E\u6B21\u7ED3\u675F\uFF0C\u4E0D\u518D\u5355\u72EC\u5524\u9192\u3002",
708
+ "notification.wake.unknown": "\u9700\u5904\u7406\u62A5\u544A\u7684\u5524\u9192\u5DF2\u8986\u76D6\u672C\u6B21\u8F6E\u6B21\u7ED3\u675F\uFF0C\u4E0D\u518D\u5355\u72EC\u5524\u9192\u3002",
578
709
  "transition.completed": "\u5B8C\u6210",
579
710
  "transition.error": "\u5931\u8D25",
580
711
  "transition.blocked": "\u963B\u585E",
@@ -594,14 +725,14 @@ window.__ModuleLoader__.load({
594
725
  "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.",
595
726
  "bar.aria": "DevLead status bar",
596
727
  "label": "DevLead",
597
- "hint.enabled": "DevLead is on: watched-session turn ends and mid-turn reports (including questions) notify and wake this session.",
728
+ "hint.enabled": "DevLead is on: watched-session turn ends and mid-turn reports notify this session; blocked/decision reports and questions request a wake, while progress/fyi are background context and do not wake.",
598
729
  "count.watched": "{count} watched",
599
730
  "count.running": "{count} running",
600
731
  "count.missing": "{count} unavailable",
601
732
  "row.mark.aria": "Active DevLead Session",
602
733
  "row.watched.aria": "Watched by the active DevLead",
603
734
  "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.",
735
+ "row.hover.watched": "Watched by the active DevLead: its turn ends and mid-turn reports notify the lead; blocked/decision reports and questions request a wake, while progress/fyi are background context and do not wake.",
605
736
  "toggle.label": "DevLead",
606
737
  "toggle.enable": "Turn on DevLead mode",
607
738
  "toggle.disable": "Turn off DevLead mode",
@@ -617,6 +748,22 @@ window.__ModuleLoader__.load({
617
748
  "report.kind.question": "question",
618
749
  "report.kind.fyi": "fyi",
619
750
  "report.kind.unknown": "report",
751
+ "report.question.open": "open",
752
+ "report.question.answered": "answered",
753
+ "report.question.expired": "expired",
754
+ "report.question.cancelled": "cancelled",
755
+ "report.question.unknown": "unknown status",
756
+ "report.question.provisional": "provisional",
757
+ "report.answer.admitted": "admitted",
758
+ "report.answer.claimed": "claimed",
759
+ "report.answer.presented": "presented",
760
+ "report.answer.discarded": "discarded",
761
+ "report.answer.failed": "failed",
762
+ "report.answer.unknown": "unknown status",
763
+ "notification.wake.suppressed": "wake merged",
764
+ "notification.wake.merged": "This turn end was merged into a pending action-required report wake; no separate wake was sent.",
765
+ "notification.wake.included": "The sent action-required report wake already included this turn end; no separate wake was sent.",
766
+ "notification.wake.unknown": "An action-required report wake covers this turn end; no separate wake was sent.",
620
767
  "transition.completed": "completed",
621
768
  "transition.error": "failed",
622
769
  "transition.blocked": "blocked",
@@ -871,17 +1018,28 @@ window.__ModuleLoader__.load({
871
1018
  background: var(--dsw-alias-state-warn-primary, #a15c00);
872
1019
  }
873
1020
 
874
- .devlead-notification-dot[data-report-kind="progress"] {
875
- background: var(--dsw-alias-state-success-primary, #2e7d32);
1021
+ /* Report dots follow the delivery lane: the action-required kinds (blocked/
1022
+ decision/question) share the warning ink \u2014 a blocked report is a scheduling
1023
+ fact, not a Host failure, so it must not wear the error red. Background
1024
+ kinds (progress/fyi) keep the default tertiary dot: a non-urgent update
1025
+ reads quieter than a settled outcome. */
1026
+ .devlead-notification-dot[data-report-kind="blocked"],
1027
+ .devlead-notification-dot[data-report-kind="decision"],
1028
+ .devlead-notification-dot[data-report-kind="question"] {
1029
+ background: var(--dsw-alias-state-warn-primary, #a15c00);
876
1030
  }
877
1031
 
878
- .devlead-notification-dot[data-report-kind="blocked"] {
879
- background: var(--dsw-alias-state-error-primary, #c0392b);
1032
+ /* Action-required chips wear the warning ink on the kind label so the strip
1033
+ reads "the lead must act" at a glance; colour only, never layout. */
1034
+ .devlead-notification[data-lane="action-required"] .devlead-notification-label {
1035
+ color: var(--dsw-alias-state-warn-primary, #a15c00);
880
1036
  }
881
1037
 
882
- .devlead-notification-dot[data-report-kind="decision"],
883
- .devlead-notification-dot[data-report-kind="question"] {
884
- background: var(--dsw-alias-state-warn-primary, #a15c00);
1038
+ /* Background chips are non-urgent: one uniform opacity step weakens the whole
1039
+ chip (dot, who, label, detail) without touching any box, mirroring the
1040
+ watched-row mark's quieter-ink idiom. */
1041
+ .devlead-notification[data-lane="background"] {
1042
+ opacity: 0.72;
885
1043
  }
886
1044
 
887
1045
  .devlead-notification-who {
@@ -897,6 +1055,23 @@ window.__ModuleLoader__.load({
897
1055
  flex: none;
898
1056
  }
899
1057
 
1058
+ /* Fold-derived question/answer lifecycle suffix ("answered \xB7 presented"):
1059
+ compact neutral copy \u2014 the kind dot and label carry the urgency, the suffix
1060
+ only states the lifecycle fact. */
1061
+ .devlead-notification-status {
1062
+ flex: none;
1063
+ color: var(--dsw-alias-label-secondary, GrayText);
1064
+ }
1065
+
1066
+ /* A suppressed turn-end wake keeps its transition row; only this marker is
1067
+ weakened. Tertiary ink at the detail size reads as an annotation, and the
1068
+ marker's title carries the localized explanation of which merge rule hit. */
1069
+ .devlead-notification-wake {
1070
+ flex: none;
1071
+ color: var(--dsw-alias-label-tertiary, GrayText);
1072
+ font-size: 12px;
1073
+ }
1074
+
900
1075
  /* A turn failure excerpt keeps the error ink; a report's summary/message
901
1076
  detail is neutral copy \u2014 the kind dot and localized label carry the
902
1077
  semantics, so progress/fyi/question text must not read as a failure. */
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@yankeguo/dsh-client-ui-devlead",
3
- "version": "0.3.0-rc.1",
3
+ "version": "0.4.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",
@@ -12,6 +12,7 @@
12
12
  "./package.json": "./package.json"
13
13
  },
14
14
  "files": [
15
+ "LICENSE",
15
16
  "lib",
16
17
  "locale/*.json",
17
18
  "README.md"
@@ -35,7 +36,7 @@
35
36
  "@deepseek-ai/cordis": "~4.1.0"
36
37
  },
37
38
  "dependencies": {
38
- "@yankeguo/dsh-devlead-protocol": "0.3.0-rc.1"
39
+ "@yankeguo/dsh-devlead-protocol": "0.4.0-rc.1"
39
40
  },
40
41
  "engines": {
41
42
  "dsh": ">=0.2.2-rc.1 <0.3.0"