@d86e/hive-panel 0.3.11 → 0.4.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/public/panel.js CHANGED
@@ -5,7 +5,7 @@
5
5
  // (en / zh) and, when a host provides one, a \`t(key)\` translate function.
6
6
  // Hosts can hot-swap languages by calling \`subscribeLocale\` and re-rendering.
7
7
 
8
- const LANE_ORDER = Object.freeze(["pending", "claimed", "done", "blocked", "failed"]);
8
+ const LANE_ORDER = Object.freeze(["pending", "claimed", "done", "failed"]);
9
9
  const MAX_EVENTS = 80;
10
10
  const DEFAULT_SNAPSHOT_URL = "/api/snapshot";
11
11
  const DEFAULT_ACTIONS_URL = "/api/actions";
@@ -20,7 +20,6 @@ const CARD_ACTIONS = Object.freeze({
20
20
  pending: Object.freeze(["claim", "remove"]),
21
21
  claimed: Object.freeze(["done", "fail", "remove"]),
22
22
  done: Object.freeze(["remove"]),
23
- blocked: Object.freeze(["retry", "remove"]),
24
23
  failed: Object.freeze(["retry", "remove"]),
25
24
  });
26
25
 
@@ -64,7 +63,7 @@ const PANEL_STYLES = `.hive { position: relative; }
64
63
  overflow-x: auto;
65
64
  overflow-y: hidden;
66
65
  overscroll-behavior-x: contain;
67
- scrollbar-color: var(--hive-line, #232b38) transparent;
66
+ scrollbar-color: var(--hive-line) transparent;
68
67
  scrollbar-width: thin;
69
68
  }
70
69
 
@@ -81,10 +80,10 @@ const PANEL_STYLES = `.hive { position: relative; }
81
80
  align-items: center;
82
81
  gap: 6px 10px;
83
82
  padding: 6px 12px;
