@yankeguo/dsh-client-ui-devlead 0.1.0 → 0.1.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 +216 -106
  2. package/package.json +2 -2
package/lib/client.js CHANGED
@@ -31,9 +31,11 @@ window.__ModuleLoader__.load({
31
31
  module.exports = __toCommonJS(index_exports);
32
32
 
33
33
  // packages/client-ui/src/client/DevLeadBar.tsx
34
- var import_react = require("react");
35
34
  var import_dsh_client_ui_primitives = require("@deepseek-ai/dsh-client-ui-primitives");
36
35
 
36
+ // packages/protocol/src/types.ts
37
+ var DEVLEAD_PROJECTION_KEY = "devLead";
38
+
37
39
  // packages/protocol/src/format.ts
38
40
  var DEVLEAD_TRANSITIONS = [
39
41
  "completed",
@@ -44,8 +46,9 @@ window.__ModuleLoader__.load({
44
46
  "interrupted",
45
47
  "forked"
46
48
  ];
49
+ var TRANSITION_SET = new Set(DEVLEAD_TRANSITIONS);
47
50
  function isDevLeadTransition(value) {
48
- return typeof value === "string" && DEVLEAD_TRANSITIONS.includes(value);
51
+ return typeof value === "string" && TRANSITION_SET.has(value);
49
52
  }
50
53
  var TRANSITION_LABELS = {
51
54
  completed: "completed",
@@ -59,33 +62,32 @@ window.__ModuleLoader__.load({
59
62
  function transitionLabel(transition) {
60
63
  return TRANSITION_LABELS[transition];
61
64
  }
65
+ function presentLine(value) {
66
+ if (value === void 0) return void 0;
67
+ const trimmed = value.trim();
68
+ return trimmed.length === 0 ? void 0 : trimmed;
69
+ }
62
70
  function notificationLine(notification) {
63
- const who = notification.sessionTitle === void 0 ? notification.sessionId : `${notification.sessionTitle} (${notification.sessionId})`;
64
- const error = notification.error === void 0 ? "" : `: ${notification.error}`;
65
- const summary = notification.error === void 0 && notification.summary !== void 0 ? `: ${notification.summary}` : "";
66
- return `${who} \u2014 turn ${notification.turn} ${transitionLabel(notification.transition)}${error}${summary}`;
71
+ const title = presentLine(notification.sessionTitle);
72
+ const who = title === void 0 ? notification.sessionId : `${title} (${notification.sessionId})`;
73
+ const error = presentLine(notification.error);
74
+ const detail = error ?? presentLine(notification.summary);
75
+ const suffix = detail === void 0 ? "" : `: ${detail}`;
76
+ return `${who} \u2014 turn ${notification.turn} ${transitionLabel(notification.transition)}${suffix}`;
67
77
  }
68
78
 
69
79
  // packages/client-ui/src/client/format.ts
80
+ var TRANSITION_LABEL_KEYS = {
81
+ completed: "transition.completed",
82
+ error: "transition.error",
83
+ blocked: "transition.blocked",
84
+ aborted: "transition.aborted",
85
+ "max-tokens": "transition.max-tokens",
86
+ interrupted: "transition.interrupted",
87
+ forked: "transition.forked"
88
+ };
70
89
  function transitionLabelKey(transition) {
71
- switch (transition) {
72
- case "completed":
73
- return "transition.completed";
74
- case "error":
75
- return "transition.error";
76
- case "blocked":
77
- return "transition.blocked";
78
- case "aborted":
79
- return "transition.aborted";
80
- case "max-tokens":
81
- return "transition.max-tokens";
82
- case "interrupted":
83
- return "transition.interrupted";
84
- case "forked":
85
- return "transition.forked";
86
- default:
87
- return "transition.unknown";
88
- }
90
+ return isDevLeadTransition(transition) ? TRANSITION_LABEL_KEYS[transition] : "transition.unknown";
89
91
  }
90
92
  function notificationSummary(notification) {
91
93
  const rawTitle = typeof notification.sessionTitle === "string" ? notification.sessionTitle.trim() : "";
@@ -123,27 +125,41 @@ window.__ModuleLoader__.load({
123
125
 
124
126
  // packages/client-ui/src/client/results.ts
125
127
  var REJECTED_FALLBACK = "command rejected";
128
+ var TRANSPORT_FALLBACK = "command failed";
126
129
  var UNEXPECTED_FALLBACK = "unknown error";
130
+ var UNRESOLVED_TEXT = "the Host did not recognize the command line";
131
+ function presentMessage(value) {
132
+ if (value === void 0) return void 0;
133
+ const trimmed = value.trim();
134
+ return trimmed.length === 0 ? void 0 : trimmed;
135
+ }
127
136
  function commandFailure(result) {
128
137
  if (!result.ok) {
129
- return { kind: "transport", message: result.error.message, code: result.error.code };
138
+ return {
139
+ kind: "transport",
140
+ message: presentMessage(result.error.message) ?? TRANSPORT_FALLBACK,
141
+ code: result.error.code
142
+ };
130
143
  }
131
144
  const outcome = result.value?.result;
132
145
  if (outcome === void 0 || outcome.kind !== "error") return void 0;
133
- return { kind: "rejected", message: outcome.text ?? REJECTED_FALLBACK };
146
+ return { kind: "rejected", message: presentMessage(outcome.text) ?? REJECTED_FALLBACK };
134
147
  }
135
148
  function unexpectedFailure(error) {
136
- return { kind: "unexpected", message: error instanceof Error ? error.message : UNEXPECTED_FALLBACK };
149
+ const message = error instanceof Error ? presentMessage(error.message) : void 0;
150
+ return { kind: "unexpected", message: message ?? UNEXPECTED_FALLBACK };
137
151
  }
138
152
  async function admitCommand(executeCommand, line) {
139
153
  try {
140
- return commandFailure(await executeCommand(line));
154
+ const result = await executeCommand(line);
155
+ if (result.ok && result.value === void 0) return { kind: "unresolved", line };
156
+ return commandFailure(result);
141
157
  } catch (error) {
142
158
  return unexpectedFailure(error);
143
159
  }
144
160
  }
145
161
  function failureMessage(failure) {
146
- return failure.message;
162
+ return failure.kind === "unresolved" ? UNRESOLVED_TEXT : failure.message;
147
163
  }
148
164
  function failureCopy(failure) {
149
165
  switch (failure.kind) {
@@ -153,9 +169,62 @@ window.__ModuleLoader__.load({
153
169
  return { key: "error.rejected", params: { message: failure.message } };
154
170
  case "unexpected":
155
171
  return { key: "error.unknown", params: { message: failure.message } };
172
+ case "unresolved":
173
+ return { key: "error.unresolved", params: { line: failure.line } };
174
+ }
175
+ }
176
+ function createDevLeadAdmissionGate() {
177
+ let entered = false;
178
+ return {
179
+ tryEnter: () => {
180
+ if (entered) return false;
181
+ entered = true;
182
+ return true;
183
+ },
184
+ leave: () => {
185
+ entered = false;
186
+ }
187
+ };
188
+ }
189
+ var DEVLEAD_ADMISSION_IDLE = { pending: false, failure: null };
190
+ function devLeadAdmissionReducer(state, action) {
191
+ switch (action.type) {
192
+ case "begin":
193
+ return state.pending && state.failure === null ? state : { pending: true, failure: null };
194
+ case "settle":
195
+ return state.pending || state.failure !== action.failure ? { pending: false, failure: action.failure } : state;
196
+ case "reset":
197
+ return state.failure === null ? state : { pending: state.pending, failure: null };
156
198
  }
157
199
  }
158
200
 
201
+ // packages/client-ui/src/client/useDevLeadAdmission.ts
202
+ var import_react = require("react");
203
+ function useDevLeadAdmission(executeCommand, resetKey) {
204
+ const [state, dispatch] = (0, import_react.useReducer)(devLeadAdmissionReducer, DEVLEAD_ADMISSION_IDLE);
205
+ const [gate] = (0, import_react.useState)(createDevLeadAdmissionGate);
206
+ const aliveRef = (0, import_react.useRef)(true);
207
+ (0, import_react.useEffect)(() => {
208
+ aliveRef.current = true;
209
+ return () => {
210
+ aliveRef.current = false;
211
+ };
212
+ }, []);
213
+ (0, import_react.useEffect)(() => {
214
+ dispatch({ type: "reset" });
215
+ }, [resetKey]);
216
+ const run = (line) => {
217
+ if (!gate.tryEnter()) return;
218
+ dispatch({ type: "begin" });
219
+ void admitCommand(executeCommand, line).then((failure) => {
220
+ gate.leave();
221
+ if (!aliveRef.current) return;
222
+ dispatch({ type: "settle", failure: failure ?? null });
223
+ });
224
+ };
225
+ return { pending: state.pending, failure: state.failure, run };
226
+ }
227
+
159
228
  // packages/client-ui/src/client/DevLeadBar.tsx
160
229
  var import_jsx_runtime = require("react/jsx-runtime");
161
230
  function DevLeadBar({
@@ -165,16 +234,11 @@ window.__ModuleLoader__.load({
165
234
  executeCommand,
166
235
  t
167
236
  }) {
168
- const projection = useProjection("devLead");
237
+ const projection = useProjection(DEVLEAD_PROJECTION_KEY);
169
238
  const rows = useSessions((state) => state.byId);
170
239
  const statuses = useSessionStatus((current) => current);
171
240
  const enabled = projection?.enabled ?? false;
172
- const [pending, setPending] = (0, import_react.useState)(false);
173
- const [failure, setFailure] = (0, import_react.useState)(null);
174
- const pendingRef = (0, import_react.useRef)(false);
175
- (0, import_react.useEffect)(() => {
176
- setFailure(null);
177
- }, [enabled]);
241
+ const { pending, failure, run } = useDevLeadAdmission(executeCommand, enabled);
178
242
  if (projection === void 0 || !enabled) return null;
179
243
  const summary = summarizeWatched(projection.sessions, rows, statuses);
180
244
  const latest = latestNotification(projection.notifications);
@@ -182,15 +246,8 @@ window.__ModuleLoader__.load({
182
246
  const failureLine = failure === null ? null : failureCopy(failure);
183
247
  const switchTitle = pending ? t("switch.pending") : t("switch.disable");
184
248
  const toggle = (next) => {
185
- if (next || pendingRef.current) return;
186
- pendingRef.current = true;
187
- setPending(true);
188
- setFailure(null);
189
- void admitCommand(executeCommand, "/devlead off").then((rejected) => {
190
- pendingRef.current = false;
191
- setPending(false);
192
- if (rejected !== void 0) setFailure(rejected);
193
- });
249
+ if (next) return;
250
+ run("/devlead off");
194
251
  };
195
252
  return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
196
253
  "div",
@@ -236,24 +293,34 @@ window.__ModuleLoader__.load({
236
293
  ] }),
237
294
  summary.missing > 0 && /* @__PURE__ */ (0, import_jsx_runtime.jsx)("span", { className: "devlead-missing", title: t("count.missing", { count: summary.missing }), children: t("count.missing", { count: summary.missing }) })
238
295
  ] }),
239
- notice === null ? (
240
- // An enabled Session with no retained notification keeps the help
241
- // hint visible instead of leaving the row visually empty.
242
- /* @__PURE__ */ (0, import_jsx_runtime.jsx)("span", { className: "devlead-hint", title: t("hint.enabled"), children: t("hint.enabled") })
243
- ) : /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("span", { className: "devlead-notification", title: notice.tooltip, children: [
244
- /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
245
- "span",
246
- {
247
- className: "devlead-notification-dot",
248
- "data-transition": notice.transition,
249
- "aria-hidden": "true"
250
- }
251
- ),
252
- /* @__PURE__ */ (0, import_jsx_runtime.jsx)("span", { className: "devlead-notification-who", children: notice.who }),
253
- notice.turn > 0 && /* @__PURE__ */ (0, import_jsx_runtime.jsx)("span", { className: "devlead-notification-turn", children: t("notification.turn", { turn: notice.turn }) }),
254
- /* @__PURE__ */ (0, import_jsx_runtime.jsx)("span", { className: "devlead-notification-label", children: t(notice.labelKey) }),
255
- notice.error !== void 0 && /* @__PURE__ */ (0, import_jsx_runtime.jsx)("span", { className: "devlead-notification-error", children: notice.error })
256
- ] }),
296
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
297
+ "span",
298
+ {
299
+ className: "devlead-notice",
300
+ role: "status",
301
+ "aria-live": "polite",
302
+ "aria-atomic": "true",
303
+ title: notice === null ? t("hint.enabled") : notice.tooltip,
304
+ children: notice === null ? (
305
+ // An enabled Session with no retained notification keeps the help
306
+ // hint visible instead of leaving the row visually empty.
307
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)("span", { className: "devlead-hint", children: t("hint.enabled") })
308
+ ) : /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("span", { className: "devlead-notification", children: [
309
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
310
+ "span",
311
+ {
312
+ className: "devlead-notification-dot",
313
+ "data-transition": notice.transition,
314
+ "aria-hidden": "true"
315
+ }
316
+ ),
317
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)("span", { className: "devlead-notification-who", children: notice.who }),
318
+ notice.turn > 0 && /* @__PURE__ */ (0, import_jsx_runtime.jsx)("span", { className: "devlead-notification-turn", children: t("notification.turn", { turn: notice.turn }) }),
319
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)("span", { className: "devlead-notification-label", children: t(notice.labelKey) }),
320
+ notice.error !== void 0 && /* @__PURE__ */ (0, import_jsx_runtime.jsx)("span", { className: "devlead-notification-error", children: notice.error })
321
+ ] })
322
+ }
323
+ ),
257
324
  failureLine !== null && /* @__PURE__ */ (0, import_jsx_runtime.jsx)("span", { className: "devlead-error", role: "alert", children: t(failureLine.key, failureLine.params) })
258
325
  ]
259
326
  }
@@ -263,46 +330,35 @@ window.__ModuleLoader__.load({
263
330
  }
264
331
 
265
332
  // packages/client-ui/src/client/DevLeadIconToggle.tsx
266
- var import_react2 = require("react");
267
333
  var import_dsh_client_ui_primitives2 = require("@deepseek-ai/dsh-client-ui-primitives");
268
334
  var import_jsx_runtime2 = require("react/jsx-runtime");
269
335
  function DevLeadIconToggle({ useProjection, executeCommand, t }) {
270
- const projection = useProjection("devLead");
336
+ const projection = useProjection(DEVLEAD_PROJECTION_KEY);
271
337
  const enabled = projection?.enabled ?? false;
272
- const [pending, setPending] = (0, import_react2.useState)(false);
273
- const [failure, setFailure] = (0, import_react2.useState)(null);
274
- const pendingRef = (0, import_react2.useRef)(false);
275
- (0, import_react2.useEffect)(() => {
276
- setFailure(null);
277
- }, [enabled]);
338
+ const { pending, failure, run } = useDevLeadAdmission(executeCommand, enabled);
278
339
  if (projection === void 0 || enabled) return null;
279
- const enable = () => {
280
- if (pendingRef.current) return;
281
- pendingRef.current = true;
282
- setPending(true);
283
- setFailure(null);
284
- void admitCommand(executeCommand, "/devlead on").then((rejected) => {
285
- pendingRef.current = false;
286
- setPending(false);
287
- if (rejected !== void 0) setFailure(rejected);
288
- });
289
- };
290
340
  const label = failure === null ? t("toggle.enable") : t("toggle.failed", { message: failureMessage(failure) });
291
- return /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(import_dsh_client_ui_primitives2.Tooltip, { label, side: "top", delayMs: 300, maxWidth: 300, portal: true, children: /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(
292
- import_dsh_client_ui_primitives2.Button,
293
- {
294
- variant: "ghost",
295
- size: "sm",
296
- className: "devlead-toggle",
297
- "aria-label": label,
298
- disabled: pending,
299
- "data-devlead-toggle": "true",
300
- "data-devlead-pending": pending ? "true" : "false",
301
- "data-devlead-failed": failure === null ? "false" : "true",
302
- onClick: enable,
303
- children: /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(import_dsh_client_ui_primitives2.IconUsersOutlineRegular, { size: 16, "aria-hidden": "true" })
304
- }
305
- ) });
341
+ return /* @__PURE__ */ (0, import_jsx_runtime2.jsxs)(import_jsx_runtime2.Fragment, { children: [
342
+ /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(import_dsh_client_ui_primitives2.Tooltip, { label, side: "top", delayMs: 300, maxWidth: 300, portal: true, children: /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(
343
+ import_dsh_client_ui_primitives2.Button,
344
+ {
345
+ variant: "ghost",
346
+ size: "sm",
347
+ className: "devlead-toggle",
348
+ "aria-label": label,
349
+ "aria-busy": pending,
350
+ disabled: pending,
351
+ "data-devlead-toggle": "true",
352
+ "data-devlead-pending": pending ? "true" : "false",
353
+ "data-devlead-failed": failure === null ? "false" : "true",
354
+ onClick: () => {
355
+ run("/devlead on");
356
+ },
357
+ children: /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(import_dsh_client_ui_primitives2.IconUsersOutlineRegular, { size: 16 })
358
+ }
359
+ ) }),
360
+ /* @__PURE__ */ (0, import_jsx_runtime2.jsx)("span", { className: "devlead-sr-only", role: "status", "aria-live": "polite", "aria-atomic": "true", children: failure === null ? null : t("toggle.failed.status", { message: failureMessage(failure) }) })
361
+ ] });
306
362
  }
307
363
 
308
364
  // packages/client-ui/src/client/locales.ts
@@ -320,6 +376,7 @@ window.__ModuleLoader__.load({
320
376
  "count.missing": "{count} \u4E2A\u5DF2\u4E0D\u53EF\u7528",
321
377
  "toggle.enable": "\u5F00\u542F DevLead \u6A21\u5F0F",
322
378
  "toggle.failed": "\u5F00\u542F DevLead \u6A21\u5F0F\u5931\u8D25\uFF1A{message}\uFF08\u60AC\u505C\u67E5\u770B\uFF0C\u53EF\u91CD\u8BD5\uFF09",
379
+ "toggle.failed.status": "\u5F00\u542F DevLead \u6A21\u5F0F\u5931\u8D25\uFF1A{message}",
323
380
  "notification.turn": "\u7B2C {turn} \u8F6E",
324
381
  "transition.completed": "\u5B8C\u6210",
325
382
  "transition.error": "\u5931\u8D25",
@@ -331,7 +388,8 @@ window.__ModuleLoader__.load({
331
388
  "transition.unknown": "\u672A\u77E5\u72B6\u6001",
332
389
  "error.command": "\u547D\u4EE4\u5931\u8D25\uFF1A{message}\uFF08{code}\uFF09",
333
390
  "error.rejected": "\u547D\u4EE4\u88AB\u62D2\u7EDD\uFF1A{message}",
334
- "error.unknown": "\u547D\u4EE4\u6267\u884C\u5931\u8D25\uFF1A{message}"
391
+ "error.unknown": "\u547D\u4EE4\u6267\u884C\u5931\u8D25\uFF1A{message}",
392
+ "error.unresolved": "\u547D\u4EE4\u672A\u6267\u884C\uFF1AHost \u672A\u8BC6\u522B {line}"
335
393
  };
336
394
  var en = {
337
395
  "meta.title": "DevLead mode",
@@ -347,6 +405,7 @@ window.__ModuleLoader__.load({
347
405
  "count.missing": "{count} unavailable",
348
406
  "toggle.enable": "Turn on DevLead mode",
349
407
  "toggle.failed": "Could not turn on DevLead mode: {message} (hover to read, then retry)",
408
+ "toggle.failed.status": "Could not turn on DevLead mode: {message}",
350
409
  "notification.turn": "turn {turn}",
351
410
  "transition.completed": "completed",
352
411
  "transition.error": "failed",
@@ -358,15 +417,22 @@ window.__ModuleLoader__.load({
358
417
  "transition.unknown": "unknown state",
359
418
  "error.command": "Command failed: {message} ({code})",
360
419
  "error.rejected": "Command rejected: {message}",
361
- "error.unknown": "Command failed: {message}"
420
+ "error.unknown": "Command failed: {message}",
421
+ "error.unresolved": "Command did not run: the Host did not recognize {line}"
362
422
  };
363
423
 
364
424
  // packages/client-ui/src/client/styles.ts
365
425
  var STYLE_ATTRIBUTE = "data-plugin-css";
366
426
  var STYLE_KEY = "devlead";
367
427
  var styles = `
428
+ /* Composer-tool row control: the 28px round glyph seat of the shipped attach
429
+ and mode controls, so the off-state entry reads as one of them. */
368
430
  .devlead-toggle {
369
431
  flex: none;
432
+ width: 28px;
433
+ height: 28px;
434
+ padding: 0;
435
+ border-radius: 999px;
370
436
  color: var(--dsw-alias-label-tertiary, GrayText);
371
437
  }
372
438
 
@@ -386,17 +452,22 @@ window.__ModuleLoader__.load({
386
452
  100% -
387
453
  var(--dsh-composer-side-clearance, 16px) -
388
454
  var(--dsh-composer-side-clearance, 16px) -
389
- var(--dsh-composer-dock-inset, 4px) -
390
- var(--dsh-composer-dock-inset, 4px) -
391
- var(--dsh-composer-dock-inset, 4px) -
392
- var(--dsh-composer-dock-inset, 4px)
455
+ var(--dsh-composer-dock-inset, 8px) -
456
+ var(--dsh-composer-dock-inset, 8px) -
457
+ var(--dsh-composer-dock-inset, 8px) -
458
+ var(--dsh-composer-dock-inset, 8px)
393
459
  );
394
- max-width: calc(var(--dsh-composer-card-max-width, 960px) - 4 * var(--dsh-composer-dock-inset, 4px));
460
+ max-width: calc(var(--dsh-composer-card-max-width, 952px) - 4 * var(--dsh-composer-dock-inset, 8px));
395
461
  margin: 0 auto;
396
462
  }
397
463
 
464
+ /* Menu-surface card: the composer context-stack geometry and elevation triple
465
+ (stroke + soft light) rather than an extra CSS border, which would double the
466
+ hairline and add layout width; the blur needs the surface on a background
467
+ layer, so it is painted by the pseudo-element behind the content. */
398
468
  .devlead-bar {
399
469
  position: relative;
470
+ isolation: isolate;
400
471
  box-sizing: border-box;
401
472
  display: flex;
402
473
  align-items: center;
@@ -405,9 +476,9 @@ window.__ModuleLoader__.load({
405
476
  min-height: 34px;
406
477
  margin: 0 auto;
407
478
  padding: 4px 6px 4px 12px;
408
- border: 1px solid var(--dsw-alias-border-l1, rgba(127, 127, 127, 0.24));
479
+ border: 0;
480
+ --dsw-elevation-stroke-color: var(--dsw-alias-border-l1, rgba(127, 127, 127, 0.24));
409
481
  border-radius: var(--dsw-radius-md, 10px);
410
- background: var(--dsw-specific-menu, Canvas);
411
482
  box-shadow: var(--dsw-elevation-panel, 0 1px 2px rgba(0, 0, 0, 0.08));
412
483
  color: var(--dsw-alias-label-primary, CanvasText);
413
484
  font-size: 13px;
@@ -415,6 +486,17 @@ window.__ModuleLoader__.load({
415
486
  font-family: inherit;
416
487
  }
417
488
 
489
+ .devlead-bar::before {
490
+ position: absolute;
491
+ z-index: -1;
492
+ inset: 0;
493
+ border-radius: inherit;
494
+ background: var(--dsw-specific-menu, Canvas);
495
+ backdrop-filter: var(--dsw-menu-backdrop-filter, none);
496
+ content: '';
497
+ pointer-events: none;
498
+ }
499
+
418
500
  .devlead-glyph {
419
501
  display: inline-flex;
420
502
  flex: none;
@@ -469,6 +551,18 @@ window.__ModuleLoader__.load({
469
551
  color: var(--dsw-alias-state-warn-primary, #a15c00);
470
552
  }
471
553
 
554
+ /* One stable live region wrapping the hint or the latest-notification chip so
555
+ assistive technology announces a new notification as a content change of an
556
+ existing region, not as a freshly inserted one. */
557
+ .devlead-notice {
558
+ display: inline-flex;
559
+ flex: 1 1 auto;
560
+ align-items: center;
561
+ min-width: 0;
562
+ overflow: hidden;
563
+ white-space: nowrap;
564
+ }
565
+
472
566
  .devlead-hint {
473
567
  flex: 1 1 auto;
474
568
  min-width: 0;
@@ -542,6 +636,18 @@ window.__ModuleLoader__.load({
542
636
  text-overflow: ellipsis;
543
637
  white-space: nowrap;
544
638
  }
639
+
640
+ /* Visually hidden but announced: the compact toolbar surface has no inline
641
+ error seat, so its failure text is mirrored into a live region through this
642
+ class (the shipped visually-hidden idiom used by the chat surfaces). */
643
+ .devlead-sr-only {
644
+ position: absolute;
645
+ width: 1px;
646
+ height: 1px;
647
+ overflow: hidden;
648
+ clip: rect(0 0 0 0);
649
+ white-space: nowrap;
650
+ }
545
651
  `;
546
652
  function ensureStyleTag() {
547
653
  if (typeof document === "undefined") return () => {
@@ -573,6 +679,8 @@ window.__ModuleLoader__.load({
573
679
  ctx.slots.inject("conversation.input.left", () => ctx.slots.register({
574
680
  name: "conversation.input.left",
575
681
  id: "devlead",
682
+ // No shipped entry occupies this list; the order only sequences additive
683
+ // contributions, so the compact switch stays ahead of any later entry.
576
684
  order: 12,
577
685
  locale: NS,
578
686
  inject: face
@@ -580,6 +688,8 @@ window.__ModuleLoader__.load({
580
688
  ctx.slots.inject("conversation.input.dock", () => ctx.slots.register({
581
689
  name: "conversation.input.dock",
582
690
  id: "devlead",
691
+ // The shipped context stack orders Todo (0), Goal (10), and Queue (20):
692
+ // the DevLead strip sits directly below the goal card.
583
693
  order: 12,
584
694
  locale: NS,
585
695
  inject: face
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@yankeguo/dsh-client-ui-devlead",
3
- "version": "0.1.0",
3
+ "version": "0.1.1",
4
4
  "description": "DevLead surfaces: a compact composer-toolbar switch while off, and the full status strip above the composer while the mode is on.",
5
5
  "license": "MIT",
6
6
  "type": "module",
@@ -33,7 +33,7 @@
33
33
  "@deepseek-ai/cordis": "~4.1.0"
34
34
  },
35
35
  "dependencies": {
36
- "@yankeguo/dsh-devlead-protocol": "0.1.0"
36
+ "@yankeguo/dsh-devlead-protocol": "0.1.1"
37
37
  },
38
38
  "engines": {
39
39
  "dsh": ">=0.2.2-rc.1 <0.3.0"