@d86e/hive-panel 1.0.27 → 1.0.29
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/package.json +1 -1
- package/public/panel.css +0 -42
- package/public/panel.js +2 -366
- package/src/cache.js +5 -10
- package/src/data.js +2 -9
- package/src/server.js +0 -1
package/package.json
CHANGED
package/public/panel.css
CHANGED
|
@@ -237,7 +237,6 @@
|
|
|
237
237
|
min-height: 0;
|
|
238
238
|
}
|
|
239
239
|
|
|
240
|
-
.hive-agents {
|
|
241
240
|
border-right: 1px solid var(--hive-line);
|
|
242
241
|
background: color-mix(in srgb, var(--hive-fg) 1.5%, transparent);
|
|
243
242
|
}
|
|
@@ -305,21 +304,18 @@
|
|
|
305
304
|
|
|
306
305
|
/* ------------------------------------------------------------------- agents */
|
|
307
306
|
|
|
308
|
-
.hive-agent {
|
|
309
307
|
padding: 8px 10px;
|
|
310
308
|
border: 1px solid var(--hive-line);
|
|
311
309
|
border-radius: var(--hive-radius-md);
|
|
312
310
|
background: var(--hive-surface);
|
|
313
311
|
}
|
|
314
312
|
|
|
315
|
-
.hive-agent-head {
|
|
316
313
|
display: flex;
|
|
317
314
|
align-items: center;
|
|
318
315
|
gap: 7px;
|
|
319
316
|
font-weight: 600;
|
|
320
317
|
}
|
|
321
318
|
|
|
322
|
-
.hive-agent-name {
|
|
323
319
|
overflow: hidden;
|
|
324
320
|
text-overflow: ellipsis;
|
|
325
321
|
white-space: nowrap;
|
|
@@ -360,7 +356,6 @@
|
|
|
360
356
|
white-space: nowrap;
|
|
361
357
|
}
|
|
362
358
|
|
|
363
|
-
.hive-agent-files {
|
|
364
359
|
color: var(--hive-fg-faint);
|
|
365
360
|
font-family: var(--hive-mono);
|
|
366
361
|
}
|
|
@@ -713,7 +708,6 @@
|
|
|
713
708
|
grid-template-rows: minmax(110px, 17vh) minmax(280px, 1fr) minmax(120px, 20vh);
|
|
714
709
|
}
|
|
715
710
|
|
|
716
|
-
.hive-agents {
|
|
717
711
|
border-right: 0;
|
|
718
712
|
border-bottom: 1px solid var(--hive-line);
|
|
719
713
|
}
|
|
@@ -723,13 +717,11 @@
|
|
|
723
717
|
border-left: 0;
|
|
724
718
|
}
|
|
725
719
|
|
|
726
|
-
.hive-agent-list {
|
|
727
720
|
flex-direction: row;
|
|
728
721
|
overflow-x: auto;
|
|
729
722
|
overflow-y: hidden;
|
|
730
723
|
}
|
|
731
724
|
|
|
732
|
-
.hive-agent {
|
|
733
725
|
flex: 0 0 190px;
|
|
734
726
|
}
|
|
735
727
|
|
|
@@ -772,7 +764,6 @@
|
|
|
772
764
|
.hive-bar { background: var(--hive-bg-layer-1); border-bottom-color: var(--hive-line); gap: 8px; }
|
|
773
765
|
.hive-main,
|
|
774
766
|
.hive-board { background: var(--hive-bg); }
|
|
775
|
-
.hive-agents,
|
|
776
767
|
.hive-events { background: var(--hive-bg-layer-1); border-color: var(--hive-line); }
|
|
777
768
|
.hive-lane { background: var(--hive-bg-layer-1); border-color: var(--hive-line); border-radius: var(--hive-radius-md); }
|
|
778
769
|
.hive-card { background: var(--hive-bg-layer-1); border: 1px solid var(--hive-line); border-radius: var(--hive-radius-md); box-shadow: none; }
|
|
@@ -1128,25 +1119,8 @@ dialog.hive-dialog .hive-dialog-body { flex: 1 1 auto; min-height: 0; overflow:
|
|
|
1128
1119
|
white-space: nowrap;
|
|
1129
1120
|
}
|
|
1130
1121
|
|
|
1131
|
-
.hive-agent-count { font: inherit; cursor: pointer; }
|
|
1132
|
-
.hive-agent-count:disabled { cursor: default; }
|
|
1133
1122
|
|
|
1134
1123
|
/* Agents dialog */
|
|
1135
|
-
.hive-agents-dialog { width: min(560px, 92vw); max-height: 80vh; }
|
|
1136
|
-
.hive-agents-body { display: flex; flex-direction: column; gap: 8px; min-height: 0; overflow: auto; }
|
|
1137
|
-
.hive-agents-empty-note { padding: 10px 0; color: var(--hive-fg-soft); font-size: 12px; line-height: 1.5; }
|
|
1138
|
-
.hive-agent-row { display: flex; align-items: flex-start; gap: 8px; padding: 8px 0; border-bottom: 1px solid var(--hive-line-2); }
|
|
1139
|
-
.hive-agent-row-main { display: flex; flex: 1 1 auto; flex-direction: column; gap: 2px; min-width: 0; }
|
|
1140
|
-
.hive-agent-row-name { color: var(--hive-fg); font-size: 14px; font-weight: 600; line-height: 1.5; overflow-wrap: anywhere; }
|
|
1141
|
-
.hive-agent-row-task { color: var(--hive-fg-soft); font-size: 12px; line-height: 1.5; overflow-wrap: anywhere; }
|
|
1142
|
-
.hive-agent-row-meta { color: var(--hive-fg-faint); font-size: 12px; line-height: 1.5; overflow-wrap: anywhere; }
|
|
1143
|
-
.hive-agents-workers-title { padding-top: 4px; color: var(--hive-fg); font-size: 14px; font-weight: 700; line-height: 1.5; }
|
|
1144
|
-
.hive-agent-worker-row { padding: 8px 0; border-bottom: 1px solid var(--hive-line-2); }
|
|
1145
|
-
.hive-agent-worker-task { color: var(--hive-fg); font-size: 14px; font-weight: 600; line-height: 1.5; overflow-wrap: anywhere; }
|
|
1146
|
-
.hive-agent-worker-meta { color: var(--hive-fg-soft); font-size: 12px; line-height: 1.5; overflow-wrap: anywhere; }
|
|
1147
|
-
.hive-agents-technical { border-top: 1px solid var(--hive-line-2); padding-top: 8px; }
|
|
1148
|
-
.hive-agents-technical-summary { color: var(--hive-fg-soft); font-size: 12px; line-height: 1.5; cursor: pointer; }
|
|
1149
|
-
.hive-agents-technical-json { max-height: 220px; margin-top: 8px; }
|
|
1150
1124
|
|
|
1151
1125
|
.hive-supervisor-inline-sep { color: var(--hive-fg-faint); }
|
|
1152
1126
|
.hive-supervisor-inline-state.is-normal::before { background: var(--hive-ok); }
|
|
@@ -1265,22 +1239,6 @@ dialog.hive-dialog .hive-dialog-body { flex: 1 1 auto; min-height: 0; overflow:
|
|
|
1265
1239
|
.hive-skeleton { grid-template-columns: 1fr; min-height: 0; }
|
|
1266
1240
|
}
|
|
1267
1241
|
|
|
1268
|
-
/* Task search and per-lane pagination controls. */
|
|
1269
|
-
.hive-search { flex: 0 0 auto; padding: 8px 10px 0; }
|
|
1270
|
-
.hive-search-input { box-sizing: border-box; width: 100%; padding: 5px 8px; border: 1px solid var(--hive-line); border-radius: var(--hive-radius-sm); background: var(--hive-bg-layer-1); color: var(--hive-fg); font: inherit; font-size: 12px; }
|
|
1271
|
-
.hive-search-input:focus { outline: 1px solid var(--hive-selected); outline-offset: 0; }
|
|
1272
|
-
.hive-search-results { margin-top: 6px; padding: 6px; border: 1px solid var(--hive-line-2); border-radius: var(--hive-radius-md); background: var(--hive-bg-layer-1); }
|
|
1273
|
-
.hive-search-results.is-hidden { display: none; }
|
|
1274
|
-
.hive-search-summary, .hive-search-empty { color: var(--hive-fg-faint); font-size: 11px; line-height: 1.5; }
|
|
1275
|
-
.hive-search-result { display: flex; align-items: center; gap: 6px; width: 100%; padding: 4px 6px; border: 0; background: transparent; color: var(--hive-fg); font: inherit; font-size: 12px; text-align: left; cursor: pointer; }
|
|
1276
|
-
.hive-search-result:hover { background: var(--hive-hover); }
|
|
1277
|
-
.hive-search-status { flex: 0 0 auto; font-size: 10px; }
|
|
1278
|
-
.hive-search-status.is-done { color: var(--hive-ok); }
|
|
1279
|
-
.hive-search-status.is-failed { color: var(--hive-danger); }
|
|
1280
|
-
.hive-search-status.is-claimed { color: var(--hive-accent); }
|
|
1281
|
-
.hive-search-status.is-pending { color: var(--hive-fg-faint); }
|
|
1282
|
-
.hive-search-title { flex: 1 1 auto; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
|
|
1283
|
-
.hive-search-id { flex: 0 0 auto; color: var(--hive-fg-faint); font-family: var(--hive-mono); font-size: 10.5px; }
|
|
1284
1242
|
.hive-lane-paging { flex: 0 0 auto; padding: 0 7px 7px; }
|
|
1285
1243
|
.hive-lane-more { width: 100%; padding: 3px 6px; font-size: 11px; }
|
|
1286
1244
|
.hive-lane-page-error { margin-top: 4px; color: var(--hive-danger); font-size: 10.5px; line-height: 1.4; overflow-wrap: anywhere; }
|
package/public/panel.js
CHANGED
|
@@ -325,7 +325,6 @@ const PANEL_STYLES = `.hive { position: relative; }
|
|
|
325
325
|
min-height: 0;
|
|
326
326
|
}
|
|
327
327
|
|
|
328
|
-
.hive-agents-strip {
|
|
329
328
|
display: flex;
|
|
330
329
|
flex: 0 0 auto;
|
|
331
330
|
flex-wrap: wrap;
|
|
@@ -345,9 +344,7 @@ const PANEL_STYLES = `.hive { position: relative; }
|
|
|
345
344
|
text-transform: uppercase;
|
|
346
345
|
}
|
|
347
346
|
|
|
348
|
-
.hive-agents-strip .hive-count { margin-left: 0; }
|
|
349
347
|
|
|
350
|
-
.hive-agent-pills {
|
|
351
348
|
display: flex;
|
|
352
349
|
flex: 1 1 auto;
|
|
353
350
|
flex-wrap: wrap;
|
|
@@ -355,7 +352,6 @@ const PANEL_STYLES = `.hive { position: relative; }
|
|
|
355
352
|
min-width: 0;
|
|
356
353
|
}
|
|
357
354
|
|
|
358
|
-
.hive-agent-pill {
|
|
359
355
|
display: inline-flex;
|
|
360
356
|
align-items: center;
|
|
361
357
|
gap: 6px;
|
|
@@ -371,17 +367,14 @@ const PANEL_STYLES = `.hive { position: relative; }
|
|
|
371
367
|
cursor: pointer;
|
|
372
368
|
}
|
|
373
369
|
|
|
374
|
-
.hive-agent-pill:hover {
|
|
375
370
|
border-color: color-mix(in srgb, var(--hive-accent) 50%, var(--hive-line));
|
|
376
371
|
background: var(--hive-surface-hover);
|
|
377
372
|
}
|
|
378
373
|
|
|
379
|
-
.hive-agent-pill:focus-visible {
|
|
380
374
|
outline: 2px solid var(--hive-accent);
|
|
381
375
|
outline-offset: 1px;
|
|
382
376
|
}
|
|
383
377
|
|
|
384
|
-
.hive-agent-pill-name {
|
|
385
378
|
max-width: 150px;
|
|
386
379
|
overflow: hidden;
|
|
387
380
|
font-weight: 600;
|
|
@@ -389,12 +382,10 @@ const PANEL_STYLES = `.hive { position: relative; }
|
|
|
389
382
|
white-space: nowrap;
|
|
390
383
|
}
|
|
391
384
|
|
|
392
|
-
.hive-agent-pill .hive-dot {
|
|
393
385
|
width: 6px;
|
|
394
386
|
height: 6px;
|
|
395
387
|
}
|
|
396
388
|
|
|
397
|
-
.hive-agent-pill-task {
|
|
398
389
|
max-width: 160px;
|
|
399
390
|
overflow: hidden;
|
|
400
391
|
color: var(--hive-fg-soft);
|
|
@@ -404,12 +395,10 @@ const PANEL_STYLES = `.hive { position: relative; }
|
|
|
404
395
|
white-space: nowrap;
|
|
405
396
|
}
|
|
406
397
|
|
|
407
|
-
.hive-agents-empty {
|
|
408
398
|
color: var(--hive-fg-faint);
|
|
409
399
|
font-size: 12px;
|
|
410
400
|
}
|
|
411
401
|
|
|
412
|
-
.hive-agents-error {
|
|
413
402
|
min-width: 0;
|
|
414
403
|
overflow-wrap: anywhere;
|
|
415
404
|
color: var(--hive-danger);
|
|
@@ -622,7 +611,6 @@ const PANEL_STYLES = `.hive { position: relative; }
|
|
|
622
611
|
|
|
623
612
|
.hive.is-uninitialised .hive-init-pane { display: flex; }
|
|
624
613
|
|
|
625
|
-
.hive.is-uninitialised .hive-agents-strip,
|
|
626
614
|
.hive.is-uninitialised .hive-board,
|
|
627
615
|
.hive.is-uninitialised .hive-events-drawer,
|
|
628
616
|
.hive.is-uninitialised .hive-freeze-slot,
|
|
@@ -1199,7 +1187,6 @@ const PANEL_STYLES = `.hive { position: relative; }
|
|
|
1199
1187
|
.hive-main { gap: 8px; }
|
|
1200
1188
|
.hive-supervisor { padding: 10px 16px; }
|
|
1201
1189
|
.hive-freeze-banner { padding: 10px 16px; }
|
|
1202
|
-
.hive-agents-strip { padding: 10px 16px; }
|
|
1203
1190
|
.hive-stage-chips { padding: 10px 16px 0; }
|
|
1204
1191
|
.hive-lanes { gap: 10px; padding: 12px 16px; }
|
|
1205
1192
|
.hive-lane-cards { gap: 9px; }
|
|
@@ -1227,7 +1214,6 @@ const PANEL_STYLES = `.hive { position: relative; }
|
|
|
1227
1214
|
|
|
1228
1215
|
.hive-empty,
|
|
1229
1216
|
.hive-filter-empty,
|
|
1230
|
-
.hive-agents-empty {
|
|
1231
1217
|
padding: 12px 14px;
|
|
1232
1218
|
border: 1px solid var(--hive-line);
|
|
1233
1219
|
border-radius: var(--hive-radius-md);
|
|
@@ -1306,7 +1292,6 @@ const PANEL_STYLES = `.hive { position: relative; }
|
|
|
1306
1292
|
.hive-supervisor,
|
|
1307
1293
|
.hive-freeze-banner,
|
|
1308
1294
|
.hive-queen-hint,
|
|
1309
|
-
.hive-agents-strip,
|
|
1310
1295
|
.hive-events-toggle,
|
|
1311
1296
|
.hive-dialog-head,
|
|
1312
1297
|
.hive-dialog-body,
|
|
@@ -1536,7 +1521,6 @@ const PANEL_STYLES = `.hive { position: relative; }
|
|
|
1536
1521
|
.hive-settings-form-actions .hive-btn,
|
|
1537
1522
|
.hive-settings-tab,
|
|
1538
1523
|
.hive-stage-chip,
|
|
1539
|
-
.hive-agent-pill,
|
|
1540
1524
|
.hive-events-toggle,
|
|
1541
1525
|
.hive-supervisor-resume,
|
|
1542
1526
|
.hive-queen-takeover,
|
|
@@ -1561,7 +1545,6 @@ const PANEL_STYLES = `.hive { position: relative; }
|
|
|
1561
1545
|
.hive-plan-error,
|
|
1562
1546
|
.hive-init-description,
|
|
1563
1547
|
.hive-queen-text,
|
|
1564
|
-
.hive-agent-empty,
|
|
1565
1548
|
.hive-card-meta,
|
|
1566
1549
|
.hive-card-reason,
|
|
1567
1550
|
.hive-card-scope,
|
|
@@ -1620,7 +1603,6 @@ const PANEL_STYLES = `.hive { position: relative; }
|
|
|
1620
1603
|
.hive-bar { background: var(--hive-bg-layer-1); border-bottom-color: var(--hive-line); gap: 8px; }
|
|
1621
1604
|
.hive-main,
|
|
1622
1605
|
.hive-board { background: var(--hive-bg); }
|
|
1623
|
-
.hive-agents,
|
|
1624
1606
|
.hive-events { background: var(--hive-bg-layer-1); border-color: var(--hive-line); }
|
|
1625
1607
|
.hive-lane { background: var(--hive-bg-layer-1); border-color: var(--hive-line); border-radius: var(--hive-radius-md); }
|
|
1626
1608
|
.hive-card { background: var(--hive-bg-layer-1); border: 1px solid var(--hive-line); border-radius: var(--hive-radius-md); box-shadow: none; }
|
|
@@ -1968,24 +1950,7 @@ dialog.hive-dialog .hive-dialog-body { flex: 1 1 auto; min-height: 0; overflow:
|
|
|
1968
1950
|
text-overflow: ellipsis;
|
|
1969
1951
|
white-space: nowrap;
|
|
1970
1952
|
}
|
|
1971
|
-
.hive-agent-count { font: inherit; cursor: pointer; }
|
|
1972
|
-
.hive-agent-count:disabled { cursor: default; }
|
|
1973
1953
|
/* Agents dialog */
|
|
1974
|
-
.hive-agents-dialog { width: min(560px, 92vw); max-height: 80vh; }
|
|
1975
|
-
.hive-agents-body { display: flex; flex-direction: column; gap: 8px; min-height: 0; overflow: auto; }
|
|
1976
|
-
.hive-agents-empty-note { padding: 10px 0; color: var(--hive-fg-soft); font-size: 12px; line-height: 1.5; }
|
|
1977
|
-
.hive-agent-row { display: flex; align-items: flex-start; gap: 8px; padding: 8px 0; border-bottom: 1px solid var(--hive-line-2); }
|
|
1978
|
-
.hive-agent-row-main { display: flex; flex: 1 1 auto; flex-direction: column; gap: 2px; min-width: 0; }
|
|
1979
|
-
.hive-agent-row-name { color: var(--hive-fg); font-size: 14px; font-weight: 600; line-height: 1.5; overflow-wrap: anywhere; }
|
|
1980
|
-
.hive-agent-row-task { color: var(--hive-fg-soft); font-size: 12px; line-height: 1.5; overflow-wrap: anywhere; }
|
|
1981
|
-
.hive-agent-row-meta { color: var(--hive-fg-faint); font-size: 12px; line-height: 1.5; overflow-wrap: anywhere; }
|
|
1982
|
-
.hive-agents-workers-title { padding-top: 4px; color: var(--hive-fg); font-size: 14px; font-weight: 700; line-height: 1.5; }
|
|
1983
|
-
.hive-agent-worker-row { padding: 8px 0; border-bottom: 1px solid var(--hive-line-2); }
|
|
1984
|
-
.hive-agent-worker-task { color: var(--hive-fg); font-size: 14px; font-weight: 600; line-height: 1.5; overflow-wrap: anywhere; }
|
|
1985
|
-
.hive-agent-worker-meta { color: var(--hive-fg-soft); font-size: 12px; line-height: 1.5; overflow-wrap: anywhere; }
|
|
1986
|
-
.hive-agents-technical { border-top: 1px solid var(--hive-line-2); padding-top: 8px; }
|
|
1987
|
-
.hive-agents-technical-summary { color: var(--hive-fg-soft); font-size: 12px; line-height: 1.5; cursor: pointer; }
|
|
1988
|
-
.hive-agents-technical-json { max-height: 220px; margin-top: 8px; }
|
|
1989
1954
|
.hive-supervisor-inline-sep { color: var(--hive-fg-faint); }
|
|
1990
1955
|
.hive-supervisor-inline-state.is-normal::before { background: var(--hive-ok); }
|
|
1991
1956
|
.hive-supervisor-inline-state.is-paused::before { background: var(--hive-warn); }
|
|
@@ -2093,22 +2058,6 @@ dialog.hive-dialog .hive-dialog-body { flex: 1 1 auto; min-height: 0; overflow:
|
|
|
2093
2058
|
.hive-lane-cards { min-height: 480px; max-height: none; }
|
|
2094
2059
|
.hive-skeleton { grid-template-columns: 1fr; min-height: 0; }
|
|
2095
2060
|
}
|
|
2096
|
-
/* Task search and per-lane pagination controls. */
|
|
2097
|
-
.hive-search { flex: 0 0 auto; padding: 8px 10px 0; }
|
|
2098
|
-
.hive-search-input { box-sizing: border-box; width: 100%; padding: 5px 8px; border: 1px solid var(--hive-line); border-radius: var(--hive-radius-sm); background: var(--hive-bg-layer-1); color: var(--hive-fg); font: inherit; font-size: 12px; }
|
|
2099
|
-
.hive-search-input:focus { outline: 1px solid var(--hive-selected); outline-offset: 0; }
|
|
2100
|
-
.hive-search-results { margin-top: 6px; padding: 6px; border: 1px solid var(--hive-line-2); border-radius: var(--hive-radius-md); background: var(--hive-bg-layer-1); }
|
|
2101
|
-
.hive-search-results.is-hidden { display: none; }
|
|
2102
|
-
.hive-search-summary, .hive-search-empty { color: var(--hive-fg-faint); font-size: 11px; line-height: 1.5; }
|
|
2103
|
-
.hive-search-result { display: flex; align-items: center; gap: 6px; width: 100%; padding: 4px 6px; border: 0; background: transparent; color: var(--hive-fg); font: inherit; font-size: 12px; text-align: left; cursor: pointer; }
|
|
2104
|
-
.hive-search-result:hover { background: var(--hive-hover); }
|
|
2105
|
-
.hive-search-status { flex: 0 0 auto; font-size: 10px; }
|
|
2106
|
-
.hive-search-status.is-done { color: var(--hive-ok); }
|
|
2107
|
-
.hive-search-status.is-failed { color: var(--hive-danger); }
|
|
2108
|
-
.hive-search-status.is-claimed { color: var(--hive-accent); }
|
|
2109
|
-
.hive-search-status.is-pending { color: var(--hive-fg-faint); }
|
|
2110
|
-
.hive-search-title { flex: 1 1 auto; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
|
|
2111
|
-
.hive-search-id { flex: 0 0 auto; color: var(--hive-fg-faint); font-family: var(--hive-mono); font-size: 10.5px; }
|
|
2112
2061
|
.hive-lane-paging { flex: 0 0 auto; padding: 0 7px 7px; }
|
|
2113
2062
|
.hive-lane-more { width: 100%; padding: 3px 6px; font-size: 11px; }
|
|
2114
2063
|
.hive-lane-page-error { margin-top: 4px; color: var(--hive-danger); font-size: 10.5px; line-height: 1.4; overflow-wrap: anywhere; }
|
|
@@ -2214,7 +2163,6 @@ export const messages = Object.freeze({
|
|
|
2214
2163
|
"action.remove": "Delete task",
|
|
2215
2164
|
"action.retry": "retry",
|
|
2216
2165
|
"action.unfreeze": "Resume",
|
|
2217
|
-
"pane.agents": "agents",
|
|
2218
2166
|
"pane.board": "Task board",
|
|
2219
2167
|
"pane.events": "events",
|
|
2220
2168
|
"board.filtersAria": "Filter by state",
|
|
@@ -2244,10 +2192,6 @@ export const messages = Object.freeze({
|
|
|
2244
2192
|
"board.loading": "Loading…",
|
|
2245
2193
|
"board.loadFailed": "Could not load more",
|
|
2246
2194
|
"board.retry": "Retry",
|
|
2247
|
-
"board.searchPlaceholder": "Search task id or title",
|
|
2248
|
-
"board.searchAria": "Search tasks by id or title",
|
|
2249
|
-
"board.searchEmpty": "No matching tasks",
|
|
2250
|
-
"board.searchResults": "{count} matching tasks",
|
|
2251
2195
|
"board.all": "all",
|
|
2252
2196
|
"board.showAll": "Show all tasks",
|
|
2253
2197
|
"board.filterChip": "Show {lane} tasks ({count})",
|
|
@@ -2283,21 +2227,6 @@ export const messages = Object.freeze({
|
|
|
2283
2227
|
"loading.events": "Loading…",
|
|
2284
2228
|
"loading.retryAria": "Retry loading the board",
|
|
2285
2229
|
"loading.aria": "Loading the board",
|
|
2286
|
-
"agents.openAria": "Open agent",
|
|
2287
|
-
"agents.runningTooltip": "Running {running} / board identities {identities}",
|
|
2288
|
-
"agents.fallbackTooltip": "Board identities {identities} (supervisor disconnected or repository not registered)",
|
|
2289
|
-
"agents.modalEmpty": "No agents.",
|
|
2290
|
-
"agents.fileCount": "{count} files",
|
|
2291
|
-
"agents.workersTitle": "Active work units",
|
|
2292
|
-
"agents.workerStarted": "Started {time}",
|
|
2293
|
-
"agents.workerElapsed": "Running for {duration}",
|
|
2294
|
-
"agents.technical": "Technical details",
|
|
2295
|
-
"agents.waitingReclaim": "Waiting to reclaim {count}",
|
|
2296
|
-
"agents.waitingReclaimTooltip": "{count} tasks are claimed but no agent is running (waiting to be reclaimed after a process restart)",
|
|
2297
|
-
"agent.idle": "idle",
|
|
2298
|
-
"agent.task": "task",
|
|
2299
|
-
"agent.unknown": "unknown",
|
|
2300
|
-
"agent.seen": "seen",
|
|
2301
2230
|
"card.untitled": "(untitled)",
|
|
2302
2231
|
"card.noId": "no id",
|
|
2303
2232
|
"card.openAria": "Open task",
|
|
@@ -2603,7 +2532,6 @@ export const messages = Object.freeze({
|
|
|
2603
2532
|
"action.remove": "删除任务",
|
|
2604
2533
|
"action.retry": "重试",
|
|
2605
2534
|
"action.unfreeze": "恢复",
|
|
2606
|
-
"pane.agents": "智能体",
|
|
2607
2535
|
"pane.board": "任务看板",
|
|
2608
2536
|
"pane.events": "事件",
|
|
2609
2537
|
"board.filtersAria": "按状态筛选",
|
|
@@ -2633,10 +2561,6 @@ export const messages = Object.freeze({
|
|
|
2633
2561
|
"board.loading": "加载中…",
|
|
2634
2562
|
"board.loadFailed": "加载失败",
|
|
2635
2563
|
"board.retry": "重试",
|
|
2636
|
-
"board.searchPlaceholder": "搜索任务 ID 或标题",
|
|
2637
|
-
"board.searchAria": "按 ID 或标题搜索任务",
|
|
2638
|
-
"board.searchEmpty": "没有匹配任务",
|
|
2639
|
-
"board.searchResults": "{count} 个匹配任务",
|
|
2640
2564
|
"board.all": "全部",
|
|
2641
2565
|
"board.showAll": "显示全部任务",
|
|
2642
2566
|
"board.filterChip": "只看{lane}任务({count})",
|
|
@@ -2672,21 +2596,6 @@ export const messages = Object.freeze({
|
|
|
2672
2596
|
"loading.events": "加载中…",
|
|
2673
2597
|
"loading.retryAria": "重试读取看板",
|
|
2674
2598
|
"loading.aria": "正在读取看板",
|
|
2675
|
-
"agents.openAria": "打开智能体",
|
|
2676
|
-
"agents.runningTooltip": "运行中 {running} / 公告板身份 {identities}",
|
|
2677
|
-
"agents.fallbackTooltip": "公告板身份 {identities}(监督器未连接或未注册该仓库)",
|
|
2678
|
-
"agents.modalEmpty": "暂无智能体。",
|
|
2679
|
-
"agents.fileCount": "{count} 个文件",
|
|
2680
|
-
"agents.workersTitle": "运行中的工作单元",
|
|
2681
|
-
"agents.workerStarted": "开始于 {time}",
|
|
2682
|
-
"agents.workerElapsed": "已运行 {duration}",
|
|
2683
|
-
"agents.technical": "技术详情",
|
|
2684
|
-
"agents.waitingReclaim": "等待回收 {count}",
|
|
2685
|
-
"agents.waitingReclaimTooltip": "有 {count} 个任务被认领但当前没有运行中的工作单元(进程重启后等待回收)",
|
|
2686
|
-
"agent.idle": "空闲",
|
|
2687
|
-
"agent.task": "任务",
|
|
2688
|
-
"agent.unknown": "未知",
|
|
2689
|
-
"agent.seen": "上次活跃",
|
|
2690
2599
|
"card.untitled": "(无标题)",
|
|
2691
2600
|
"card.noId": "无 ID",
|
|
2692
2601
|
"card.openAria": "打开任务",
|
|
@@ -3248,22 +3157,6 @@ function normalizeStats(stats, tasks) {
|
|
|
3248
3157
|
return { total, byState, byRole, oldestPending };
|
|
3249
3158
|
}
|
|
3250
3159
|
|
|
3251
|
-
function normalizeAgents(board) {
|
|
3252
|
-
const agents = [];
|
|
3253
|
-
for (const rawEntry of asArray(board)) {
|
|
3254
|
-
const entry = isRecord(rawEntry) && isRecord(rawEntry.value) ? rawEntry.value : rawEntry;
|
|
3255
|
-
if (!isRecord(entry)) continue;
|
|
3256
|
-
agents.push({
|
|
3257
|
-
agent: asString(entry.agent || entry.key || entry.name),
|
|
3258
|
-
state: asString(entry.state),
|
|
3259
|
-
task: asString(entry.task),
|
|
3260
|
-
files: asArray(entry.files).map((file) => asString(file)).filter(Boolean),
|
|
3261
|
-
updatedAt: asString(entry.updatedAt),
|
|
3262
|
-
});
|
|
3263
|
-
}
|
|
3264
|
-
return agents;
|
|
3265
|
-
}
|
|
3266
|
-
|
|
3267
3160
|
function normalizeEventKinds(value) {
|
|
3268
3161
|
const rows = [];
|
|
3269
3162
|
for (const entry of asArray(value)) {
|
|
@@ -3325,8 +3218,6 @@ function toolbarActions(writable, mode) {
|
|
|
3325
3218
|
* lanes: Record<string, Array<{id:string,title:string,role:string,owner:string,scope:string[],reason:string}>>,
|
|
3326
3219
|
* laneOrder: string[],
|
|
3327
3220
|
* stats: {total:number, byState:Record<string,number>, byRole:Record<string,number>, oldestPending:{id:string,createdAt:string}|null},
|
|
3328
|
-
* agents: Array<{agent:string,state:string,task:string,files:string[],updatedAt:string}>,
|
|
3329
|
-
* boardError: string|null,
|
|
3330
3221
|
* events: Array<{ts:string,kind:string,task:string,actor:string}>,
|
|
3331
3222
|
* actions: Array<{name:string,labelKey:string,body?:object}>
|
|
3332
3223
|
* }}
|
|
@@ -3440,10 +3331,8 @@ export function renderModel(snapshot) {
|
|
|
3440
3331
|
lanePages,
|
|
3441
3332
|
taskList: tasks.map(normalizeCard),
|
|
3442
3333
|
stats: normalizeStats(source.stats, tasks),
|
|
3443
|
-
agents: normalizeAgents(source.board),
|
|
3444
3334
|
// A board read that failed is not the same as an idle swarm: keep the
|
|
3445
3335
|
// diagnostic so the agents strip can show it instead of "no agents".
|
|
3446
|
-
boardError: asString(source.boardError) || null,
|
|
3447
3336
|
events: normalizeEvents(source.events),
|
|
3448
3337
|
eventTotal: asCount(source.eventTotal, normalizeEvents(source.events).length),
|
|
3449
3338
|
eventKinds: normalizeEventKinds(source.eventKinds),
|
|
@@ -4333,13 +4222,6 @@ export function mount(root, options = {}) {
|
|
|
4333
4222
|
const statsNode = element(doc, "div", "hive-stats");
|
|
4334
4223
|
bar.appendChild(statsNode);
|
|
4335
4224
|
|
|
4336
|
-
const agentsCount = element(doc, "button", "hive-stat hive-agent-count");
|
|
4337
|
-
setAttr(agentsCount, "type", "button");
|
|
4338
|
-
agentsCount.addEventListener("click", () => {
|
|
4339
|
-
openAgentsDialog();
|
|
4340
|
-
});
|
|
4341
|
-
bar.appendChild(agentsCount);
|
|
4342
|
-
|
|
4343
4225
|
const queenBadge = element(doc, "span", "hive-queen-badge is-hidden", "");
|
|
4344
4226
|
bar.appendChild(queenBadge);
|
|
4345
4227
|
|
|
@@ -4456,21 +4338,6 @@ export function mount(root, options = {}) {
|
|
|
4456
4338
|
const stage = element(doc, "div", "hive-stage");
|
|
4457
4339
|
const stageChips = element(doc, "div", "hive-stage-chips");
|
|
4458
4340
|
setAttr(stageChips, "aria-label", translate("board.filtersAria"));
|
|
4459
|
-
const searchBox = element(doc, "div", "hive-search");
|
|
4460
|
-
const searchInput = element(doc, "input", "hive-search-input");
|
|
4461
|
-
setAttr(searchInput, "type", "search");
|
|
4462
|
-
setAttr(searchInput, "placeholder", translate("board.searchPlaceholder"));
|
|
4463
|
-
setAttr(searchInput, "aria-label", translate("board.searchAria"));
|
|
4464
|
-
const searchResults = element(doc, "div", "hive-search-results is-hidden");
|
|
4465
|
-
searchBox.appendChild(searchInput);
|
|
4466
|
-
searchBox.appendChild(searchResults);
|
|
4467
|
-
stage.appendChild(searchBox);
|
|
4468
|
-
searchInput.addEventListener("input", () => {
|
|
4469
|
-
void runSearch(searchInput.value);
|
|
4470
|
-
});
|
|
4471
|
-
searchInput.addEventListener("keydown", (event) => {
|
|
4472
|
-
if (event && event.key === "Enter") void runSearch(searchInput.value);
|
|
4473
|
-
});
|
|
4474
4341
|
|
|
4475
4342
|
const lanesNode = element(doc, "div", "hive-lanes");
|
|
4476
4343
|
const filterEmpty = element(doc, "div", "hive-filter-empty", "");
|
|
@@ -4766,18 +4633,6 @@ export function mount(root, options = {}) {
|
|
|
4766
4633
|
return element(doc, "div", "hive-empty", text);
|
|
4767
4634
|
}
|
|
4768
4635
|
|
|
4769
|
-
function findRawAgent(agent) {
|
|
4770
|
-
const board = lastSnapshot && Array.isArray(lastSnapshot.board) ? lastSnapshot.board : [];
|
|
4771
|
-
for (const rawEntry of board) {
|
|
4772
|
-
const entry = isRecord(rawEntry) && isRecord(rawEntry.value) ? rawEntry.value : rawEntry;
|
|
4773
|
-
if (!isRecord(entry)) continue;
|
|
4774
|
-
if (asString(entry.agent || entry.key || entry.name) === agent.agent) return entry;
|
|
4775
|
-
}
|
|
4776
|
-
return null;
|
|
4777
|
-
}
|
|
4778
|
-
|
|
4779
|
-
// --- help popover --------------------------------------------------------
|
|
4780
|
-
|
|
4781
4636
|
function helpSignatureOf(model) {
|
|
4782
4637
|
if (!model) return "none";
|
|
4783
4638
|
return (
|
|
@@ -6135,114 +5990,6 @@ export function mount(root, options = {}) {
|
|
|
6135
5990
|
return body;
|
|
6136
5991
|
}
|
|
6137
5992
|
|
|
6138
|
-
function taskTitleForId(id) {
|
|
6139
|
-
const wanted = asString(id);
|
|
6140
|
-
if (!wanted || !lastModel) return "";
|
|
6141
|
-
for (const lane of LANE_ORDER) {
|
|
6142
|
-
for (const card of lastModel.lanes[lane] || []) {
|
|
6143
|
-
if (asString(card.id) === wanted) return card.title || wanted;
|
|
6144
|
-
}
|
|
6145
|
-
}
|
|
6146
|
-
return wanted;
|
|
6147
|
-
}
|
|
6148
|
-
|
|
6149
|
-
function openAgentsDialog() {
|
|
6150
|
-
closeHelp(false);
|
|
6151
|
-
closePlanDialog(false);
|
|
6152
|
-
closeAddDialog(false);
|
|
6153
|
-
closeDrawer(false);
|
|
6154
|
-
closeLimitsDialog(false);
|
|
6155
|
-
|
|
6156
|
-
const dialog = element(doc, "dialog", "hive-dialog hive-agents-dialog");
|
|
6157
|
-
setAttr(dialog, "role", "dialog");
|
|
6158
|
-
setAttr(dialog, "aria-modal", "true");
|
|
6159
|
-
setAttr(dialog, "aria-label", translate("pane.agents"));
|
|
6160
|
-
bindDialogDismiss(dialog, () => {
|
|
6161
|
-
closeModalDialog(dialog);
|
|
6162
|
-
if (!destroyed) focusNode(agentsCount);
|
|
6163
|
-
});
|
|
6164
|
-
|
|
6165
|
-
const head = element(doc, "div", "hive-dialog-head");
|
|
6166
|
-
const titleBox = element(doc, "div", "hive-dialog-head-title");
|
|
6167
|
-
titleBox.appendChild(element(doc, "h2", "hive-dialog-title", translate("pane.agents")));
|
|
6168
|
-
head.appendChild(titleBox);
|
|
6169
|
-
const closeButton = dialogCloseButton(() => {
|
|
6170
|
-
closeModalDialog(dialog);
|
|
6171
|
-
if (!destroyed) focusNode(agentsCount);
|
|
6172
|
-
});
|
|
6173
|
-
head.appendChild(closeButton);
|
|
6174
|
-
dialog.appendChild(head);
|
|
6175
|
-
|
|
6176
|
-
const body = element(doc, "div", "hive-dialog-body hive-agents-body");
|
|
6177
|
-
const agents = lastModel && Array.isArray(lastModel.agents) ? lastModel.agents : [];
|
|
6178
|
-
if (agents.length === 0) {
|
|
6179
|
-
body.appendChild(element(doc, "div", "hive-agents-empty-note", translate("agents.modalEmpty")));
|
|
6180
|
-
}
|
|
6181
|
-
for (const agent of agents) {
|
|
6182
|
-
const row = element(doc, "div", "hive-agent-row");
|
|
6183
|
-
const dot = element(doc, "span", "hive-dot is-" + safeClassToken(agent.state));
|
|
6184
|
-
setAttr(dot, "title", agent.state || translate("agent.idle"));
|
|
6185
|
-
row.appendChild(dot);
|
|
6186
|
-
const content = element(doc, "div", "hive-agent-row-main");
|
|
6187
|
-
content.appendChild(element(doc, "div", "hive-agent-row-name", agent.agent || translate("agent.unknown")));
|
|
6188
|
-
const task = taskTitleForId(agent.task);
|
|
6189
|
-
content.appendChild(
|
|
6190
|
-
element(doc, "div", "hive-agent-row-task", task || translate("agent.idle")),
|
|
6191
|
-
);
|
|
6192
|
-
const meta = [translate("agents.fileCount").replace("{count}", String((agent.files || []).length))];
|
|
6193
|
-
const activity = elapsedLabel(agent.updatedAt);
|
|
6194
|
-
if (activity) meta.push(activity);
|
|
6195
|
-
const metaNode = element(doc, "div", "hive-agent-row-meta", meta.join(" · "));
|
|
6196
|
-
if (agent.updatedAt) setAttr(metaNode, "title", agent.updatedAt);
|
|
6197
|
-
content.appendChild(metaNode);
|
|
6198
|
-
row.appendChild(content);
|
|
6199
|
-
body.appendChild(row);
|
|
6200
|
-
}
|
|
6201
|
-
|
|
6202
|
-
const supervisor = currentSupervisorRow();
|
|
6203
|
-
const workers = supervisor && Array.isArray(supervisor.workers) ? supervisor.workers : [];
|
|
6204
|
-
if (workers.length > 0) {
|
|
6205
|
-
body.appendChild(element(doc, "div", "hive-agents-workers-title", translate("agents.workersTitle")));
|
|
6206
|
-
for (const worker of workers) {
|
|
6207
|
-
const row = element(doc, "div", "hive-agent-worker-row");
|
|
6208
|
-
row.appendChild(
|
|
6209
|
-
element(doc, "div", "hive-agent-worker-task", taskTitleForId(worker.cardId) || worker.cardId),
|
|
6210
|
-
);
|
|
6211
|
-
const meta = [];
|
|
6212
|
-
if (worker.role) meta.push(worker.role);
|
|
6213
|
-
if (worker.startedAt) meta.push(translate("agents.workerStarted").replace("{time}", formatRunStamp(worker.startedAt)));
|
|
6214
|
-
const elapsed = elapsedLabel(worker.startedAt);
|
|
6215
|
-
if (elapsed) meta.push(translate("agents.workerElapsed").replace("{duration}", elapsed));
|
|
6216
|
-
row.appendChild(element(doc, "div", "hive-agent-worker-meta", meta.join(" · ") || worker.agentName || worker.agent || ""));
|
|
6217
|
-
body.appendChild(row);
|
|
6218
|
-
}
|
|
6219
|
-
}
|
|
6220
|
-
|
|
6221
|
-
const technical = element(doc, "details", "hive-agents-technical");
|
|
6222
|
-
technical.appendChild(element(doc, "summary", "hive-agents-technical-summary", translate("agents.technical")));
|
|
6223
|
-
technical.appendChild(
|
|
6224
|
-
element(doc, "pre", "hive-json hive-agents-technical-json", JSON.stringify({ agents, workers }, null, 2)),
|
|
6225
|
-
);
|
|
6226
|
-
body.appendChild(technical);
|
|
6227
|
-
dialog.appendChild(body);
|
|
6228
|
-
|
|
6229
|
-
showModalDialog(dialog);
|
|
6230
|
-
focusNode(closeButton);
|
|
6231
|
-
}
|
|
6232
|
-
|
|
6233
|
-
function openAgentDrawer(agent) {
|
|
6234
|
-
const raw = findRawAgent(agent) || { ...agent };
|
|
6235
|
-
const title = agent.agent || translate("agent.unknown");
|
|
6236
|
-
const body = mountDrawer(
|
|
6237
|
-
agent.state || translate("agent.idle"),
|
|
6238
|
-
title,
|
|
6239
|
-
translate("agents.openAria") + " " + title,
|
|
6240
|
-
);
|
|
6241
|
-
drawerState = { kind: "agent", agent };
|
|
6242
|
-
body.appendChild(element(doc, "div", "hive-section-label", translate("drawer.rawJson")));
|
|
6243
|
-
body.appendChild(element(doc, "pre", "hive-json", JSON.stringify(raw, null, 2)));
|
|
6244
|
-
}
|
|
6245
|
-
|
|
6246
5993
|
/**
|
|
6247
5994
|
* The card drawer's "Last run" block. With no record it is one muted line;
|
|
6248
5995
|
* with a record it shows status, agent, timestamps and the short commit above
|
|
@@ -7415,7 +7162,6 @@ function renderMarkdownInto(doc, host, source) {
|
|
|
7415
7162
|
function setSupervisorData(rows) {
|
|
7416
7163
|
supervisorData = Array.isArray(rows) ? rows : [];
|
|
7417
7164
|
renderSupervisor();
|
|
7418
|
-
if (lastModel) renderAgents(lastModel);
|
|
7419
7165
|
}
|
|
7420
7166
|
|
|
7421
7167
|
|
|
@@ -7564,42 +7310,6 @@ function renderMarkdownInto(doc, host, source) {
|
|
|
7564
7310
|
}
|
|
7565
7311
|
}
|
|
7566
7312
|
|
|
7567
|
-
function renderAgents(model) {
|
|
7568
|
-
if (model.initialised === false) {
|
|
7569
|
-
agentsCount.className = "hive-stat hive-agent-count is-hidden";
|
|
7570
|
-
agentsCount.textContent = "0";
|
|
7571
|
-
agentsCount._agent = null;
|
|
7572
|
-
agentsCount.disabled = true;
|
|
7573
|
-
return;
|
|
7574
|
-
}
|
|
7575
|
-
const identities = model.agents.length;
|
|
7576
|
-
const row = currentSupervisorRow();
|
|
7577
|
-
const managed = Boolean(row && row.unmanaged !== true && row.waiting !== "no-queen-session");
|
|
7578
|
-
const hasWorkers = Boolean(managed && row.workersKnown === true && Array.isArray(row.workers));
|
|
7579
|
-
const workers = hasWorkers ? row.workers.length : null;
|
|
7580
|
-
const claimed = asCount(model.stats.byState.claimed, (model.lanes.claimed || []).length);
|
|
7581
|
-
const waitingToReclaim = workers === 0 && claimed > 0;
|
|
7582
|
-
agentsCount.className = "hive-stat hive-agent-count";
|
|
7583
|
-
agentsCount.disabled = false;
|
|
7584
|
-
agentsCount._agent = identities > 0 ? model.agents[0] : null;
|
|
7585
|
-
if (!hasWorkers) {
|
|
7586
|
-
agentsCount.textContent = "—";
|
|
7587
|
-
const label = model.boardError ? model.boardError : "";
|
|
7588
|
-
setAttr(agentsCount, "title", label);
|
|
7589
|
-
setAttr(agentsCount, "aria-label", label);
|
|
7590
|
-
return;
|
|
7591
|
-
}
|
|
7592
|
-
agentsCount.textContent = String(workers);
|
|
7593
|
-
const message = waitingToReclaim
|
|
7594
|
-
? translate("agents.waitingReclaimTooltip").replace("{count}", String(claimed))
|
|
7595
|
-
: translate("agents.runningTooltip")
|
|
7596
|
-
.replace("{running}", String(workers))
|
|
7597
|
-
.replace("{identities}", String(identities));
|
|
7598
|
-
const label = model.boardError ? message + " · " + model.boardError : message;
|
|
7599
|
-
setAttr(agentsCount, "title", label);
|
|
7600
|
-
setAttr(agentsCount, "aria-label", label);
|
|
7601
|
-
}
|
|
7602
|
-
|
|
7603
7313
|
function selectedCount() {
|
|
7604
7314
|
return selectedTasks.size + selectedEvents.size;
|
|
7605
7315
|
}
|
|
@@ -8114,73 +7824,6 @@ function renderMarkdownInto(doc, host, source) {
|
|
|
8114
7824
|
state.count.textContent = String(total);
|
|
8115
7825
|
}
|
|
8116
7826
|
|
|
8117
|
-
let searchSeq = 0;
|
|
8118
|
-
|
|
8119
|
-
function taskSearchUrl(query) {
|
|
8120
|
-
const params = ["search=" + encodeURIComponent(query), "limit=200"];
|
|
8121
|
-
return tasksUrl + (tasksUrl.includes("?") ? "&" : "?") + params.join("&");
|
|
8122
|
-
}
|
|
8123
|
-
|
|
8124
|
-
function renderSearchResults(items, total) {
|
|
8125
|
-
clearNode(searchResults);
|
|
8126
|
-
searchResults.className = "hive-search-results";
|
|
8127
|
-
if (!Array.isArray(items) || items.length === 0) {
|
|
8128
|
-
searchResults.appendChild(element(doc, "div", "hive-search-empty", translate("board.searchEmpty")));
|
|
8129
|
-
return;
|
|
8130
|
-
}
|
|
8131
|
-
searchResults.appendChild(
|
|
8132
|
-
element(
|
|
8133
|
-
doc,
|
|
8134
|
-
"div",
|
|
8135
|
-
"hive-search-summary",
|
|
8136
|
-
translate("board.searchResults").replace("{count}", String(asCount(total, items.length))),
|
|
8137
|
-
),
|
|
8138
|
-
);
|
|
8139
|
-
for (const taskData of items) {
|
|
8140
|
-
const task = normalizeCard(taskData);
|
|
8141
|
-
const button = element(doc, "button", "hive-search-result");
|
|
8142
|
-
setAttr(button, "type", "button");
|
|
8143
|
-
button.appendChild(element(doc, "span", "hive-search-status is-" + safeClassToken(task.state), "●"));
|
|
8144
|
-
button.appendChild(element(doc, "span", "hive-search-title", task.title || task.id));
|
|
8145
|
-
button.appendChild(element(doc, "span", "hive-search-id", task.id));
|
|
8146
|
-
button.addEventListener("click", () => {
|
|
8147
|
-
void openCardDetail(task, task.state, null);
|
|
8148
|
-
});
|
|
8149
|
-
searchResults.appendChild(button);
|
|
8150
|
-
}
|
|
8151
|
-
}
|
|
8152
|
-
|
|
8153
|
-
async function runSearch(rawQuery) {
|
|
8154
|
-
const query = asString(rawQuery).trim();
|
|
8155
|
-
resetLaneScroll();
|
|
8156
|
-
searchSeq += 1;
|
|
8157
|
-
const seq = searchSeq;
|
|
8158
|
-
if (!query) {
|
|
8159
|
-
clearNode(searchResults);
|
|
8160
|
-
searchResults.className = "hive-search-results is-hidden";
|
|
8161
|
-
return;
|
|
8162
|
-
}
|
|
8163
|
-
if (!fetchImpl) return;
|
|
8164
|
-
try {
|
|
8165
|
-
const response = await fetchImpl(taskSearchUrl(query), {
|
|
8166
|
-
cache: "no-store",
|
|
8167
|
-
headers: { accept: "application/json" },
|
|
8168
|
-
});
|
|
8169
|
-
if (!response || response.ok === false) throw new Error("task search failed");
|
|
8170
|
-
const payload = await response.json();
|
|
8171
|
-
if (destroyed || seq !== searchSeq) return;
|
|
8172
|
-
const items = Array.isArray(payload && payload.items) ? payload.items : [];
|
|
8173
|
-
renderSearchResults(items, payload && payload.total);
|
|
8174
|
-
} catch (error) {
|
|
8175
|
-
if (!destroyed && seq === searchSeq) {
|
|
8176
|
-
clearNode(searchResults);
|
|
8177
|
-
searchResults.className = "hive-search-results";
|
|
8178
|
-
searchResults.appendChild(element(doc, "div", "hive-search-empty", translate("board.searchEmpty")));
|
|
8179
|
-
}
|
|
8180
|
-
reportError(error);
|
|
8181
|
-
}
|
|
8182
|
-
}
|
|
8183
|
-
|
|
8184
7827
|
function taskPageUrl(state, cursor) {
|
|
8185
7828
|
let url = tasksUrl;
|
|
8186
7829
|
const params = [];
|
|
@@ -9066,7 +8709,6 @@ function renderMarkdownInto(doc, host, source) {
|
|
|
9066
8709
|
renderStats(model);
|
|
9067
8710
|
renderActions(model);
|
|
9068
8711
|
renderFreezeBanner(model);
|
|
9069
|
-
renderAgents(model);
|
|
9070
8712
|
renderStageChips(model);
|
|
9071
8713
|
renderLanes(model);
|
|
9072
8714
|
}
|
|
@@ -9094,12 +8736,8 @@ function renderMarkdownInto(doc, host, source) {
|
|
|
9094
8736
|
}
|
|
9095
8737
|
const state = drawerState;
|
|
9096
8738
|
if (state) {
|
|
9097
|
-
if (state.kind === "card")
|
|
9098
|
-
|
|
9099
|
-
} else {
|
|
9100
|
-
closeDrawer();
|
|
9101
|
-
openAgentDrawer(state.agent);
|
|
9102
|
-
}
|
|
8739
|
+
if (state.kind === "card") openDrawer(state.card, state.lane);
|
|
8740
|
+
else closeDrawer();
|
|
9103
8741
|
}
|
|
9104
8742
|
if (helpWasOpen) openHelp();
|
|
9105
8743
|
}
|
|
@@ -9592,7 +9230,6 @@ function renderMarkdownInto(doc, host, source) {
|
|
|
9592
9230
|
for (const child of actionsNode.children) {
|
|
9593
9231
|
if ("disabled" in child) child.disabled = disabled;
|
|
9594
9232
|
}
|
|
9595
|
-
agentsCount.disabled = disabled;
|
|
9596
9233
|
}
|
|
9597
9234
|
|
|
9598
9235
|
function primeInitialUI() {
|
|
@@ -9613,7 +9250,6 @@ function renderMarkdownInto(doc, host, source) {
|
|
|
9613
9250
|
function showStatusPlaceholders() {
|
|
9614
9251
|
clearNode(statsNode);
|
|
9615
9252
|
statsNode.appendChild(element(doc, "span", "hive-stat is-total", "—"));
|
|
9616
|
-
agentsCount.textContent = "—";
|
|
9617
9253
|
queenBadge.className = "hive-queen-badge is-hidden";
|
|
9618
9254
|
}
|
|
9619
9255
|
|
package/src/cache.js
CHANGED
|
@@ -39,13 +39,8 @@ function compareTasks(left, right) {
|
|
|
39
39
|
return String(right?.id || "").localeCompare(String(left?.id || ""));
|
|
40
40
|
}
|
|
41
41
|
|
|
42
|
-
function lanePage(rows, stats, state, cursor, limit
|
|
43
|
-
const
|
|
44
|
-
let lane = rows.filter((task) => (task.state || "pending") === state);
|
|
45
|
-
if (query) {
|
|
46
|
-
lane = lane.filter((task) => String(task.id || "").toLowerCase().includes(query)
|
|
47
|
-
|| String(task.title || "").toLowerCase().includes(query));
|
|
48
|
-
}
|
|
42
|
+
function lanePage(rows, stats, state, cursor, limit) {
|
|
43
|
+
const lane = rows.filter((task) => (task.state || "pending") === state);
|
|
49
44
|
lane.sort(compareTasks);
|
|
50
45
|
const total = Number(stats?.byState?.[state]);
|
|
51
46
|
const offset = Math.max(0, Math.floor(Number(cursor) || 0));
|
|
@@ -242,16 +237,16 @@ export class SnapshotCache {
|
|
|
242
237
|
const items = fresh.slice(Math.max(0, fresh.length - size)).reverse();
|
|
243
238
|
return { items, total, cursor: total, hasMore: fresh.length > size, kind: wanted, dropped: start < firstIndex };
|
|
244
239
|
}
|
|
245
|
-
async tasksPage({ state = "", cursor = 0, limit = LANE_PAGE_LIMIT
|
|
240
|
+
async tasksPage({ state = "", cursor = 0, limit = LANE_PAGE_LIMIT } = {}) {
|
|
246
241
|
const data = await this.snapshot();
|
|
247
242
|
const all = Array.isArray(data.allTasks) ? data.allTasks : data.tasks;
|
|
248
243
|
if (!state) {
|
|
249
244
|
const offset = Math.max(0, Number(cursor) || 0);
|
|
250
245
|
const size = Math.max(1, Math.min(LANE_PAGE_LIMIT, Number(limit) || LANE_PAGE_LIMIT));
|
|
251
246
|
const items = [...all].sort(compareTasks).slice(offset, offset + size);
|
|
252
|
-
return { items, total: all.length, cursor: offset + items.length, hasMore: offset + items.length < all.length, state: ""
|
|
247
|
+
return { items, total: all.length, cursor: offset + items.length, hasMore: offset + items.length < all.length, state: "" };
|
|
253
248
|
}
|
|
254
|
-
return lanePage(all, data.stats, String(state), cursor, limit
|
|
249
|
+
return lanePage(all, data.stats, String(state), cursor, limit);
|
|
255
250
|
}
|
|
256
251
|
|
|
257
252
|
async eventsPage({ cursor = 0, limit = 80, kind = "" } = {}) {
|
package/src/data.js
CHANGED
|
@@ -144,23 +144,16 @@ export function paginateTasks(tasks, stats, limit = TASK_PAGE_LIMIT) {
|
|
|
144
144
|
return lanePages;
|
|
145
145
|
}
|
|
146
146
|
|
|
147
|
-
export function snapshotTasksPage(repo, { state = "", cursor = 0, limit = TASK_PAGE_LIMIT
|
|
147
|
+
export function snapshotTasksPage(repo, { state = "", cursor = 0, limit = TASK_PAGE_LIMIT } = {}, env = process.env) {
|
|
148
148
|
let rows = readTasks(repo, env);
|
|
149
|
-
const query = String(search || "").trim().toLowerCase();
|
|
150
149
|
if (state) rows = rows.filter((task) => (task.state || "pending") === state);
|
|
151
|
-
if (query) {
|
|
152
|
-
rows = rows.filter((task) =>
|
|
153
|
-
String(task.id || "").toLowerCase().includes(query) ||
|
|
154
|
-
String(task.title || "").toLowerCase().includes(query),
|
|
155
|
-
);
|
|
156
|
-
}
|
|
157
150
|
rows.sort(compareTasksNewestFirst);
|
|
158
151
|
const total = rows.length;
|
|
159
152
|
const offset = Math.max(0, Math.floor(Number(cursor) || 0));
|
|
160
153
|
const size = Math.max(1, Math.min(200, Math.floor(Number(limit) || TASK_PAGE_LIMIT)));
|
|
161
154
|
const items = rows.slice(offset, offset + size);
|
|
162
155
|
const next = offset + items.length;
|
|
163
|
-
return { items, total, cursor: next, hasMore: next < total, state: String(state || "")
|
|
156
|
+
return { items, total, cursor: next, hasMore: next < total, state: String(state || "") };
|
|
164
157
|
}
|
|
165
158
|
|
|
166
159
|
export function findTaskById(repo, id, env = process.env) {
|
package/src/server.js
CHANGED
|
@@ -102,7 +102,6 @@ export function createServer({ repo, publicDir, env = process.env, writable = fa
|
|
|
102
102
|
state: url.searchParams.get("state") || "",
|
|
103
103
|
cursor: url.searchParams.get("cursor") || "0",
|
|
104
104
|
limit: url.searchParams.get("limit") || "200",
|
|
105
|
-
search: url.searchParams.get("search") || url.searchParams.get("q") || "",
|
|
106
105
|
});
|
|
107
106
|
response.writeHead(200, { "content-type": "application/json; charset=utf-8", "cache-control": "no-store" });
|
|
108
107
|
return response.end(JSON.stringify(page));
|