84
- border-bottom: 1px solid color-mix(in srgb, var(--hive-warn) 45%, var(--hive-line, #232b38));
83
+ border-bottom: 1px solid color-mix(in srgb, var(--hive-warn) 45%, var(--hive-line));
85
84
  background: color-mix(in srgb, var(--hive-warn) 10%, transparent);
86
85
  color: var(--hive-warn);
87
- font-size: 11px;
86
+ font-size: 12px;
88
87
  line-height: 1.5;
89
88
  }
90
89
 
@@ -93,10 +92,10 @@ const PANEL_STYLES = `.hive { position: relative; }
93
92
  .hive-freeze-banner .hive-btn {
94
93
  flex: 0 0 auto;
95
94
  padding: 3px 8px;
96
- border-color: color-mix(in srgb, var(--hive-warn) 45%, var(--hive-line, #232b38));
95
+ border-color: color-mix(in srgb, var(--hive-warn) 45%, var(--hive-line));
97
96
  background: color-mix(in srgb, var(--hive-warn) 12%, transparent);
98
97
  color: var(--hive-warn);
99
- font-size: 10.5px;
98
+ font-size: 12px;
100
99
  }
101
100
 
102
101
  .hive-help-trigger {
@@ -108,13 +107,13 @@ const PANEL_STYLES = `.hive { position: relative; }
108
107
 
109
108
  /* Destructive card action: the drawer's delete control. */
110
109
  .hive-btn-danger {
111
- border-color: color-mix(in srgb, var(--hive-danger) 55%, var(--hive-line, #232b38));
110
+ border-color: color-mix(in srgb, var(--hive-danger) 55%, var(--hive-line));
112
111
  background: color-mix(in srgb, var(--hive-danger) 12%, transparent);
113
- color: color-mix(in srgb, var(--hive-danger) 88%, var(--hive-fg, #e6edf3));
112
+ color: color-mix(in srgb, var(--hive-danger) 88%, var(--hive-fg));
114
113
  }
115
114
 
116
115
  .hive-btn-danger:hover:not(:disabled) {
117
- border-color: color-mix(in srgb, var(--hive-danger) 75%, var(--hive-line, #232b38));
116
+ border-color: color-mix(in srgb, var(--hive-danger) 75%, var(--hive-line));
118
117
  background: color-mix(in srgb, var(--hive-danger) 22%, transparent);
119
118
  }
120
119
 
@@ -144,39 +143,77 @@ const PANEL_STYLES = `.hive { position: relative; }
144
143
  max-height: min(70vh, 560px);
145
144
  overflow: auto;
146
145
  padding: 12px;
147
- border: 1px solid var(--hive-line, #232b38);
148
- border-radius: 12px;
149
- background: color-mix(in srgb, var(--hive-bg, #0b0f17) 97%, var(--hive-fg, #e6edf3) 3%);
150
- color: var(--hive-fg, #e6edf3);
151
- box-shadow: 0 18px 48px rgb(0 0 0 / 38%);
152
- scrollbar-color: var(--hive-line, #232b38) transparent;
146
+ border: 1px solid var(--hive-line);
147
+ border-radius: var(--hive-radius-lg);
148
+ background: color-mix(in srgb, var(--hive-bg) 97%, var(--hive-fg) 3%);
149
+ color: var(--hive-fg);
150
+ box-shadow: none;
151
+ scrollbar-color: var(--hive-line) transparent;
153
152
  scrollbar-width: thin;
154
- color-scheme: dark;
153
+ color-scheme: light dark;
155
154
  }
156
155
 
157
156
  .hive-help-head, .hive-dialog-head, .hive-toast-head { display: flex; align-items: flex-start; gap: 8px; }
158
- .hive-help-title, .hive-dialog-title { margin: 0; overflow-wrap: anywhere; font-size: 13px; font-weight: 650; line-height: 1.4; }
157
+ .hive-help-title, .hive-dialog-title { margin: 0; overflow-wrap: anywhere; font-size: 14px; font-weight: 650; line-height: 1.5; }
159
158
  .hive-help-title { padding-top: 3px; }
160
159
  .hive-help-head .hive-btn-ghost, .hive-dialog-head .hive-btn-ghost, .hive-toast-head .hive-btn-ghost { flex: 0 0 auto; margin-left: auto; }
161
160
 
162
- .hive-help-section { margin-top: 12px; color: var(--hive-fg-faint); font-size: 9.5px; font-weight: 650; letter-spacing: 0.1em; text-transform: uppercase; }
163
- .hive-help-action { padding: 7px 0; border-bottom: 1px solid color-mix(in srgb, var(--hive-line, #232b38) 70%, transparent); }
161
+ .hive-help-section { margin-top: 12px; color: var(--hive-fg-faint); font-size: 12px; font-weight: 650; letter-spacing: 0.1em; text-transform: uppercase; }
162
+ .hive-help-action { padding: 7px 0; border-bottom: 1px solid color-mix(in srgb, var(--hive-line) 70%, transparent); }
164
163
  .hive-help-action:last-of-type { border-bottom: 0; }
165
- .hive-help-name { color: var(--hive-fg, #e6edf3); font-size: 11.5px; font-weight: 600; }
166
- .hive-help-desc { margin-top: 2px; color: var(--hive-fg-soft); font-size: 11px; line-height: 1.5; }
167
- .hive-help-params { margin-top: 3px; overflow-wrap: anywhere; color: var(--hive-fg-faint); font-family: var(--hive-mono); font-size: 10px; line-height: 1.5; }
164
+ .hive-help-name { color: var(--hive-fg); font-size: 12px; font-weight: 600; }
165
+ .hive-help-desc { margin-top: 2px; color: var(--hive-fg-soft); font-size: 12px; line-height: 1.5; }
166
+ .hive-help-params { margin-top: 3px; overflow-wrap: anywhere; color: var(--hive-fg-faint); font-family: var(--hive-mono); font-size: 12px; line-height: 1.5; }
168
167
  .hive-help-actionrow { margin-top: 7px; }
169
168
  .hive-help-note {
170
169
  margin-top: 10px;
171
170
  padding: 7px 8px;
172
171
  border: 1px solid color-mix(in srgb, var(--hive-warn) 40%, transparent);
173
- border-radius: 6px;
172
+ border-radius: var(--hive-radius-sm);
174
173
  background: color-mix(in srgb, var(--hive-warn) 10%, transparent);
175
174
  color: var(--hive-warn);
176
- font-size: 11px;
175
+ font-size: 12px;
177
176
  line-height: 1.5;
178
177
  }
179
- .hive-help-hint { margin-top: 10px; color: var(--hive-fg-faint); font-size: 10px; line-height: 1.5; }
178
+ .hive-help-hint { margin-top: 10px; color: var(--hive-fg-faint); font-size: 12px; line-height: 1.5; }
179
+
180
+ .hive-dialog {
181
+ position: relative;
182
+ }
183
+
184
+ .hive-dialog-head-title { padding-right: 36px; }
185
+
186
+ .hive-dialog-close {
187
+ position: absolute;
188
+ top: 12px;
189
+ right: 12px;
190
+ display: inline-flex;
191
+ align-items: center;
192
+ justify-content: center;
193
+ width: 28px;
194
+ min-width: 28px;
195
+ height: 28px;
196
+ padding: 0;
197
+ border: 0;
198
+ border-radius: var(--hive-radius-md);
199
+ background: transparent;
200
+ color: var(--hive-fg-soft);
201
+ font-size: 16px;
202
+ line-height: 1;
203
+ cursor: pointer;
204
+ z-index: 1;
205
+ }
206
+
207
+ .hive-dialog-close:hover {
208
+ border: 0;
209
+ background: var(--hive-surface-hover);
210
+ color: var(--hive-fg);
211
+ }
212
+
213
+ .hive-dialog-close:focus-visible {
214
+ outline: 2px solid var(--hive-accent);
215
+ outline-offset: 1px;
216
+ }
180
217
 
181
218
  .hive-dialog {
182
219
  display: flex;
@@ -184,52 +221,52 @@ const PANEL_STYLES = `.hive { position: relative; }
184
221
  width: min(560px, 100%);
185
222
  max-height: 100%;
186
223
  overflow: hidden;
187
- border: 1px solid var(--hive-line, #232b38);
188
- border-radius: 12px;
189
- background: color-mix(in srgb, var(--hive-bg, #0b0f17) 97%, var(--hive-fg, #e6edf3) 3%);
190
- color: var(--hive-fg, #e6edf3);
191
- box-shadow: 0 24px 70px rgb(0 0 0 / 52%);
192
- color-scheme: dark;
193
- }
194
- .hive-dialog-head { flex: 0 0 auto; padding: 12px 14px; border-bottom: 1px solid var(--hive-line, #232b38); }
224
+ border: 1px solid var(--hive-line);
225
+ border-radius: var(--hive-radius-lg);
226
+ background: color-mix(in srgb, var(--hive-bg) 97%, var(--hive-fg) 3%);
227
+ color: var(--hive-fg);
228
+ box-shadow: none;
229
+ color-scheme: light dark;
230
+ }
231
+ .hive-dialog-head { flex: 0 0 auto; padding: 12px 14px; border-bottom: 1px solid var(--hive-line); }
195
232
  .hive-dialog-head-title { min-width: 0; }
196
- .hive-dialog-eyebrow { margin-bottom: 2px; color: var(--hive-fg-faint); font-family: var(--hive-mono); font-size: 9.5px; letter-spacing: 0.06em; text-transform: uppercase; }
197
- .hive-dialog-body { display: flex; flex: 1 1 auto; flex-direction: column; gap: 10px; min-height: 0; padding: 14px; overflow: auto; scrollbar-color: var(--hive-line, #232b38) transparent; scrollbar-width: thin; }
198
- .hive-dialog-foot { display: flex; flex: 0 0 auto; flex-wrap: wrap; justify-content: flex-end; gap: 6px; padding: 10px 14px; border-top: 1px solid var(--hive-line, #232b38); }
233
+ .hive-dialog-eyebrow { margin-bottom: 2px; color: var(--hive-fg-faint); font-family: var(--hive-mono); font-size: 12px; letter-spacing: 0.06em; text-transform: uppercase; }
234
+ .hive-dialog-body { display: flex; flex: 1 1 auto; flex-direction: column; gap: 10px; min-height: 0; padding: 14px; overflow: auto; scrollbar-color: var(--hive-line) transparent; scrollbar-width: thin; }
235
+ .hive-dialog-foot { display: flex; flex: 0 0 auto; flex-wrap: wrap; justify-content: flex-end; gap: 6px; padding: 10px 14px; border-top: 1px solid var(--hive-line); }
199
236
 
200
237
  .hive-field { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
201
238
  .hive-field-row { display: flex; flex-wrap: wrap; gap: 8px; align-items: flex-end; }
202
239
  .hive-field-row .hive-field { flex: 1 1 220px; }
203
240
  .hive-field-row .hive-field.is-narrow { flex: 0 0 110px; }
204
- .hive-field-label { color: var(--hive-fg-soft); font-size: 10px; font-weight: 600; letter-spacing: 0.04em; }
205
- .hive-field-hint { color: var(--hive-fg-faint); font-size: 10px; line-height: 1.4; }
241
+ .hive-field-label { color: var(--hive-fg-soft); font-size: 12px; font-weight: 600; letter-spacing: 0.04em; }
242
+ .hive-field-hint { color: var(--hive-fg-faint); font-size: 12px; line-height: 1.5; }
206
243
  .hive-input, .hive-textarea {
207
244
  width: 100%;
208
245
  padding: 6px 8px;
209
- border: 1px solid var(--hive-line, #232b38);
210
- border-radius: 7px;
211
- background: var(--hive-bg, #0b0f17);
212
- color: var(--hive-fg, #e6edf3);
246
+ border: 1px solid var(--hive-line);
247
+ border-radius: var(--hive-radius-md);
248
+ background: var(--hive-bg);
249
+ color: var(--hive-fg);
213
250
  font: inherit;
214
251
  font-size: 12px;
215
- line-height: 1.45;
252
+ line-height: 1.5;
216
253
  }
217
254
  .hive-textarea { min-height: 76px; resize: vertical; }
218
- .hive-input:focus-visible, .hive-textarea:focus-visible { outline: 2px solid var(--hive-accent, #58c4dc); outline-offset: 1px; }
255
+ .hive-input:focus-visible, .hive-textarea:focus-visible { outline: 2px solid var(--hive-accent); outline-offset: 1px; }
219
256
 
220
- .hive-plan-preview-head { display: flex; align-items: baseline; gap: 6px; color: var(--hive-fg-soft); font-size: 10px; font-weight: 650; letter-spacing: 0.08em; text-transform: uppercase; }
257
+ .hive-plan-preview-head { display: flex; align-items: baseline; gap: 6px; color: var(--hive-fg-soft); font-size: 12px; font-weight: 650; letter-spacing: 0.08em; text-transform: uppercase; }
221
258
  .hive-plan-count { color: var(--hive-fg-faint); font-family: var(--hive-mono); font-weight: 400; letter-spacing: 0; }
222
259
  .hive-plan-list { display: flex; flex-direction: column; gap: 6px; }
223
- .hive-plan-item { padding: 8px 9px; border: 1px solid var(--hive-line, #232b38); border-radius: 8px; background: var(--hive-surface); }
224
- .hive-plan-item-title { overflow-wrap: anywhere; font-size: 12px; font-weight: 600; line-height: 1.35; }
225
- .hive-plan-key { margin-left: 6px; color: var(--hive-fg-faint); font-family: var(--hive-mono); font-size: 9.5px; font-weight: 400; }
226
- .hive-plan-meta { margin-top: 3px; overflow-wrap: anywhere; color: var(--hive-fg-soft); font-size: 10.5px; line-height: 1.5; }
260
+ .hive-plan-item { padding: 8px 9px; border: 1px solid var(--hive-line); border-radius: var(--hive-radius-md); background: var(--hive-surface); }
261
+ .hive-plan-item-title { overflow-wrap: anywhere; font-size: 12px; font-weight: 600; line-height: 1.5; }
262
+ .hive-plan-key { margin-left: 6px; color: var(--hive-fg-faint); font-family: var(--hive-mono); font-size: 12px; font-weight: 400; }
263
+ .hive-plan-meta { margin-top: 3px; overflow-wrap: anywhere; color: var(--hive-fg-soft); font-size: 12px; line-height: 1.5; }
227
264
  .hive-plan-chips { display: flex; flex-wrap: wrap; gap: 3px; margin-top: 5px; }
228
- .hive-plan-chip { max-width: 100%; overflow: hidden; padding: 1px 5px; border: 1px solid var(--hive-line, #232b38); border-radius: 4px; background: var(--hive-surface-strong); color: var(--hive-fg-soft); font-family: var(--hive-mono); font-size: 9.5px; text-overflow: ellipsis; white-space: nowrap; }
229
- .hive-plan-empty, .hive-plan-hint { color: var(--hive-fg-faint); font-size: 10.5px; line-height: 1.5; }
230
- .hive-plan-error { padding: 8px 9px; border-left: 2px solid var(--hive-danger); border-radius: 0 5px 5px 0; background: color-mix(in srgb, var(--hive-danger) 10%, transparent); color: color-mix(in srgb, var(--hive-danger) 82%, var(--hive-fg, #e6edf3)); font-family: var(--hive-mono); font-size: 10.5px; line-height: 1.5; overflow-wrap: anywhere; white-space: pre-wrap; }
265
+ .hive-plan-chip { max-width: 100%; overflow: hidden; padding: 1px 5px; border: 1px solid var(--hive-line); border-radius: var(--hive-radius-sm); background: var(--hive-surface-strong); color: var(--hive-fg-soft); font-family: var(--hive-mono); font-size: 12px; text-overflow: ellipsis; white-space: nowrap; }
266
+ .hive-plan-empty, .hive-plan-hint { color: var(--hive-fg-faint); font-size: 12px; line-height: 1.5; }
267
+ .hive-plan-error { padding: 8px 9px; border-left: 1px solid var(--hive-danger); border-radius: 0 var(--hive-radius-sm) var(--hive-radius-sm) 0; background: color-mix(in srgb, var(--hive-danger) 10%, transparent); color: color-mix(in srgb, var(--hive-danger) 82%, var(--hive-fg)); font-family: var(--hive-mono); font-size: 12px; line-height: 1.5; overflow-wrap: anywhere; white-space: pre-wrap; }
231
268
  .hive-plan-error:empty { display: none; }
232
- .hive-plan-raw { max-height: 180px; margin: 0; padding: 8px; overflow: auto; border: 1px solid var(--hive-line, #232b38); border-radius: 6px; background: var(--hive-surface); color: var(--hive-fg-soft); font-family: var(--hive-mono); font-size: 10px; line-height: 1.5; white-space: pre-wrap; }
269
+ .hive-plan-raw { max-height: 180px; margin: 0; padding: 8px; overflow: auto; border: 1px solid var(--hive-line); border-radius: var(--hive-radius-sm); background: var(--hive-surface); color: var(--hive-fg-soft); font-family: var(--hive-mono); font-size: 12px; line-height: 1.5; white-space: pre-wrap; }
233
270
 
234
271
  .hive-toast {
235
272
  position: absolute;
@@ -240,21 +277,21 @@ const PANEL_STYLES = `.hive { position: relative; }
240
277
  max-height: min(42vh, 340px);
241
278
  overflow: auto;
242
279
  padding: 9px 11px;
243
- border: 1px solid color-mix(in srgb, var(--hive-danger) 45%, var(--hive-line, #232b38));
280
+ border: 1px solid color-mix(in srgb, var(--hive-danger) 45%, var(--hive-line));
244
281
  border-left: 3px solid var(--hive-danger);
245
- border-radius: 8px;
246
- background: color-mix(in srgb, var(--hive-bg, #0b0f17) 96%, var(--hive-fg, #e6edf3) 4%);
247
- color: var(--hive-fg, #e6edf3);
248
- box-shadow: 0 16px 40px rgb(0 0 0 / 38%);
249
- scrollbar-color: var(--hive-line, #232b38) transparent;
282
+ border-radius: var(--hive-radius-md);
283
+ background: color-mix(in srgb, var(--hive-bg) 96%, var(--hive-fg) 4%);
284
+ color: var(--hive-fg);
285
+ box-shadow: none;
286
+ scrollbar-color: var(--hive-line) transparent;
250
287
  scrollbar-width: thin;
251
- color-scheme: dark;
288
+ color-scheme: light dark;
252
289
  }
253
- .hive-toast.is-success { border-color: color-mix(in srgb, var(--hive-ok) 45%, var(--hive-line, #232b38)); border-left-color: var(--hive-ok); }
254
- .hive-toast-title { padding-top: 1px; font-size: 11.5px; font-weight: 650; }
290
+ .hive-toast.is-success { border-color: color-mix(in srgb, var(--hive-ok) 45%, var(--hive-line)); border-left-color: var(--hive-ok); }
291
+ .hive-toast-title { padding-top: 1px; font-size: 12px; font-weight: 650; }
255
292
  .hive-toast-title.is-error { color: var(--hive-danger); }
256
293
  .hive-toast-title.is-success { color: var(--hive-ok); }
257
- .hive-toast-detail { margin-top: 3px; overflow-wrap: anywhere; color: var(--hive-fg-soft); font-family: var(--hive-mono); font-size: 10px; line-height: 1.5; white-space: pre-wrap; }
294
+ .hive-toast-detail { margin-top: 3px; overflow-wrap: anywhere; color: var(--hive-fg-soft); font-family: var(--hive-mono); font-size: 12px; line-height: 1.5; white-space: pre-wrap; }
258
295
 
259
296
  .hive-main {
260
297
  display: flex;
@@ -291,13 +328,13 @@ const PANEL_STYLES = `.hive { position: relative; }
291
328
  gap: 6px;
292
329
  min-width: 0;
293
330
  padding: 7px 12px;
294
- border-bottom: 1px solid var(--hive-line, #232b38);
295
- background: color-mix(in srgb, var(--hive-fg, #e6edf3) 1.5%, transparent);
331
+ border-bottom: 1px solid var(--hive-line);
332
+ background: color-mix(in srgb, var(--hive-fg) 1.5%, transparent);
296
333
  }
297
334
 
298
335
  .hive-strip-label {
299
336
  color: var(--hive-fg-soft);
300
- font-size: 9.5px;
337
+ font-size: 12px;
301
338
  font-weight: 650;
302
339
  letter-spacing: 0.12em;
303
340
  text-transform: uppercase;
@@ -319,23 +356,23 @@ const PANEL_STYLES = `.hive { position: relative; }
319
356
  gap: 6px;
320
357
  max-width: 100%;
321
358
  padding: 2px 8px;
322
- border: 1px solid var(--hive-line, #232b38);
359
+ border: 1px solid var(--hive-line);
323
360
  border-radius: 999px;
324
361
  background: var(--hive-surface);
325
- color: var(--hive-fg, #e6edf3);
362
+ color: var(--hive-fg);
326
363
  font: inherit;
327
- font-size: 10.5px;
328
- line-height: 1.6;
364
+ font-size: 12px;
365
+ line-height: 1.5;
329
366
  cursor: pointer;
330
367
  }
331
368
 
332
369
  .hive-agent-pill:hover {
333
- border-color: color-mix(in srgb, var(--hive-accent, #58c4dc) 50%, var(--hive-line, #232b38));
370
+ border-color: color-mix(in srgb, var(--hive-accent) 50%, var(--hive-line));
334
371
  background: var(--hive-surface-hover);
335
372
  }
336
373
 
337
374
  .hive-agent-pill:focus-visible {
338
- outline: 2px solid var(--hive-accent, #58c4dc);
375
+ outline: 2px solid var(--hive-accent);
339
376
  outline-offset: 1px;
340
377
  }
341
378
 
@@ -357,14 +394,22 @@ const PANEL_STYLES = `.hive { position: relative; }
357
394
  overflow: hidden;
358
395
  color: var(--hive-fg-soft);
359
396
  font-family: var(--hive-mono);
360
- font-size: 9.5px;
397
+ font-size: 12px;
361
398
  text-overflow: ellipsis;
362
399
  white-space: nowrap;
363
400
  }
364
401
 
365
402
  .hive-agents-empty {
366
403
  color: var(--hive-fg-faint);
367
- font-size: 10.5px;
404
+ font-size: 12px;
405
+ }
406
+
407
+ .hive-agents-error {
408
+ min-width: 0;
409
+ overflow-wrap: anywhere;
410
+ color: var(--hive-danger);
411
+ font-family: var(--hive-mono);
412
+ font-size: 12px;
368
413
  }
369
414
 
370
415
  .hive-stage-chips {
@@ -378,29 +423,29 @@ const PANEL_STYLES = `.hive { position: relative; }
378
423
  .hive-stage-chip {
379
424
  appearance: none;
380
425
  padding: 2px 8px;
381
- border: 1px solid var(--hive-line, #232b38);
426
+ border: 1px solid var(--hive-line);
382
427
  border-radius: 999px;
383
428
  background: var(--hive-surface);
384
429
  color: var(--hive-fg-soft);
385
430
  font: inherit;
386
- font-size: 10.5px;
387
- line-height: 1.6;
431
+ font-size: 12px;
432
+ line-height: 1.5;
388
433
  cursor: pointer;
389
434
  white-space: nowrap;
390
435
  }
391
436
 
392
437
  .hive-stage-chip:hover {
393
- border-color: color-mix(in srgb, var(--hive-accent, #58c4dc) 50%, var(--hive-line, #232b38));
438
+ border-color: color-mix(in srgb, var(--hive-accent) 50%, var(--hive-line));
394
439
  }
395
440
 
396
441
  .hive-stage-chip.is-active {
397
- border-color: color-mix(in srgb, var(--hive-accent, #58c4dc) 55%, transparent);
442
+ border-color: color-mix(in srgb, var(--hive-accent) 55%, transparent);
398
443
  background: var(--hive-accent-soft);
399
- color: var(--hive-accent, #58c4dc);
444
+ color: var(--hive-accent);
400
445
  }
401
446
 
402
447
  .hive-stage-chip:focus-visible {
403
- outline: 2px solid var(--hive-accent, #58c4dc);
448
+ outline: 2px solid var(--hive-accent);
404
449
  outline-offset: 1px;
405
450
  }
406
451
 
@@ -445,7 +490,7 @@ const PANEL_STYLES = `.hive { position: relative; }
445
490
  flex: 0 0 auto;
446
491
  padding: 16px 10px;
447
492
  color: var(--hive-fg-faint);
448
- font-size: 11px;
493
+ font-size: 12px;
449
494
  text-align: center;
450
495
  }
451
496
 
@@ -454,8 +499,8 @@ const PANEL_STYLES = `.hive { position: relative; }
454
499
  .hive-events-drawer {
455
500
  flex: 0 0 auto;
456
501
  min-width: 0;
457
- border-top: 1px solid var(--hive-line, #232b38);
458
- background: color-mix(in srgb, var(--hive-fg, #e6edf3) 1.5%, transparent);
502
+ border-top: 1px solid var(--hive-line);
503
+ background: color-mix(in srgb, var(--hive-fg) 1.5%, transparent);
459
504
  }
460
505
 
461
506
  .hive-events-toggle {
@@ -468,10 +513,10 @@ const PANEL_STYLES = `.hive { position: relative; }
468
513
  background: transparent;
469
514
  color: var(--hive-fg-soft);
470
515
  font: inherit;
471
- font-size: 10px;
516
+ font-size: 12px;
472
517
  font-weight: 650;
473
518
  letter-spacing: 0.12em;
474
- line-height: 1.6;
519
+ line-height: 1.5;
475
520
  text-align: left;
476
521
  text-transform: uppercase;
477
522
  cursor: pointer;
@@ -480,7 +525,7 @@ const PANEL_STYLES = `.hive { position: relative; }
480
525
  .hive-events-toggle:hover { background: var(--hive-surface); }
481
526
 
482
527
  .hive-events-toggle:focus-visible {
483
- outline: 2px solid var(--hive-accent, #58c4dc);
528
+ outline: 2px solid var(--hive-accent);
484
529
  outline-offset: -2px;
485
530
  }
486
531
 
@@ -490,14 +535,14 @@ const PANEL_STYLES = `.hive { position: relative; }
490
535
  margin-left: auto;
491
536
  color: var(--hive-fg-faint);
492
537
  font-family: var(--hive-mono);
493
- font-size: 10px;
538
+ font-size: 12px;
494
539
  font-weight: 400;
495
540
  letter-spacing: 0;
496
541
  }
497
542
 
498
543
  .hive-events-caret {
499
544
  color: var(--hive-fg-faint);
500
- font-size: 10px;
545
+ font-size: 12px;
501
546
  }
502
547
 
503
548
  .hive-event-list {
@@ -518,23 +563,23 @@ const PANEL_STYLES = `.hive { position: relative; }
518
563
  }
519
564
 
520
565
  .hive-events-drawer.is-open .hive-events-toggle {
521
- color: var(--hive-fg, #e6edf3);
566
+ color: var(--hive-fg);
522
567
  }
523
568
 
524
- @container hiveboard (max-width: 899px) {
569
+ @container hiveboard (max-width: 819px) {
525
570
  .hive-lane.is-empty,
526
571
  .hive-lane.is-filtered-out { display: none; }
527
572
 
528
573
  .hive-hint { display: none; }
529
574
  }
530
575
 
531
- @container hiveboard (min-width: 900px) {
576
+ @container hiveboard (min-width: 820px) {
532
577
  .hive-stage-chips { display: none; }
533
578
  .hive-filter-empty,
534
579
  .hive-filter-empty.is-visible { display: none; }
535
580
  .hive-lanes {
536
581
  display: grid;
537
- grid-template-columns: repeat(5, minmax(0, 1fr));
582
+ grid-template-columns: repeat(4, minmax(200px, 1fr));
538
583
  align-items: stretch;
539
584
  gap: 9px;
540
585
  overflow: hidden;
@@ -581,11 +626,11 @@ const PANEL_STYLES = `.hive { position: relative; }
581
626
  .hive-init-card {
582
627
  width: min(520px, 100%);
583
628
  padding: 20px;
584
- border: 1px solid var(--hive-line, #232b38);
585
- border-radius: 14px;
586
- background: color-mix(in srgb, var(--hive-bg, #0b0f17) 96%, var(--hive-fg, #e6edf3) 4%);
587
- color: var(--hive-fg, #e6edf3);
588
- box-shadow: 0 18px 50px rgb(0 0 0 / 28%);
629
+ border: 1px solid var(--hive-line);
630
+ border-radius: var(--hive-radius-lg);
631
+ background: color-mix(in srgb, var(--hive-bg) 96%, var(--hive-fg) 4%);
632
+ color: var(--hive-fg);
633
+ box-shadow: none;
589
634
  }
590
635
 
591
636
  .hive-init-repo-row {
@@ -598,7 +643,7 @@ const PANEL_STYLES = `.hive { position: relative; }
598
643
 
599
644
  .hive-init-repo-label {
600
645
  flex: 0 0 auto;
601
- font-size: 9.5px;
646
+ font-size: 12px;
602
647
  font-weight: 650;
603
648
  letter-spacing: 0.1em;
604
649
  text-transform: uppercase;
@@ -607,23 +652,23 @@ const PANEL_STYLES = `.hive { position: relative; }
607
652
  .hive-init-repo {
608
653
  min-width: 0;
609
654
  overflow-wrap: anywhere;
610
- color: var(--hive-fg, #e6edf3);
655
+ color: var(--hive-fg);
611
656
  font-family: var(--hive-mono);
612
- font-size: 11px;
657
+ font-size: 12px;
613
658
  }
614
659
 
615
660
  .hive-init-title {
616
661
  margin: 10px 0 0;
617
662
  font-size: 16px;
618
663
  font-weight: 650;
619
- line-height: 1.35;
664
+ line-height: 1.5;
620
665
  }
621
666
 
622
667
  .hive-init-description {
623
668
  margin: 6px 0 0;
624
669
  color: var(--hive-fg-soft);
625
- font-size: 11.5px;
626
- line-height: 1.55;
670
+ font-size: 12px;
671
+ line-height: 1.5;
627
672
  }
628
673
 
629
674
  .hive-init-button { margin-top: 14px; }
@@ -636,7 +681,7 @@ const PANEL_STYLES = `.hive { position: relative; }
636
681
  .hive-init-readonly {
637
682
  margin-top: 8px;
638
683
  color: var(--hive-warn);
639
- font-size: 11px;
684
+ font-size: 12px;
640
685
  line-height: 1.5;
641
686
  }
642
687
 
@@ -645,8 +690,8 @@ const PANEL_STYLES = `.hive { position: relative; }
645
690
  align-items: center;
646
691
  gap: 7px;
647
692
  margin-top: 10px;
648
- color: var(--hive-accent, #58c4dc);
649
- font-size: 11px;
693
+ color: var(--hive-accent);
694
+ font-size: 12px;
650
695
  line-height: 1.5;
651
696
  }
652
697
 
@@ -654,8 +699,8 @@ const PANEL_STYLES = `.hive { position: relative; }
654
699
  width: 12px;
655
700
  height: 12px;
656
701
  flex: 0 0 auto;
657
- border: 2px solid color-mix(in srgb, var(--hive-accent, #58c4dc) 25%, transparent);
658
- border-top-color: var(--hive-accent, #58c4dc);
702
+ border: 2px solid color-mix(in srgb, var(--hive-accent) 25%, transparent);
703
+ border-top-color: var(--hive-accent);
659
704
  border-radius: 50%;
660
705
  animation: hive-spin 0.8s linear infinite;
661
706
  }
@@ -667,12 +712,12 @@ const PANEL_STYLES = `.hive { position: relative; }
667
712
  .hive-init-error {
668
713
  margin-top: 10px;
669
714
  padding: 8px 9px;
670
- border-left: 2px solid var(--hive-danger);
671
- border-radius: 0 5px 5px 0;
715
+ border-left: 1px solid var(--hive-danger);
716
+ border-radius: 0 var(--hive-radius-sm) var(--hive-radius-sm) 0;
672
717
  background: color-mix(in srgb, var(--hive-danger) 10%, transparent);
673
- color: color-mix(in srgb, var(--hive-danger) 82%, var(--hive-fg, #e6edf3));
718
+ color: color-mix(in srgb, var(--hive-danger) 82%, var(--hive-fg));
674
719
  font-family: var(--hive-mono);
675
- font-size: 10.5px;
720
+ font-size: 12px;
676
721
  line-height: 1.5;
677
722
  overflow-wrap: anywhere;
678
723
  white-space: pre-wrap;
@@ -680,15 +725,15 @@ const PANEL_STYLES = `.hive { position: relative; }
680
725
 
681
726
  .hive-init-output {
682
727
  margin-top: 10px;
683
- border: 1px solid var(--hive-line, #232b38);
684
- border-radius: 7px;
728
+ border: 1px solid var(--hive-line);
729
+ border-radius: var(--hive-radius-md);
685
730
  background: var(--hive-surface);
686
731
  }
687
732
 
688
733
  .hive-output-summary {
689
734
  padding: 6px 8px;
690
735
  color: var(--hive-fg-soft);
691
- font-size: 10px;
736
+ font-size: 12px;
692
737
  line-height: 1.5;
693
738
  cursor: pointer;
694
739
  user-select: none;
@@ -701,7 +746,7 @@ const PANEL_STYLES = `.hive { position: relative; }
701
746
  overflow: auto;
702
747
  color: var(--hive-fg-soft);
703
748
  font-family: var(--hive-mono);
704
- font-size: 10px;
749
+ font-size: 12px;
705
750
  line-height: 1.5;
706
751
  overflow-wrap: anywhere;
707
752
  white-space: pre-wrap;
@@ -719,19 +764,19 @@ const PANEL_STYLES = `.hive { position: relative; }
719
764
  flex-direction: row;
720
765
  gap: 8px;
721
766
  padding: 10px 16px;
722
- border-bottom: 1px solid color-mix(in srgb, var(--hive-accent, #58c4dc) 32%, var(--hive-line, #232b38));
767
+ border-bottom: 1px solid color-mix(in srgb, var(--hive-accent) 32%, var(--hive-line));
723
768
  background: var(--hive-accent-soft);
724
- color: var(--hive-accent, #58c4dc);
725
- font-size: 10.5px;
726
- line-height: 1.55;
769
+ color: var(--hive-accent);
770
+ font-size: 12px;
771
+ line-height: 1.5;
727
772
  }
728
773
 
729
774
  .hive-queen-hint.is-visible { display: flex; }
730
775
  .hive-queen-badge {
731
776
  padding: 2px 8px;
732
- border: 1px solid var(--hive-line, #232b38);
777
+ border: 1px solid var(--hive-line);
733
778
  border-radius: 999px;
734
- font-size: 10px;
779
+ font-size: 12px;
735
780
  font-weight: 650;
736
781
  letter-spacing: 0.09em;
737
782
  line-height: 1.5;
@@ -742,19 +787,19 @@ const PANEL_STYLES = `.hive { position: relative; }
742
787
  .hive-queen-badge.is-hidden { display: none; }
743
788
 
744
789
  .hive-queen-badge.is-active {
745
- border-color: color-mix(in srgb, var(--hive-accent, #58c4dc) 45%, transparent);
790
+ border-color: color-mix(in srgb, var(--hive-accent) 45%, transparent);
746
791
  background: var(--hive-accent-soft);
747
- color: var(--hive-accent, #58c4dc);
792
+ color: var(--hive-accent);
748
793
  }
749
794
 
750
795
  .hive-queen-badge.is-inactive {
751
- border-color: var(--hive-line, #232b38);
796
+ border-color: var(--hive-line);
752
797
  background: var(--hive-surface);
753
798
  color: var(--hive-fg-soft);
754
799
  }
755
800
 
756
801
  .hive-queen-hint.is-offer {
757
- border-bottom-color: var(--hive-line, #232b38);
802
+ border-bottom-color: var(--hive-line);
758
803
  background: var(--hive-surface);
759
804
  color: var(--hive-fg-soft);
760
805
  }
@@ -783,15 +828,15 @@ const PANEL_STYLES = `.hive { position: relative; }
783
828
  padding: 0 6px;
784
829
  color: var(--hive-fg-soft);
785
830
  font-size: 16px;
786
- line-height: 1.4;
831
+ line-height: 1.5;
787
832
  }
788
833
 
789
834
  .hive-queen-dismiss.is-hidden { display: none; }
790
835
 
791
836
  .hive-queen-takeover {
792
- border-color: color-mix(in srgb, var(--hive-accent, #58c4dc) 45%, var(--hive-line, #232b38));
837
+ border-color: color-mix(in srgb, var(--hive-accent) 45%, var(--hive-line));
793
838
  background: var(--hive-accent-soft);
794
- color: var(--hive-accent, #58c4dc);
839
+ color: var(--hive-accent);
795
840
  }
796
841
 
797
842
  .hive-queen-takeover:disabled {
@@ -808,11 +853,11 @@ const PANEL_STYLES = `.hive { position: relative; }
808
853
 
809
854
  .hive-queen-output {
810
855
  margin-top: 6px;
811
- border-color: color-mix(in srgb, var(--hive-accent, #58c4dc) 32%, var(--hive-line, #232b38));
812
- background: color-mix(in srgb, var(--hive-bg, #0b0f17) 80%, transparent);
856
+ border-color: color-mix(in srgb, var(--hive-accent) 32%, var(--hive-line));
857
+ background: color-mix(in srgb, var(--hive-bg) 80%, transparent);
813
858
  }
814
859
 
815
- .hive-queen-output .hive-output-summary { color: var(--hive-accent, #58c4dc); }
860
+ .hive-queen-output .hive-output-summary { color: var(--hive-accent); }
816
861
  .hive-queen-output .hive-output-pre { max-height: 120px; }
817
862
 
818
863
  .hive-supervisor {
@@ -823,16 +868,16 @@ const PANEL_STYLES = `.hive { position: relative; }
823
868
  gap: 5px 8px;
824
869
  min-width: 0;
825
870
  padding: 6px 12px;
826
- border-bottom: 1px solid var(--hive-line, #232b38);
827
- background: color-mix(in srgb, var(--hive-fg, #e6edf3) 2%, transparent);
828
- font-size: 10.5px;
871
+ border-bottom: 1px solid var(--hive-line);
872
+ background: color-mix(in srgb, var(--hive-fg) 2%, transparent);
873
+ font-size: 12px;
829
874
  }
830
875
 
831
876
  .hive-supervisor.is-hidden { display: none; }
832
877
 
833
878
  .hive-supervisor-label {
834
879
  color: var(--hive-fg-soft);
835
- font-size: 9.5px;
880
+ font-size: 12px;
836
881
  font-weight: 650;
837
882
  letter-spacing: 0.12em;
838
883
  text-transform: uppercase;
@@ -852,7 +897,7 @@ const PANEL_STYLES = `.hive { position: relative; }
852
897
  gap: 5px;
853
898
  max-width: 100%;
854
899
  padding: 1px 7px;
855
- border: 1px solid var(--hive-line, #232b38);
900
+ border: 1px solid var(--hive-line);
856
901
  border-radius: 999px;
857
902
  background: var(--hive-surface);
858
903
  }
@@ -862,13 +907,13 @@ const PANEL_STYLES = `.hive { position: relative; }
862
907
  overflow: hidden;
863
908
  color: var(--hive-fg-soft);
864
909
  font-family: var(--hive-mono);
865
- font-size: 9.5px;
910
+ font-size: 12px;
866
911
  text-overflow: ellipsis;
867
912
  white-space: nowrap;
868
913
  }
869
914
 
870
915
  .hive-supervisor-state {
871
- font-size: 9.5px;
916
+ font-size: 12px;
872
917
  font-weight: 600;
873
918
  white-space: nowrap;
874
919
  }
@@ -881,16 +926,16 @@ const PANEL_STYLES = `.hive { position: relative; }
881
926
  .hive-supervisor-resume {
882
927
  margin-left: 2px;
883
928
  padding: 2px 6px;
884
- font-size: 9.5px;
885
- line-height: 1.3;
929
+ font-size: 12px;
930
+ line-height: 1.5;
886
931
  }
887
932
 
888
933
  .hive-supervisor-limits {
889
934
  flex: 0 0 auto;
890
935
  margin-left: auto;
891
936
  padding: 2px 7px;
892
- font-size: 9.5px;
893
- line-height: 1.4;
937
+ font-size: 12px;
938
+ line-height: 1.5;
894
939
  }
895
940
 
896
941
  .hive-supervisor-limits.is-hidden { display: none; }
@@ -905,7 +950,7 @@ const PANEL_STYLES = `.hive { position: relative; }
905
950
 
906
951
  .hive-limits-repo-label {
907
952
  color: var(--hive-fg-faint);
908
- font-size: 9.5px;
953
+ font-size: 12px;
909
954
  font-weight: 650;
910
955
  letter-spacing: 0.1em;
911
956
  text-transform: uppercase;
@@ -913,14 +958,14 @@ const PANEL_STYLES = `.hive { position: relative; }
913
958
 
914
959
  .hive-limits-repo-path {
915
960
  overflow-wrap: anywhere;
916
- color: var(--hive-fg, #e6edf3);
961
+ color: var(--hive-fg);
917
962
  font-family: var(--hive-mono);
918
- font-size: 10px;
963
+ font-size: 12px;
919
964
  }
920
965
 
921
966
  .hive-limits-description {
922
967
  color: var(--hive-fg-soft);
923
- font-size: 10.5px;
968
+ font-size: 12px;
924
969
  line-height: 1.5;
925
970
  }
926
971
 
@@ -933,31 +978,50 @@ const PANEL_STYLES = `.hive { position: relative; }
933
978
 
934
979
  .hive-limits-row {
935
980
  display: grid;
936
- grid-template-columns: minmax(0, 1fr) 96px 48px 48px;
981
+ grid-template-columns: minmax(0, 1fr) 96px 48px 48px 28px;
937
982
  align-items: center;
938
983
  gap: 6px;
939
984
  min-width: 0;
940
985
  padding: 3px 0;
941
- border-top: 1px solid color-mix(in srgb, var(--hive-line, #232b38) 70%, transparent);
986
+ border-top: 1px solid color-mix(in srgb, var(--hive-line) 70%, transparent);
987
+ }
988
+
989
+ .hive-limits-cell.is-action { min-width: 28px; }
990
+
991
+ .hive-role-remove {
992
+ width: 28px;
993
+ min-width: 28px;
994
+ height: 24px;
995
+ padding: 0;
996
+ border-color: transparent;
997
+ background: transparent;
998
+ color: var(--hive-danger);
999
+ font-size: 14px;
1000
+ line-height: 1;
1001
+ }
1002
+
1003
+ .hive-role-remove:hover:not(:disabled) {
1004
+ border-color: color-mix(in srgb, var(--hive-danger) 55%, var(--hive-line));
1005
+ background: color-mix(in srgb, var(--hive-danger) 12%, transparent);
942
1006
  }
943
1007
 
944
1008
  .hive-limits-row.is-head {
945
1009
  padding: 0 0 2px;
946
1010
  border-top: 0;
947
1011
  color: var(--hive-fg-faint);
948
- font-size: 9px;
1012
+ font-size: 12px;
949
1013
  letter-spacing: 0.06em;
950
1014
  text-transform: uppercase;
951
1015
  }
952
1016
 
953
1017
  .hive-limits-cell { min-width: 0; }
954
- .hive-limits-cell.is-number { text-align: right; color: var(--hive-fg-soft); font-family: var(--hive-mono); font-size: 10px; }
1018
+ .hive-limits-cell.is-number { text-align: right; color: var(--hive-fg-soft); font-family: var(--hive-mono); font-size: 12px; }
955
1019
 
956
1020
  .hive-limits-role {
957
1021
  overflow: hidden;
958
- color: var(--hive-fg, #e6edf3);
1022
+ color: var(--hive-fg);
959
1023
  font-family: var(--hive-mono);
960
- font-size: 10.5px;
1024
+ font-size: 12px;
961
1025
  text-overflow: ellipsis;
962
1026
  white-space: nowrap;
963
1027
  }
@@ -966,30 +1030,30 @@ const PANEL_STYLES = `.hive { position: relative; }
966
1030
  width: 100%;
967
1031
  padding: 4px 5px;
968
1032
  font-family: var(--hive-mono);
969
- font-size: 10.5px;
1033
+ font-size: 12px;
970
1034
  text-align: right;
971
1035
  }
972
1036
 
973
1037
  .hive-limits-hint {
974
1038
  color: var(--hive-fg-faint);
975
- font-size: 9.5px;
976
- line-height: 1.4;
1039
+ font-size: 12px;
1040
+ line-height: 1.5;
977
1041
  }
978
1042
 
979
1043
  .hive-limits-empty {
980
1044
  color: var(--hive-fg-faint);
981
- font-size: 10.5px;
1045
+ font-size: 12px;
982
1046
  line-height: 1.5;
983
1047
  }
984
1048
 
985
1049
  .hive-limits-error {
986
1050
  padding: 8px 9px;
987
- border-left: 2px solid var(--hive-danger);
988
- border-radius: 0 5px 5px 0;
1051
+ border-left: 1px solid var(--hive-danger);
1052
+ border-radius: 0 var(--hive-radius-sm) var(--hive-radius-sm) 0;
989
1053
  background: color-mix(in srgb, var(--hive-danger) 10%, transparent);
990
- color: color-mix(in srgb, var(--hive-danger) 82%, var(--hive-fg, #e6edf3));
1054
+ color: color-mix(in srgb, var(--hive-danger) 82%, var(--hive-fg));
991
1055
  font-family: var(--hive-mono);
992
- font-size: 10.5px;
1056
+ font-size: 12px;
993
1057
  line-height: 1.5;
994
1058
  overflow-wrap: anywhere;
995
1059
  white-space: pre-wrap;
@@ -999,15 +1063,15 @@ const PANEL_STYLES = `.hive { position: relative; }
999
1063
 
1000
1064
  .hive-status {
1001
1065
  padding: 2px 8px;
1002
- border: 1px solid color-mix(in srgb, var(--hive-danger) 40%, var(--hive-line, #232b38));
1066
+ border: 1px solid color-mix(in srgb, var(--hive-danger) 40%, var(--hive-line));
1003
1067
  border-radius: 999px;
1004
1068
  background: color-mix(in srgb, var(--hive-danger) 9%, transparent);
1005
1069
  }
1006
1070
 
1007
1071
  .hive-field-hint {
1008
1072
  padding: 4px 7px;
1009
- border: 1px solid color-mix(in srgb, var(--hive-line, #232b38) 70%, transparent);
1010
- border-radius: 5px;
1073
+ border: 1px solid color-mix(in srgb, var(--hive-line) 70%, transparent);
1074
+ border-radius: var(--hive-radius-sm);
1011
1075
  background: var(--hive-surface);
1012
1076
  line-height: 1.5;
1013
1077
  }
@@ -1024,7 +1088,7 @@ const PANEL_STYLES = `.hive { position: relative; }
1024
1088
 
1025
1089
  .hive-oldest-id {
1026
1090
  font-family: var(--hive-mono);
1027
- font-size: 9.5px;
1091
+ font-size: 12px;
1028
1092
  font-weight: 400;
1029
1093
  overflow-wrap: anywhere;
1030
1094
  }
@@ -1036,19 +1100,19 @@ const PANEL_STYLES = `.hive { position: relative; }
1036
1100
  gap: 5px;
1037
1101
  min-width: 0;
1038
1102
  padding: 1px 8px;
1039
- border: 1px solid var(--hive-line, #232b38);
1103
+ border: 1px solid var(--hive-line);
1040
1104
  border-radius: 999px;
1041
1105
  background: var(--hive-surface);
1042
1106
  color: var(--hive-fg-soft);
1043
- font-size: 10px;
1044
- line-height: 1.6;
1107
+ font-size: 12px;
1108
+ line-height: 1.5;
1045
1109
  }
1046
1110
 
1047
1111
  .hive-supervisor-inline.is-hidden { display: none; }
1048
1112
 
1049
1113
  .hive-supervisor-inline-label {
1050
1114
  color: var(--hive-fg-faint);
1051
- font-size: 9.5px;
1115
+ font-size: 12px;
1052
1116
  font-weight: 650;
1053
1117
  letter-spacing: 0.1em;
1054
1118
  text-transform: uppercase;
@@ -1067,8 +1131,8 @@ const PANEL_STYLES = `.hive { position: relative; }
1067
1131
 
1068
1132
  .hive-supervisor-inline-resume {
1069
1133
  padding: 1px 6px;
1070
- font-size: 9.5px;
1071
- line-height: 1.3;
1134
+ font-size: 12px;
1135
+ line-height: 1.5;
1072
1136
  }
1073
1137
 
1074
1138
  .hive-supervisor-inline-resume.is-hidden { display: none; }
@@ -1078,7 +1142,7 @@ const PANEL_STYLES = `.hive { position: relative; }
1078
1142
  min-width: 28px;
1079
1143
  padding-inline: 8px;
1080
1144
  font-size: 14px;
1081
- line-height: 1.2;
1145
+ line-height: 1.5;
1082
1146
  }
1083
1147
 
1084
1148
  .hive-settings-section {
@@ -1087,14 +1151,14 @@ const PANEL_STYLES = `.hive { position: relative; }
1087
1151
  gap: 8px;
1088
1152
  min-width: 0;
1089
1153
  padding-top: 12px;
1090
- border-top: 1px solid color-mix(in srgb, var(--hive-line, #232b38) 70%, transparent);
1154
+ border-top: 1px solid color-mix(in srgb, var(--hive-line) 70%, transparent);
1091
1155
  }
1092
1156
 
1093
1157
  .hive-settings-section:first-of-type { padding-top: 0; border-top: 0; }
1094
1158
 
1095
1159
  .hive-settings-section-title {
1096
- color: var(--hive-fg, #e6edf3);
1097
- font-size: 11px;
1160
+ color: var(--hive-fg);
1161
+ font-size: 12px;
1098
1162
  font-weight: 650;
1099
1163
  letter-spacing: 0.08em;
1100
1164
  text-transform: uppercase;
@@ -1110,12 +1174,12 @@ const PANEL_STYLES = `.hive { position: relative; }
1110
1174
 
1111
1175
  .hive-settings-note {
1112
1176
  padding: 8px 10px;
1113
- border: 1px solid color-mix(in srgb, var(--hive-warn) 38%, var(--hive-line, #232b38));
1114
- border-radius: 6px;
1177
+ border: 1px solid color-mix(in srgb, var(--hive-warn) 38%, var(--hive-line));
1178
+ border-radius: var(--hive-radius-sm);
1115
1179
  background: color-mix(in srgb, var(--hive-warn) 9%, transparent);
1116
1180
  color: var(--hive-warn);
1117
- font-size: 10.5px;
1118
- line-height: 1.55;
1181
+ font-size: 12px;
1182
+ line-height: 1.5;
1119
1183
  }
1120
1184
 
1121
1185
  /* -------------------------------------------------------------------- spacing */
@@ -1154,18 +1218,18 @@ const PANEL_STYLES = `.hive { position: relative; }
1154
1218
  .hive-plan-hint,
1155
1219
  .hive-limits-description,
1156
1220
  .hive-limits-hint,
1157
- .hive-queen-text { max-width: 76ch; line-height: 1.55; }
1221
+ .hive-queen-text { max-width: 76ch; line-height: 1.5; }
1158
1222
 
1159
1223
  .hive-empty,
1160
1224
  .hive-filter-empty,
1161
1225
  .hive-agents-empty {
1162
1226
  padding: 12px 14px;
1163
- border: 1px solid var(--hive-line, #232b38);
1164
- border-radius: 8px;
1227
+ border: 1px solid var(--hive-line);
1228
+ border-radius: var(--hive-radius-md);
1165
1229
  background: var(--hive-surface);
1166
1230
  color: var(--hive-fg-soft);
1167
- font-size: 10.5px;
1168
- line-height: 1.55;
1231
+ font-size: 12px;
1232
+ line-height: 1.5;
1169
1233
  text-align: left;
1170
1234
  }
1171
1235
 
@@ -1175,20 +1239,20 @@ const PANEL_STYLES = `.hive { position: relative; }
1175
1239
  .hive-limits-hint,
1176
1240
  .hive-note {
1177
1241
  padding: 8px 10px;
1178
- border: 1px solid color-mix(in srgb, var(--hive-line, #232b38) 80%, transparent);
1179
- border-radius: 6px;
1242
+ border: 1px solid color-mix(in srgb, var(--hive-line) 80%, transparent);
1243
+ border-radius: var(--hive-radius-sm);
1180
1244
  background: var(--hive-surface);
1181
1245
  color: var(--hive-fg-soft);
1182
- font-size: 10.5px;
1183
- line-height: 1.55;
1246
+ font-size: 12px;
1247
+ line-height: 1.5;
1184
1248
  }
1185
1249
 
1186
1250
  .hive-init-readonly {
1187
1251
  padding: 8px 10px;
1188
- border: 1px solid color-mix(in srgb, var(--hive-warn) 38%, var(--hive-line, #232b38));
1189
- border-radius: 6px;
1252
+ border: 1px solid color-mix(in srgb, var(--hive-warn) 38%, var(--hive-line));
1253
+ border-radius: var(--hive-radius-sm);
1190
1254
  background: color-mix(in srgb, var(--hive-warn) 9%, transparent);
1191
- line-height: 1.55;
1255
+ line-height: 1.5;
1192
1256
  }
1193
1257
 
1194
1258
  .hive-icon-button {
@@ -1203,7 +1267,7 @@ const PANEL_STYLES = `.hive { position: relative; }
1203
1267
  border: 0;
1204
1268
  border-color: transparent;
1205
1269
  background: transparent;
1206
- color: color-mix(in srgb, var(--hive-fg, #e6edf3) 80%, transparent);
1270
+ color: color-mix(in srgb, var(--hive-fg) 80%, transparent);
1207
1271
  font-size: 0;
1208
1272
  line-height: 1;
1209
1273
  box-shadow: none;
@@ -1214,13 +1278,13 @@ const PANEL_STYLES = `.hive { position: relative; }
1214
1278
  border: 0;
1215
1279
  border-color: transparent;
1216
1280
  background: transparent;
1217
- color: var(--hive-fg, #e6edf3);
1281
+ color: var(--hive-fg);
1218
1282
  }
1219
1283
 
1220
1284
  .hive-icon-button:active { transform: none; }
1221
1285
 
1222
1286
  .hive-icon-button:focus-visible {
1223
- outline: 2px solid var(--hive-accent, #58c4dc);
1287
+ outline: 2px solid var(--hive-accent);
1224
1288
  outline-offset: 1px;
1225
1289
  }
1226
1290
 
@@ -1266,7 +1330,7 @@ const PANEL_STYLES = `.hive { position: relative; }
1266
1330
  display: flex;
1267
1331
  align-items: center;
1268
1332
  gap: 4px;
1269
- border-bottom: 1px solid var(--hive-line, #232b38);
1333
+ border-bottom: 1px solid var(--hive-line);
1270
1334
  }
1271
1335
 
1272
1336
  .hive-settings-tab {
@@ -1276,20 +1340,20 @@ const PANEL_STYLES = `.hive { position: relative; }
1276
1340
  border-bottom: 2px solid transparent;
1277
1341
  background: transparent;
1278
1342
  color: var(--hive-fg-soft);
1279
- font-size: 11.5px;
1280
- line-height: 1.3;
1343
+ font-size: 12px;
1344
+ line-height: 1.5;
1281
1345
  cursor: pointer;
1282
1346
  }
1283
1347
 
1284
- .hive-settings-tab:hover { color: var(--hive-fg, #e6edf3); }
1348
+ .hive-settings-tab:hover { color: var(--hive-fg); }
1285
1349
 
1286
1350
  .hive-settings-tab[aria-selected="true"] {
1287
- border-bottom-color: var(--hive-accent, #58c4dc);
1288
- color: var(--hive-fg, #e6edf3);
1351
+ border-bottom-color: var(--hive-accent);
1352
+ color: var(--hive-fg);
1289
1353
  }
1290
1354
 
1291
1355
  .hive-settings-tab:focus-visible {
1292
- outline: 2px solid var(--hive-accent, #58c4dc);
1356
+ outline: 2px solid var(--hive-accent);
1293
1357
  outline-offset: -2px;
1294
1358
  }
1295
1359
 
@@ -1300,6 +1364,17 @@ const PANEL_STYLES = `.hive { position: relative; }
1300
1364
  border-top: 0;
1301
1365
  }
1302
1366
 
1367
+ .hive-help-queen code,
1368
+ .hive-queen-command {
1369
+ padding: 1px 4px;
1370
+ border: 1px solid var(--hive-line);
1371
+ border-radius: var(--hive-radius-sm);
1372
+ background: var(--hive-surface);
1373
+ font-family: var(--hive-mono);
1374
+ font-size: 12px;
1375
+ white-space: nowrap;
1376
+ }
1377
+
1303
1378
  .hive-settings-form-actions {
1304
1379
  display: flex;
1305
1380
  align-items: center;
@@ -1317,8 +1392,8 @@ const PANEL_STYLES = `.hive { position: relative; }
1317
1392
  height: 28px;
1318
1393
  min-height: 28px;
1319
1394
  padding: 0 14px;
1320
- border-radius: 7px;
1321
- font-size: 11.5px;
1395
+ border-radius: var(--hive-radius-md);
1396
+ font-size: 12px;
1322
1397
  line-height: 1;
1323
1398
  }
1324
1399
 
@@ -1328,27 +1403,27 @@ const PANEL_STYLES = `.hive { position: relative; }
1328
1403
  }
1329
1404
 
1330
1405
  .hive-settings-primary {
1331
- border-color: color-mix(in srgb, var(--hive-accent, #58c4dc) 70%, var(--hive-line, #232b38));
1332
- background: var(--hive-accent, #58c4dc);
1333
- color: var(--hive-bg, #0b0f17);
1406
+ border-color: color-mix(in srgb, var(--hive-accent) 70%, var(--hive-line));
1407
+ background: var(--hive-accent);
1408
+ color: var(--hive-bg);
1334
1409
  }
1335
1410
 
1336
1411
  .hive-settings-primary:hover {
1337
- border-color: var(--hive-accent, #58c4dc);
1338
- background: color-mix(in srgb, var(--hive-accent, #58c4dc) 86%, white);
1339
- color: var(--hive-bg, #0b0f17);
1412
+ border-color: var(--hive-accent);
1413
+ background: color-mix(in srgb, var(--hive-accent) 86%, white);
1414
+ color: var(--hive-bg);
1340
1415
  }
1341
1416
 
1342
1417
  .hive-settings-secondary {
1343
- border-color: var(--hive-line, #232b38);
1418
+ border-color: var(--hive-line);
1344
1419
  background: var(--hive-surface-strong);
1345
- color: var(--hive-fg, #e6edf3);
1420
+ color: var(--hive-fg);
1346
1421
  }
1347
1422
 
1348
1423
  .hive-settings-secondary:hover {
1349
- border-color: color-mix(in srgb, var(--hive-accent, #58c4dc) 40%, var(--hive-line, #232b38));
1424
+ border-color: color-mix(in srgb, var(--hive-accent) 40%, var(--hive-line));
1350
1425
  background: var(--hive-surface-hover);
1351
- color: var(--hive-fg, #e6edf3);
1426
+ color: var(--hive-fg);
1352
1427
  }
1353
1428
 
1354
1429
  .hive-settings-form-actions .hive-btn:disabled {
@@ -1365,10 +1440,10 @@ const PANEL_STYLES = `.hive { position: relative; }
1365
1440
  max-width: 92vw;
1366
1441
  height: auto;
1367
1442
  max-height: 80vh;
1368
- border: 1px solid var(--hive-line, #232b38);
1369
- border-radius: 12px;
1370
- background: color-mix(in srgb, var(--hive-bg, #0b0f17) 97%, var(--hive-fg, #e6edf3) 3%);
1371
- box-shadow: 0 24px 70px rgb(0 0 0 / 52%);
1443
+ border: 1px solid var(--hive-line);
1444
+ border-radius: var(--hive-radius-lg);
1445
+ background: color-mix(in srgb, var(--hive-bg) 97%, var(--hive-fg) 3%);
1446
+ box-shadow: none;
1372
1447
  overflow: hidden;
1373
1448
  }
1374
1449
 
@@ -1379,7 +1454,7 @@ const PANEL_STYLES = `.hive { position: relative; }
1379
1454
  overflow-wrap: anywhere;
1380
1455
  color: var(--hive-fg-soft);
1381
1456
  font-family: var(--hive-mono);
1382
- font-size: 10.5px;
1457
+ font-size: 12px;
1383
1458
  line-height: 1.5;
1384
1459
  }
1385
1460
 
@@ -1400,35 +1475,57 @@ const PANEL_STYLES = `.hive { position: relative; }
1400
1475
  overflow: auto;
1401
1476
  }
1402
1477
 
1403
- .hive-card-json {
1404
- border: 1px solid var(--hive-line, #232b38);
1405
- border-radius: 8px;
1478
+ .hive-card-run {
1479
+ border: 1px solid var(--hive-line);
1480
+ border-radius: var(--hive-radius-md);
1406
1481
  background: var(--hive-surface);
1407
1482
  overflow: hidden;
1408
1483
  }
1409
1484
 
1410
- .hive-card-json-summary {
1485
+ .hive-card-run-title {
1411
1486
  padding: 8px 10px;
1412
1487
  color: var(--hive-fg-soft);
1413
- font-size: 10px;
1488
+ font-size: 12px;
1414
1489
  font-weight: 650;
1415
1490
  letter-spacing: 0.08em;
1416
1491
  line-height: 1.5;
1417
1492
  text-transform: uppercase;
1418
- cursor: pointer;
1419
- user-select: none;
1420
1493
  }
1421
1494
 
1422
- .hive-card-json .hive-json {
1423
- max-height: 300px;
1495
+ .hive-card-run-meta {
1496
+ padding: 0 10px 8px;
1497
+ overflow-wrap: anywhere;
1498
+ color: var(--hive-fg-soft);
1499
+ font-family: var(--hive-mono);
1500
+ font-size: 12px;
1501
+ line-height: 1.5;
1502
+ }
1503
+
1504
+ .hive-card-run-empty {
1505
+ margin: 0 10px 10px;
1506
+ }
1507
+
1508
+ .hive-card-run-output {
1509
+ max-height: 360px;
1510
+ max-height: 20lh; /* longer output scrolls inside the pre */
1424
1511
  margin: 0;
1425
1512
  padding: 10px;
1426
1513
  overflow: auto;
1427
- border-top: 1px solid var(--hive-line, #232b38);
1514
+ border-top: 1px solid var(--hive-line);
1515
+ background: var(--hive-surface);
1428
1516
  font-family: var(--hive-mono);
1429
- font-size: 10.5px;
1517
+ font-size: 12px;
1430
1518
  line-height: 1.5;
1431
1519
  white-space: pre-wrap;
1520
+ overflow-wrap: anywhere;
1521
+ }
1522
+
1523
+ .hive-card-run-foot {
1524
+ display: flex;
1525
+ justify-content: flex-end;
1526
+ gap: 8px;
1527
+ padding: 8px 10px;
1528
+ border-top: 1px solid var(--hive-line);
1432
1529
  }
1433
1530
 
1434
1531
  .hive-card-actions {
@@ -1459,24 +1556,440 @@ const PANEL_STYLES = `.hive { position: relative; }
1459
1556
  .hive-add-acceptance { min-height: 70px; }
1460
1557
 
1461
1558
  .hive-add-submit {
1462
- border-color: color-mix(in srgb, var(--hive-accent, #58c4dc) 70%, var(--hive-line, #232b38));
1463
- background: var(--hive-accent, #58c4dc);
1464
- color: var(--hive-bg, #0b0f17);
1559
+ border-color: color-mix(in srgb, var(--hive-accent) 70%, var(--hive-line));
1560
+ background: var(--hive-accent);
1561
+ color: var(--hive-bg);
1562
+ }
1563
+
1564
+ .hive-add-submit:hover:not(:disabled) {
1565
+ border-color: var(--hive-accent);
1566
+ background: color-mix(in srgb, var(--hive-accent) 86%, white);
1567
+ color: var(--hive-bg);
1568
+ }
1569
+
1570
+ /* Unified type scale: 12 / 14 / 16 / 18 only. */
1571
+ .hive { font-size: 14px; line-height: 1.5; }
1572
+ .hive * { font-size: 14px; line-height: 1.5; }
1573
+ .hive-dialog-title,
1574
+ .hive-help-title { font-size: 16px; line-height: 1.5; }
1575
+ .hive-settings-section-title,
1576
+ .hive-section-label,
1577
+ .hive-plan-preview-head,
1578
+ .hive-events-title,
1579
+ .hive-lane-head { font-size: 14px; font-weight: 700; line-height: 1.5; }
1580
+ .hive-card-title { font-size: 14px; font-weight: 600; line-height: 1.35; }
1581
+ .hive-btn,
1582
+ .hive-settings-form-actions .hive-btn,
1583
+ .hive-settings-tab,
1584
+ .hive-stage-chip,
1585
+ .hive-agent-pill,
1586
+ .hive-events-toggle,
1587
+ .hive-supervisor-resume,
1588
+ .hive-queen-takeover,
1589
+ .hive-queen-dismiss { font-size: 14px; line-height: 1.5; }
1590
+ .hive-input,
1591
+ .hive-textarea,
1592
+ .hive-limits-input { font-size: 14px; line-height: 1.5; }
1593
+ .hive-help-desc,
1594
+ .hive-help-note,
1595
+ .hive-help-hint,
1596
+ .hive-field-label,
1597
+ .hive-field-hint,
1598
+ .hive-limits-description,
1599
+ .hive-limits-hint,
1600
+ .hive-limits-empty,
1601
+ .hive-settings-note,
1602
+ .hive-empty,
1603
+ .hive-filter-empty,
1604
+ .hive-plan-empty,
1605
+ .hive-plan-hint,
1606
+ .hive-plan-meta,
1607
+ .hive-plan-error,
1608
+ .hive-init-description,
1609
+ .hive-queen-text,
1610
+ .hive-agent-empty,
1611
+ .hive-card-meta,
1612
+ .hive-card-reason,
1613
+ .hive-card-scope,
1614
+ .hive-toast-detail,
1615
+ .hive-limits-row.is-head,
1616
+ .hive-queen-badge { font-size: 12px; line-height: 1.5; }
1617
+ .hive-repo,
1618
+ .hive-card-subline,
1619
+ .hive-card-id,
1620
+ .hive-json,
1621
+ .hive-plan-raw,
1622
+ .hive-plan-key,
1623
+ .hive-plan-chip,
1624
+ .hive-help-params,
1625
+ .hive-toast-detail,
1626
+ .hive-oldest-id,
1627
+ .hive-scope,
1628
+ .hive-supervisor-path,
1629
+ .hive-queen-command,
1630
+ .hive-dialog-eyebrow,
1631
+ .hive-limits-cell.is-number { font-size: 12px; line-height: 1.5; }
1632
+ .hive-dialog-close { font-size: 16px; line-height: 1; }
1633
+ .hive-role-remove { font-size: 16px; line-height: 1; }
1634
+ .hive-icon-button { font-size: 0; line-height: 1; }
1635
+ /* DSH design-token bridge. Neutral grayscale fallbacks keep standalone pages readable. */
1636
+ .hive, .hive-portal, .hive-dialog {
1637
+ --hive-bg: var(--dsw-alias-bg-base, #fff);
1638
+ --hive-bg-layer-1: var(--dsw-alias-bg-layer-1, #fff);
1639
+ --hive-bg-layer-2: var(--dsw-alias-bg-layer-2, #fff);
1640
+ --hive-bg-layer-3: var(--dsw-alias-bg-layer-3, #f5f5f5);
1641
+ --hive-line: var(--dsw-alias-border-l1, #d9d9d9);
1642
+ --hive-line-2: var(--dsw-alias-border-l2, #e8e8e8);
1643
+ --hive-fg: var(--dsw-alias-label-primary, #000);
1644
+ --hive-fg-soft: var(--dsw-alias-label-secondary, #4d4d4d);
1645
+ --hive-fg-faint: var(--dsw-alias-label-tertiary, #808080);
1646
+ --hive-accent: var(--dsw-alias-brand-primary, #000);
1647
+ --hive-hover: var(--dsw-alias-interactive-bg-hover, #f2f2f2);
1648
+ --hive-selected: var(--dsw-alias-border-selected, #000);
1649
+ --hive-danger: var(--dsw-alias-state-error-primary, #000);
1650
+ --hive-ok: var(--dsw-alias-state-success-primary, #000);
1651
+ --hive-warn: var(--dsw-alias-state-warn-primary, #000);
1652
+ --hive-info: var(--dsw-alias-brand-primary, #000);
1653
+ --hive-radius-sm: var(--dsw-radius-sm, 4px);
1654
+ --hive-radius-md: var(--dsw-radius-md, 8px);
1655
+ --hive-radius-lg: var(--dsw-radius-lg, 12px);
1656
+ --hive-elevation: var(--dsw-elevation-panel, 0 12px 32px rgba(0, 0, 0, 0.18));
1657
+ --hive-surface: var(--hive-bg-layer-1);
1658
+ --hive-surface-strong: var(--hive-bg-layer-2);
1659
+ --hive-surface-hover: var(--hive-hover);
1660
+ --hive-accent-soft: color-mix(in srgb, var(--hive-accent) 14%, transparent);
1661
+ --hive-label-on-brand: var(--hive-bg);
1662
+ --hive-mono: ui-monospace, "SFMono-Regular", "JetBrains Mono", Menlo, Consolas, monospace;
1663
+ }
1664
+ /* Tokenized component treatment. */
1665
+ .hive { background: var(--hive-bg); color: var(--hive-fg); border-color: var(--hive-line); border-radius: var(--hive-radius-lg); }
1666
+ .hive-bar { background: var(--hive-bg-layer-1); border-bottom-color: var(--hive-line); gap: 8px; }
1667
+ .hive-main,
1668
+ .hive-board { background: var(--hive-bg); }
1669
+ .hive-agents,
1670
+ .hive-events { background: var(--hive-bg-layer-1); border-color: var(--hive-line); }
1671
+ .hive-lane { background: var(--hive-bg-layer-1); border-color: var(--hive-line); border-radius: var(--hive-radius-md); }
1672
+ .hive-card { background: var(--hive-bg-layer-1); border: 1px solid var(--hive-line); border-radius: var(--hive-radius-md); box-shadow: none; }
1673
+ .hive-card:hover { background: var(--hive-hover); border-color: var(--hive-line); }
1674
+ .hive-btn { background: transparent; border: 1px solid var(--hive-line); color: var(--hive-fg); border-radius: var(--hive-radius-md); }
1675
+ .hive-btn:hover { background: var(--hive-hover); border-color: var(--hive-line); color: var(--hive-fg); }
1676
+ .hive-btn-ghost { background: transparent; border-color: transparent; color: var(--hive-fg-soft); }
1677
+ .hive-btn-ghost:hover { background: var(--hive-hover); border-color: transparent; color: var(--hive-fg); }
1678
+ .hive-btn-danger { background: transparent; border-color: var(--hive-danger); color: var(--hive-danger); }
1679
+ .hive-btn-danger:hover:not(:disabled) { background: var(--hive-hover); border-color: var(--hive-danger); color: var(--hive-danger); }
1680
+ .hive-settings-primary,
1681
+ .hive-add-submit { background: var(--hive-accent); border-color: var(--hive-accent); color: var(--hive-label-on-brand); }
1682
+ .hive-settings-primary:hover:not(:disabled),
1683
+ .hive-add-submit:hover:not(:disabled) { background: var(--hive-accent); border-color: var(--hive-accent); color: var(--hive-label-on-brand); }
1684
+ .hive-settings-secondary { background: transparent; border-color: var(--hive-line); color: var(--hive-fg); }
1685
+ .hive-settings-secondary:hover { background: var(--hive-hover); border-color: var(--hive-line); color: var(--hive-fg); }
1686
+ .hive-input,
1687
+ .hive-textarea,
1688
+ .hive-limits-input { background: var(--hive-bg-layer-1); border: 1px solid var(--hive-line); color: var(--hive-fg); border-radius: var(--hive-radius-sm); }
1689
+ .hive-input:focus,
1690
+ .hive-textarea:focus,
1691
+ .hive-limits-input:focus { outline: 1px solid var(--hive-selected); outline-offset: 0; }
1692
+ .hive-dialog,
1693
+ .hive-add-dialog,
1694
+ .hive-settings-dialog,
1695
+ .hive-card-dialog { background: var(--hive-bg-layer-2); border: 1px solid var(--hive-line); border-radius: var(--hive-radius-lg); box-shadow: var(--hive-elevation); color: var(--hive-fg); }
1696
+ .hive-toast { background: var(--hive-bg-layer-2); border: 1px solid var(--hive-line); border-radius: var(--hive-radius-lg); box-shadow: none; color: var(--hive-fg); }
1697
+ .hive-drawer { background: var(--hive-bg-layer-2); border-left: 1px solid var(--hive-line); box-shadow: none; }
1698
+ .hive-json,
1699
+ .hive-plan-raw,
1700
+ .hive-plan-item,
1701
+ .hive-scope,
1702
+ .hive-init-card,
1703
+ .hive-limits-error,
1704
+ .hive-settings-note { background: var(--hive-bg-layer-1); border-color: var(--hive-line); border-radius: var(--hive-radius-sm); }
1705
+ .hive-limits-row { border-top-color: var(--hive-line-2); }
1706
+ .hive-limits-row:not(.is-head):hover { background: var(--hive-hover); }
1707
+ .hive-settings-tab[aria-selected="true"] { border-bottom-color: var(--hive-selected); }
1708
+ .hive-lane-head,
1709
+ .hive-dialog-head,
1710
+ .hive-dialog-foot,
1711
+ .hive-drawer-head,
1712
+ .hive-settings-tabs { border-color: var(--hive-line-2); }
1713
+ .hive-freeze-banner { background: transparent; border-bottom-color: var(--hive-warn); color: var(--hive-warn); }
1714
+ .hive-freeze-banner .hive-btn { background: transparent; border-color: var(--hive-line); color: var(--hive-fg); }
1715
+ .hive-queen-hint { background: var(--hive-bg-layer-1); border-color: var(--hive-line); }
1716
+ .hive-supervisor-inline,
1717
+ .hive-stat,
1718
+ .hive-status,
1719
+ .hive-queen-badge {
1720
+ display: inline-flex;
1721
+ align-items: center;
1722
+ gap: 6px;
1723
+ height: 22px;
1724
+ padding: 0 8px;
1725
+ border: 1px solid var(--hive-line);
1726
+ border-radius: 999px;
1727
+ background: transparent;
1728
+ color: var(--hive-fg-soft);
1729
+ font-size: 12px;
1730
+ font-weight: 400;
1731
+ line-height: 1;
1732
+ white-space: nowrap;
1733
+ }
1734
+ .hive-supervisor-inline { gap: 6px; }
1735
+ .hive-supervisor-inline-label { color: var(--hive-fg-soft); font-weight: 400; }
1736
+ .hive-supervisor-inline-state { display: inline-flex; align-items: center; gap: 6px; color: var(--hive-fg-soft); font-size: 12px; font-weight: 400; }
1737
+ .hive-supervisor-inline-state::before { width: 6px; height: 6px; flex: 0 0 6px; border-radius: 50%; background: var(--hive-fg-faint); content: ""; }
1738
+ .hive-supervisor-inline-state.is-running::before { background: var(--hive-accent); }
1739
+ .hive-supervisor-inline-state.is-backoff::before { background: var(--hive-warn); }
1740
+ .hive-supervisor-inline-state.is-paused::before { background: var(--hive-fg-faint); }
1741
+ .hive-supervisor-inline-resume { height: auto; min-height: 0; padding: 0; border: 0; background: transparent; color: var(--hive-fg-soft); font-size: 12px; line-height: 1; }
1742
+ .hive-supervisor-inline-resume:hover { background: transparent; color: var(--hive-fg); }
1743
+ .hive-stats { flex-wrap: wrap; gap: 8px; }
1744
+ .hive-stat.is-warn { color: var(--hive-fg-soft); background: transparent; }
1745
+ .hive-stat strong { color: var(--hive-fg-soft); font-weight: 400; }
1746
+ .hive-status { color: var(--hive-fg-soft); }
1747
+ .hive-status::before { width: 6px; height: 6px; flex: 0 0 6px; border-radius: 50%; background: var(--hive-danger); content: ""; font-size: 0; }
1748
+ .hive-status.is-info::before { background: var(--hive-accent); }
1749
+ .hive-queen-badge { color: var(--hive-fg-soft); }
1750
+
1751
+ .hive-portal {
1752
+ position: fixed;
1753
+ inset: 0;
1754
+ z-index: 2147483600;
1755
+ pointer-events: none;
1756
+ }
1757
+
1758
+ .hive-portal > .hive-overlay { pointer-events: auto; }
1759
+
1760
+ /* Buttons: two explicit tiers. */
1761
+ .hive-btn {
1762
+ display: inline-flex;
1763
+ align-items: center;
1764
+ justify-content: center;
1765
+ gap: 6px;
1766
+ height: 28px;
1767
+ padding: 0 12px;
1768
+ border: 1px solid var(--hive-line-2);
1769
+ border-radius: var(--hive-radius-md);
1770
+ background: transparent;
1771
+ color: var(--hive-fg);
1772
+ font-size: 14px;
1773
+ font-weight: 600;
1774
+ line-height: 1.5;
1775
+ }
1776
+
1777
+ .hive-btn:hover {
1778
+ border-color: var(--hive-line-2);
1779
+ background: var(--hive-hover);
1780
+ color: var(--hive-fg);
1781
+ }
1782
+
1783
+ .hive-btn-ghost {
1784
+ border-color: transparent;
1785
+ background: transparent;
1786
+ color: var(--hive-fg-soft);
1787
+ }
1788
+
1789
+ .hive-btn-ghost:hover {
1790
+ border-color: transparent;
1791
+ background: var(--hive-hover);
1792
+ color: var(--hive-fg);
1793
+ }
1794
+
1795
+ .hive-btn-danger {
1796
+ border-color: var(--hive-danger);
1797
+ background: transparent;
1798
+ color: var(--hive-danger);
1799
+ }
1800
+
1801
+ .hive-btn-danger:hover:not(:disabled) {
1802
+ border-color: var(--hive-danger);
1803
+ background: var(--hive-hover);
1804
+ color: var(--hive-danger);
1805
+ }
1806
+
1807
+ .hive-settings-primary,
1808
+ .hive-add-submit {
1809
+ border-color: var(--hive-accent);
1810
+ background: var(--hive-accent);
1811
+ color: var(--hive-label-on-brand);
1812
+ font-weight: 600;
1465
1813
  }
1466
1814
 
1815
+ .hive-settings-primary:hover:not(:disabled),
1467
1816
  .hive-add-submit:hover:not(:disabled) {
1468
- border-color: var(--hive-accent, #58c4dc);
1469
- background: color-mix(in srgb, var(--hive-accent, #58c4dc) 86%, white);
1470
- color: var(--hive-bg, #0b0f17);
1817
+ border-color: var(--hive-accent);
1818
+ background: color-mix(in srgb, var(--hive-accent) 92%, #000);
1819
+ color: var(--hive-label-on-brand);
1820
+ }
1821
+
1822
+ .hive-settings-primary:active:not(:disabled),
1823
+ .hive-add-submit:active:not(:disabled) {
1824
+ border-color: var(--hive-accent);
1825
+ background: color-mix(in srgb, var(--hive-accent) 84%, #000);
1826
+ color: var(--hive-label-on-brand);
1827
+ }
1828
+
1829
+ .hive-settings-primary:focus-visible,
1830
+ .hive-add-submit:focus-visible {
1831
+ outline: 2px solid var(--hive-accent);
1832
+ outline-offset: 2px;
1833
+ }
1834
+
1835
+ .hive-settings-secondary {
1836
+ border-color: var(--hive-line-2);
1837
+ background: transparent;
1838
+ color: var(--hive-fg);
1839
+ }
1840
+
1841
+ .hive-settings-secondary:hover {
1842
+ border-color: var(--hive-line-2);
1843
+ background: var(--hive-hover);
1844
+ color: var(--hive-fg);
1845
+ }
1846
+
1847
+ .hive-icon-button,
1848
+ .hive-dialog-close {
1849
+ height: 28px;
1850
+ padding: 0;
1851
+ border: 0;
1852
+ background: transparent;
1853
+ color: var(--hive-fg-soft);
1471
1854
  }
1472
1855
 
1856
+ .hive-icon-button:hover,
1857
+ .hive-dialog-close:hover {
1858
+ border: 0;
1859
+ background: var(--hive-hover);
1860
+ color: var(--hive-fg);
1861
+ }
1862
+
1863
+ .hive-role-remove {
1864
+ height: 28px;
1865
+ min-height: 28px;
1866
+ padding: 0;
1867
+ border-color: transparent;
1868
+ background: transparent;
1869
+ color: var(--hive-danger);
1870
+ }
1871
+
1872
+ /* Dialogs are portaled to the document body; keep them above the panel. */
1873
+ .hive-dialog,
1874
+ .hive-add-dialog,
1875
+ .hive-settings-dialog,
1876
+ .hive-card-dialog {
1877
+ border: 1px solid var(--hive-line);
1878
+ background: var(--hive-bg-layer-2);
1879
+ box-shadow: var(--dsw-elevation-panel, 0 12px 32px rgba(0, 0, 0, 0.18));
1880
+ }
1881
+ /* toolbar action rhythm */
1882
+ .hive-actions { gap: 8px; }
1883
+ .hive-actions > .hive-btn { display: inline-flex; align-items: center; gap: 6px; flex: 0 0 auto; }
1884
+ /* Dialog form containment: portal content must not create horizontal scroll. */
1885
+ .hive-portal,
1886
+ .hive-portal *,
1887
+ .hive-portal *::before,
1888
+ .hive-portal *::after { box-sizing: border-box; }
1889
+
1890
+ .hive-portal .hive-dialog { max-width: 92vw; overflow-x: hidden; }
1891
+ .hive-portal .hive-dialog-head,
1892
+ .hive-portal .hive-dialog-body,
1893
+ .hive-portal .hive-dialog-foot { padding-left: 16px; padding-right: 16px; }
1894
+ .hive-portal .hive-dialog-body { width: auto; min-width: 0; max-width: 100%; }
1895
+ .hive-portal .hive-dialog-body > * { margin-left: 0; margin-right: 0; max-width: 100%; min-width: 0; }
1896
+ .hive-portal .hive-field,
1897
+ .hive-portal .hive-field-row,
1898
+ .hive-portal .hive-settings-section,
1899
+ .hive-portal .hive-settings-tabpanel,
1900
+ .hive-portal .hive-limits-table { width: 100%; max-width: 100%; min-width: 0; margin-left: 0; margin-right: 0; }
1901
+ .hive-portal .hive-field-row > .hive-field { width: auto; flex: 1 1 160px; }
1902
+ .hive-portal .hive-input,
1903
+ .hive-portal .hive-textarea,
1904
+ .hive-portal select { width: 100%; min-width: 0; max-width: 100%; }
1905
+ .hive-portal .hive-limits-row {
1906
+ width: 100%;
1907
+ max-width: 100%;
1908
+ min-width: 0;
1909
+ grid-template-columns: minmax(0, 1fr) 96px 48px 48px 28px;
1910
+ }
1911
+ .hive-portal .hive-limits-cell,
1912
+ .hive-portal .hive-limits-role,
1913
+ .hive-portal .hive-dialog-title,
1914
+ .hive-portal .hive-card-subline,
1915
+ .hive-portal .hive-settings-role-name { min-width: 0; overflow-wrap: anywhere; }
1916
+ .hive-portal .hive-dialog-foot { flex-wrap: wrap; }
1917
+ .hive-portal .hive-dialog-body { overflow-x: hidden; }
1918
+ .hive-portal .hive-settings-tabs { flex-wrap: wrap; }
1919
+ .hive-portal .hive-card-actions,
1920
+ .hive-portal .hive-settings-form-actions { max-width: 100%; }
1921
+ /* Native <dialog>: top layer, browser-managed backdrop and focus trap. */
1922
+ .hive-dialog,
1923
+ .hive-dialog *,
1924
+ .hive-dialog *::before,
1925
+ .hive-dialog *::after { box-sizing: border-box; }
1926
+
1927
+ dialog.hive-dialog {
1928
+ position: fixed;
1929
+ inset: 0;
1930
+ margin: auto;
1931
+ padding: 0;
1932
+ width: min(560px, 100%);
1933
+ max-width: 92vw;
1934
+ max-height: 80vh;
1935
+ overflow: hidden;
1936
+ border: 1px solid var(--hive-line);
1937
+ border-radius: var(--hive-radius-lg);
1938
+ background: var(--hive-bg-layer-2);
1939
+ color: var(--hive-fg);
1940
+ box-shadow: var(--dsw-elevation-panel, 0 12px 32px rgba(0, 0, 0, 0.18));
1941
+ color-scheme: light dark;
1942
+ }
1943
+
1944
+ dialog.hive-card-dialog { width: min(720px, 92vw); }
1945
+
1946
+ dialog.hive-dialog::backdrop {
1947
+ background: var(--dsw-alias-bg-mask-1, rgba(0, 0, 0, 0.24));
1948
+ backdrop-filter: var(--dsw-mask-blur, none);
1949
+ }
1950
+
1951
+ dialog.hive-dialog .hive-dialog-head,
1952
+ dialog.hive-dialog .hive-dialog-body,
1953
+ dialog.hive-dialog .hive-dialog-foot { padding-left: 16px; padding-right: 16px; }
1954
+ dialog.hive-dialog .hive-dialog-body { width: auto; min-width: 0; max-width: 100%; overflow-x: hidden; }
1955
+ dialog.hive-dialog .hive-dialog-body > * { margin-left: 0; margin-right: 0; max-width: 100%; min-width: 0; }
1956
+ dialog.hive-dialog .hive-field,
1957
+ dialog.hive-dialog .hive-field-row,
1958
+ dialog.hive-dialog .hive-settings-section,
1959
+ dialog.hive-dialog .hive-settings-tabpanel,
1960
+ dialog.hive-dialog .hive-limits-table { width: 100%; max-width: 100%; min-width: 0; margin-left: 0; margin-right: 0; }
1961
+ dialog.hive-dialog .hive-field-row > .hive-field { width: auto; flex: 1 1 160px; }
1962
+ dialog.hive-dialog .hive-input,
1963
+ dialog.hive-dialog .hive-textarea,
1964
+ dialog.hive-dialog select { width: 100%; min-width: 0; max-width: 100%; }
1965
+ dialog.hive-dialog .hive-limits-row {
1966
+ width: 100%;
1967
+ max-width: 100%;
1968
+ min-width: 0;
1969
+ grid-template-columns: minmax(0, 1fr) 96px 48px 48px 28px;
1970
+ }
1971
+ dialog.hive-dialog .hive-limits-cell,
1972
+ dialog.hive-dialog .hive-limits-role,
1973
+ dialog.hive-dialog .hive-dialog-title,
1974
+ dialog.hive-dialog .hive-card-subline,
1975
+ dialog.hive-dialog .hive-settings-role-name { min-width: 0; overflow-wrap: anywhere; }
1976
+ dialog.hive-dialog .hive-dialog-foot { flex-wrap: wrap; }
1977
+ dialog.hive-dialog {
1978
+ display: flex;
1979
+ flex-direction: column;
1980
+ max-height: 80vh;
1981
+ }
1982
+ dialog.hive-dialog .hive-dialog-head,
1983
+ dialog.hive-dialog .hive-dialog-foot { flex: 0 0 auto; }
1984
+ dialog.hive-dialog .hive-dialog-body { flex: 1 1 auto; min-height: 0; overflow: auto; }
1985
+ .hive-card-run-output { max-height: 20lh; overflow: auto; }
1986
+ .hive-card-actions { flex-wrap: wrap; justify-content: flex-end; }
1473
1987
  `;
1474
1988
 
1475
1989
  const LANE_LABEL_KEYS = Object.freeze({
1476
1990
  pending: "lane.pending",
1477
1991
  claimed: "lane.claimed",
1478
1992
  done: "lane.done",
1479
- blocked: "lane.blocked",
1480
1993
  failed: "lane.failed",
1481
1994
  });
1482
1995
 
@@ -1499,18 +2012,16 @@ export const messages = Object.freeze({
1499
2012
  "action.retry": "retry",
1500
2013
  "action.unfreeze": "Resume",
1501
2014
  "pane.agents": "agents",
1502
- "pane.board": "board",
2015
+ "pane.board": "Task board",
1503
2016
  "pane.events": "events",
1504
- "board.hint": "5 lanes",
1505
2017
  "board.filtersAria": "Filter by state",
1506
2018
  "board.all": "all",
1507
2019
  "board.showAll": "Show all tasks",
1508
2020
  "board.filterChip": "Show {lane} tasks ({count})",
1509
2021
  "board.emptyFilter": "No tasks in this state.",
1510
2022
  "lane.pending": "pending",
1511
- "lane.claimed": "claimed",
2023
+ "lane.claimed": "In progress",
1512
2024
  "lane.done": "done",
1513
- "lane.blocked": "blocked",
1514
2025
  "lane.failed": "failed",
1515
2026
  "mode.free": "free",
1516
2027
  "mode.freeze": "freeze",
@@ -1549,6 +2060,13 @@ export const messages = Object.freeze({
1549
2060
  "drawer.readOnly": "Read-only: writable=false.",
1550
2061
  "drawer.removeClaimed": "A claimed task must be released or reopened before it can be deleted.",
1551
2062
  "drawer.rawJson": "raw json",
2063
+ "drawer.lastRun": "Last run",
2064
+ "drawer.runOverlaps": "Also writing",
2065
+ "drawer.runLessons": "Read {count} lessons",
2066
+ "drawer.runNoLessons": "No lessons to read",
2067
+ "drawer.noRuns": "No runs yet",
2068
+ "drawer.copyOutput": "Copy output",
2069
+ "drawer.openChat": "Open agent chat",
1552
2070
  "events.empty": "No events yet.",
1553
2071
  "events.showAll": "Show all events",
1554
2072
  "events.collapse": "Collapse events",
@@ -1569,8 +2087,8 @@ export const messages = Object.freeze({
1569
2087
  "limits.description": "Max agents working at the same time, per role; 0 pauses the role",
1570
2088
  "limits.role": "Role",
1571
2089
  "limits.limit": "Concurrency limit",
1572
- "limits.inFlight": "In flight",
1573
- "limits.queued": "Queued",
2090
+ "limits.inFlight": "Running",
2091
+ "limits.queued": "Waiting",
1574
2092
  "limits.defaultHint": "0-999, default 5",
1575
2093
  "limits.limitAria": "Concurrency limit for {role}",
1576
2094
  "limits.save": "Save",
@@ -1582,7 +2100,10 @@ export const messages = Object.freeze({
1582
2100
  "limits.none": "No role data for this repository.",
1583
2101
  "limits.close": "Close",
1584
2102
  "limits.closeAria": "Close agent concurrency settings",
2103
+ "limits.removeRoleAria": "Delete role {name}",
2104
+ "limits.removeRoleConfirm": "Delete role {name}? Tasks already created will not be deleted.",
1585
2105
  "settings.openAria": "Open settings for this repository",
2106
+ "dialog.closeAria": "Close",
1586
2107
  "settings.title": "Settings",
1587
2108
  "settings.tabLimits": "Concurrency limit",
1588
2109
  "settings.tabRole": "Add role",
@@ -1622,7 +2143,7 @@ export const messages = Object.freeze({
1622
2143
  "add.titleAria": "New task title",
1623
2144
  "add.role": "Role",
1624
2145
  "add.roleAria": "Role for the new task",
1625
- "add.scope": "Scope (comma separated, optional)",
2146
+ "add.scope": "File scope",
1626
2147
  "add.scopeAria": "File scope for the new task",
1627
2148
  "add.after": "After task ids (comma separated, optional)",
1628
2149
  "add.afterAria": "Tasks that must finish first",
@@ -1663,7 +2184,7 @@ export const messages = Object.freeze({
1663
2184
  "queen.dismiss": "Dismiss",
1664
2185
  "queen.dismissAria": "Close this notice; it does not change Queen mode",
1665
2186
  "help.queen": "Queen mode",
1666
- "help.queenDesc": "Type /queen off to exit Queen mode; this session then returns to normal coding mode.",
2187
+ "help.queenDesc": "Type /queen off in the chat box to leave Queen mode; this session then returns to normal coding mode.",
1667
2188
  "queen.status.active": "Queen active",
1668
2189
  "queen.status.inactive": "Queen not active",
1669
2190
  "queen.source.auto": "auto",
@@ -1681,7 +2202,7 @@ export const messages = Object.freeze({
1681
2202
  "help.action.claim": "Claim: lease a pending task for an agent.",
1682
2203
  "help.action.done": "Done: mark a claimed task complete, optionally with a commit sha.",
1683
2204
  "help.action.fail": "Fail: mark a claimed task failed and record the reason.",
1684
- "help.action.retry": "Retry: put a failed or blocked task back in the queue.",
2205
+ "help.action.retry": "Retry: put a failed task back in the queue.",
1685
2206
  "help.action.remove": "Delete this task card permanently. A claimed task has to be released or reopened first.",
1686
2207
  "plan.dialogTitle": "Set the Queen a goal",
1687
2208
  "plan.dialogAria": "Plan tasks from a goal",
@@ -1733,18 +2254,16 @@ export const messages = Object.freeze({
1733
2254
  "action.retry": "重试",
1734
2255
  "action.unfreeze": "恢复",
1735
2256
  "pane.agents": "智能体",
1736
- "pane.board": "任务",
2257
+ "pane.board": "任务看板",
1737
2258
  "pane.events": "事件",
1738
- "board.hint": "5 条泳道",
1739
2259
  "board.filtersAria": "按状态筛选",
1740
2260
  "board.all": "全部",
1741
2261
  "board.showAll": "显示全部任务",
1742
2262
  "board.filterChip": "只看{lane}任务({count})",
1743
2263
  "board.emptyFilter": "该状态没有任务。",
1744
2264
  "lane.pending": "待办",
1745
- "lane.claimed": "已认领",
2265
+ "lane.claimed": "进行中",
1746
2266
  "lane.done": "已完成",
1747
- "lane.blocked": "受阻",
1748
2267
  "lane.failed": "失败",
1749
2268
  "mode.free": "正常",
1750
2269
  "mode.freeze": "冻结",
@@ -1783,6 +2302,13 @@ export const messages = Object.freeze({
1783
2302
  "drawer.readOnly": "只读:writable=false。",
1784
2303
  "drawer.removeClaimed": "已认领的任务必须先释放或重开才能删除。",
1785
2304
  "drawer.rawJson": "原始 JSON",
2305
+ "drawer.lastRun": "最近一次执行",
2306
+ "drawer.runOverlaps": "同时写入",
2307
+ "drawer.runLessons": "读取了 {count} 条经验",
2308
+ "drawer.runNoLessons": "没有可读取的经验",
2309
+ "drawer.noRuns": "还没有执行记录",
2310
+ "drawer.copyOutput": "复制输出",
2311
+ "drawer.openChat": "打开智能体对话",
1786
2312
  "events.empty": "暂无事件。",
1787
2313
  "events.showAll": "展开全部事件",
1788
2314
  "events.collapse": "收起事件",
@@ -1803,8 +2329,8 @@ export const messages = Object.freeze({
1803
2329
  "limits.description": "同时干活的智能体数量上限,按角色分别设置;0 表示暂停该角色",
1804
2330
  "limits.role": "角色",
1805
2331
  "limits.limit": "并发上限",
1806
- "limits.inFlight": "在飞",
1807
- "limits.queued": "排队",
2332
+ "limits.inFlight": "运行",
2333
+ "limits.queued": "等待",
1808
2334
  "limits.defaultHint": "0–999,默认 5",
1809
2335
  "limits.limitAria": "{role} 的并发上限",
1810
2336
  "limits.save": "保存",
@@ -1816,7 +2342,10 @@ export const messages = Object.freeze({
1816
2342
  "limits.none": "这个仓库没有角色数据。",
1817
2343
  "limits.close": "关闭",
1818
2344
  "limits.closeAria": "关闭智能体的并发上限设置",
2345
+ "limits.removeRoleAria": "删除角色 {name}",
2346
+ "limits.removeRoleConfirm": "确定删除角色 {name}?已创建的任务不会删除。",
1819
2347
  "settings.openAria": "打开这个仓库的设置",
2348
+ "dialog.closeAria": "关闭",
1820
2349
  "settings.title": "设置",
1821
2350
  "settings.tabLimits": "并发上限",
1822
2351
  "settings.tabRole": "添加角色",
@@ -1856,7 +2385,7 @@ export const messages = Object.freeze({
1856
2385
  "add.titleAria": "新任务标题",
1857
2386
  "add.role": "角色",
1858
2387
  "add.roleAria": "新任务角色",
1859
- "add.scope": "范围(逗号分隔,可选)",
2388
+ "add.scope": "文件范围",
1860
2389
  "add.scopeAria": "新任务的文件范围",
1861
2390
  "add.after": "依赖任务(任务 ID,逗号分隔,可选)",
1862
2391
  "add.afterAria": "需要先完成的任务",
@@ -1897,7 +2426,7 @@ export const messages = Object.freeze({
1897
2426
  "queen.dismiss": "关闭提示",
1898
2427
  "queen.dismissAria": "关闭提示,不影响女王状态",
1899
2428
  "help.queen": "女王模式",
1900
- "help.queenDesc": "输入 /queen off 退出女王模式,退出后本会话恢复普通编码模式。",
2429
+ "help.queenDesc": "在对话框输入 /queen off 退出女王模式,退出后本会话恢复普通编码模式。",
1901
2430
  "queen.status.active": "女王已接管",
1902
2431
  "queen.status.inactive": "女王未接管",
1903
2432
  "queen.source.auto": "自动",
@@ -1989,6 +2518,79 @@ function normalizeScope(scope) {
1989
2518
  return [];
1990
2519
  }
1991
2520
 
2521
+ /**
2522
+ * Normalize the optional `overlaps` announcements of a run record: other agents
2523
+ * have declared they are writing the same paths too. An entry without a
2524
+ * non-empty agent is dropped; a missing or malformed list is empty, so the
2525
+ * drawer renders no overlap row.
2526
+ * @param {unknown} value
2527
+ * @returns {Array<{key:string,agent:string,task:string,expiresAt:string}>}
2528
+ */
2529
+ function normalizeOverlaps(value) {
2530
+ const overlaps = [];
2531
+ for (const entry of asArray(value)) {
2532
+ if (!isRecord(entry)) continue;
2533
+ const agent = asString(entry.agent);
2534
+ if (agent.trim() === "") continue;
2535
+ overlaps.push({
2536
+ key: asString(entry.key),
2537
+ agent,
2538
+ task: asString(entry.task),
2539
+ expiresAt: asString(entry.expiresAt),
2540
+ });
2541
+ }
2542
+ return overlaps;
2543
+ }
2544
+
2545
+ /**
2546
+ * Normalize the optional `lessons` recall summary of a run record. A missing
2547
+ * or malformed record is null; a count-only, scopes-only or error-only record
2548
+ * survives so the drawer can still render its "no lessons" line.
2549
+ * @param {unknown} value
2550
+ * @returns {null|{count:number,scopes:string[],error?:string}}
2551
+ */
2552
+ function normalizeLessons(value) {
2553
+ if (!isRecord(value)) return null;
2554
+ const lessons = {
2555
+ count: asCount(value.count, 0),
2556
+ scopes: asArray(value.scopes)
2557
+ .map((scope) => asString(scope))
2558
+ .filter((scope) => scope.trim() !== ""),
2559
+ };
2560
+ const error = asString(value.error);
2561
+ if (error !== "") lessons.error = error;
2562
+ return lessons;
2563
+ }
2564
+
2565
+ /**
2566
+ * Normalize `lastRun` (written by hive-runner to .hive/runs/<cardId>.json).
2567
+ * A missing record is null; a malformed one is dropped instead of leaking
2568
+ * half-parsed values into the drawer.
2569
+ * @param {unknown} value
2570
+ * @returns {null|{agent:string,startedAt:string,endedAt:string,status:string,commit:string,exitCode:number|null,sessionId:string,output:string,overlaps:Array<{key:string,agent:string,task:string,expiresAt:string}>,lessons:null|{count:number,scopes:string[],error?:string}}}
2571
+ */
2572
+ function normalizeLastRun(value) {
2573
+ if (!isRecord(value)) return null;
2574
+ const status = asString(value.status);
2575
+ if (status !== "done" && status !== "failed" && status !== "running") return null;
2576
+ return {
2577
+ agent: asString(value.agent),
2578
+ startedAt: asString(value.startedAt),
2579
+ endedAt: asString(value.endedAt),
2580
+ status,
2581
+ commit: asString(value.commit),
2582
+ exitCode: typeof value.exitCode === "number" && Number.isFinite(value.exitCode) ? value.exitCode : null,
2583
+ // Hive-runner records the worker activation's Session id; a host that can
2584
+ // navigate can open that conversation, an older record simply has none.
2585
+ sessionId: asString(value.sessionId),
2586
+ output: asString(value.output),
2587
+ // Consensus announcements from the other writers of these paths.
2588
+ overlaps: normalizeOverlaps(value.overlaps),
2589
+ // Memory recall summary: how many lessons the worker read before its run.
2590
+ lessons: normalizeLessons(value.lessons),
2591
+ };
2592
+ }
2593
+
1992
2594
  function normalizeCard(task) {
1993
2595
  return {
1994
2596
  id: asString(task.id),
@@ -1997,6 +2599,7 @@ function normalizeCard(task) {
1997
2599
  owner: asString(task.owner),
1998
2600
  scope: normalizeScope(task.scope),
1999
2601
  reason: asString(task.reason),
2602
+ lastRun: normalizeLastRun(task.lastRun),
2000
2603
  };
2001
2604
  }
2002
2605
 
@@ -2141,6 +2744,7 @@ function toolbarActions(writable, mode) {
2141
2744
  * laneOrder: string[],
2142
2745
  * stats: {total:number, byState:Record<string,number>, byRole:Record<string,number>, oldestPending:{id:string,createdAt:string}|null},
2143
2746
  * agents: Array<{agent:string,state:string,task:string,files:string[],updatedAt:string}>,
2747
+ * boardError: string|null,
2144
2748
  * events: Array<{ts:string,kind:string,task:string,actor:string}>,
2145
2749
  * actions: Array<{name:string,labelKey:string,body?:object}>
2146
2750
  * }}
@@ -2219,6 +2823,9 @@ export function renderModel(snapshot) {
2219
2823
  laneOrder: [...LANE_ORDER],
2220
2824
  stats: normalizeStats(source.stats, tasks),
2221
2825
  agents: normalizeAgents(source.board),
2826
+ // A board read that failed is not the same as an idle swarm: keep the
2827
+ // diagnostic so the agents strip can show it instead of "no agents".
2828
+ boardError: asString(source.boardError) || null,
2222
2829
  events: normalizeEvents(source.events),
2223
2830
  actions: initialised ? toolbarActions(writable, mode) : [],
2224
2831
  };
@@ -2448,6 +3055,17 @@ function makeHiveIcon(doc, kind) {
2448
3055
  return svg;
2449
3056
  }
2450
3057
 
3058
+ function appendCodeText(node, text, token) {
3059
+ const index = String(text).indexOf(token);
3060
+ if (index < 0) {
3061
+ node.appendChild(element(node.ownerDocument || node, "span", null, text));
3062
+ return;
3063
+ }
3064
+ node.appendChild(element(node.ownerDocument || node, "span", null, String(text).slice(0, index)));
3065
+ node.appendChild(element(node.ownerDocument || node, "code", "hive-queen-command", token));
3066
+ node.appendChild(element(node.ownerDocument || node, "span", null, String(text).slice(index + token.length)));
3067
+ }
3068
+
2451
3069
  function setHidden(node, hidden) {
2452
3070
  if (!node) return;
2453
3071
  if (hidden) {
@@ -2536,6 +3154,80 @@ function formatTime(value) {
2536
3154
  }
2537
3155
  }
2538
3156
 
3157
+ /** Local `YYYY-MM-DD HH:MM:SS` for a run timestamp; the raw value on failure. */
3158
+ function formatRunStamp(value) {
3159
+ const date = parseDate(value);
3160
+ if (!date) return asString(value);
3161
+ const pad = (number) => String(number).padStart(2, "0");
3162
+ try {
3163
+ return (
3164
+ date.getFullYear() +
3165
+ "-" +
3166
+ pad(date.getMonth() + 1) +
3167
+ "-" +
3168
+ pad(date.getDate()) +
3169
+ " " +
3170
+ pad(date.getHours()) +
3171
+ ":" +
3172
+ pad(date.getMinutes()) +
3173
+ ":" +
3174
+ pad(date.getSeconds())
3175
+ );
3176
+ } catch {
3177
+ return asString(value);
3178
+ }
3179
+ }
3180
+
3181
+ /** Short display form of a commit sha; anything else is returned unchanged. */
3182
+ function shortCommit(value) {
3183
+ const sha = asString(value).trim();
3184
+ return /^[0-9a-f]{7,64}$/i.test(sha) ? sha.slice(0, 7) : sha;
3185
+ }
3186
+
3187
+ /**
3188
+ * Copy text to the clipboard. Modern async clipboard first, then the legacy
3189
+ * textarea + execCommand path; a refused permission is silent (no new copy).
3190
+ * @param {Document} doc
3191
+ * @param {string} text
3192
+ * @returns {boolean}
3193
+ */
3194
+ function copyToClipboard(doc, text) {
3195
+ const value = asString(text);
3196
+ if (value === "") return false;
3197
+ const view = (doc && doc.defaultView) || globalThis;
3198
+ const clipboard = view && view.navigator ? view.navigator.clipboard : null;
3199
+ if (clipboard && typeof clipboard.writeText === "function") {
3200
+ try {
3201
+ const pending = clipboard.writeText(value);
3202
+ if (pending && typeof pending.catch === "function") pending.catch(() => {});
3203
+ return true;
3204
+ } catch {
3205
+ // Fall through to the legacy path.
3206
+ }
3207
+ }
3208
+ const body = doc && doc.body;
3209
+ if (body && typeof body.appendChild === "function" && typeof doc.execCommand === "function") {
3210
+ const area = doc.createElement("textarea");
3211
+ area.value = value;
3212
+ setAttr(area, "readonly", "");
3213
+ setStyle(area, "position", "absolute");
3214
+ setStyle(area, "left", "-9999px");
3215
+ try {
3216
+ body.appendChild(area);
3217
+ if (typeof area.select === "function") area.select();
3218
+ doc.execCommand("copy");
3219
+ return true;
3220
+ } catch {
3221
+ return false;
3222
+ } finally {
3223
+ if (area.parentNode && typeof area.parentNode.removeChild === "function") {
3224
+ area.parentNode.removeChild(area);
3225
+ }
3226
+ }
3227
+ }
3228
+ return false;
3229
+ }
3230
+
2539
3231
  function safeClassToken(value) {
2540
3232
  const token = asString(value).toLowerCase().replace(/[^a-z0-9_-]+/g, "-").replace(/^-+|-+$/g, "");
2541
3233
  return token || "unknown";
@@ -2650,7 +3342,8 @@ function extractPlan(payload) {
2650
3342
  * fetch?: typeof fetch,
2651
3343
  * confirm?: (message: string) => boolean,
2652
3344
  * t?: (key: string) => string,
2653
- * subscribeLocale?: (listener: () => void) => (() => void)
3345
+ * subscribeLocale?: (listener: () => void) => (() => void),
3346
+ * openSession?: (sessionId: string) => void
2654
3347
  * }} [options]
2655
3348
  * @returns {{
2656
3349
  * setSnapshot: (snapshot: object) => object|null,
@@ -2714,6 +3407,11 @@ export function mount(root, options = {}) {
2714
3407
  ? globalThis.confirm.bind(globalThis)
2715
3408
  : null;
2716
3409
 
3410
+ // Hosts that can navigate open a worker's Session for the card drawer. The
3411
+ // callback stays absent on the standalone page and on hosts without the
3412
+ // client navigation API, so the "Open agent chat" button is never rendered.
3413
+ const openSession = typeof opts.openSession === "function" ? opts.openSession : null;
3414
+
2717
3415
  const schedule =
2718
3416
  typeof view.setInterval === "function" ? view.setInterval.bind(view) : globalThis.setInterval.bind(globalThis);
2719
3417
  const unschedule =
@@ -2790,13 +3488,22 @@ export function mount(root, options = {}) {
2790
3488
  let limitsFocusables = [];
2791
3489
  let settingsActiveTab = "limits";
2792
3490
 
3491
+ function dialogCloseButton(onClose) {
3492
+ const button = element(doc, "button", "hive-dialog-close", "×");
3493
+ setAttr(button, "type", "button");
3494
+ const label = translate("dialog.closeAria");
3495
+ setAttr(button, "title", label);
3496
+ setAttr(button, "aria-label", label);
3497
+ button.addEventListener("click", onClose);
3498
+ return button;
3499
+ }
3500
+
2793
3501
  // --- shell ---------------------------------------------------------------
2794
3502
 
2795
3503
  const frame = element(doc, "div", "hive");
2796
3504
  const bar = element(doc, "header", "hive-bar");
2797
3505
 
2798
3506
  const ident = element(doc, "div", "hive-ident");
2799
- ident.appendChild(element(doc, "span", "hive-brand", "hive"));
2800
3507
  const repoNode = element(doc, "span", "hive-repo", "—");
2801
3508
  ident.appendChild(repoNode);
2802
3509
  bar.appendChild(ident);
@@ -2940,8 +3647,6 @@ export function mount(root, options = {}) {
2940
3647
  const boardHead = element(doc, "div", "hive-pane-head");
2941
3648
  const boardLabel = element(doc, "span", null, "");
2942
3649
  boardHead.appendChild(boardLabel);
2943
- const boardHint = element(doc, "span", "hive-hint", "");
2944
- boardHead.appendChild(boardHint);
2945
3650
  const boardCount = element(doc, "span", "hive-count", "0");
2946
3651
  boardHead.appendChild(boardCount);
2947
3652
  const stage = element(doc, "div", "hive-stage");
@@ -2986,6 +3691,61 @@ export function mount(root, options = {}) {
2986
3691
  root.textContent = "";
2987
3692
  root.appendChild(frame);
2988
3693
 
3694
+ let portalHost = null;
3695
+
3696
+ function showModalDialog(dialog) {
3697
+ const parent = doc.body && typeof doc.body.appendChild === "function" ? doc.body : frame;
3698
+ parent.appendChild(dialog);
3699
+ if (typeof dialog.showModal === "function") {
3700
+ try {
3701
+ dialog.showModal();
3702
+ } catch {
3703
+ setAttr(dialog, "open", "");
3704
+ }
3705
+ } else {
3706
+ setAttr(dialog, "open", "");
3707
+ }
3708
+ }
3709
+
3710
+ function closeModalDialog(dialog) {
3711
+ if (!dialog) return;
3712
+ if (typeof dialog.close === "function") {
3713
+ try {
3714
+ dialog.close();
3715
+ } catch {
3716
+ // Native close can throw for a detached dialog; removal below still wins.
3717
+ }
3718
+ }
3719
+ if (dialog.parentNode) dialog.parentNode.removeChild(dialog);
3720
+ }
3721
+
3722
+ function bindDialogDismiss(dialog, close) {
3723
+ dialog.addEventListener("click", (event) => {
3724
+ if (!event || !event.target || event.target === dialog) close();
3725
+ });
3726
+ dialog.addEventListener("cancel", (event) => {
3727
+ if (event && typeof event.preventDefault === "function") event.preventDefault();
3728
+ close();
3729
+ });
3730
+ }
3731
+
3732
+ function ensurePortalHost() {
3733
+ const parent =
3734
+ doc.body && typeof doc.body.appendChild === "function"
3735
+ ? doc.body
3736
+ : frame;
3737
+ if (!portalHost || portalHost.parentNode !== parent) {
3738
+ portalHost = element(doc, "div", "hive-portal");
3739
+ parent.appendChild(portalHost);
3740
+ }
3741
+ return portalHost;
3742
+ }
3743
+
3744
+ function appendPortalOverlay(overlay) {
3745
+ ensurePortalHost().appendChild(overlay);
3746
+ }
3747
+
3748
+
2989
3749
  // --- helpers -------------------------------------------------------------
2990
3750
 
2991
3751
  function reportError(error) {
@@ -3019,7 +3779,6 @@ export function mount(root, options = {}) {
3019
3779
  setAttr(stageChips, "aria-label", translate("board.filtersAria"));
3020
3780
  agentsLabel.textContent = translate("pane.agents");
3021
3781
  boardLabel.textContent = translate("pane.board");
3022
- boardHint.textContent = translate("board.hint");
3023
3782
  eventsLabel.textContent = translate("pane.events");
3024
3783
  const eventsToggleLabel = eventsExpanded ? translate("events.collapse") : translate("events.showAll");
3025
3784
  setAttr(eventsToggle, "title", eventsToggleLabel);
@@ -3046,14 +3805,6 @@ export function mount(root, options = {}) {
3046
3805
  return element(doc, "div", "hive-empty", text);
3047
3806
  }
3048
3807
 
3049
- function findRawTask(card) {
3050
- const tasks = lastSnapshot && Array.isArray(lastSnapshot.tasks) ? lastSnapshot.tasks : [];
3051
- for (const task of tasks) {
3052
- if (isRecord(task) && asString(task.id) === card.id) return task;
3053
- }
3054
- return null;
3055
- }
3056
-
3057
3808
  function findRawAgent(agent) {
3058
3809
  const board = lastSnapshot && Array.isArray(lastSnapshot.board) ? lastSnapshot.board : [];
3059
3810
  for (const rawEntry of board) {
@@ -3357,7 +4108,7 @@ export function mount(root, options = {}) {
3357
4108
  }
3358
4109
 
3359
4110
  function closePlanDialog(restoreFocus = true) {
3360
- if (planOverlay && planOverlay.parentNode) planOverlay.parentNode.removeChild(planOverlay);
4111
+ closeModalDialog(planOverlay);
3361
4112
  planOverlay = null;
3362
4113
  planDialogNode = null;
3363
4114
  planState = null;
@@ -3375,12 +4126,8 @@ export function mount(root, options = {}) {
3375
4126
  closeDrawer();
3376
4127
  planTriggerButton = trigger || planTriggerButton || null;
3377
4128
 
3378
- const overlay = element(doc, "div", "hive-overlay hive-dialog-scrim");
3379
- overlay.addEventListener("click", (event) => {
3380
- if (!event || !event.target || event.target === overlay) closePlanDialog();
3381
- });
3382
-
3383
- const dialog = element(doc, "div", "hive-dialog");
4129
+ const dialog = element(doc, "dialog", "hive-dialog");
4130
+ bindDialogDismiss(dialog, () => closePlanDialog());
3384
4131
  setAttr(dialog, "role", "dialog");
3385
4132
  setAttr(dialog, "aria-modal", "true");
3386
4133
  setAttr(dialog, "aria-label", translate("plan.dialogAria"));
@@ -3390,11 +4137,7 @@ export function mount(root, options = {}) {
3390
4137
  titleBox.appendChild(element(doc, "h2", "hive-dialog-title", translate("plan.dialogTitle")));
3391
4138
  head.appendChild(titleBox);
3392
4139
 
3393
- const closeButton = element(doc, "button", "hive-btn hive-btn-ghost", translate("plan.close"));
3394
- setAttr(closeButton, "type", "button");
3395
- setAttr(closeButton, "title", translate("plan.closeAria"));
3396
- setAttr(closeButton, "aria-label", translate("plan.closeAria"));
3397
- closeButton.addEventListener("click", () => {
4140
+ const closeButton = dialogCloseButton(() => {
3398
4141
  closePlanDialog();
3399
4142
  });
3400
4143
  head.appendChild(closeButton);
@@ -3451,7 +4194,7 @@ export function mount(root, options = {}) {
3451
4194
  dialog.appendChild(body);
3452
4195
 
3453
4196
  const foot = element(doc, "div", "hive-dialog-foot");
3454
- const cancelButton = element(doc, "button", "hive-btn hive-btn-ghost", translate("plan.cancel"));
4197
+ const cancelButton = element(doc, "button", "hive-btn", translate("plan.cancel"));
3455
4198
  setAttr(cancelButton, "type", "button");
3456
4199
  setAttr(cancelButton, "title", translate("plan.cancelAria"));
3457
4200
  setAttr(cancelButton, "aria-label", translate("plan.cancelAria"));
@@ -3460,7 +4203,7 @@ export function mount(root, options = {}) {
3460
4203
  });
3461
4204
  foot.appendChild(cancelButton);
3462
4205
 
3463
- const applyButton = element(doc, "button", "hive-btn", translate("plan.write"));
4206
+ const applyButton = element(doc, "button", "hive-btn hive-settings-primary", translate("plan.write"));
3464
4207
  setAttr(applyButton, "type", "button");
3465
4208
  setButtonCopy(applyButton, translate("plan.write"), translate("plan.writeAria"));
3466
4209
  applyButton.disabled = true;
@@ -3470,9 +4213,8 @@ export function mount(root, options = {}) {
3470
4213
  foot.appendChild(applyButton);
3471
4214
  dialog.appendChild(foot);
3472
4215
 
3473
- overlay.appendChild(dialog);
3474
- frame.appendChild(overlay);
3475
- planOverlay = overlay;
4216
+ showModalDialog(dialog);
4217
+ planOverlay = dialog;
3476
4218
  planDialogNode = dialog;
3477
4219
  planFocusables = [closeButton, goalInput, maxInput, previewButton, cancelButton, applyButton];
3478
4220
  planState = {
@@ -3596,7 +4338,7 @@ export function mount(root, options = {}) {
3596
4338
  }
3597
4339
 
3598
4340
  function closeLimitsDialog(restoreFocus = true) {
3599
- if (limitsOverlay && limitsOverlay.parentNode) limitsOverlay.parentNode.removeChild(limitsOverlay);
4341
+ closeModalDialog(limitsOverlay);
3600
4342
  limitsOverlay = null;
3601
4343
  limitsDialogNode = null;
3602
4344
  limitsState = null;
@@ -3621,12 +4363,8 @@ export function mount(root, options = {}) {
3621
4363
  const writable = Boolean(lastModel.writable);
3622
4364
  const supervisorAvailable = supervisorData.length > 0;
3623
4365
  const rows = roleRowsForCurrentRepo(currentSupervisorRow());
3624
- const overlay = element(doc, "div", "hive-overlay hive-dialog-scrim");
3625
- overlay.addEventListener("click", (event) => {
3626
- if (!event || !event.target || event.target === overlay) closeLimitsDialog();
3627
- });
3628
-
3629
- const dialog = element(doc, "div", "hive-dialog hive-settings-dialog");
4366
+ const dialog = element(doc, "dialog", "hive-dialog hive-settings-dialog");
4367
+ bindDialogDismiss(dialog, () => closeLimitsDialog());
3630
4368
  setAttr(dialog, "role", "dialog");
3631
4369
  setAttr(dialog, "aria-modal", "true");
3632
4370
  setAttr(dialog, "aria-label", translate("settings.aria"));
@@ -3635,11 +4373,7 @@ export function mount(root, options = {}) {
3635
4373
  const titleBox = element(doc, "div", "hive-dialog-head-title");
3636
4374
  titleBox.appendChild(element(doc, "h2", "hive-dialog-title", translate("settings.title")));
3637
4375
  head.appendChild(titleBox);
3638
- const closeButton = element(doc, "button", "hive-btn hive-btn-ghost", translate("settings.close"));
3639
- setAttr(closeButton, "type", "button");
3640
- setAttr(closeButton, "title", translate("settings.closeAria"));
3641
- setAttr(closeButton, "aria-label", translate("settings.closeAria"));
3642
- closeButton.addEventListener("click", () => {
4376
+ const closeButton = dialogCloseButton(() => {
3643
4377
  closeLimitsDialog();
3644
4378
  });
3645
4379
  head.appendChild(closeButton);
@@ -3744,6 +4478,7 @@ export function mount(root, options = {}) {
3744
4478
  header.appendChild(element(doc, "span", "hive-limits-cell is-number", translate("limits.limit")));
3745
4479
  header.appendChild(element(doc, "span", "hive-limits-cell is-number", translate("limits.inFlight")));
3746
4480
  header.appendChild(element(doc, "span", "hive-limits-cell is-number", translate("limits.queued")));
4481
+ header.appendChild(element(doc, "span", "hive-limits-cell is-action", ""));
3747
4482
  table.appendChild(header);
3748
4483
 
3749
4484
  for (const role of rows) {
@@ -3761,6 +4496,19 @@ export function mount(root, options = {}) {
3761
4496
  roleRow.appendChild(input);
3762
4497
  roleRow.appendChild(element(doc, "span", "hive-limits-cell is-number", limitsNumberText(role.inFlight)));
3763
4498
  roleRow.appendChild(element(doc, "span", "hive-limits-cell is-number", limitsNumberText(role.queued)));
4499
+ if (writable) {
4500
+ const removeButton = element(doc, "button", "hive-btn hive-btn-ghost hive-btn-danger hive-role-remove", "×");
4501
+ setAttr(removeButton, "type", "button");
4502
+ const removeTitle = translate("limits.removeRoleAria").replace("{name}", role.role);
4503
+ setAttr(removeButton, "title", removeTitle);
4504
+ setAttr(removeButton, "aria-label", removeTitle);
4505
+ removeButton.addEventListener("click", () => {
4506
+ void removeRole(role.role, role.inFlight, removeButton);
4507
+ });
4508
+ roleRow.appendChild(removeButton);
4509
+ } else {
4510
+ roleRow.appendChild(element(doc, "span", "hive-limits-cell is-action", ""));
4511
+ }
3764
4512
  table.appendChild(roleRow);
3765
4513
  rowNodes.push({ role: role.role, input });
3766
4514
  }
@@ -3789,7 +4537,9 @@ export function mount(root, options = {}) {
3789
4537
 
3790
4538
  const queenSection = element(doc, "section", "hive-settings-section");
3791
4539
  queenSection.appendChild(element(doc, "div", "hive-settings-section-title", translate("help.queen")));
3792
- queenSection.appendChild(element(doc, "div", "hive-help-desc hive-help-queen", translate("help.queenDesc")));
4540
+ const queenDescription = element(doc, "div", "hive-help-desc hive-help-queen");
4541
+ appendCodeText(queenDescription, translate("help.queenDesc"), "/queen off");
4542
+ queenSection.appendChild(queenDescription);
3793
4543
  const tabs = element(doc, "div", "hive-settings-tabs");
3794
4544
  setAttr(tabs, "role", "tablist");
3795
4545
  setAttr(tabs, "aria-label", translate("settings.tabsAria"));
@@ -3860,9 +4610,8 @@ export function mount(root, options = {}) {
3860
4610
  body.appendChild(queenSection);
3861
4611
  dialog.appendChild(body);
3862
4612
 
3863
- overlay.appendChild(dialog);
3864
- frame.appendChild(overlay);
3865
- limitsOverlay = overlay;
4613
+ showModalDialog(dialog);
4614
+ limitsOverlay = dialog;
3866
4615
  limitsDialogNode = dialog;
3867
4616
  limitsState = {
3868
4617
  repo,
@@ -3966,6 +4715,33 @@ export function mount(root, options = {}) {
3966
4715
  }
3967
4716
  }
3968
4717
 
4718
+ async function removeRole(name, inFlight, button) {
4719
+ const state = limitsState;
4720
+ if (!state || !state.writable || state.busy || destroyed) return;
4721
+ const count = supervisorNumber(inFlight) || 0;
4722
+ let message = translate("limits.removeRoleConfirm").replace("{name}", name);
4723
+ if (count > 0) {
4724
+ const zh = String(translate("limits.removeRoleAria")).startsWith("删除角色");
4725
+ message += zh
4726
+ ? " 该角色已有 " + String(count) + " 个任务在跑。"
4727
+ : " This role has " + String(count) + " tasks running.";
4728
+ }
4729
+ if (!askConfirm(message)) return;
4730
+ button.disabled = true;
4731
+ try {
4732
+ const ok = await postAction("roles-remove", { name });
4733
+ if (!ok || destroyed) return;
4734
+ await refreshSupervisor(true);
4735
+ if (destroyed) return;
4736
+ const trigger = limitsTriggerButton;
4737
+ closeLimitsDialog(false);
4738
+ openLimitsDialog(trigger);
4739
+ showToast("success", name, "");
4740
+ } finally {
4741
+ if (!destroyed && button.parentNode) button.disabled = false;
4742
+ }
4743
+ }
4744
+
3969
4745
  async function saveBeeCounts() {
3970
4746
  const state = limitsState;
3971
4747
  if (!state || state.busy || !state.writable || !state.supervisorAvailable) return;
@@ -4123,7 +4899,7 @@ export function mount(root, options = {}) {
4123
4899
  }
4124
4900
 
4125
4901
  function closeAddDialog(restoreFocus = true) {
4126
- if (addOverlay && addOverlay.parentNode) addOverlay.parentNode.removeChild(addOverlay);
4902
+ closeModalDialog(addOverlay);
4127
4903
  addOverlay = null;
4128
4904
  addDialogNode = null;
4129
4905
  addState = null;
@@ -4158,12 +4934,8 @@ export function mount(root, options = {}) {
4158
4934
  closeAddDialog(false);
4159
4935
  addTriggerButton = trigger || null;
4160
4936
 
4161
- const overlay = element(doc, "div", "hive-overlay hive-dialog-scrim");
4162
- overlay.addEventListener("click", (event) => {
4163
- if (!event || !event.target || event.target === overlay) closeAddDialog();
4164
- });
4165
-
4166
- const dialog = element(doc, "div", "hive-dialog hive-add-dialog");
4937
+ const dialog = element(doc, "dialog", "hive-dialog hive-add-dialog");
4938
+ bindDialogDismiss(dialog, () => closeAddDialog());
4167
4939
  setAttr(dialog, "role", "dialog");
4168
4940
  setAttr(dialog, "aria-modal", "true");
4169
4941
  setAttr(dialog, "aria-label", translate("add.dialogTitle"));
@@ -4172,11 +4944,7 @@ export function mount(root, options = {}) {
4172
4944
  const titleBox = element(doc, "div", "hive-dialog-head-title");
4173
4945
  titleBox.appendChild(element(doc, "h2", "hive-dialog-title", translate("add.dialogTitle")));
4174
4946
  head.appendChild(titleBox);
4175
- const closeButton = element(doc, "button", "hive-btn hive-btn-ghost hive-add-close", "×");
4176
- setAttr(closeButton, "type", "button");
4177
- setAttr(closeButton, "title", translate("settings.closeAria"));
4178
- setAttr(closeButton, "aria-label", translate("settings.closeAria"));
4179
- closeButton.addEventListener("click", () => {
4947
+ const closeButton = dialogCloseButton(() => {
4180
4948
  closeAddDialog();
4181
4949
  });
4182
4950
  head.appendChild(closeButton);
@@ -4200,8 +4968,12 @@ export function mount(root, options = {}) {
4200
4968
  const scopeInput = element(doc, "input", "hive-input hive-add-scope");
4201
4969
  setAttr(scopeInput, "type", "text");
4202
4970
  setAttr(scopeInput, "autocomplete", "off");
4971
+ setAttr(scopeInput, "placeholder", "src/auth.ts, docs/");
4203
4972
  setAttr(scopeInput, "aria-label", translate("add.scopeAria"));
4204
- body.appendChild(addField("add.scope", scopeInput));
4973
+ const scopeField = element(doc, "label", "hive-field");
4974
+ scopeField.appendChild(element(doc, "span", "hive-field-label", translate("add.scope")));
4975
+ scopeField.appendChild(scopeInput);
4976
+ body.appendChild(scopeField);
4205
4977
 
4206
4978
  const afterInput = element(doc, "input", "hive-input hive-add-after");
4207
4979
  setAttr(afterInput, "type", "text");
@@ -4220,7 +4992,7 @@ export function mount(root, options = {}) {
4220
4992
  dialog.appendChild(body);
4221
4993
 
4222
4994
  const foot = element(doc, "div", "hive-dialog-foot");
4223
- const cancelButton = element(doc, "button", "hive-btn hive-btn-ghost", translate("add.cancel"));
4995
+ const cancelButton = element(doc, "button", "hive-btn", translate("add.cancel"));
4224
4996
  setAttr(cancelButton, "type", "button");
4225
4997
  cancelButton.addEventListener("click", () => {
4226
4998
  closeAddDialog();
@@ -4234,12 +5006,11 @@ export function mount(root, options = {}) {
4234
5006
  foot.appendChild(submitButton);
4235
5007
  dialog.appendChild(foot);
4236
5008
 
4237
- overlay.appendChild(dialog);
4238
- frame.appendChild(overlay);
4239
- addOverlay = overlay;
5009
+ showModalDialog(dialog);
5010
+ addOverlay = dialog;
4240
5011
  addDialogNode = dialog;
4241
5012
  addState = {
4242
- overlay,
5013
+ overlay: dialog,
4243
5014
  dialog,
4244
5015
  title: titleInput,
4245
5016
  role: roleInput,
@@ -4306,7 +5077,10 @@ export function mount(root, options = {}) {
4306
5077
  }
4307
5078
 
4308
5079
  function closeDrawer(restoreFocus = true) {
4309
- if (drawerNode && drawerNode.parentNode) drawerNode.parentNode.removeChild(drawerNode);
5080
+ if (drawerNode) {
5081
+ if (String(drawerNode.tagName).toLowerCase() === "dialog") closeModalDialog(drawerNode);
5082
+ else if (drawerNode.parentNode) drawerNode.parentNode.removeChild(drawerNode);
5083
+ }
4310
5084
  drawerNode = null;
4311
5085
  drawerState = null;
4312
5086
  if (typeof doc.removeEventListener === "function") {
@@ -4365,6 +5139,97 @@ export function mount(root, options = {}) {
4365
5139
  body.appendChild(element(doc, "pre", "hive-json", JSON.stringify(raw, null, 2)));
4366
5140
  }
4367
5141
 
5142
+ /**
5143
+ * The card drawer's "Last run" block. With no record it is one muted line;
5144
+ * with a record it shows status, agent, timestamps and the short commit above
5145
+ * the worker output (monospace, internally scrollable) and a copy button.
5146
+ * A record with overlapping writers adds one "Also writing" row, a record with
5147
+ * a lessons summary adds one recall row, and a record whose worker Session is
5148
+ * known, on a host that provides `openSession`, also gets the "Open agent
5149
+ * chat" button.
5150
+ * @param {object|null} run - normalized `lastRun` (see normalizeLastRun)
5151
+ * @returns {HTMLElement}
5152
+ */
5153
+ function buildRunSection(run, actionHost) {
5154
+ const section = element(doc, "div", "hive-card-run");
5155
+ const addAction = (node) => {
5156
+ if (Array.isArray(actionHost)) actionHost.push(node);
5157
+ else if (actionHost && typeof actionHost.appendChild === "function") actionHost.appendChild(node);
5158
+ else section.appendChild(node);
5159
+ };
5160
+ section.appendChild(element(doc, "div", "hive-card-run-title", translate("drawer.lastRun")));
5161
+ if (!run) {
5162
+ section.appendChild(element(doc, "div", "hive-note hive-card-run-empty", translate("drawer.noRuns")));
5163
+ return section;
5164
+ }
5165
+ const started = formatRunStamp(run.startedAt);
5166
+ const ended = formatRunStamp(run.endedAt);
5167
+ const metaParts = [run.status, run.agent];
5168
+ if (started || ended) metaParts.push(started + (ended ? " → " + ended : ""));
5169
+ if (run.commit) metaParts.push(shortCommit(run.commit));
5170
+ const metaPartsText = metaParts.filter(Boolean).join(" · ");
5171
+ const meta = element(doc, "div", "hive-card-run-meta", metaPartsText);
5172
+ setAttr(meta, "title", metaPartsText);
5173
+ section.appendChild(meta);
5174
+ // Consensus announcements: the other agents that announced the same paths. Invalid
5175
+ // entries are dropped by normalizeLastRun, duplicates collapse to one name,
5176
+ // and no overlapping writer means no row at all.
5177
+ const writers = [];
5178
+ for (const overlap of run.overlaps) {
5179
+ const agent = asString(overlap.agent);
5180
+ if (agent !== "" && !writers.includes(agent)) writers.push(agent);
5181
+ }
5182
+ if (writers.length > 0) {
5183
+ const overlapsLabel = translate("drawer.runOverlaps");
5184
+ // The zh dictionary copy uses the full-width colon elsewhere in the panel.
5185
+ const separator = /[\u4e00-\u9fff]/.test(overlapsLabel) ? ":" : ": ";
5186
+ section.appendChild(
5187
+ element(doc, "div", "hive-card-run-meta", overlapsLabel + separator + writers.join(", ")),
5188
+ );
5189
+ }
5190
+ // Memory recall: the worker always reports whether it read lessons, so the
5191
+ // block keeps one line even when the record predates that field.
5192
+ const lessonCount = run.lessons ? asCount(run.lessons.count, 0) : 0;
5193
+ const lessonsText =
5194
+ lessonCount > 0
5195
+ ? translate("drawer.runLessons").replace("{count}", String(lessonCount))
5196
+ : translate("drawer.runNoLessons");
5197
+ section.appendChild(element(doc, "div", "hive-card-run-meta", lessonsText));
5198
+ section.appendChild(element(doc, "pre", "hive-card-run-output", run.output));
5199
+ const foot = element(doc, "div", "hive-card-run-foot");
5200
+ const copy = element(doc, "button", "hive-btn hive-btn-ghost hive-card-run-copy", translate("drawer.copyOutput"));
5201
+ setAttr(copy, "type", "button");
5202
+ setAttr(copy, "title", translate("drawer.copyOutput"));
5203
+ setAttr(copy, "aria-label", translate("drawer.copyOutput"));
5204
+ copy.addEventListener("click", () => {
5205
+ copyToClipboard(doc, run.output);
5206
+ });
5207
+ if (Array.isArray(actionHost) || actionHost) addAction(copy);
5208
+ else foot.appendChild(copy);
5209
+ // Only render the jump-to-chat control when both halves exist: a recorded
5210
+ // worker Session and a host navigation callback. The status does not matter:
5211
+ // a running card exposes its Session as soon as the worker starts, and the
5212
+ // button must be there while the card is still in progress. No disabled stub.
5213
+ const canOpenChat = asString(run.sessionId) !== "" && typeof openSession === "function";
5214
+ if (canOpenChat) {
5215
+ const chat = element(doc, "button", "hive-btn hive-btn-ghost hive-card-run-open", translate("drawer.openChat"));
5216
+ setAttr(chat, "type", "button");
5217
+ setAttr(chat, "title", translate("drawer.openChat"));
5218
+ setAttr(chat, "aria-label", translate("drawer.openChat"));
5219
+ chat.addEventListener("click", () => {
5220
+ try {
5221
+ openSession(run.sessionId);
5222
+ } catch (error) {
5223
+ reportError(error);
5224
+ }
5225
+ });
5226
+ if (Array.isArray(actionHost) || actionHost) addAction(chat);
5227
+ else foot.appendChild(chat);
5228
+ }
5229
+ if (!actionHost) section.appendChild(foot);
5230
+ return section;
5231
+ }
5232
+
4368
5233
  function openDrawer(card, lane, trigger) {
4369
5234
  closeHelp(false);
4370
5235
  closePlanDialog(false);
@@ -4372,7 +5237,6 @@ export function mount(root, options = {}) {
4372
5237
  closeDrawer(false);
4373
5238
  drawerTrigger = trigger || null;
4374
5239
 
4375
- const raw = findRawTask(card) || { ...card, state: lane };
4376
5240
  const title = card.title || translate("card.untitled");
4377
5241
  const id = card.id || translate("card.noId");
4378
5242
  const role = asString(card.role) || "—";
@@ -4380,12 +5244,8 @@ export function mount(root, options = {}) {
4380
5244
  const repo = lastModel ? lastModel.repo : "";
4381
5245
  const ariaLabel = translate("drawer.cardAria") + " " + (card.title || card.id || translate("card.untitled"));
4382
5246
 
4383
- const overlay = element(doc, "div", "hive-overlay hive-dialog-scrim hive-card-scrim");
4384
- overlay.addEventListener("click", (event) => {
4385
- if (!event || !event.target || event.target === overlay) closeDrawer();
4386
- });
4387
-
4388
- const dialog = element(doc, "div", "hive-dialog hive-card-dialog hive-drawer");
5247
+ const dialog = element(doc, "dialog", "hive-dialog hive-card-dialog hive-drawer");
5248
+ bindDialogDismiss(dialog, () => closeDrawer());
4389
5249
  setAttr(dialog, "role", "dialog");
4390
5250
  setAttr(dialog, "aria-modal", "true");
4391
5251
  setAttr(dialog, "aria-label", ariaLabel);
@@ -4399,23 +5259,15 @@ export function mount(root, options = {}) {
4399
5259
  setAttr(subline, "title", sublineText);
4400
5260
  titleBox.appendChild(subline);
4401
5261
  head.appendChild(titleBox);
4402
- const closeButton = element(doc, "button", "hive-btn hive-btn-ghost hive-card-close", "×");
4403
- setAttr(closeButton, "type", "button");
4404
- setAttr(closeButton, "title", translate("drawer.closeAria"));
4405
- setAttr(closeButton, "aria-label", translate("drawer.closeAria"));
4406
- closeButton.addEventListener("click", () => {
5262
+ const closeButton = dialogCloseButton(() => {
4407
5263
  closeDrawer();
4408
5264
  });
4409
5265
  head.appendChild(closeButton);
4410
5266
  dialog.appendChild(head);
4411
5267
 
4412
5268
  const body = element(doc, "div", "hive-dialog-body hive-card-body");
4413
- const details = element(doc, "details", "hive-card-json");
4414
- const summary = element(doc, "summary", "hive-card-json-summary", translate("drawer.rawJson"));
4415
- const pre = element(doc, "pre", "hive-json", JSON.stringify(raw, null, 2));
4416
- details.appendChild(summary);
4417
- details.appendChild(pre);
4418
- body.appendChild(details);
5269
+ const runActions = [];
5270
+ body.appendChild(buildRunSection(card.lastRun, runActions));
4419
5271
  dialog.appendChild(body);
4420
5272
 
4421
5273
  const actions = actionsForState(lane, lastModel ? lastModel.writable : false);
@@ -4429,9 +5281,10 @@ export function mount(root, options = {}) {
4429
5281
  ),
4430
5282
  );
4431
5283
  }
4432
- if (actions.length > 0) {
5284
+ if (runActions.length > 0 || actions.length > 0) {
4433
5285
  const foot = element(doc, "div", "hive-dialog-foot hive-card-actions");
4434
5286
  setAttr(foot, "aria-label", translate("drawer.cardActions"));
5287
+ for (const runAction of runActions) foot.appendChild(runAction);
4435
5288
  const claimed = asString(card.state || lane) === "claimed";
4436
5289
  for (const action of actions) {
4437
5290
  const destructive = action.name === "remove";
@@ -4459,9 +5312,8 @@ export function mount(root, options = {}) {
4459
5312
  dialog.appendChild(foot);
4460
5313
  }
4461
5314
 
4462
- overlay.appendChild(dialog);
4463
- frame.appendChild(overlay);
4464
- drawerNode = overlay;
5315
+ showModalDialog(dialog);
5316
+ drawerNode = dialog;
4465
5317
  drawerState = { kind: "card", card, lane };
4466
5318
  if (typeof doc.addEventListener === "function") {
4467
5319
  doc.addEventListener("keydown", onDrawerKeydown);
@@ -4712,7 +5564,7 @@ export function mount(root, options = {}) {
4712
5564
  return storage;
4713
5565
  }
4714
5566
  } catch {
4715
- // A blocked localStorage must not break the panel.
5567
+ // A failing localStorage must not break the panel.
4716
5568
  }
4717
5569
  return null;
4718
5570
  }
@@ -4953,14 +5805,11 @@ export function mount(root, options = {}) {
4953
5805
  const total = element(doc, "span", "hive-stat is-total");
4954
5806
  total.appendChild(element(doc, "strong", null, String(model.stats.total)));
4955
5807
  total.appendChild(element(doc, "span", "hive-stat-unit", " " + translate("stats.cards")));
4956
- statsNode.appendChild(total);
4957
-
4958
- for (const state of LANE_ORDER) {
4959
- const count = model.stats.byState[state];
4960
- if (count === undefined || count === null) continue;
4961
- const pill = element(doc, "span", "hive-stat", laneLabel(state) + " " + count);
4962
- statsNode.appendChild(pill);
5808
+ const failedCount = model.stats.byState.failed;
5809
+ if (failedCount !== undefined && failedCount !== null && Number(failedCount) > 0) {
5810
+ total.appendChild(element(doc, "span", "hive-stat-unit", " · " + laneLabel("failed") + " " + failedCount));
4963
5811
  }
5812
+ statsNode.appendChild(total);
4964
5813
 
4965
5814
  if (model.stats.oldestPending) {
4966
5815
  const pending = model.stats.oldestPending;
@@ -5004,7 +5853,8 @@ export function mount(root, options = {}) {
5004
5853
  function renderActions(model) {
5005
5854
  clearNode(actionsNode);
5006
5855
  for (const action of model.actions) {
5007
- const button = element(doc, "button", "hive-btn", translate(action.labelKey));
5856
+ const variant = action.name === "add" ? " hive-settings-primary" : "";
5857
+ const button = element(doc, "button", "hive-btn" + variant, translate(action.labelKey));
5008
5858
  setAttr(button, "type", "button");
5009
5859
  setAttr(button, "title", translate(action.helpKey));
5010
5860
  setAttr(button, "aria-label", translate(action.helpKey));
@@ -5023,8 +5873,23 @@ export function mount(root, options = {}) {
5023
5873
  return;
5024
5874
  }
5025
5875
  agentsCount.textContent = String(model.agents.length);
5876
+ // A failed board read must never look like an idle swarm: show the CLI
5877
+ // diagnostic in the strip instead of the "no agents" empty state.
5878
+ if (model.boardError) {
5879
+ const error = element(
5880
+ doc,
5881
+ "span",
5882
+ "hive-agents-error",
5883
+ summarizeActionOutput(model.boardError, 400) || model.boardError,
5884
+ );
5885
+ setAttr(error, "title", model.boardError);
5886
+ setAttr(error, "role", "status");
5887
+ agentPills.appendChild(error);
5888
+ }
5026
5889
  if (model.agents.length === 0) {
5027
- agentPills.appendChild(element(doc, "span", "hive-agents-empty", translate("agents.empty")));
5890
+ if (!model.boardError) {
5891
+ agentPills.appendChild(element(doc, "span", "hive-agents-empty", translate("agents.empty")));
5892
+ }
5028
5893
  return;
5029
5894
  }
5030
5895
  for (const agent of model.agents) {
@@ -5372,12 +6237,53 @@ export function mount(root, options = {}) {
5372
6237
  closeAddDialog(false);
5373
6238
  closeToast();
5374
6239
  closeDrawer();
6240
+ if (portalHost && portalHost.parentNode) portalHost.parentNode.removeChild(portalHost);
6241
+ portalHost = null;
5375
6242
  if (frame.parentNode) frame.parentNode.removeChild(frame);
5376
6243
  lastSnapshot = null;
5377
6244
  lastModel = null;
5378
6245
  }
5379
6246
 
6247
+ const THEME_TOKEN_NAMES = [
6248
+ "--dsw-alias-bg-base",
6249
+ "--dsw-alias-bg-layer-1",
6250
+ "--dsw-alias-bg-layer-2",
6251
+ "--dsw-alias-bg-layer-3",
6252
+ "--dsw-alias-border-l1",
6253
+ "--dsw-alias-border-l2",
6254
+ "--dsw-alias-label-primary",
6255
+ "--dsw-alias-label-secondary",
6256
+ "--dsw-alias-label-tertiary",
6257
+ "--dsw-alias-brand-primary",
6258
+ "--dsw-alias-interactive-bg-hover",
6259
+ "--dsw-alias-border-selected",
6260
+ "--dsw-alias-state-error-primary",
6261
+ "--dsw-alias-state-success-primary",
6262
+ "--dsw-alias-state-warn-primary",
6263
+ "--dsw-radius-sm",
6264
+ "--dsw-radius-md",
6265
+ "--dsw-radius-lg",
6266
+ "--dsw-elevation-panel",
6267
+ ];
6268
+
6269
+ function assertThemeTokens() {
6270
+ if (!view || typeof view.getComputedStyle !== "function") return;
6271
+ let computed = null;
6272
+ try {
6273
+ computed = view.getComputedStyle(frame);
6274
+ } catch {
6275
+ return;
6276
+ }
6277
+ if (!computed) return;
6278
+ for (const token of THEME_TOKEN_NAMES) {
6279
+ if (computed.getPropertyValue(token).trim() === "" && view.console && typeof view.console.warn === "function") {
6280
+ view.console.warn("hive: " + token + " is empty; the neutral fallback keeps the panel visible");
6281
+ }
6282
+ }
6283
+ }
6284
+
5380
6285
  applyChrome();
6286
+ assertThemeTokens();
5381
6287
 
5382
6288
  if (typeof opts.subscribeLocale === "function") {
5383
6289
  try {