dsh-hive-panel 0.2.0 → 0.3.0
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/CHANGELOG.md +97 -17
- package/README.md +76 -49
- package/README.zh-CN.md +46 -33
- package/SPEC.md +82 -39
- package/docs/DESIGN.md +8 -4
- package/docs/QUEEN-ACTIVATION.md +2 -2
- package/lib/client.js +370 -151
- package/lib/index.js +101 -4
- package/lib/queen.js +4 -4
- package/package.json +1 -1
- package/scripts/verify-queen-activation.mjs +5 -4
- package/scripts/verify.mjs +96 -10
- package/src/panel.css +45 -0
- package/src/panel.js +369 -150
package/lib/client.js
CHANGED
|
@@ -71,7 +71,7 @@ window.__ModuleLoader__.load({
|
|
|
71
71
|
|
|
72
72
|
/* ---- inlined from src/panel.js ---- */
|
|
73
73
|
var HIVE_PANEL = (function () {
|
|
74
|
-
// Hive panel — zero-dependency ESM renderer for hive-panel 0.
|
|
74
|
+
// Hive panel — zero-dependency ESM renderer for hive-panel 0.5.0 snapshots.
|
|
75
75
|
// User-provided values are always written with textContent; no raw HTML is assigned.
|
|
76
76
|
//
|
|
77
77
|
// Visible copy is translated through the built-in \`messages\` dictionaries
|
|
@@ -108,7 +108,8 @@ const ACTION_META = Object.freeze({
|
|
|
108
108
|
remove: { labelKey: "action.remove", helpKey: "help.action.remove" },
|
|
109
109
|
});
|
|
110
110
|
|
|
111
|
-
const MIN_PLAN_CARDS =
|
|
111
|
+
const MIN_PLAN_CARDS = 0;
|
|
112
|
+
const DEFAULT_PLAN_CARDS = 50;
|
|
112
113
|
|
|
113
114
|
const PANEL_STYLES = `.hive { position: relative; }
|
|
114
115
|
|
|
@@ -477,6 +478,14 @@ const PANEL_STYLES = `.hive { position: relative; }
|
|
|
477
478
|
font-size: 12px;
|
|
478
479
|
}
|
|
479
480
|
|
|
481
|
+
.hive-agents-error {
|
|
482
|
+
min-width: 0;
|
|
483
|
+
overflow-wrap: anywhere;
|
|
484
|
+
color: var(--hive-danger);
|
|
485
|
+
font-family: var(--hive-mono);
|
|
486
|
+
font-size: 12px;
|
|
487
|
+
}
|
|
488
|
+
|
|
480
489
|
.hive-stage-chips {
|
|
481
490
|
display: flex;
|
|
482
491
|
flex: 0 0 auto;
|
|
@@ -1571,7 +1580,8 @@ const PANEL_STYLES = `.hive { position: relative; }
|
|
|
1571
1580
|
}
|
|
1572
1581
|
|
|
1573
1582
|
.hive-card-run-output {
|
|
1574
|
-
max-height: 360px;
|
|
1583
|
+
max-height: 360px;
|
|
1584
|
+
max-height: 20lh; /* longer output scrolls inside the pre */
|
|
1575
1585
|
margin: 0;
|
|
1576
1586
|
padding: 10px;
|
|
1577
1587
|
overflow: auto;
|
|
@@ -2038,6 +2048,48 @@ dialog.hive-dialog .hive-dialog-title,
|
|
|
2038
2048
|
dialog.hive-dialog .hive-card-subline,
|
|
2039
2049
|
dialog.hive-dialog .hive-settings-role-name { min-width: 0; overflow-wrap: anywhere; }
|
|
2040
2050
|
dialog.hive-dialog .hive-dialog-foot { flex-wrap: wrap; }
|
|
2051
|
+
dialog.hive-dialog {
|
|
2052
|
+
display: flex;
|
|
2053
|
+
flex-direction: column;
|
|
2054
|
+
max-height: 80vh;
|
|
2055
|
+
}
|
|
2056
|
+
dialog.hive-dialog .hive-dialog-head,
|
|
2057
|
+
dialog.hive-dialog .hive-dialog-foot { flex: 0 0 auto; }
|
|
2058
|
+
dialog.hive-dialog .hive-dialog-body { flex: 1 1 auto; min-height: 0; overflow: auto; }
|
|
2059
|
+
.hive-card-run-output { max-height: 20lh; overflow: auto; }
|
|
2060
|
+
.hive-card-actions { flex-wrap: wrap; justify-content: flex-end; }
|
|
2061
|
+
/* Virtual lanes: fixed 26px cards, 2px gaps, 28px stride. */
|
|
2062
|
+
.hive-lane-cards {
|
|
2063
|
+
display: block;
|
|
2064
|
+
flex: 1 1 auto;
|
|
2065
|
+
min-height: 0;
|
|
2066
|
+
padding: 7px;
|
|
2067
|
+
overflow-x: hidden;
|
|
2068
|
+
overflow-y: auto;
|
|
2069
|
+
}
|
|
2070
|
+
.hive-lane-virtual { position: relative; width: 100%; min-width: 0; }
|
|
2071
|
+
.hive-lane-virtual .hive-card {
|
|
2072
|
+
position: absolute;
|
|
2073
|
+
left: 0;
|
|
2074
|
+
right: 0;
|
|
2075
|
+
display: flex;
|
|
2076
|
+
align-items: center;
|
|
2077
|
+
height: 26px;
|
|
2078
|
+
min-height: 26px;
|
|
2079
|
+
padding: 2px 8px;
|
|
2080
|
+
overflow: hidden;
|
|
2081
|
+
border-radius: var(--hive-radius-sm);
|
|
2082
|
+
}
|
|
2083
|
+
.hive-lane-virtual .hive-card-title {
|
|
2084
|
+
width: 100%;
|
|
2085
|
+
overflow: hidden;
|
|
2086
|
+
font-size: 12px;
|
|
2087
|
+
line-height: 16px;
|
|
2088
|
+
text-overflow: ellipsis;
|
|
2089
|
+
white-space: nowrap;
|
|
2090
|
+
}
|
|
2091
|
+
.hive-agent-count { font: inherit; cursor: pointer; }
|
|
2092
|
+
.hive-agent-count:disabled { cursor: default; }
|
|
2041
2093
|
`;
|
|
2042
2094
|
|
|
2043
2095
|
const LANE_LABEL_KEYS = Object.freeze({
|
|
@@ -2095,7 +2147,6 @@ const messages = Object.freeze({
|
|
|
2095
2147
|
"stats.byRoleTitle": "by role: ",
|
|
2096
2148
|
"status.actionFailed": "action failed",
|
|
2097
2149
|
"status.disconnected": "disconnected",
|
|
2098
|
-
"agents.empty": "No agents yet.",
|
|
2099
2150
|
"agents.openAria": "Open agent",
|
|
2100
2151
|
"agent.idle": "idle",
|
|
2101
2152
|
"agent.task": "task",
|
|
@@ -2115,6 +2166,9 @@ const messages = Object.freeze({
|
|
|
2115
2166
|
"drawer.removeClaimed": "A claimed task must be released or reopened before it can be deleted.",
|
|
2116
2167
|
"drawer.rawJson": "raw json",
|
|
2117
2168
|
"drawer.lastRun": "Last run",
|
|
2169
|
+
"drawer.runOverlaps": "Also writing",
|
|
2170
|
+
"drawer.runLessons": "Read {count} lessons",
|
|
2171
|
+
"drawer.runNoLessons": "No lessons to read",
|
|
2118
2172
|
"drawer.noRuns": "No runs yet",
|
|
2119
2173
|
"drawer.copyOutput": "Copy output",
|
|
2120
2174
|
"drawer.openChat": "Open agent chat",
|
|
@@ -2250,17 +2304,17 @@ const messages = Object.freeze({
|
|
|
2250
2304
|
"help.action.unfreeze": "Resume: agents can claim pending tasks again.",
|
|
2251
2305
|
"help.action.add": "New task: create a pending task with a role and file scope.",
|
|
2252
2306
|
"help.action.plan": "Set the Queen a goal: split a goal into tasks, preview the plan, then write it to the board.",
|
|
2253
|
-
"help.action.claim": "Claim:
|
|
2307
|
+
"help.action.claim": "Claim: take a pending task for an agent; the claim lasts 5 minutes.",
|
|
2254
2308
|
"help.action.done": "Done: mark a claimed task complete, optionally with a commit sha.",
|
|
2255
2309
|
"help.action.fail": "Fail: mark a claimed task failed and record the reason.",
|
|
2256
2310
|
"help.action.retry": "Retry: put a failed task back in the queue.",
|
|
2257
|
-
"help.action.remove": "Delete this task
|
|
2311
|
+
"help.action.remove": "Delete this task permanently. A claimed task has to be released or reopened first.",
|
|
2258
2312
|
"plan.dialogTitle": "Set the Queen a goal",
|
|
2259
2313
|
"plan.dialogAria": "Plan tasks from a goal",
|
|
2260
2314
|
"plan.goal": "Goal",
|
|
2261
2315
|
"plan.goalHint": "Describe the outcome; the Queen will split it into tasks.",
|
|
2262
2316
|
"plan.maxCards": "Max tasks",
|
|
2263
|
-
"plan.maxCardsHint": "
|
|
2317
|
+
"plan.maxCardsHint": "0 = no limit",
|
|
2264
2318
|
"plan.preview": "Preview plan",
|
|
2265
2319
|
"plan.previewAria": "Ask the Queen to draft a task plan without writing it",
|
|
2266
2320
|
"plan.previewing": "Planning…",
|
|
@@ -2280,7 +2334,7 @@ const messages = Object.freeze({
|
|
|
2280
2334
|
"plan.deps": "deps",
|
|
2281
2335
|
"plan.none": "—",
|
|
2282
2336
|
"plan.goalRequired": "Enter a goal first.",
|
|
2283
|
-
"plan.maxInvalid": "Max tasks must be a
|
|
2337
|
+
"plan.maxInvalid": "Max tasks must be a whole number of 0 or more (0 = no limit).",
|
|
2284
2338
|
"plan.previewFirst": "Preview the plan before writing tasks.",
|
|
2285
2339
|
"plan.previewFailed": "Could not read the plan.",
|
|
2286
2340
|
"plan.applyHint": "The preview is read-only; writing calls plan again with apply=true.",
|
|
@@ -2334,7 +2388,6 @@ const messages = Object.freeze({
|
|
|
2334
2388
|
"stats.byRoleTitle": "按角色:",
|
|
2335
2389
|
"status.actionFailed": "操作失败",
|
|
2336
2390
|
"status.disconnected": "连接断开",
|
|
2337
|
-
"agents.empty": "后台暂无智能体。",
|
|
2338
2391
|
"agents.openAria": "打开智能体",
|
|
2339
2392
|
"agent.idle": "空闲",
|
|
2340
2393
|
"agent.task": "任务",
|
|
@@ -2354,6 +2407,9 @@ const messages = Object.freeze({
|
|
|
2354
2407
|
"drawer.removeClaimed": "已认领的任务必须先释放或重开才能删除。",
|
|
2355
2408
|
"drawer.rawJson": "原始 JSON",
|
|
2356
2409
|
"drawer.lastRun": "最近一次执行",
|
|
2410
|
+
"drawer.runOverlaps": "同时写入",
|
|
2411
|
+
"drawer.runLessons": "读取了 {count} 条经验",
|
|
2412
|
+
"drawer.runNoLessons": "没有可读取的经验",
|
|
2357
2413
|
"drawer.noRuns": "还没有执行记录",
|
|
2358
2414
|
"drawer.copyOutput": "复制输出",
|
|
2359
2415
|
"drawer.openChat": "打开智能体对话",
|
|
@@ -2489,17 +2545,17 @@ const messages = Object.freeze({
|
|
|
2489
2545
|
"help.action.unfreeze": "恢复:恢复认领,智能体可以继续接取待办任务。",
|
|
2490
2546
|
"help.action.add": "新建任务:添加一条带角色和文件范围的待办任务。",
|
|
2491
2547
|
"help.action.plan": "给女王设目标:让女王把目标拆成任务计划,预览后再写入看板。",
|
|
2492
|
-
"help.action.claim": "
|
|
2548
|
+
"help.action.claim": "认领:以某个智能体的名义接取一条待办任务,认领有效期 5 分钟。",
|
|
2493
2549
|
"help.action.done": "完成:把已认领的任务标为完成,可选填写提交 SHA。",
|
|
2494
2550
|
"help.action.fail": "标记失败:把已认领的任务标为失败,并写明原因。",
|
|
2495
2551
|
"help.action.retry": "重试:把失败或受阻的任务放回队列。",
|
|
2496
|
-
"help.action.remove": "
|
|
2552
|
+
"help.action.remove": "永久删除这张任务;已认领的任务需要先释放或重开。",
|
|
2497
2553
|
"plan.dialogTitle": "给女王设目标",
|
|
2498
2554
|
"plan.dialogAria": "按目标规划任务",
|
|
2499
2555
|
"plan.goal": "目标",
|
|
2500
2556
|
"plan.goalHint": "描述想达成的结果,女王会把它拆成任务。",
|
|
2501
2557
|
"plan.maxCards": "最大任务数",
|
|
2502
|
-
"plan.maxCardsHint": "
|
|
2558
|
+
"plan.maxCardsHint": "0 = 不限",
|
|
2503
2559
|
"plan.preview": "预览计划",
|
|
2504
2560
|
"plan.previewAria": "让女王先给出任务计划,不写入看板",
|
|
2505
2561
|
"plan.previewing": "规划中…",
|
|
@@ -2519,7 +2575,7 @@ const messages = Object.freeze({
|
|
|
2519
2575
|
"plan.deps": "依赖",
|
|
2520
2576
|
"plan.none": "—",
|
|
2521
2577
|
"plan.goalRequired": "请先填写目标。",
|
|
2522
|
-
"plan.maxInvalid": "
|
|
2578
|
+
"plan.maxInvalid": "最大任务数必须是 0 或更大的整数。",
|
|
2523
2579
|
"plan.previewFirst": "请先预览计划,再写入任务。",
|
|
2524
2580
|
"plan.previewFailed": "无法解析计划。",
|
|
2525
2581
|
"plan.applyHint": "预览不会写入;写入时会带 apply=true 再调用一次 plan。",
|
|
@@ -2529,7 +2585,7 @@ const messages = Object.freeze({
|
|
|
2529
2585
|
"toast.dismiss": "关闭",
|
|
2530
2586
|
"toast.planWritten": "任务已写入",
|
|
2531
2587
|
"toast.taskRemoved": "任务已删除",
|
|
2532
|
-
"toast.pickupHint": "supervisor
|
|
2588
|
+
"toast.pickupHint": "supervisor 会自动接任务。",
|
|
2533
2589
|
}),
|
|
2534
2590
|
});
|
|
2535
2591
|
|
|
@@ -2566,12 +2622,56 @@ function normalizeScope(scope) {
|
|
|
2566
2622
|
return [];
|
|
2567
2623
|
}
|
|
2568
2624
|
|
|
2625
|
+
/**
|
|
2626
|
+
* Normalize the optional `overlaps` announcements of a run record: other agents
|
|
2627
|
+
* have declared they are writing the same paths too. An entry without a
|
|
2628
|
+
* non-empty agent is dropped; a missing or malformed list is empty, so the
|
|
2629
|
+
* drawer renders no overlap row.
|
|
2630
|
+
* @param {unknown} value
|
|
2631
|
+
* @returns {Array<{key:string,agent:string,task:string,expiresAt:string}>}
|
|
2632
|
+
*/
|
|
2633
|
+
function normalizeOverlaps(value) {
|
|
2634
|
+
const overlaps = [];
|
|
2635
|
+
for (const entry of asArray(value)) {
|
|
2636
|
+
if (!isRecord(entry)) continue;
|
|
2637
|
+
const agent = asString(entry.agent);
|
|
2638
|
+
if (agent.trim() === "") continue;
|
|
2639
|
+
overlaps.push({
|
|
2640
|
+
key: asString(entry.key),
|
|
2641
|
+
agent,
|
|
2642
|
+
task: asString(entry.task),
|
|
2643
|
+
expiresAt: asString(entry.expiresAt),
|
|
2644
|
+
});
|
|
2645
|
+
}
|
|
2646
|
+
return overlaps;
|
|
2647
|
+
}
|
|
2648
|
+
|
|
2649
|
+
/**
|
|
2650
|
+
* Normalize the optional `lessons` recall summary of a run record. A missing
|
|
2651
|
+
* or malformed record is null; a count-only, scopes-only or error-only record
|
|
2652
|
+
* survives so the drawer can still render its "no lessons" line.
|
|
2653
|
+
* @param {unknown} value
|
|
2654
|
+
* @returns {null|{count:number,scopes:string[],error?:string}}
|
|
2655
|
+
*/
|
|
2656
|
+
function normalizeLessons(value) {
|
|
2657
|
+
if (!isRecord(value)) return null;
|
|
2658
|
+
const lessons = {
|
|
2659
|
+
count: asCount(value.count, 0),
|
|
2660
|
+
scopes: asArray(value.scopes)
|
|
2661
|
+
.map((scope) => asString(scope))
|
|
2662
|
+
.filter((scope) => scope.trim() !== ""),
|
|
2663
|
+
};
|
|
2664
|
+
const error = asString(value.error);
|
|
2665
|
+
if (error !== "") lessons.error = error;
|
|
2666
|
+
return lessons;
|
|
2667
|
+
}
|
|
2668
|
+
|
|
2569
2669
|
/**
|
|
2570
2670
|
* Normalize `lastRun` (written by hive-runner to .hive/runs/<cardId>.json).
|
|
2571
2671
|
* A missing record is null; a malformed one is dropped instead of leaking
|
|
2572
2672
|
* half-parsed values into the drawer.
|
|
2573
2673
|
* @param {unknown} value
|
|
2574
|
-
* @returns {null|{agent:string,startedAt:string,endedAt:string,status:string,commit:string,exitCode:number|null,sessionId:string,output:string}}
|
|
2674
|
+
* @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}}}
|
|
2575
2675
|
*/
|
|
2576
2676
|
function normalizeLastRun(value) {
|
|
2577
2677
|
if (!isRecord(value)) return null;
|
|
@@ -2588,6 +2688,10 @@ function normalizeLastRun(value) {
|
|
|
2588
2688
|
// navigate can open that conversation, an older record simply has none.
|
|
2589
2689
|
sessionId: asString(value.sessionId),
|
|
2590
2690
|
output: asString(value.output),
|
|
2691
|
+
// Consensus announcements from the other writers of these paths.
|
|
2692
|
+
overlaps: normalizeOverlaps(value.overlaps),
|
|
2693
|
+
// Memory recall summary: how many lessons the worker read before its run.
|
|
2694
|
+
lessons: normalizeLessons(value.lessons),
|
|
2591
2695
|
};
|
|
2592
2696
|
}
|
|
2593
2697
|
|
|
@@ -2599,6 +2703,9 @@ function normalizeCard(task) {
|
|
|
2599
2703
|
owner: asString(task.owner),
|
|
2600
2704
|
scope: normalizeScope(task.scope),
|
|
2601
2705
|
reason: asString(task.reason),
|
|
2706
|
+
stateChangedAt: asString(task.stateChangedAt),
|
|
2707
|
+
createdAt: asString(task.createdAt),
|
|
2708
|
+
updatedAt: asString(task.updatedAt),
|
|
2602
2709
|
lastRun: normalizeLastRun(task.lastRun),
|
|
2603
2710
|
};
|
|
2604
2711
|
}
|
|
@@ -2744,6 +2851,7 @@ function toolbarActions(writable, mode) {
|
|
|
2744
2851
|
* laneOrder: string[],
|
|
2745
2852
|
* stats: {total:number, byState:Record<string,number>, byRole:Record<string,number>, oldestPending:{id:string,createdAt:string}|null},
|
|
2746
2853
|
* agents: Array<{agent:string,state:string,task:string,files:string[],updatedAt:string}>,
|
|
2854
|
+
* boardError: string|null,
|
|
2747
2855
|
* events: Array<{ts:string,kind:string,task:string,actor:string}>,
|
|
2748
2856
|
* actions: Array<{name:string,labelKey:string,body?:object}>
|
|
2749
2857
|
* }}
|
|
@@ -2822,6 +2930,9 @@ function renderModel(snapshot) {
|
|
|
2822
2930
|
laneOrder: [...LANE_ORDER],
|
|
2823
2931
|
stats: normalizeStats(source.stats, tasks),
|
|
2824
2932
|
agents: normalizeAgents(source.board),
|
|
2933
|
+
// A board read that failed is not the same as an idle swarm: keep the
|
|
2934
|
+
// diagnostic so the agents strip can show it instead of "no agents".
|
|
2935
|
+
boardError: asString(source.boardError) || null,
|
|
2825
2936
|
events: normalizeEvents(source.events),
|
|
2826
2937
|
actions: initialised ? toolbarActions(writable, mode) : [],
|
|
2827
2938
|
};
|
|
@@ -3466,6 +3577,7 @@ function mount(root, options = {}) {
|
|
|
3466
3577
|
let toastNode = null;
|
|
3467
3578
|
let stageFilter = "all";
|
|
3468
3579
|
let stageChipEntries = [];
|
|
3580
|
+
const laneRenderState = new Map();
|
|
3469
3581
|
let eventsExpanded = false;
|
|
3470
3582
|
let initBusy = false;
|
|
3471
3583
|
let initOutput = null;
|
|
@@ -3521,6 +3633,13 @@ function mount(root, options = {}) {
|
|
|
3521
3633
|
const statsNode = element(doc, "div", "hive-stats");
|
|
3522
3634
|
bar.appendChild(statsNode);
|
|
3523
3635
|
|
|
3636
|
+
const agentsCount = element(doc, "button", "hive-stat hive-agent-count");
|
|
3637
|
+
setAttr(agentsCount, "type", "button");
|
|
3638
|
+
agentsCount.addEventListener("click", () => {
|
|
3639
|
+
if (agentsCount._agent) openAgentDrawer(agentsCount._agent);
|
|
3640
|
+
});
|
|
3641
|
+
bar.appendChild(agentsCount);
|
|
3642
|
+
|
|
3524
3643
|
const queenBadge = element(doc, "span", "hive-queen-badge is-hidden", "");
|
|
3525
3644
|
bar.appendChild(queenBadge);
|
|
3526
3645
|
|
|
@@ -3628,23 +3747,8 @@ function mount(root, options = {}) {
|
|
|
3628
3747
|
initPane.appendChild(initCard);
|
|
3629
3748
|
main.appendChild(initPane);
|
|
3630
3749
|
|
|
3631
|
-
// Agents strip.
|
|
3632
|
-
const agentsStrip = element(doc, "section", "hive-agents-strip");
|
|
3633
|
-
setAttr(agentsStrip, "aria-label", translate("pane.agents"));
|
|
3634
|
-
const agentsLabel = element(doc, "span", "hive-strip-label", "");
|
|
3635
|
-
agentsStrip.appendChild(agentsLabel);
|
|
3636
|
-
const agentsCount = element(doc, "span", "hive-count", "0");
|
|
3637
|
-
agentsStrip.appendChild(agentsCount);
|
|
3638
|
-
const agentPills = element(doc, "div", "hive-agent-pills");
|
|
3639
|
-
agentsStrip.appendChild(agentPills);
|
|
3640
|
-
|
|
3641
3750
|
// Board pane.
|
|
3642
3751
|
const boardPane = element(doc, "section", "hive-pane hive-board");
|
|
3643
|
-
const boardHead = element(doc, "div", "hive-pane-head");
|
|
3644
|
-
const boardLabel = element(doc, "span", null, "");
|
|
3645
|
-
boardHead.appendChild(boardLabel);
|
|
3646
|
-
const boardCount = element(doc, "span", "hive-count", "0");
|
|
3647
|
-
boardHead.appendChild(boardCount);
|
|
3648
3752
|
const stage = element(doc, "div", "hive-stage");
|
|
3649
3753
|
const stageChips = element(doc, "div", "hive-stage-chips");
|
|
3650
3754
|
setAttr(stageChips, "aria-label", translate("board.filtersAria"));
|
|
@@ -3653,7 +3757,6 @@ function mount(root, options = {}) {
|
|
|
3653
3757
|
stage.appendChild(stageChips);
|
|
3654
3758
|
stage.appendChild(filterEmpty);
|
|
3655
3759
|
stage.appendChild(lanesNode);
|
|
3656
|
-
boardPane.appendChild(boardHead);
|
|
3657
3760
|
boardPane.appendChild(stage);
|
|
3658
3761
|
main.appendChild(boardPane);
|
|
3659
3762
|
|
|
@@ -3680,7 +3783,6 @@ function mount(root, options = {}) {
|
|
|
3680
3783
|
frame.appendChild(bar);
|
|
3681
3784
|
frame.appendChild(freezeSlot);
|
|
3682
3785
|
frame.appendChild(queenHint);
|
|
3683
|
-
frame.appendChild(agentsStrip);
|
|
3684
3786
|
frame.appendChild(main);
|
|
3685
3787
|
frame.appendChild(eventsDrawer);
|
|
3686
3788
|
|
|
@@ -3771,10 +3873,7 @@ function mount(root, options = {}) {
|
|
|
3771
3873
|
setAttr(actionsNode, "aria-label", translate("actions.aria"));
|
|
3772
3874
|
setAttr(helpButton, "title", translate("menu.open"));
|
|
3773
3875
|
setAttr(helpButton, "aria-label", translate("menu.open"));
|
|
3774
|
-
setAttr(agentsStrip, "aria-label", translate("pane.agents"));
|
|
3775
3876
|
setAttr(stageChips, "aria-label", translate("board.filtersAria"));
|
|
3776
|
-
agentsLabel.textContent = translate("pane.agents");
|
|
3777
|
-
boardLabel.textContent = translate("pane.board");
|
|
3778
3877
|
eventsLabel.textContent = translate("pane.events");
|
|
3779
3878
|
const eventsToggleLabel = eventsExpanded ? translate("events.collapse") : translate("events.showAll");
|
|
3780
3879
|
setAttr(eventsToggle, "title", eventsToggleLabel);
|
|
@@ -4159,7 +4258,7 @@ function mount(root, options = {}) {
|
|
|
4159
4258
|
setAttr(maxInput, "min", String(MIN_PLAN_CARDS));
|
|
4160
4259
|
setAttr(maxInput, "step", "1");
|
|
4161
4260
|
setAttr(maxInput, "aria-label", translate("plan.maxCards"));
|
|
4162
|
-
maxInput.value =
|
|
4261
|
+
maxInput.value = String(DEFAULT_PLAN_CARDS);
|
|
4163
4262
|
maxField.appendChild(maxInput);
|
|
4164
4263
|
maxField.appendChild(element(doc, "span", "hive-field-hint", translate("plan.maxCardsHint")));
|
|
4165
4264
|
row.appendChild(maxField);
|
|
@@ -4217,7 +4316,7 @@ function mount(root, options = {}) {
|
|
|
4217
4316
|
cards: [],
|
|
4218
4317
|
previewed: false,
|
|
4219
4318
|
goal: "",
|
|
4220
|
-
maxCards:
|
|
4319
|
+
maxCards: DEFAULT_PLAN_CARDS,
|
|
4221
4320
|
token: 0,
|
|
4222
4321
|
busy: false,
|
|
4223
4322
|
nodes: {
|
|
@@ -4803,17 +4902,24 @@ function mount(root, options = {}) {
|
|
|
4803
4902
|
}
|
|
4804
4903
|
}
|
|
4805
4904
|
|
|
4905
|
+
/** Read the Max tasks field: a whole number >= 0 (0 = unlimited), or null when invalid. */
|
|
4906
|
+
function readPlanMaxCards(state) {
|
|
4907
|
+
const raw = fieldValue(state.nodes.maxCards).trim();
|
|
4908
|
+
const maxCards = Number(raw);
|
|
4909
|
+
return raw !== "" && Number.isSafeInteger(maxCards) && maxCards >= MIN_PLAN_CARDS ? maxCards : null;
|
|
4910
|
+
}
|
|
4911
|
+
|
|
4806
4912
|
async function previewPlan() {
|
|
4807
4913
|
const state = planState;
|
|
4808
4914
|
if (!state || state.busy) return;
|
|
4809
4915
|
const goal = fieldValue(state.nodes.goal).trim();
|
|
4810
|
-
const maxCards =
|
|
4916
|
+
const maxCards = readPlanMaxCards(state);
|
|
4811
4917
|
if (!goal) {
|
|
4812
4918
|
setPlanError(state, translate("plan.goalRequired"));
|
|
4813
4919
|
focusNode(state.nodes.goal);
|
|
4814
4920
|
return;
|
|
4815
4921
|
}
|
|
4816
|
-
if (
|
|
4922
|
+
if (maxCards === null) {
|
|
4817
4923
|
setPlanError(state, translate("plan.maxInvalid"));
|
|
4818
4924
|
focusNode(state.nodes.maxCards);
|
|
4819
4925
|
return;
|
|
@@ -4856,12 +4962,12 @@ function mount(root, options = {}) {
|
|
|
4856
4962
|
const state = planState;
|
|
4857
4963
|
if (!state || state.busy) return;
|
|
4858
4964
|
const goal = fieldValue(state.nodes.goal).trim();
|
|
4859
|
-
const maxCards =
|
|
4965
|
+
const maxCards = readPlanMaxCards(state);
|
|
4860
4966
|
if (!state.previewed || state.cards.length === 0) {
|
|
4861
4967
|
setPlanError(state, translate("plan.previewFirst"));
|
|
4862
4968
|
return;
|
|
4863
4969
|
}
|
|
4864
|
-
if (
|
|
4970
|
+
if (maxCards === null) {
|
|
4865
4971
|
setPlanError(state, translate("plan.maxInvalid"));
|
|
4866
4972
|
return;
|
|
4867
4973
|
}
|
|
@@ -5139,13 +5245,20 @@ function mount(root, options = {}) {
|
|
|
5139
5245
|
* The card drawer's "Last run" block. With no record it is one muted line;
|
|
5140
5246
|
* with a record it shows status, agent, timestamps and the short commit above
|
|
5141
5247
|
* the worker output (monospace, internally scrollable) and a copy button.
|
|
5142
|
-
* A record
|
|
5143
|
-
*
|
|
5248
|
+
* A record with overlapping writers adds one "Also writing" row, a record with
|
|
5249
|
+
* a lessons summary adds one recall row, and a record whose worker Session is
|
|
5250
|
+
* known, on a host that provides `openSession`, also gets the "Open agent
|
|
5251
|
+
* chat" button.
|
|
5144
5252
|
* @param {object|null} run - normalized `lastRun` (see normalizeLastRun)
|
|
5145
5253
|
* @returns {HTMLElement}
|
|
5146
5254
|
*/
|
|
5147
|
-
function buildRunSection(run) {
|
|
5255
|
+
function buildRunSection(run, actionHost) {
|
|
5148
5256
|
const section = element(doc, "div", "hive-card-run");
|
|
5257
|
+
const addAction = (node) => {
|
|
5258
|
+
if (Array.isArray(actionHost)) actionHost.push(node);
|
|
5259
|
+
else if (actionHost && typeof actionHost.appendChild === "function") actionHost.appendChild(node);
|
|
5260
|
+
else section.appendChild(node);
|
|
5261
|
+
};
|
|
5149
5262
|
section.appendChild(element(doc, "div", "hive-card-run-title", translate("drawer.lastRun")));
|
|
5150
5263
|
if (!run) {
|
|
5151
5264
|
section.appendChild(element(doc, "div", "hive-note hive-card-run-empty", translate("drawer.noRuns")));
|
|
@@ -5160,6 +5273,30 @@ function mount(root, options = {}) {
|
|
|
5160
5273
|
const meta = element(doc, "div", "hive-card-run-meta", metaPartsText);
|
|
5161
5274
|
setAttr(meta, "title", metaPartsText);
|
|
5162
5275
|
section.appendChild(meta);
|
|
5276
|
+
// Consensus announcements: the other agents that announced the same paths. Invalid
|
|
5277
|
+
// entries are dropped by normalizeLastRun, duplicates collapse to one name,
|
|
5278
|
+
// and no overlapping writer means no row at all.
|
|
5279
|
+
const writers = [];
|
|
5280
|
+
for (const overlap of run.overlaps) {
|
|
5281
|
+
const agent = asString(overlap.agent);
|
|
5282
|
+
if (agent !== "" && !writers.includes(agent)) writers.push(agent);
|
|
5283
|
+
}
|
|
5284
|
+
if (writers.length > 0) {
|
|
5285
|
+
const overlapsLabel = translate("drawer.runOverlaps");
|
|
5286
|
+
// The zh dictionary copy uses the full-width colon elsewhere in the panel.
|
|
5287
|
+
const separator = /[\u4e00-\u9fff]/.test(overlapsLabel) ? ":" : ": ";
|
|
5288
|
+
section.appendChild(
|
|
5289
|
+
element(doc, "div", "hive-card-run-meta", overlapsLabel + separator + writers.join(", ")),
|
|
5290
|
+
);
|
|
5291
|
+
}
|
|
5292
|
+
// Memory recall: the worker always reports whether it read lessons, so the
|
|
5293
|
+
// block keeps one line even when the record predates that field.
|
|
5294
|
+
const lessonCount = run.lessons ? asCount(run.lessons.count, 0) : 0;
|
|
5295
|
+
const lessonsText =
|
|
5296
|
+
lessonCount > 0
|
|
5297
|
+
? translate("drawer.runLessons").replace("{count}", String(lessonCount))
|
|
5298
|
+
: translate("drawer.runNoLessons");
|
|
5299
|
+
section.appendChild(element(doc, "div", "hive-card-run-meta", lessonsText));
|
|
5163
5300
|
section.appendChild(element(doc, "pre", "hive-card-run-output", run.output));
|
|
5164
5301
|
const foot = element(doc, "div", "hive-card-run-foot");
|
|
5165
5302
|
const copy = element(doc, "button", "hive-btn hive-btn-ghost hive-card-run-copy", translate("drawer.copyOutput"));
|
|
@@ -5169,10 +5306,14 @@ function mount(root, options = {}) {
|
|
|
5169
5306
|
copy.addEventListener("click", () => {
|
|
5170
5307
|
copyToClipboard(doc, run.output);
|
|
5171
5308
|
});
|
|
5172
|
-
|
|
5309
|
+
if (Array.isArray(actionHost) || actionHost) addAction(copy);
|
|
5310
|
+
else foot.appendChild(copy);
|
|
5173
5311
|
// Only render the jump-to-chat control when both halves exist: a recorded
|
|
5174
|
-
// worker Session and a host navigation callback.
|
|
5175
|
-
|
|
5312
|
+
// worker Session and a host navigation callback. The status does not matter:
|
|
5313
|
+
// a running card exposes its Session as soon as the worker starts, and the
|
|
5314
|
+
// button must be there while the card is still in progress. No disabled stub.
|
|
5315
|
+
const canOpenChat = asString(run.sessionId) !== "" && typeof openSession === "function";
|
|
5316
|
+
if (canOpenChat) {
|
|
5176
5317
|
const chat = element(doc, "button", "hive-btn hive-btn-ghost hive-card-run-open", translate("drawer.openChat"));
|
|
5177
5318
|
setAttr(chat, "type", "button");
|
|
5178
5319
|
setAttr(chat, "title", translate("drawer.openChat"));
|
|
@@ -5184,9 +5325,10 @@ function mount(root, options = {}) {
|
|
|
5184
5325
|
reportError(error);
|
|
5185
5326
|
}
|
|
5186
5327
|
});
|
|
5187
|
-
|
|
5328
|
+
if (Array.isArray(actionHost) || actionHost) addAction(chat);
|
|
5329
|
+
else foot.appendChild(chat);
|
|
5188
5330
|
}
|
|
5189
|
-
section.appendChild(foot);
|
|
5331
|
+
if (!actionHost) section.appendChild(foot);
|
|
5190
5332
|
return section;
|
|
5191
5333
|
}
|
|
5192
5334
|
|
|
@@ -5226,7 +5368,17 @@ function mount(root, options = {}) {
|
|
|
5226
5368
|
dialog.appendChild(head);
|
|
5227
5369
|
|
|
5228
5370
|
const body = element(doc, "div", "hive-dialog-body hive-card-body");
|
|
5229
|
-
|
|
5371
|
+
if (Array.isArray(card.scope) && card.scope.length > 0) {
|
|
5372
|
+
const drawerScopes = element(doc, "div", "hive-scopes");
|
|
5373
|
+
for (const scope of card.scope) {
|
|
5374
|
+
const chip = element(doc, "span", "hive-scope", scope);
|
|
5375
|
+
setAttr(chip, "title", scope);
|
|
5376
|
+
drawerScopes.appendChild(chip);
|
|
5377
|
+
}
|
|
5378
|
+
body.appendChild(drawerScopes);
|
|
5379
|
+
}
|
|
5380
|
+
const runActions = [];
|
|
5381
|
+
body.appendChild(buildRunSection(card.lastRun, runActions));
|
|
5230
5382
|
dialog.appendChild(body);
|
|
5231
5383
|
|
|
5232
5384
|
const actions = actionsForState(lane, lastModel ? lastModel.writable : false);
|
|
@@ -5240,9 +5392,10 @@ function mount(root, options = {}) {
|
|
|
5240
5392
|
),
|
|
5241
5393
|
);
|
|
5242
5394
|
}
|
|
5243
|
-
if (actions.length > 0) {
|
|
5395
|
+
if (runActions.length > 0 || actions.length > 0) {
|
|
5244
5396
|
const foot = element(doc, "div", "hive-dialog-foot hive-card-actions");
|
|
5245
5397
|
setAttr(foot, "aria-label", translate("drawer.cardActions"));
|
|
5398
|
+
for (const runAction of runActions) foot.appendChild(runAction);
|
|
5246
5399
|
const claimed = asString(card.state || lane) === "claimed";
|
|
5247
5400
|
for (const action of actions) {
|
|
5248
5401
|
const destructive = action.name === "remove";
|
|
@@ -5825,90 +5978,51 @@ function mount(root, options = {}) {
|
|
|
5825
5978
|
}
|
|
5826
5979
|
|
|
5827
5980
|
function renderAgents(model) {
|
|
5828
|
-
clearNode(agentPills);
|
|
5829
5981
|
if (model.initialised === false) {
|
|
5830
|
-
agentsCount.
|
|
5982
|
+
agentsCount.className = "hive-stat hive-agent-count is-hidden";
|
|
5983
|
+
agentsCount.textContent = translate("pane.agents") + " 0";
|
|
5984
|
+
agentsCount._agent = null;
|
|
5985
|
+
agentsCount.disabled = true;
|
|
5831
5986
|
return;
|
|
5832
5987
|
}
|
|
5833
|
-
|
|
5834
|
-
|
|
5835
|
-
|
|
5836
|
-
|
|
5837
|
-
|
|
5838
|
-
|
|
5839
|
-
|
|
5840
|
-
|
|
5841
|
-
|
|
5842
|
-
|
|
5843
|
-
|
|
5844
|
-
|
|
5845
|
-
|
|
5846
|
-
|
|
5847
|
-
|
|
5848
|
-
|
|
5849
|
-
|
|
5850
|
-
|
|
5851
|
-
setAttr(
|
|
5852
|
-
setAttr(
|
|
5853
|
-
|
|
5854
|
-
|
|
5855
|
-
const dot = element(doc, "span", "hive-dot is-" + safeClassToken(agent.state));
|
|
5856
|
-
setAttr(dot, "title", agent.state || translate("agent.idle"));
|
|
5857
|
-
pill.appendChild(dot);
|
|
5858
|
-
const taskNode = element(doc, "span", "hive-agent-pill-task", task);
|
|
5859
|
-
setAttr(taskNode, "title", task);
|
|
5860
|
-
pill.appendChild(taskNode);
|
|
5861
|
-
|
|
5862
|
-
pill.addEventListener("click", () => {
|
|
5863
|
-
openAgentDrawer(agent);
|
|
5988
|
+
const count = model.agents.length;
|
|
5989
|
+
agentsCount.className = "hive-stat hive-agent-count";
|
|
5990
|
+
agentsCount.textContent = translate("pane.agents") + " " + String(count);
|
|
5991
|
+
const first = count > 0 ? model.agents[0] : null;
|
|
5992
|
+
agentsCount._agent = first;
|
|
5993
|
+
agentsCount.disabled = !first;
|
|
5994
|
+
const message = first
|
|
5995
|
+
? translate("agents.openAria") + " " + (first.agent || translate("agent.unknown"))
|
|
5996
|
+
: translate("pane.agents");
|
|
5997
|
+
const label = model.boardError || message;
|
|
5998
|
+
setAttr(agentsCount, "title", label);
|
|
5999
|
+
setAttr(agentsCount, "aria-label", label);
|
|
6000
|
+
}
|
|
6001
|
+
|
|
6002
|
+
function renderCard(card, lane, existing) {
|
|
6003
|
+
const node = existing || element(doc, "article", "hive-card");
|
|
6004
|
+
const title = card.title || translate("card.untitled");
|
|
6005
|
+
if (!existing) {
|
|
6006
|
+
setAttr(node, "tabindex", "0");
|
|
6007
|
+
setAttr(node, "role", "button");
|
|
6008
|
+
node.addEventListener("click", () => {
|
|
6009
|
+
if (node._hiveCard) openDrawer(node._hiveCard, node._hiveLane, node);
|
|
5864
6010
|
});
|
|
5865
|
-
|
|
5866
|
-
|
|
5867
|
-
|
|
5868
|
-
|
|
5869
|
-
|
|
5870
|
-
|
|
5871
|
-
|
|
5872
|
-
|
|
5873
|
-
|
|
5874
|
-
|
|
5875
|
-
|
|
5876
|
-
|
|
5877
|
-
node
|
|
5878
|
-
|
|
5879
|
-
const meta = [];
|
|
5880
|
-
if (card.role) meta.push(translate("card.role") + " " + card.role);
|
|
5881
|
-
if (card.owner) meta.push(translate("card.owner") + " " + card.owner);
|
|
5882
|
-
if (meta.length) node.appendChild(element(doc, "div", "hive-card-meta", meta.join(" · ")));
|
|
5883
|
-
|
|
5884
|
-
if (card.scope.length) {
|
|
5885
|
-
const scopes = element(doc, "div", "hive-scopes");
|
|
5886
|
-
for (const scope of card.scope) {
|
|
5887
|
-
const chip = element(doc, "span", "hive-scope", scope);
|
|
5888
|
-
setAttr(chip, "title", scope);
|
|
5889
|
-
scopes.appendChild(chip);
|
|
5890
|
-
}
|
|
5891
|
-
node.appendChild(scopes);
|
|
5892
|
-
}
|
|
5893
|
-
|
|
5894
|
-
if (card.reason) {
|
|
5895
|
-
node.appendChild(element(doc, "div", "hive-reason", card.reason));
|
|
5896
|
-
}
|
|
5897
|
-
|
|
5898
|
-
const foot = element(doc, "div", "hive-card-foot");
|
|
5899
|
-
foot.appendChild(element(doc, "span", "hive-card-id", card.id || translate("card.noId")));
|
|
5900
|
-
foot.appendChild(element(doc, "span", "hive-card-state", laneLabel(lane)));
|
|
5901
|
-
node.appendChild(foot);
|
|
5902
|
-
|
|
5903
|
-
node.addEventListener("click", () => openDrawer(card, lane, node));
|
|
5904
|
-
node.addEventListener("keydown", (event) => {
|
|
5905
|
-
if (!event || (event.key !== "Enter" && event.key !== " ")) return;
|
|
5906
|
-
if (typeof event.preventDefault === "function") event.preventDefault();
|
|
5907
|
-
openDrawer(card, lane, node);
|
|
5908
|
-
});
|
|
6011
|
+
node.addEventListener("keydown", (event) => {
|
|
6012
|
+
if (!event || (event.key !== "Enter" && event.key !== " ")) return;
|
|
6013
|
+
if (typeof event.preventDefault === "function") event.preventDefault();
|
|
6014
|
+
if (node._hiveCard) openDrawer(node._hiveCard, node._hiveLane, node);
|
|
6015
|
+
});
|
|
6016
|
+
node._hiveTitle = element(doc, "div", "hive-card-title", "");
|
|
6017
|
+
node.appendChild(node._hiveTitle);
|
|
6018
|
+
}
|
|
6019
|
+
node._hiveCard = card;
|
|
6020
|
+
node._hiveLane = lane;
|
|
6021
|
+
node._hiveTitle.textContent = title;
|
|
6022
|
+
setAttr(node, "aria-label", translate("card.openAria") + " " + title);
|
|
6023
|
+
setAttr(node, "title", title);
|
|
5909
6024
|
return node;
|
|
5910
6025
|
}
|
|
5911
|
-
|
|
5912
6026
|
function renderStageChips(model) {
|
|
5913
6027
|
clearNode(stageChips);
|
|
5914
6028
|
setAttr(stageChips, "aria-label", translate("board.filtersAria"));
|
|
@@ -5949,34 +6063,112 @@ function mount(root, options = {}) {
|
|
|
5949
6063
|
if (lastModel) renderLanes(lastModel);
|
|
5950
6064
|
}
|
|
5951
6065
|
|
|
6066
|
+
function cardSortTime(card) {
|
|
6067
|
+
const stateChanged = parseDate(card.stateChangedAt);
|
|
6068
|
+
if (stateChanged) return stateChanged.getTime();
|
|
6069
|
+
const updated = parseDate(card.updatedAt);
|
|
6070
|
+
if (updated) return updated.getTime();
|
|
6071
|
+
const created = parseDate(card.createdAt);
|
|
6072
|
+
if (created) return created.getTime();
|
|
6073
|
+
const id = asString(card.id);
|
|
6074
|
+
const numeric = id.match(/(\d+)$/);
|
|
6075
|
+
return numeric ? Number(numeric[1]) : Number.NaN;
|
|
6076
|
+
}
|
|
6077
|
+
|
|
6078
|
+
function compareCardsNewestFirst(left, right) {
|
|
6079
|
+
const leftTime = cardSortTime(left);
|
|
6080
|
+
const rightTime = cardSortTime(right);
|
|
6081
|
+
if (Number.isFinite(leftTime) && Number.isFinite(rightTime) && leftTime !== rightTime) {
|
|
6082
|
+
return rightTime - leftTime;
|
|
6083
|
+
}
|
|
6084
|
+
if (Number.isFinite(leftTime) !== Number.isFinite(rightTime)) {
|
|
6085
|
+
return Number.isFinite(leftTime) ? -1 : 1;
|
|
6086
|
+
}
|
|
6087
|
+
return asString(right.id).localeCompare(asString(left.id));
|
|
6088
|
+
}
|
|
6089
|
+
|
|
6090
|
+
const LANE_ROW_HEIGHT = 28;
|
|
6091
|
+
const LANE_ROW_BUFFER = 10;
|
|
6092
|
+
const LANE_VIEWPORT_FALLBACK = 480;
|
|
6093
|
+
|
|
6094
|
+
function createLaneState(lane) {
|
|
6095
|
+
const column = element(doc, "section", "hive-lane hive-lane-" + lane);
|
|
6096
|
+
const head = element(doc, "div", "hive-lane-head");
|
|
6097
|
+
head.appendChild(element(doc, "span", "hive-lane-name", laneLabel(lane)));
|
|
6098
|
+
const count = element(doc, "span", "hive-count", "0");
|
|
6099
|
+
head.appendChild(count);
|
|
6100
|
+
column.appendChild(head);
|
|
6101
|
+
|
|
6102
|
+
const list = element(doc, "div", "hive-lane-cards");
|
|
6103
|
+
const inner = element(doc, "div", "hive-lane-virtual");
|
|
6104
|
+
list.appendChild(inner);
|
|
6105
|
+
column.appendChild(list);
|
|
6106
|
+
lanesNode.appendChild(column);
|
|
6107
|
+
|
|
6108
|
+
const state = { lane, column, list, inner, count, cards: [], visible: new Map() };
|
|
6109
|
+
list.addEventListener("scroll", () => renderLaneVirtual(state));
|
|
6110
|
+
return state;
|
|
6111
|
+
}
|
|
6112
|
+
|
|
6113
|
+
function renderLaneVirtual(state) {
|
|
6114
|
+
const cards = state.cards;
|
|
6115
|
+
const total = cards.length;
|
|
6116
|
+
const row = LANE_ROW_HEIGHT;
|
|
6117
|
+
const viewport =
|
|
6118
|
+
Number.isFinite(state.list.clientHeight) && state.list.clientHeight > 0
|
|
6119
|
+
? state.list.clientHeight
|
|
6120
|
+
: LANE_VIEWPORT_FALLBACK;
|
|
6121
|
+
const scrollTop = Number(state.list.scrollTop) || 0;
|
|
6122
|
+
const start = Math.max(0, Math.floor(scrollTop / row) - LANE_ROW_BUFFER);
|
|
6123
|
+
const end = Math.min(total, Math.ceil((scrollTop + viewport) / row) + LANE_ROW_BUFFER);
|
|
6124
|
+
const height = total === 0 ? 0 : total * row - 2;
|
|
6125
|
+
setStyle(state.inner, "height", String(height) + "px");
|
|
6126
|
+
|
|
6127
|
+
const next = new Map();
|
|
6128
|
+
for (let index = start; index < end; index += 1) {
|
|
6129
|
+
const card = cards[index];
|
|
6130
|
+
const key = String(card.id || "idx:" + index);
|
|
6131
|
+
const entry = state.visible.get(key);
|
|
6132
|
+
const node = renderCard(card, state.lane, entry ? entry.node : null);
|
|
6133
|
+
setStyle(node, "top", String(index * row) + "px");
|
|
6134
|
+
if (!entry) state.inner.appendChild(node);
|
|
6135
|
+
next.set(key, { node, index });
|
|
6136
|
+
}
|
|
6137
|
+
for (const [key, entry] of state.visible) {
|
|
6138
|
+
if (!next.has(key) && entry.node.parentNode) entry.node.parentNode.removeChild(entry.node);
|
|
6139
|
+
}
|
|
6140
|
+
state.visible = next;
|
|
6141
|
+
state.count.textContent = String(total);
|
|
6142
|
+
}
|
|
6143
|
+
|
|
5952
6144
|
function renderLanes(model) {
|
|
5953
|
-
clearNode(lanesNode);
|
|
5954
6145
|
if (model.initialised === false) {
|
|
5955
|
-
|
|
6146
|
+
clearNode(lanesNode);
|
|
6147
|
+
laneRenderState.clear();
|
|
5956
6148
|
filterEmpty.textContent = "";
|
|
5957
6149
|
filterEmpty.className = "hive-filter-empty";
|
|
5958
6150
|
return;
|
|
5959
6151
|
}
|
|
5960
|
-
|
|
6152
|
+
const seen = new Set();
|
|
5961
6153
|
for (const lane of LANE_ORDER) {
|
|
5962
|
-
const cards = model.lanes[lane] || [];
|
|
6154
|
+
const cards = [...(model.lanes[lane] || [])].sort(compareCardsNewestFirst);
|
|
6155
|
+
let state = laneRenderState.get(lane);
|
|
6156
|
+
if (!state) {
|
|
6157
|
+
state = createLaneState(lane);
|
|
6158
|
+
laneRenderState.set(lane, state);
|
|
6159
|
+
}
|
|
6160
|
+
state.cards = cards;
|
|
5963
6161
|
const classes = ["hive-lane", "hive-lane-" + lane];
|
|
5964
6162
|
if (cards.length === 0) classes.push("is-empty");
|
|
5965
6163
|
if (stageFilter !== "all" && stageFilter !== lane) classes.push("is-filtered-out");
|
|
5966
|
-
|
|
5967
|
-
|
|
5968
|
-
|
|
5969
|
-
|
|
5970
|
-
|
|
5971
|
-
|
|
5972
|
-
|
|
5973
|
-
|
|
5974
|
-
list.appendChild(emptyState("—"));
|
|
5975
|
-
} else {
|
|
5976
|
-
for (const card of cards) list.appendChild(renderCard(card, lane));
|
|
5977
|
-
}
|
|
5978
|
-
column.appendChild(list);
|
|
5979
|
-
lanesNode.appendChild(column);
|
|
6164
|
+
state.column.className = classes.join(" ");
|
|
6165
|
+
renderLaneVirtual(state);
|
|
6166
|
+
seen.add(lane);
|
|
6167
|
+
}
|
|
6168
|
+
for (const [lane, state] of laneRenderState) {
|
|
6169
|
+
if (seen.has(lane)) continue;
|
|
6170
|
+
if (state.column.parentNode) state.column.parentNode.removeChild(state.column);
|
|
6171
|
+
laneRenderState.delete(lane);
|
|
5980
6172
|
}
|
|
5981
6173
|
|
|
5982
6174
|
const visible = stageFilter === "all" ? model.lanes : { [stageFilter]: model.lanes[stageFilter] || [] };
|
|
@@ -6174,6 +6366,9 @@ function mount(root, options = {}) {
|
|
|
6174
6366
|
unschedule(timer);
|
|
6175
6367
|
timer = null;
|
|
6176
6368
|
}
|
|
6369
|
+
if (typeof doc.removeEventListener === "function") {
|
|
6370
|
+
doc.removeEventListener("visibilitychange", onVisibilityChange);
|
|
6371
|
+
}
|
|
6177
6372
|
closeHelp(false);
|
|
6178
6373
|
closePlanDialog(false);
|
|
6179
6374
|
closeLimitsDialog(false);
|
|
@@ -6237,9 +6432,33 @@ function mount(root, options = {}) {
|
|
|
6237
6432
|
}
|
|
6238
6433
|
}
|
|
6239
6434
|
|
|
6240
|
-
|
|
6241
|
-
|
|
6242
|
-
|
|
6435
|
+
function stopPolling() {
|
|
6436
|
+
if (timer === null) return;
|
|
6437
|
+
unschedule(timer);
|
|
6438
|
+
timer = null;
|
|
6439
|
+
}
|
|
6440
|
+
|
|
6441
|
+
function startPolling() {
|
|
6442
|
+
if (destroyed || timer !== null || doc.hidden) return;
|
|
6443
|
+
timer = schedule(() => {
|
|
6444
|
+
void refresh();
|
|
6445
|
+
}, intervalMs);
|
|
6446
|
+
}
|
|
6447
|
+
|
|
6448
|
+
function onVisibilityChange() {
|
|
6449
|
+
if (destroyed) return;
|
|
6450
|
+
if (doc.hidden) {
|
|
6451
|
+
stopPolling();
|
|
6452
|
+
} else {
|
|
6453
|
+
startPolling();
|
|
6454
|
+
void refresh();
|
|
6455
|
+
}
|
|
6456
|
+
}
|
|
6457
|
+
|
|
6458
|
+
if (typeof doc.addEventListener === "function") {
|
|
6459
|
+
doc.addEventListener("visibilitychange", onVisibilityChange);
|
|
6460
|
+
}
|
|
6461
|
+
startPolling();
|
|
6243
6462
|
void refresh();
|
|
6244
6463
|
|
|
6245
6464
|
return { setSnapshot, destroy, refresh, rerender };
|
|
@@ -6247,7 +6466,7 @@ function mount(root, options = {}) {
|
|
|
6247
6466
|
|
|
6248
6467
|
return { mount: mount, renderModel: renderModel, messages: messages }
|
|
6249
6468
|
})()
|
|
6250
|
-
var HIVE_PANEL_CSS = "/*\n * hive-panel-ui\n * Dark-first, host-themed through four variables:\n * --hive-bg, --hive-fg, --hive-line, --hive-accent\n * Defaults live on a zero-specificity :root rule and every rule keeps a fallback,\n * so a host can override the variables on :root, body, a wrapper, or .hive.\n */\n\n.hive,\n.hive *,\n.hive *::before,\n.hive *::after {\n box-sizing: border-box;\n}\n\n.hive {\n /* Derived helpers; the four required variables use inline fallbacks. */\n --hive-fg-soft: color-mix(in srgb, var(--hive-fg) 62%, transparent);\n --hive-fg-faint: color-mix(in srgb, var(--hive-fg) 40%, transparent);\n --hive-surface: color-mix(in srgb, var(--hive-fg) 4%, transparent);\n --hive-surface-strong: color-mix(in srgb, var(--hive-fg) 8%, transparent);\n --hive-surface-hover: color-mix(in srgb, var(--hive-fg) 11%, transparent);\n --hive-accent-soft: color-mix(in srgb, var(--hive-accent) 17%, transparent);\n --hive-mono: ui-monospace, \"SFMono-Regular\", \"JetBrains Mono\", Menlo, Consolas, monospace;\n\n display: flex;\n flex-direction: column;\n width: 100%;\n height: 100%;\n min-height: 480px;\n overflow: hidden;\n border: 1px solid var(--hive-line);\n border-radius: var(--hive-radius-lg);\n background: var(--hive-bg);\n color: var(--hive-fg);\n font: 14px/1.5 ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, \"Segoe UI\", sans-serif;\n color-scheme: light dark;\n}\n\n.hive ::selection {\n background: color-mix(in srgb, var(--hive-accent) 35%, transparent);\n}\n\n/* ------------------------------------------------------------------ top bar */\n\n.hive-bar {\n display: flex;\n flex: 0 0 auto;\n flex-wrap: wrap;\n align-items: center;\n gap: 8px 12px;\n padding: 9px 14px;\n border-bottom: 1px solid var(--hive-line);\n background: color-mix(in srgb, var(--hive-fg) 2%, transparent);\n}\n\n.hive-ident {\n display: flex;\n align-items: baseline;\n gap: 8px;\n min-width: 0;\n}\n\n.hive-brand {\n color: var(--hive-accent);\n font-size: 10px;\n font-weight: 750;\n letter-spacing: 0.18em;\n text-transform: uppercase;\n}\n\n.hive-repo {\n max-width: min(34vw, 360px);\n overflow: hidden;\n color: var(--hive-fg-soft);\n font-family: var(--hive-mono);\n font-size: 11.5px;\n text-overflow: ellipsis;\n white-space: nowrap;\n}\n\n.hive-time {\n color: var(--hive-fg-soft);\n font-family: var(--hive-mono);\n font-size: 11px;\n font-variant-numeric: tabular-nums;\n white-space: nowrap;\n}\n\n.hive-badge {\n padding: 2px 8px;\n border: 1px solid var(--hive-line);\n border-radius: 999px;\n font-size: 10px;\n font-weight: 650;\n letter-spacing: 0.09em;\n line-height: 1.5;\n text-transform: uppercase;\n white-space: nowrap;\n}\n\n.hive-badge.is-free {\n border-color: color-mix(in srgb, var(--hive-accent) 45%, transparent);\n background: var(--hive-accent-soft);\n color: var(--hive-accent);\n}\n\n.hive-badge.is-freeze {\n border-color: color-mix(in srgb, var(--hive-warn) 45%, transparent);\n background: color-mix(in srgb, var(--hive-warn) 14%, transparent);\n color: var(--hive-warn);\n}\n\n.hive-badge.is-custom {\n color: var(--hive-fg-soft);\n}\n\n.hive-stats {\n display: flex;\n flex-wrap: wrap;\n align-items: center;\n gap: 5px;\n min-width: 0;\n}\n\n.hive-stat {\n padding: 1px 7px;\n border: 1px solid transparent;\n border-radius: var(--hive-radius-sm);\n background: var(--hive-surface);\n color: var(--hive-fg-soft);\n font-size: 10.5px;\n font-variant-numeric: tabular-nums;\n line-height: 1.7;\n white-space: nowrap;\n}\n\n.hive-stat strong {\n color: var(--hive-fg);\n font-weight: 650;\n}\n\n.hive-stat.is-total {\n color: var(--hive-fg);\n}\n\n.hive-stat.is-warn {\n color: var(--hive-warn);\n background: color-mix(in srgb, var(--hive-warn) 10%, transparent);\n}\n\n.hive-status {\n color: var(--hive-danger);\n font-size: 10px;\n font-weight: 700;\n letter-spacing: 0.09em;\n text-transform: uppercase;\n white-space: nowrap;\n}\n\n.hive-status:empty {\n display: none;\n}\n\n.hive-status::before {\n content: \"● \";\n font-size: 9px;\n}\n\n.hive-status.is-error {\n color: var(--hive-danger);\n}\n\n.hive-status.is-info {\n color: var(--hive-info);\n}\n\n.hive-actions {\n display: flex;\n flex-wrap: wrap;\n gap: 6px;\n margin-left: auto;\n}\n\n/* ------------------------------------------------------------------ buttons */\n\n.hive-btn {\n appearance: none;\n padding: 4px 10px;\n border: 1px solid var(--hive-line);\n border-radius: var(--hive-radius-md);\n background: var(--hive-surface-strong);\n color: var(--hive-fg);\n font: inherit;\n font-size: 11.5px;\n font-weight: 550;\n line-height: 1.5;\n cursor: pointer;\n transition: border-color 120ms ease, background 120ms ease, color 120ms ease;\n}\n\n.hive-btn:hover {\n border-color: color-mix(in srgb, var(--hive-accent) 55%, var(--hive-line));\n background: var(--hive-accent-soft);\n}\n\n.hive-btn:active {\n transform: translateY(1px);\n}\n\n.hive-btn:focus-visible {\n outline: 2px solid var(--hive-accent);\n outline-offset: 1px;\n}\n\n.hive-btn-ghost {\n padding: 3px 8px;\n border-color: transparent;\n background: transparent;\n color: var(--hive-fg-soft);\n font-size: 11px;\n}\n\n/* ------------------------------------------------------------------- layout */\n\n.hive-main {\n display: grid;\n flex: 1 1 auto;\n grid-template-columns: minmax(185px, 230px) minmax(0, 1fr) minmax(215px, 300px);\n min-height: 0;\n}\n\n.hive-pane {\n display: flex;\n flex-direction: column;\n min-width: 0;\n min-height: 0;\n}\n\n.hive-agents {\n border-right: 1px solid var(--hive-line);\n background: color-mix(in srgb, var(--hive-fg) 1.5%, transparent);\n}\n\n.hive-events {\n border-left: 1px solid var(--hive-line);\n background: color-mix(in srgb, var(--hive-fg) 1.5%, transparent);\n}\n\n.hive-pane-head {\n display: flex;\n flex: 0 0 auto;\n align-items: center;\n gap: 7px;\n padding: 8px 12px;\n border-bottom: 1px solid var(--hive-line);\n color: var(--hive-fg-soft);\n font-size: 10px;\n font-weight: 650;\n letter-spacing: 0.12em;\n text-transform: uppercase;\n}\n\n.hive-hint {\n color: var(--hive-fg-faint);\n font-size: 9.5px;\n font-weight: 500;\n letter-spacing: 0.04em;\n text-transform: none;\n}\n\n.hive-count {\n min-width: 18px;\n margin-left: auto;\n padding: 0 6px;\n border-radius: 999px;\n background: var(--hive-surface);\n color: var(--hive-fg-soft);\n font-family: var(--hive-mono);\n font-size: 10px;\n font-variant-numeric: tabular-nums;\n line-height: 17px;\n text-align: center;\n}\n\n.hive-scroll {\n display: flex;\n flex: 1 1 auto;\n flex-direction: column;\n gap: 7px;\n min-height: 0;\n padding: 10px;\n overflow-x: hidden;\n overflow-y: auto;\n scrollbar-color: var(--hive-line) transparent;\n scrollbar-width: thin;\n}\n\n.hive-empty {\n padding: 14px 10px;\n color: var(--hive-fg-faint);\n font-size: 11px;\n text-align: center;\n}\n\n/* ------------------------------------------------------------------- agents */\n\n.hive-agent {\n padding: 8px 10px;\n border: 1px solid var(--hive-line);\n border-radius: var(--hive-radius-md);\n background: var(--hive-surface);\n}\n\n.hive-agent-head {\n display: flex;\n align-items: center;\n gap: 7px;\n font-weight: 600;\n}\n\n.hive-agent-name {\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n}\n\n.hive-dot {\n width: 7px;\n height: 7px;\n flex: 0 0 auto;\n border-radius: 50%;\n background: var(--hive-fg-faint);\n box-shadow: none;\n}\n\n.hive-dot.is-working {\n background: var(--hive-accent);\n box-shadow: none;\n}\n\n.hive-dot.is-idle {\n background: var(--hive-fg-faint);\n}\n\n.hive-dot.is-failed {\n background: var(--hive-danger);\n}\n\n.hive-dot.is-done {\n background: var(--hive-ok);\n}\n\n.hive-meta {\n margin-top: 3px;\n overflow: hidden;\n color: var(--hive-fg-soft);\n font-size: 10.5px;\n text-overflow: ellipsis;\n white-space: nowrap;\n}\n\n.hive-agent-files {\n color: var(--hive-fg-faint);\n font-family: var(--hive-mono);\n}\n\n/* -------------------------------------------------------------------- lanes */\n\n.hive-board { background: var(--hive-bg); }\n\n.hive-lanes {\n display: flex;\n flex: 1 1 auto;\n align-items: stretch;\n gap: 9px;\n min-height: 0;\n padding: 10px;\n overflow-x: auto;\n overflow-y: hidden;\n scrollbar-color: var(--hive-line) transparent;\n scrollbar-width: thin;\n}\n\n.hive-lane {\n display: flex;\n flex: 0 0 232px;\n flex-direction: column;\n min-height: 0;\n overflow: hidden;\n border: 1px solid var(--hive-line);\n border-radius: var(--hive-radius-md);\n background: color-mix(in srgb, var(--hive-fg) 2%, transparent);\n}\n\n.hive-lane-head {\n display: flex;\n flex: 0 0 auto;\n align-items: center;\n gap: 7px;\n padding: 8px 10px;\n border-bottom: 1px solid var(--hive-line);\n color: var(--hive-fg-soft);\n font-size: 10px;\n font-weight: 700;\n letter-spacing: 0.1em;\n text-transform: uppercase;\n}\n\n.hive-lane-head::before {\n width: 3px;\n height: 10px;\n border-radius: var(--hive-radius-sm);\n background: var(--hive-fg-faint);\n content: \"\";\n}\n\n.hive-lane-name {\n color: var(--hive-fg);\n}\n\n.hive-lane-pending .hive-lane-head::before {\n background: var(--hive-accent);\n}\n\n.hive-lane-claimed .hive-lane-head::before {\n background: var(--hive-info);\n}\n\n.hive-lane-done .hive-lane-head::before {\n background: var(--hive-ok);\n}\n\n.hive-lane-failed .hive-lane-head::before {\n background: var(--hive-danger);\n}\n\n.hive-lane-cards {\n display: flex;\n flex: 1 1 auto;\n flex-direction: column;\n gap: 7px;\n min-height: 0;\n padding: 7px;\n overflow-x: hidden;\n overflow-y: auto;\n scrollbar-color: var(--hive-line) transparent;\n scrollbar-width: thin;\n}\n\n.hive-card {\n padding: 8px 9px;\n border: 1px solid var(--hive-line);\n border-radius: var(--hive-radius-md);\n background: var(--hive-surface);\n cursor: pointer;\n transition: border-color 120ms ease, background 120ms ease;\n}\n\n.hive-card:hover {\n border-color: color-mix(in srgb, var(--hive-accent) 55%, var(--hive-line));\n background: var(--hive-surface-hover);\n}\n\n.hive-card:focus-visible {\n outline: 2px solid var(--hive-accent);\n outline-offset: 1px;\n}\n\n.hive-card-title {\n overflow-wrap: anywhere;\n font-size: 12.5px;\n font-weight: 600;\n line-height: 1.35;\n}\n\n.hive-card-meta {\n margin-top: 4px;\n color: var(--hive-fg-soft);\n font-size: 10.5px;\n}\n\n.hive-scopes {\n display: flex;\n flex-wrap: wrap;\n gap: 3px;\n margin-top: 6px;\n}\n\n.hive-scope {\n max-width: 100%;\n overflow: hidden;\n padding: 1px 5px;\n border: 1px solid var(--hive-line);\n border-radius: var(--hive-radius-sm);\n background: var(--hive-surface-strong);\n color: var(--hive-fg-soft);\n font-family: var(--hive-mono);\n font-size: 9.5px;\n text-overflow: ellipsis;\n white-space: nowrap;\n}\n\n.hive-reason {\n margin-top: 6px;\n padding: 3px 6px;\n overflow-wrap: anywhere;\n border-left: 1px solid var(--hive-danger);\n border-radius: 0 var(--hive-radius-sm) var(--hive-radius-sm) 0;\n background: color-mix(in srgb, var(--hive-danger) 10%, transparent);\n color: color-mix(in srgb, var(--hive-danger) 82%, var(--hive-fg));\n font-size: 10.5px;\n}\n\n.hive-card-foot {\n display: flex;\n justify-content: space-between;\n gap: 6px;\n margin-top: 7px;\n color: var(--hive-fg-faint);\n font-family: var(--hive-mono);\n font-size: 9.5px;\n}\n\n.hive-card-id,\n.hive-card-state {\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n}\n\n.hive-card-state {\n text-transform: uppercase;\n}\n\n/* ------------------------------------------------------------------- events */\n\n.hive-event {\n display: grid;\n grid-template-columns: auto minmax(0, 1fr);\n gap: 2px 7px;\n padding: 6px 7px;\n border: 1px solid transparent;\n border-radius: var(--hive-radius-sm);\n background: var(--hive-surface);\n font-size: 10.5px;\n}\n\n.hive-event-time {\n color: var(--hive-fg-faint);\n font-family: var(--hive-mono);\n font-variant-numeric: tabular-nums;\n white-space: nowrap;\n}\n\n.hive-event-kind {\n justify-self: start;\n overflow: hidden;\n color: var(--hive-accent);\n font-weight: 600;\n text-overflow: ellipsis;\n white-space: nowrap;\n}\n\n.hive-event-text {\n grid-column: 1 / -1;\n overflow-wrap: anywhere;\n color: var(--hive-fg-soft);\n font-family: var(--hive-mono);\n font-size: 10px;\n}\n\n/* ------------------------------------------------------------------- drawer */\n\n.hive-drawer {\n position: fixed;\n z-index: 2147483000;\n top: 0;\n right: 0;\n bottom: 0;\n display: flex;\n flex-direction: column;\n width: min(440px, 92vw);\n border-left: 1px solid var(--hive-line);\n background: color-mix(in srgb, var(--hive-bg) 97%, var(--hive-fg) 3%);\n color: var(--hive-fg);\n box-shadow: none;\n font: 14px/1.5 ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, \"Segoe UI\", sans-serif;\n color-scheme: light dark;\n animation: hive-drawer-in 150ms ease-out;\n}\n\n.hive-drawer-head {\n display: flex;\n align-items: flex-start;\n gap: 10px;\n padding: 14px;\n border-bottom: 1px solid var(--hive-line);\n}\n\n.hive-drawer-titlebox {\n min-width: 0;\n}\n\n.hive-drawer-eyebrow {\n overflow: hidden;\n color: var(--hive-fg-faint);\n font-family: var(--hive-mono);\n font-size: 9.5px;\n letter-spacing: 0.05em;\n text-overflow: ellipsis;\n text-transform: uppercase;\n white-space: nowrap;\n}\n\n.hive-drawer-title {\n margin: 3px 0 0;\n overflow-wrap: anywhere;\n color: var(--hive-fg);\n font-size: 15px;\n font-weight: 650;\n line-height: 1.35;\n}\n\n.hive-drawer-head .hive-btn-ghost {\n flex: 0 0 auto;\n margin-left: auto;\n}\n\n.hive-drawer-body {\n display: flex;\n flex: 1 1 auto;\n flex-direction: column;\n gap: 10px;\n min-height: 0;\n padding: 14px;\n overflow-y: auto;\n scrollbar-color: var(--hive-line) transparent;\n scrollbar-width: thin;\n}\n\n.hive-actions-row {\n display: flex;\n flex-wrap: wrap;\n gap: 6px;\n}\n\n.hive-note {\n color: var(--hive-fg-faint);\n font-size: 11px;\n}\n\n.hive-section-label {\n margin-top: 2px;\n color: var(--hive-fg-faint);\n font-size: 9.5px;\n font-weight: 650;\n letter-spacing: 0.1em;\n text-transform: uppercase;\n}\n\n.hive-json {\n max-height: 55vh;\n margin: 0;\n padding: 10px;\n overflow: auto;\n border: 1px solid var(--hive-line);\n border-radius: var(--hive-radius-md);\n background: color-mix(in srgb, var(--hive-fg) 3%, transparent);\n color: var(--hive-fg-soft);\n font-family: var(--hive-mono);\n font-size: 10.5px;\n line-height: 1.55;\n overflow-wrap: anywhere;\n scrollbar-color: var(--hive-line) transparent;\n scrollbar-width: thin;\n white-space: pre-wrap;\n}\n\n@keyframes hive-drawer-in {\n from {\n opacity: 0;\n transform: translateX(18px);\n }\n to {\n opacity: 1;\n transform: translateX(0);\n }\n}\n\n@media (prefers-reduced-motion: reduce) {\n .hive-card,\n .hive-btn {\n transition: none;\n }\n\n .hive-drawer {\n animation: none;\n }\n}\n\n/* ------------------------------------------------------------------ compact */\n\n@media (max-width: 920px) {\n .hive {\n min-height: 100dvh;\n height: 100dvh;\n border-radius: 0;\n }\n\n .hive-main {\n grid-template-columns: minmax(0, 1fr);\n grid-template-rows: minmax(110px, 17vh) minmax(280px, 1fr) minmax(120px, 20vh);\n }\n\n .hive-agents {\n border-right: 0;\n border-bottom: 1px solid var(--hive-line);\n }\n\n .hive-events {\n border-top: 1px solid var(--hive-line);\n border-left: 0;\n }\n\n .hive-agent-list {\n flex-direction: row;\n overflow-x: auto;\n overflow-y: hidden;\n }\n\n .hive-agent {\n flex: 0 0 190px;\n }\n\n .hive-drawer {\n width: 100vw;\n }\n}\n/* DSH design-token bridge. Neutral grayscale fallbacks keep standalone pages readable. */\n.hive, .hive-portal, .hive-dialog {\n --hive-bg: var(--dsw-alias-bg-base, #fff);\n --hive-bg-layer-1: var(--dsw-alias-bg-layer-1, #fff);\n --hive-bg-layer-2: var(--dsw-alias-bg-layer-2, #fff);\n --hive-bg-layer-3: var(--dsw-alias-bg-layer-3, #f5f5f5);\n --hive-line: var(--dsw-alias-border-l1, #d9d9d9);\n --hive-line-2: var(--dsw-alias-border-l2, #e8e8e8);\n --hive-fg: var(--dsw-alias-label-primary, #000);\n --hive-fg-soft: var(--dsw-alias-label-secondary, #4d4d4d);\n --hive-fg-faint: var(--dsw-alias-label-tertiary, #808080);\n --hive-accent: var(--dsw-alias-brand-primary, #000);\n --hive-hover: var(--dsw-alias-interactive-bg-hover, #f2f2f2);\n --hive-selected: var(--dsw-alias-border-selected, #000);\n --hive-danger: var(--dsw-alias-state-error-primary, #000);\n --hive-ok: var(--dsw-alias-state-success-primary, #000);\n --hive-warn: var(--dsw-alias-state-warn-primary, #000);\n --hive-info: var(--dsw-alias-brand-primary, #000);\n --hive-radius-sm: var(--dsw-radius-sm, 4px);\n --hive-radius-md: var(--dsw-radius-md, 8px);\n --hive-radius-lg: var(--dsw-radius-lg, 12px);\n --hive-elevation: var(--dsw-elevation-panel, 0 12px 32px rgba(0, 0, 0, 0.18));\n --hive-surface: var(--hive-bg-layer-1);\n --hive-surface-strong: var(--hive-bg-layer-2);\n --hive-surface-hover: var(--hive-hover);\n --hive-accent-soft: color-mix(in srgb, var(--hive-accent) 14%, transparent);\n --hive-label-on-brand: var(--hive-bg);\n --hive-mono: ui-monospace, \"SFMono-Regular\", \"JetBrains Mono\", Menlo, Consolas, monospace;\n}\n\n/* Tokenized component treatment. */\n.hive { background: var(--hive-bg); color: var(--hive-fg); border-color: var(--hive-line); border-radius: var(--hive-radius-lg); }\n.hive-bar { background: var(--hive-bg-layer-1); border-bottom-color: var(--hive-line); gap: 8px; }\n.hive-main,\n.hive-board { background: var(--hive-bg); }\n.hive-agents,\n.hive-events { background: var(--hive-bg-layer-1); border-color: var(--hive-line); }\n.hive-lane { background: var(--hive-bg-layer-1); border-color: var(--hive-line); border-radius: var(--hive-radius-md); }\n.hive-card { background: var(--hive-bg-layer-1); border: 1px solid var(--hive-line); border-radius: var(--hive-radius-md); box-shadow: none; }\n.hive-card:hover { background: var(--hive-hover); border-color: var(--hive-line); }\n.hive-btn { background: transparent; border: 1px solid var(--hive-line); color: var(--hive-fg); border-radius: var(--hive-radius-md); }\n.hive-btn:hover { background: var(--hive-hover); border-color: var(--hive-line); color: var(--hive-fg); }\n.hive-btn-ghost { background: transparent; border-color: transparent; color: var(--hive-fg-soft); }\n.hive-btn-ghost:hover { background: var(--hive-hover); border-color: transparent; color: var(--hive-fg); }\n.hive-btn-danger { background: transparent; border-color: var(--hive-danger); color: var(--hive-danger); }\n.hive-btn-danger:hover:not(:disabled) { background: var(--hive-hover); border-color: var(--hive-danger); color: var(--hive-danger); }\n.hive-settings-primary,\n.hive-add-submit { background: var(--hive-accent); border-color: var(--hive-accent); color: var(--hive-label-on-brand); }\n.hive-settings-primary:hover:not(:disabled),\n.hive-add-submit:hover:not(:disabled) { background: var(--hive-accent); border-color: var(--hive-accent); color: var(--hive-label-on-brand); }\n.hive-settings-secondary { background: transparent; border-color: var(--hive-line); color: var(--hive-fg); }\n.hive-settings-secondary:hover { background: var(--hive-hover); border-color: var(--hive-line); color: var(--hive-fg); }\n.hive-input,\n.hive-textarea,\n.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); }\n.hive-input:focus,\n.hive-textarea:focus,\n.hive-limits-input:focus { outline: 1px solid var(--hive-selected); outline-offset: 0; }\n.hive-dialog,\n.hive-add-dialog,\n.hive-settings-dialog,\n.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); }\n.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); }\n.hive-drawer { background: var(--hive-bg-layer-2); border-left: 1px solid var(--hive-line); box-shadow: none; }\n.hive-json,\n.hive-plan-raw,\n.hive-plan-item,\n.hive-scope,\n.hive-init-card,\n.hive-limits-error,\n.hive-settings-note { background: var(--hive-bg-layer-1); border-color: var(--hive-line); border-radius: var(--hive-radius-sm); }\n.hive-limits-row { border-top-color: var(--hive-line-2); }\n.hive-limits-row:not(.is-head):hover { background: var(--hive-hover); }\n.hive-settings-tab[aria-selected=\"true\"] { border-bottom-color: var(--hive-selected); }\n.hive-lane-head,\n.hive-dialog-head,\n.hive-dialog-foot,\n.hive-drawer-head,\n.hive-settings-tabs { border-color: var(--hive-line-2); }\n.hive-freeze-banner { background: transparent; border-bottom-color: var(--hive-warn); color: var(--hive-warn); }\n.hive-freeze-banner .hive-btn { background: transparent; border-color: var(--hive-line); color: var(--hive-fg); }\n.hive-queen-hint { background: var(--hive-bg-layer-1); border-color: var(--hive-line); }\n.hive-supervisor-inline,\n.hive-stat,\n.hive-status,\n.hive-queen-badge {\n display: inline-flex;\n align-items: center;\n gap: 6px;\n height: 22px;\n padding: 0 8px;\n border: 1px solid var(--hive-line);\n border-radius: 999px;\n background: transparent;\n color: var(--hive-fg-soft);\n font-size: 12px;\n font-weight: 400;\n line-height: 1;\n white-space: nowrap;\n}\n.hive-supervisor-inline { gap: 6px; }\n.hive-supervisor-inline-label { color: var(--hive-fg-soft); font-weight: 400; }\n.hive-supervisor-inline-state { display: inline-flex; align-items: center; gap: 6px; color: var(--hive-fg-soft); font-size: 12px; font-weight: 400; }\n.hive-supervisor-inline-state::before { width: 6px; height: 6px; flex: 0 0 6px; border-radius: 50%; background: var(--hive-fg-faint); content: \"\"; }\n.hive-supervisor-inline-state.is-running::before { background: var(--hive-accent); }\n.hive-supervisor-inline-state.is-backoff::before { background: var(--hive-warn); }\n.hive-supervisor-inline-state.is-paused::before { background: var(--hive-fg-faint); }\n.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; }\n.hive-supervisor-inline-resume:hover { background: transparent; color: var(--hive-fg); }\n.hive-stats { flex-wrap: wrap; gap: 8px; }\n.hive-stat.is-warn { color: var(--hive-fg-soft); background: transparent; }\n.hive-stat strong { color: var(--hive-fg-soft); font-weight: 400; }\n.hive-status { color: var(--hive-fg-soft); }\n.hive-status::before { width: 6px; height: 6px; flex: 0 0 6px; border-radius: 50%; background: var(--hive-danger); content: \"\"; font-size: 0; }\n.hive-status.is-info::before { background: var(--hive-accent); }\n.hive-queen-badge { color: var(--hive-fg-soft); }\n\n\n.hive-portal {\n position: fixed;\n inset: 0;\n z-index: 2147483600;\n pointer-events: none;\n}\n\n.hive-portal > .hive-overlay { pointer-events: auto; }\n\n/* Buttons: two explicit tiers. */\n.hive-btn {\n display: inline-flex;\n align-items: center;\n justify-content: center;\n gap: 6px;\n height: 28px;\n padding: 0 12px;\n border: 1px solid var(--hive-line-2);\n border-radius: var(--hive-radius-md);\n background: transparent;\n color: var(--hive-fg);\n font-size: 14px;\n font-weight: 600;\n line-height: 1.5;\n}\n\n.hive-btn:hover {\n border-color: var(--hive-line-2);\n background: var(--hive-hover);\n color: var(--hive-fg);\n}\n\n.hive-btn-ghost {\n border-color: transparent;\n background: transparent;\n color: var(--hive-fg-soft);\n}\n\n.hive-btn-ghost:hover {\n border-color: transparent;\n background: var(--hive-hover);\n color: var(--hive-fg);\n}\n\n.hive-btn-danger {\n border-color: var(--hive-danger);\n background: transparent;\n color: var(--hive-danger);\n}\n\n.hive-btn-danger:hover:not(:disabled) {\n border-color: var(--hive-danger);\n background: var(--hive-hover);\n color: var(--hive-danger);\n}\n\n.hive-settings-primary,\n.hive-add-submit {\n border-color: var(--hive-accent);\n background: var(--hive-accent);\n color: var(--hive-label-on-brand);\n font-weight: 600;\n}\n\n.hive-settings-primary:hover:not(:disabled),\n.hive-add-submit:hover:not(:disabled) {\n border-color: var(--hive-accent);\n background: color-mix(in srgb, var(--hive-accent) 92%, #000);\n color: var(--hive-label-on-brand);\n}\n\n.hive-settings-primary:active:not(:disabled),\n.hive-add-submit:active:not(:disabled) {\n border-color: var(--hive-accent);\n background: color-mix(in srgb, var(--hive-accent) 84%, #000);\n color: var(--hive-label-on-brand);\n}\n\n.hive-settings-primary:focus-visible,\n.hive-add-submit:focus-visible {\n outline: 2px solid var(--hive-accent);\n outline-offset: 2px;\n}\n\n.hive-settings-secondary {\n border-color: var(--hive-line-2);\n background: transparent;\n color: var(--hive-fg);\n}\n\n.hive-settings-secondary:hover {\n border-color: var(--hive-line-2);\n background: var(--hive-hover);\n color: var(--hive-fg);\n}\n\n.hive-icon-button,\n.hive-dialog-close {\n height: 28px;\n padding: 0;\n border: 0;\n background: transparent;\n color: var(--hive-fg-soft);\n}\n\n.hive-icon-button:hover,\n.hive-dialog-close:hover {\n border: 0;\n background: var(--hive-hover);\n color: var(--hive-fg);\n}\n\n.hive-role-remove {\n height: 28px;\n min-height: 28px;\n padding: 0;\n border-color: transparent;\n background: transparent;\n color: var(--hive-danger);\n}\n\n/* Dialogs are portaled to the document body; keep them above the panel. */\n.hive-dialog,\n.hive-add-dialog,\n.hive-settings-dialog,\n.hive-card-dialog {\n border: 1px solid var(--hive-line);\n background: var(--hive-bg-layer-2);\n box-shadow: var(--dsw-elevation-panel, 0 12px 32px rgba(0, 0, 0, 0.18));\n}\n\n/* toolbar action rhythm */\n.hive-actions { gap: 8px; }\n.hive-actions > .hive-btn { display: inline-flex; align-items: center; gap: 6px; flex: 0 0 auto; }\n\n/* Dialog form containment: portal content must not create horizontal scroll. */\n.hive-portal,\n.hive-portal *,\n.hive-portal *::before,\n.hive-portal *::after { box-sizing: border-box; }\n\n.hive-portal .hive-dialog { max-width: 92vw; overflow-x: hidden; }\n.hive-portal .hive-dialog-head,\n.hive-portal .hive-dialog-body,\n.hive-portal .hive-dialog-foot { padding-left: 16px; padding-right: 16px; }\n.hive-portal .hive-dialog-body { width: auto; min-width: 0; max-width: 100%; }\n.hive-portal .hive-dialog-body > * { margin-left: 0; margin-right: 0; max-width: 100%; min-width: 0; }\n.hive-portal .hive-field,\n.hive-portal .hive-field-row,\n.hive-portal .hive-settings-section,\n.hive-portal .hive-settings-tabpanel,\n.hive-portal .hive-limits-table { width: 100%; max-width: 100%; min-width: 0; margin-left: 0; margin-right: 0; }\n.hive-portal .hive-field-row > .hive-field { width: auto; flex: 1 1 160px; }\n.hive-portal .hive-input,\n.hive-portal .hive-textarea,\n.hive-portal select { width: 100%; min-width: 0; max-width: 100%; }\n.hive-portal .hive-limits-row {\n width: 100%;\n max-width: 100%;\n min-width: 0;\n grid-template-columns: minmax(0, 1fr) 96px 48px 48px 28px;\n}\n.hive-portal .hive-limits-cell,\n.hive-portal .hive-limits-role,\n.hive-portal .hive-dialog-title,\n.hive-portal .hive-card-subline,\n.hive-portal .hive-settings-role-name { min-width: 0; overflow-wrap: anywhere; }\n.hive-portal .hive-dialog-foot { flex-wrap: wrap; }\n\n.hive-portal .hive-dialog-body { overflow-x: hidden; }\n.hive-portal .hive-settings-tabs { flex-wrap: wrap; }\n.hive-portal .hive-card-actions,\n.hive-portal .hive-settings-form-actions { max-width: 100%; }\n\n/* Native <dialog>: top layer, browser-managed backdrop and focus trap. */\n.hive-dialog,\n.hive-dialog *,\n.hive-dialog *::before,\n.hive-dialog *::after { box-sizing: border-box; }\n\ndialog.hive-dialog {\n position: fixed;\n inset: 0;\n margin: auto;\n padding: 0;\n width: min(560px, 100%);\n max-width: 92vw;\n max-height: 80vh;\n overflow: hidden;\n border: 1px solid var(--hive-line);\n border-radius: var(--hive-radius-lg);\n background: var(--hive-bg-layer-2);\n color: var(--hive-fg);\n box-shadow: var(--dsw-elevation-panel, 0 12px 32px rgba(0, 0, 0, 0.18));\n color-scheme: light dark;\n}\n\ndialog.hive-card-dialog { width: min(720px, 92vw); }\n\ndialog.hive-dialog::backdrop {\n background: var(--dsw-alias-bg-mask-1, rgba(0, 0, 0, 0.24));\n backdrop-filter: var(--dsw-mask-blur, none);\n}\n\ndialog.hive-dialog .hive-dialog-head,\ndialog.hive-dialog .hive-dialog-body,\ndialog.hive-dialog .hive-dialog-foot { padding-left: 16px; padding-right: 16px; }\ndialog.hive-dialog .hive-dialog-body { width: auto; min-width: 0; max-width: 100%; overflow-x: hidden; }\ndialog.hive-dialog .hive-dialog-body > * { margin-left: 0; margin-right: 0; max-width: 100%; min-width: 0; }\ndialog.hive-dialog .hive-field,\ndialog.hive-dialog .hive-field-row,\ndialog.hive-dialog .hive-settings-section,\ndialog.hive-dialog .hive-settings-tabpanel,\ndialog.hive-dialog .hive-limits-table { width: 100%; max-width: 100%; min-width: 0; margin-left: 0; margin-right: 0; }\ndialog.hive-dialog .hive-field-row > .hive-field { width: auto; flex: 1 1 160px; }\ndialog.hive-dialog .hive-input,\ndialog.hive-dialog .hive-textarea,\ndialog.hive-dialog select { width: 100%; min-width: 0; max-width: 100%; }\ndialog.hive-dialog .hive-limits-row {\n width: 100%;\n max-width: 100%;\n min-width: 0;\n grid-template-columns: minmax(0, 1fr) 96px 48px 48px 28px;\n}\ndialog.hive-dialog .hive-limits-cell,\ndialog.hive-dialog .hive-limits-role,\ndialog.hive-dialog .hive-dialog-title,\ndialog.hive-dialog .hive-card-subline,\ndialog.hive-dialog .hive-settings-role-name { min-width: 0; overflow-wrap: anywhere; }\ndialog.hive-dialog .hive-dialog-foot { flex-wrap: wrap; }\n\n\n/* The DSH design-token bridge is bundled in panel.css; this file is kept for package layout compatibility. */\n"
|
|
6469
|
+
var HIVE_PANEL_CSS = "/*\n * hive-panel-ui\n * Dark-first, host-themed through four variables:\n * --hive-bg, --hive-fg, --hive-line, --hive-accent\n * Defaults live on a zero-specificity :root rule and every rule keeps a fallback,\n * so a host can override the variables on :root, body, a wrapper, or .hive.\n */\n\n.hive,\n.hive *,\n.hive *::before,\n.hive *::after {\n box-sizing: border-box;\n}\n\n.hive {\n /* Derived helpers; the four required variables use inline fallbacks. */\n --hive-fg-soft: color-mix(in srgb, var(--hive-fg) 62%, transparent);\n --hive-fg-faint: color-mix(in srgb, var(--hive-fg) 40%, transparent);\n --hive-surface: color-mix(in srgb, var(--hive-fg) 4%, transparent);\n --hive-surface-strong: color-mix(in srgb, var(--hive-fg) 8%, transparent);\n --hive-surface-hover: color-mix(in srgb, var(--hive-fg) 11%, transparent);\n --hive-accent-soft: color-mix(in srgb, var(--hive-accent) 17%, transparent);\n --hive-mono: ui-monospace, \"SFMono-Regular\", \"JetBrains Mono\", Menlo, Consolas, monospace;\n\n display: flex;\n flex-direction: column;\n width: 100%;\n height: 100%;\n min-height: 480px;\n overflow: hidden;\n border: 1px solid var(--hive-line);\n border-radius: var(--hive-radius-lg);\n background: var(--hive-bg);\n color: var(--hive-fg);\n font: 14px/1.5 ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, \"Segoe UI\", sans-serif;\n color-scheme: light dark;\n}\n\n.hive ::selection {\n background: color-mix(in srgb, var(--hive-accent) 35%, transparent);\n}\n\n/* ------------------------------------------------------------------ top bar */\n\n.hive-bar {\n display: flex;\n flex: 0 0 auto;\n flex-wrap: wrap;\n align-items: center;\n gap: 8px 12px;\n padding: 9px 14px;\n border-bottom: 1px solid var(--hive-line);\n background: color-mix(in srgb, var(--hive-fg) 2%, transparent);\n}\n\n.hive-ident {\n display: flex;\n align-items: baseline;\n gap: 8px;\n min-width: 0;\n}\n\n.hive-brand {\n color: var(--hive-accent);\n font-size: 10px;\n font-weight: 750;\n letter-spacing: 0.18em;\n text-transform: uppercase;\n}\n\n.hive-repo {\n max-width: min(34vw, 360px);\n overflow: hidden;\n color: var(--hive-fg-soft);\n font-family: var(--hive-mono);\n font-size: 11.5px;\n text-overflow: ellipsis;\n white-space: nowrap;\n}\n\n.hive-time {\n color: var(--hive-fg-soft);\n font-family: var(--hive-mono);\n font-size: 11px;\n font-variant-numeric: tabular-nums;\n white-space: nowrap;\n}\n\n.hive-badge {\n padding: 2px 8px;\n border: 1px solid var(--hive-line);\n border-radius: 999px;\n font-size: 10px;\n font-weight: 650;\n letter-spacing: 0.09em;\n line-height: 1.5;\n text-transform: uppercase;\n white-space: nowrap;\n}\n\n.hive-badge.is-free {\n border-color: color-mix(in srgb, var(--hive-accent) 45%, transparent);\n background: var(--hive-accent-soft);\n color: var(--hive-accent);\n}\n\n.hive-badge.is-freeze {\n border-color: color-mix(in srgb, var(--hive-warn) 45%, transparent);\n background: color-mix(in srgb, var(--hive-warn) 14%, transparent);\n color: var(--hive-warn);\n}\n\n.hive-badge.is-custom {\n color: var(--hive-fg-soft);\n}\n\n.hive-stats {\n display: flex;\n flex-wrap: wrap;\n align-items: center;\n gap: 5px;\n min-width: 0;\n}\n\n.hive-stat {\n padding: 1px 7px;\n border: 1px solid transparent;\n border-radius: var(--hive-radius-sm);\n background: var(--hive-surface);\n color: var(--hive-fg-soft);\n font-size: 10.5px;\n font-variant-numeric: tabular-nums;\n line-height: 1.7;\n white-space: nowrap;\n}\n\n.hive-stat strong {\n color: var(--hive-fg);\n font-weight: 650;\n}\n\n.hive-stat.is-total {\n color: var(--hive-fg);\n}\n\n.hive-stat.is-warn {\n color: var(--hive-warn);\n background: color-mix(in srgb, var(--hive-warn) 10%, transparent);\n}\n\n.hive-status {\n color: var(--hive-danger);\n font-size: 10px;\n font-weight: 700;\n letter-spacing: 0.09em;\n text-transform: uppercase;\n white-space: nowrap;\n}\n\n.hive-status:empty {\n display: none;\n}\n\n.hive-status::before {\n content: \"● \";\n font-size: 9px;\n}\n\n.hive-status.is-error {\n color: var(--hive-danger);\n}\n\n.hive-status.is-info {\n color: var(--hive-info);\n}\n\n.hive-actions {\n display: flex;\n flex-wrap: wrap;\n gap: 6px;\n margin-left: auto;\n}\n\n/* ------------------------------------------------------------------ buttons */\n\n.hive-btn {\n appearance: none;\n padding: 4px 10px;\n border: 1px solid var(--hive-line);\n border-radius: var(--hive-radius-md);\n background: var(--hive-surface-strong);\n color: var(--hive-fg);\n font: inherit;\n font-size: 11.5px;\n font-weight: 550;\n line-height: 1.5;\n cursor: pointer;\n transition: border-color 120ms ease, background 120ms ease, color 120ms ease;\n}\n\n.hive-btn:hover {\n border-color: color-mix(in srgb, var(--hive-accent) 55%, var(--hive-line));\n background: var(--hive-accent-soft);\n}\n\n.hive-btn:active {\n transform: translateY(1px);\n}\n\n.hive-btn:focus-visible {\n outline: 2px solid var(--hive-accent);\n outline-offset: 1px;\n}\n\n.hive-btn-ghost {\n padding: 3px 8px;\n border-color: transparent;\n background: transparent;\n color: var(--hive-fg-soft);\n font-size: 11px;\n}\n\n/* ------------------------------------------------------------------- layout */\n\n.hive-main {\n display: grid;\n flex: 1 1 auto;\n grid-template-columns: minmax(185px, 230px) minmax(0, 1fr) minmax(215px, 300px);\n min-height: 0;\n}\n\n.hive-pane {\n display: flex;\n flex-direction: column;\n min-width: 0;\n min-height: 0;\n}\n\n.hive-agents {\n border-right: 1px solid var(--hive-line);\n background: color-mix(in srgb, var(--hive-fg) 1.5%, transparent);\n}\n\n.hive-events {\n border-left: 1px solid var(--hive-line);\n background: color-mix(in srgb, var(--hive-fg) 1.5%, transparent);\n}\n\n.hive-pane-head {\n display: flex;\n flex: 0 0 auto;\n align-items: center;\n gap: 7px;\n padding: 8px 12px;\n border-bottom: 1px solid var(--hive-line);\n color: var(--hive-fg-soft);\n font-size: 10px;\n font-weight: 650;\n letter-spacing: 0.12em;\n text-transform: uppercase;\n}\n\n.hive-hint {\n color: var(--hive-fg-faint);\n font-size: 9.5px;\n font-weight: 500;\n letter-spacing: 0.04em;\n text-transform: none;\n}\n\n.hive-count {\n min-width: 18px;\n margin-left: auto;\n padding: 0 6px;\n border-radius: 999px;\n background: var(--hive-surface);\n color: var(--hive-fg-soft);\n font-family: var(--hive-mono);\n font-size: 10px;\n font-variant-numeric: tabular-nums;\n line-height: 17px;\n text-align: center;\n}\n\n.hive-scroll {\n display: flex;\n flex: 1 1 auto;\n flex-direction: column;\n gap: 7px;\n min-height: 0;\n padding: 10px;\n overflow-x: hidden;\n overflow-y: auto;\n scrollbar-color: var(--hive-line) transparent;\n scrollbar-width: thin;\n}\n\n.hive-empty {\n padding: 14px 10px;\n color: var(--hive-fg-faint);\n font-size: 11px;\n text-align: center;\n}\n\n/* ------------------------------------------------------------------- agents */\n\n.hive-agent {\n padding: 8px 10px;\n border: 1px solid var(--hive-line);\n border-radius: var(--hive-radius-md);\n background: var(--hive-surface);\n}\n\n.hive-agent-head {\n display: flex;\n align-items: center;\n gap: 7px;\n font-weight: 600;\n}\n\n.hive-agent-name {\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n}\n\n.hive-dot {\n width: 7px;\n height: 7px;\n flex: 0 0 auto;\n border-radius: 50%;\n background: var(--hive-fg-faint);\n box-shadow: none;\n}\n\n.hive-dot.is-working {\n background: var(--hive-accent);\n box-shadow: none;\n}\n\n.hive-dot.is-idle {\n background: var(--hive-fg-faint);\n}\n\n.hive-dot.is-failed {\n background: var(--hive-danger);\n}\n\n.hive-dot.is-done {\n background: var(--hive-ok);\n}\n\n.hive-meta {\n margin-top: 3px;\n overflow: hidden;\n color: var(--hive-fg-soft);\n font-size: 10.5px;\n text-overflow: ellipsis;\n white-space: nowrap;\n}\n\n.hive-agent-files {\n color: var(--hive-fg-faint);\n font-family: var(--hive-mono);\n}\n\n/* -------------------------------------------------------------------- lanes */\n\n.hive-board { background: var(--hive-bg); }\n\n.hive-lanes {\n display: flex;\n flex: 1 1 auto;\n align-items: stretch;\n gap: 9px;\n min-height: 0;\n padding: 10px;\n overflow-x: auto;\n overflow-y: hidden;\n scrollbar-color: var(--hive-line) transparent;\n scrollbar-width: thin;\n}\n\n.hive-lane {\n display: flex;\n flex: 0 0 232px;\n flex-direction: column;\n min-height: 0;\n overflow: hidden;\n border: 1px solid var(--hive-line);\n border-radius: var(--hive-radius-md);\n background: color-mix(in srgb, var(--hive-fg) 2%, transparent);\n}\n\n.hive-lane-head {\n display: flex;\n flex: 0 0 auto;\n align-items: center;\n gap: 7px;\n padding: 8px 10px;\n border-bottom: 1px solid var(--hive-line);\n color: var(--hive-fg-soft);\n font-size: 10px;\n font-weight: 700;\n letter-spacing: 0.1em;\n text-transform: uppercase;\n}\n\n.hive-lane-head::before {\n width: 3px;\n height: 10px;\n border-radius: var(--hive-radius-sm);\n background: var(--hive-fg-faint);\n content: \"\";\n}\n\n.hive-lane-name {\n color: var(--hive-fg);\n}\n\n.hive-lane-pending .hive-lane-head::before {\n background: var(--hive-accent);\n}\n\n.hive-lane-claimed .hive-lane-head::before {\n background: var(--hive-info);\n}\n\n.hive-lane-done .hive-lane-head::before {\n background: var(--hive-ok);\n}\n\n.hive-lane-failed .hive-lane-head::before {\n background: var(--hive-danger);\n}\n\n.hive-lane-cards {\n display: flex;\n flex: 1 1 auto;\n flex-direction: column;\n gap: 7px;\n min-height: 0;\n padding: 7px;\n overflow-x: hidden;\n overflow-y: auto;\n scrollbar-color: var(--hive-line) transparent;\n scrollbar-width: thin;\n}\n\n.hive-card {\n padding: 8px 9px;\n border: 1px solid var(--hive-line);\n border-radius: var(--hive-radius-md);\n background: var(--hive-surface);\n cursor: pointer;\n transition: border-color 120ms ease, background 120ms ease;\n}\n\n.hive-card:hover {\n border-color: color-mix(in srgb, var(--hive-accent) 55%, var(--hive-line));\n background: var(--hive-surface-hover);\n}\n\n.hive-card:focus-visible {\n outline: 2px solid var(--hive-accent);\n outline-offset: 1px;\n}\n\n.hive-card-title {\n overflow-wrap: anywhere;\n font-size: 12.5px;\n font-weight: 600;\n line-height: 1.35;\n}\n\n.hive-card-meta {\n margin-top: 4px;\n color: var(--hive-fg-soft);\n font-size: 10.5px;\n}\n\n.hive-scopes {\n display: flex;\n flex-wrap: wrap;\n gap: 3px;\n margin-top: 6px;\n}\n\n.hive-scope {\n max-width: 100%;\n overflow: hidden;\n padding: 1px 5px;\n border: 1px solid var(--hive-line);\n border-radius: var(--hive-radius-sm);\n background: var(--hive-surface-strong);\n color: var(--hive-fg-soft);\n font-family: var(--hive-mono);\n font-size: 9.5px;\n text-overflow: ellipsis;\n white-space: nowrap;\n}\n\n.hive-reason {\n margin-top: 6px;\n padding: 3px 6px;\n overflow-wrap: anywhere;\n border-left: 1px solid var(--hive-danger);\n border-radius: 0 var(--hive-radius-sm) var(--hive-radius-sm) 0;\n background: color-mix(in srgb, var(--hive-danger) 10%, transparent);\n color: color-mix(in srgb, var(--hive-danger) 82%, var(--hive-fg));\n font-size: 10.5px;\n}\n\n.hive-card-foot {\n display: flex;\n justify-content: space-between;\n gap: 6px;\n margin-top: 7px;\n color: var(--hive-fg-faint);\n font-family: var(--hive-mono);\n font-size: 9.5px;\n}\n\n.hive-card-id,\n.hive-card-state {\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n}\n\n.hive-card-state {\n text-transform: uppercase;\n}\n\n/* ------------------------------------------------------------------- events */\n\n.hive-event {\n display: grid;\n grid-template-columns: auto minmax(0, 1fr);\n gap: 2px 7px;\n padding: 6px 7px;\n border: 1px solid transparent;\n border-radius: var(--hive-radius-sm);\n background: var(--hive-surface);\n font-size: 10.5px;\n}\n\n.hive-event-time {\n color: var(--hive-fg-faint);\n font-family: var(--hive-mono);\n font-variant-numeric: tabular-nums;\n white-space: nowrap;\n}\n\n.hive-event-kind {\n justify-self: start;\n overflow: hidden;\n color: var(--hive-accent);\n font-weight: 600;\n text-overflow: ellipsis;\n white-space: nowrap;\n}\n\n.hive-event-text {\n grid-column: 1 / -1;\n overflow-wrap: anywhere;\n color: var(--hive-fg-soft);\n font-family: var(--hive-mono);\n font-size: 10px;\n}\n\n/* ------------------------------------------------------------------- drawer */\n\n.hive-drawer {\n position: fixed;\n z-index: 2147483000;\n top: 0;\n right: 0;\n bottom: 0;\n display: flex;\n flex-direction: column;\n width: min(440px, 92vw);\n border-left: 1px solid var(--hive-line);\n background: color-mix(in srgb, var(--hive-bg) 97%, var(--hive-fg) 3%);\n color: var(--hive-fg);\n box-shadow: none;\n font: 14px/1.5 ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, \"Segoe UI\", sans-serif;\n color-scheme: light dark;\n animation: hive-drawer-in 150ms ease-out;\n}\n\n.hive-drawer-head {\n display: flex;\n align-items: flex-start;\n gap: 10px;\n padding: 14px;\n border-bottom: 1px solid var(--hive-line);\n}\n\n.hive-drawer-titlebox {\n min-width: 0;\n}\n\n.hive-drawer-eyebrow {\n overflow: hidden;\n color: var(--hive-fg-faint);\n font-family: var(--hive-mono);\n font-size: 9.5px;\n letter-spacing: 0.05em;\n text-overflow: ellipsis;\n text-transform: uppercase;\n white-space: nowrap;\n}\n\n.hive-drawer-title {\n margin: 3px 0 0;\n overflow-wrap: anywhere;\n color: var(--hive-fg);\n font-size: 15px;\n font-weight: 650;\n line-height: 1.35;\n}\n\n.hive-drawer-head .hive-btn-ghost {\n flex: 0 0 auto;\n margin-left: auto;\n}\n\n.hive-drawer-body {\n display: flex;\n flex: 1 1 auto;\n flex-direction: column;\n gap: 10px;\n min-height: 0;\n padding: 14px;\n overflow-y: auto;\n scrollbar-color: var(--hive-line) transparent;\n scrollbar-width: thin;\n}\n\n.hive-actions-row {\n display: flex;\n flex-wrap: wrap;\n gap: 6px;\n}\n\n.hive-note {\n color: var(--hive-fg-faint);\n font-size: 11px;\n}\n\n.hive-section-label {\n margin-top: 2px;\n color: var(--hive-fg-faint);\n font-size: 9.5px;\n font-weight: 650;\n letter-spacing: 0.1em;\n text-transform: uppercase;\n}\n\n.hive-json {\n max-height: 55vh;\n margin: 0;\n padding: 10px;\n overflow: auto;\n border: 1px solid var(--hive-line);\n border-radius: var(--hive-radius-md);\n background: color-mix(in srgb, var(--hive-fg) 3%, transparent);\n color: var(--hive-fg-soft);\n font-family: var(--hive-mono);\n font-size: 10.5px;\n line-height: 1.55;\n overflow-wrap: anywhere;\n scrollbar-color: var(--hive-line) transparent;\n scrollbar-width: thin;\n white-space: pre-wrap;\n}\n\n@keyframes hive-drawer-in {\n from {\n opacity: 0;\n transform: translateX(18px);\n }\n to {\n opacity: 1;\n transform: translateX(0);\n }\n}\n\n@media (prefers-reduced-motion: reduce) {\n .hive-card,\n .hive-btn {\n transition: none;\n }\n\n .hive-drawer {\n animation: none;\n }\n}\n\n/* ------------------------------------------------------------------ compact */\n\n@media (max-width: 920px) {\n .hive {\n min-height: 100dvh;\n height: 100dvh;\n border-radius: 0;\n }\n\n .hive-main {\n grid-template-columns: minmax(0, 1fr);\n grid-template-rows: minmax(110px, 17vh) minmax(280px, 1fr) minmax(120px, 20vh);\n }\n\n .hive-agents {\n border-right: 0;\n border-bottom: 1px solid var(--hive-line);\n }\n\n .hive-events {\n border-top: 1px solid var(--hive-line);\n border-left: 0;\n }\n\n .hive-agent-list {\n flex-direction: row;\n overflow-x: auto;\n overflow-y: hidden;\n }\n\n .hive-agent {\n flex: 0 0 190px;\n }\n\n .hive-drawer {\n width: 100vw;\n }\n}\n/* DSH design-token bridge. Neutral grayscale fallbacks keep standalone pages readable. */\n.hive, .hive-portal, .hive-dialog {\n --hive-bg: var(--dsw-alias-bg-base, #fff);\n --hive-bg-layer-1: var(--dsw-alias-bg-layer-1, #fff);\n --hive-bg-layer-2: var(--dsw-alias-bg-layer-2, #fff);\n --hive-bg-layer-3: var(--dsw-alias-bg-layer-3, #f5f5f5);\n --hive-line: var(--dsw-alias-border-l1, #d9d9d9);\n --hive-line-2: var(--dsw-alias-border-l2, #e8e8e8);\n --hive-fg: var(--dsw-alias-label-primary, #000);\n --hive-fg-soft: var(--dsw-alias-label-secondary, #4d4d4d);\n --hive-fg-faint: var(--dsw-alias-label-tertiary, #808080);\n --hive-accent: var(--dsw-alias-brand-primary, #000);\n --hive-hover: var(--dsw-alias-interactive-bg-hover, #f2f2f2);\n --hive-selected: var(--dsw-alias-border-selected, #000);\n --hive-danger: var(--dsw-alias-state-error-primary, #000);\n --hive-ok: var(--dsw-alias-state-success-primary, #000);\n --hive-warn: var(--dsw-alias-state-warn-primary, #000);\n --hive-info: var(--dsw-alias-brand-primary, #000);\n --hive-radius-sm: var(--dsw-radius-sm, 4px);\n --hive-radius-md: var(--dsw-radius-md, 8px);\n --hive-radius-lg: var(--dsw-radius-lg, 12px);\n --hive-elevation: var(--dsw-elevation-panel, 0 12px 32px rgba(0, 0, 0, 0.18));\n --hive-surface: var(--hive-bg-layer-1);\n --hive-surface-strong: var(--hive-bg-layer-2);\n --hive-surface-hover: var(--hive-hover);\n --hive-accent-soft: color-mix(in srgb, var(--hive-accent) 14%, transparent);\n --hive-label-on-brand: var(--hive-bg);\n --hive-mono: ui-monospace, \"SFMono-Regular\", \"JetBrains Mono\", Menlo, Consolas, monospace;\n}\n\n/* Tokenized component treatment. */\n.hive { background: var(--hive-bg); color: var(--hive-fg); border-color: var(--hive-line); border-radius: var(--hive-radius-lg); }\n.hive-bar { background: var(--hive-bg-layer-1); border-bottom-color: var(--hive-line); gap: 8px; }\n.hive-main,\n.hive-board { background: var(--hive-bg); }\n.hive-agents,\n.hive-events { background: var(--hive-bg-layer-1); border-color: var(--hive-line); }\n.hive-lane { background: var(--hive-bg-layer-1); border-color: var(--hive-line); border-radius: var(--hive-radius-md); }\n.hive-card { background: var(--hive-bg-layer-1); border: 1px solid var(--hive-line); border-radius: var(--hive-radius-md); box-shadow: none; }\n.hive-card:hover { background: var(--hive-hover); border-color: var(--hive-line); }\n.hive-btn { background: transparent; border: 1px solid var(--hive-line); color: var(--hive-fg); border-radius: var(--hive-radius-md); }\n.hive-btn:hover { background: var(--hive-hover); border-color: var(--hive-line); color: var(--hive-fg); }\n.hive-btn-ghost { background: transparent; border-color: transparent; color: var(--hive-fg-soft); }\n.hive-btn-ghost:hover { background: var(--hive-hover); border-color: transparent; color: var(--hive-fg); }\n.hive-btn-danger { background: transparent; border-color: var(--hive-danger); color: var(--hive-danger); }\n.hive-btn-danger:hover:not(:disabled) { background: var(--hive-hover); border-color: var(--hive-danger); color: var(--hive-danger); }\n.hive-settings-primary,\n.hive-add-submit { background: var(--hive-accent); border-color: var(--hive-accent); color: var(--hive-label-on-brand); }\n.hive-settings-primary:hover:not(:disabled),\n.hive-add-submit:hover:not(:disabled) { background: var(--hive-accent); border-color: var(--hive-accent); color: var(--hive-label-on-brand); }\n.hive-settings-secondary { background: transparent; border-color: var(--hive-line); color: var(--hive-fg); }\n.hive-settings-secondary:hover { background: var(--hive-hover); border-color: var(--hive-line); color: var(--hive-fg); }\n.hive-input,\n.hive-textarea,\n.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); }\n.hive-input:focus,\n.hive-textarea:focus,\n.hive-limits-input:focus { outline: 1px solid var(--hive-selected); outline-offset: 0; }\n.hive-dialog,\n.hive-add-dialog,\n.hive-settings-dialog,\n.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); }\n.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); }\n.hive-drawer { background: var(--hive-bg-layer-2); border-left: 1px solid var(--hive-line); box-shadow: none; }\n.hive-json,\n.hive-plan-raw,\n.hive-plan-item,\n.hive-scope,\n.hive-init-card,\n.hive-limits-error,\n.hive-settings-note { background: var(--hive-bg-layer-1); border-color: var(--hive-line); border-radius: var(--hive-radius-sm); }\n.hive-limits-row { border-top-color: var(--hive-line-2); }\n.hive-limits-row:not(.is-head):hover { background: var(--hive-hover); }\n.hive-settings-tab[aria-selected=\"true\"] { border-bottom-color: var(--hive-selected); }\n.hive-lane-head,\n.hive-dialog-head,\n.hive-dialog-foot,\n.hive-drawer-head,\n.hive-settings-tabs { border-color: var(--hive-line-2); }\n.hive-freeze-banner { background: transparent; border-bottom-color: var(--hive-warn); color: var(--hive-warn); }\n.hive-freeze-banner .hive-btn { background: transparent; border-color: var(--hive-line); color: var(--hive-fg); }\n.hive-queen-hint { background: var(--hive-bg-layer-1); border-color: var(--hive-line); }\n.hive-supervisor-inline,\n.hive-stat,\n.hive-status,\n.hive-queen-badge {\n display: inline-flex;\n align-items: center;\n gap: 6px;\n height: 22px;\n padding: 0 8px;\n border: 1px solid var(--hive-line);\n border-radius: 999px;\n background: transparent;\n color: var(--hive-fg-soft);\n font-size: 12px;\n font-weight: 400;\n line-height: 1;\n white-space: nowrap;\n}\n.hive-supervisor-inline { gap: 6px; }\n.hive-supervisor-inline-label { color: var(--hive-fg-soft); font-weight: 400; }\n.hive-supervisor-inline-state { display: inline-flex; align-items: center; gap: 6px; color: var(--hive-fg-soft); font-size: 12px; font-weight: 400; }\n.hive-supervisor-inline-state::before { width: 6px; height: 6px; flex: 0 0 6px; border-radius: 50%; background: var(--hive-fg-faint); content: \"\"; }\n.hive-supervisor-inline-state.is-running::before { background: var(--hive-accent); }\n.hive-supervisor-inline-state.is-backoff::before { background: var(--hive-warn); }\n.hive-supervisor-inline-state.is-paused::before { background: var(--hive-fg-faint); }\n.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; }\n.hive-supervisor-inline-resume:hover { background: transparent; color: var(--hive-fg); }\n.hive-stats { flex-wrap: wrap; gap: 8px; }\n.hive-stat.is-warn { color: var(--hive-fg-soft); background: transparent; }\n.hive-stat strong { color: var(--hive-fg-soft); font-weight: 400; }\n.hive-status { color: var(--hive-fg-soft); }\n.hive-status::before { width: 6px; height: 6px; flex: 0 0 6px; border-radius: 50%; background: var(--hive-danger); content: \"\"; font-size: 0; }\n.hive-status.is-info::before { background: var(--hive-accent); }\n.hive-queen-badge { color: var(--hive-fg-soft); }\n\n\n.hive-portal {\n position: fixed;\n inset: 0;\n z-index: 2147483600;\n pointer-events: none;\n}\n\n.hive-portal > .hive-overlay { pointer-events: auto; }\n\n/* Buttons: two explicit tiers. */\n.hive-btn {\n display: inline-flex;\n align-items: center;\n justify-content: center;\n gap: 6px;\n height: 28px;\n padding: 0 12px;\n border: 1px solid var(--hive-line-2);\n border-radius: var(--hive-radius-md);\n background: transparent;\n color: var(--hive-fg);\n font-size: 14px;\n font-weight: 600;\n line-height: 1.5;\n}\n\n.hive-btn:hover {\n border-color: var(--hive-line-2);\n background: var(--hive-hover);\n color: var(--hive-fg);\n}\n\n.hive-btn-ghost {\n border-color: transparent;\n background: transparent;\n color: var(--hive-fg-soft);\n}\n\n.hive-btn-ghost:hover {\n border-color: transparent;\n background: var(--hive-hover);\n color: var(--hive-fg);\n}\n\n.hive-btn-danger {\n border-color: var(--hive-danger);\n background: transparent;\n color: var(--hive-danger);\n}\n\n.hive-btn-danger:hover:not(:disabled) {\n border-color: var(--hive-danger);\n background: var(--hive-hover);\n color: var(--hive-danger);\n}\n\n.hive-settings-primary,\n.hive-add-submit {\n border-color: var(--hive-accent);\n background: var(--hive-accent);\n color: var(--hive-label-on-brand);\n font-weight: 600;\n}\n\n.hive-settings-primary:hover:not(:disabled),\n.hive-add-submit:hover:not(:disabled) {\n border-color: var(--hive-accent);\n background: color-mix(in srgb, var(--hive-accent) 92%, #000);\n color: var(--hive-label-on-brand);\n}\n\n.hive-settings-primary:active:not(:disabled),\n.hive-add-submit:active:not(:disabled) {\n border-color: var(--hive-accent);\n background: color-mix(in srgb, var(--hive-accent) 84%, #000);\n color: var(--hive-label-on-brand);\n}\n\n.hive-settings-primary:focus-visible,\n.hive-add-submit:focus-visible {\n outline: 2px solid var(--hive-accent);\n outline-offset: 2px;\n}\n\n.hive-settings-secondary {\n border-color: var(--hive-line-2);\n background: transparent;\n color: var(--hive-fg);\n}\n\n.hive-settings-secondary:hover {\n border-color: var(--hive-line-2);\n background: var(--hive-hover);\n color: var(--hive-fg);\n}\n\n.hive-icon-button,\n.hive-dialog-close {\n height: 28px;\n padding: 0;\n border: 0;\n background: transparent;\n color: var(--hive-fg-soft);\n}\n\n.hive-icon-button:hover,\n.hive-dialog-close:hover {\n border: 0;\n background: var(--hive-hover);\n color: var(--hive-fg);\n}\n\n.hive-role-remove {\n height: 28px;\n min-height: 28px;\n padding: 0;\n border-color: transparent;\n background: transparent;\n color: var(--hive-danger);\n}\n\n/* Dialogs are portaled to the document body; keep them above the panel. */\n.hive-dialog,\n.hive-add-dialog,\n.hive-settings-dialog,\n.hive-card-dialog {\n border: 1px solid var(--hive-line);\n background: var(--hive-bg-layer-2);\n box-shadow: var(--dsw-elevation-panel, 0 12px 32px rgba(0, 0, 0, 0.18));\n}\n\n/* toolbar action rhythm */\n.hive-actions { gap: 8px; }\n.hive-actions > .hive-btn { display: inline-flex; align-items: center; gap: 6px; flex: 0 0 auto; }\n\n/* Dialog form containment: portal content must not create horizontal scroll. */\n.hive-portal,\n.hive-portal *,\n.hive-portal *::before,\n.hive-portal *::after { box-sizing: border-box; }\n\n.hive-portal .hive-dialog { max-width: 92vw; overflow-x: hidden; }\n.hive-portal .hive-dialog-head,\n.hive-portal .hive-dialog-body,\n.hive-portal .hive-dialog-foot { padding-left: 16px; padding-right: 16px; }\n.hive-portal .hive-dialog-body { width: auto; min-width: 0; max-width: 100%; }\n.hive-portal .hive-dialog-body > * { margin-left: 0; margin-right: 0; max-width: 100%; min-width: 0; }\n.hive-portal .hive-field,\n.hive-portal .hive-field-row,\n.hive-portal .hive-settings-section,\n.hive-portal .hive-settings-tabpanel,\n.hive-portal .hive-limits-table { width: 100%; max-width: 100%; min-width: 0; margin-left: 0; margin-right: 0; }\n.hive-portal .hive-field-row > .hive-field { width: auto; flex: 1 1 160px; }\n.hive-portal .hive-input,\n.hive-portal .hive-textarea,\n.hive-portal select { width: 100%; min-width: 0; max-width: 100%; }\n.hive-portal .hive-limits-row {\n width: 100%;\n max-width: 100%;\n min-width: 0;\n grid-template-columns: minmax(0, 1fr) 96px 48px 48px 28px;\n}\n.hive-portal .hive-limits-cell,\n.hive-portal .hive-limits-role,\n.hive-portal .hive-dialog-title,\n.hive-portal .hive-card-subline,\n.hive-portal .hive-settings-role-name { min-width: 0; overflow-wrap: anywhere; }\n.hive-portal .hive-dialog-foot { flex-wrap: wrap; }\n\n.hive-portal .hive-dialog-body { overflow-x: hidden; }\n.hive-portal .hive-settings-tabs { flex-wrap: wrap; }\n.hive-portal .hive-card-actions,\n.hive-portal .hive-settings-form-actions { max-width: 100%; }\n\n/* Native <dialog>: top layer, browser-managed backdrop and focus trap. */\n.hive-dialog,\n.hive-dialog *,\n.hive-dialog *::before,\n.hive-dialog *::after { box-sizing: border-box; }\n\ndialog.hive-dialog {\n position: fixed;\n inset: 0;\n margin: auto;\n padding: 0;\n width: min(560px, 100%);\n max-width: 92vw;\n max-height: 80vh;\n overflow: hidden;\n border: 1px solid var(--hive-line);\n border-radius: var(--hive-radius-lg);\n background: var(--hive-bg-layer-2);\n color: var(--hive-fg);\n box-shadow: var(--dsw-elevation-panel, 0 12px 32px rgba(0, 0, 0, 0.18));\n color-scheme: light dark;\n}\n\ndialog.hive-card-dialog { width: min(720px, 92vw); }\n\ndialog.hive-dialog::backdrop {\n background: var(--dsw-alias-bg-mask-1, rgba(0, 0, 0, 0.24));\n backdrop-filter: var(--dsw-mask-blur, none);\n}\n\ndialog.hive-dialog .hive-dialog-head,\ndialog.hive-dialog .hive-dialog-body,\ndialog.hive-dialog .hive-dialog-foot { padding-left: 16px; padding-right: 16px; }\ndialog.hive-dialog .hive-dialog-body { width: auto; min-width: 0; max-width: 100%; overflow-x: hidden; }\ndialog.hive-dialog .hive-dialog-body > * { margin-left: 0; margin-right: 0; max-width: 100%; min-width: 0; }\ndialog.hive-dialog .hive-field,\ndialog.hive-dialog .hive-field-row,\ndialog.hive-dialog .hive-settings-section,\ndialog.hive-dialog .hive-settings-tabpanel,\ndialog.hive-dialog .hive-limits-table { width: 100%; max-width: 100%; min-width: 0; margin-left: 0; margin-right: 0; }\ndialog.hive-dialog .hive-field-row > .hive-field { width: auto; flex: 1 1 160px; }\ndialog.hive-dialog .hive-input,\ndialog.hive-dialog .hive-textarea,\ndialog.hive-dialog select { width: 100%; min-width: 0; max-width: 100%; }\ndialog.hive-dialog .hive-limits-row {\n width: 100%;\n max-width: 100%;\n min-width: 0;\n grid-template-columns: minmax(0, 1fr) 96px 48px 48px 28px;\n}\ndialog.hive-dialog .hive-limits-cell,\ndialog.hive-dialog .hive-limits-role,\ndialog.hive-dialog .hive-dialog-title,\ndialog.hive-dialog .hive-card-subline,\ndialog.hive-dialog .hive-settings-role-name { min-width: 0; overflow-wrap: anywhere; }\ndialog.hive-dialog .hive-dialog-foot { flex-wrap: wrap; }\n\ndialog.hive-dialog {\n display: flex;\n flex-direction: column;\n max-height: 80vh;\n}\ndialog.hive-dialog .hive-dialog-head,\ndialog.hive-dialog .hive-dialog-foot { flex: 0 0 auto; }\ndialog.hive-dialog .hive-dialog-body { flex: 1 1 auto; min-height: 0; overflow: auto; }\n.hive-card-run-output { max-height: 20lh; overflow: auto; }\n.hive-card-actions { flex-wrap: wrap; justify-content: flex-end; }\n\n/* Virtual lanes: fixed 26px cards, 2px gaps, 28px stride. */\n.hive-lane-cards {\n display: block;\n flex: 1 1 auto;\n min-height: 0;\n padding: 7px;\n overflow-x: hidden;\n overflow-y: auto;\n}\n.hive-lane-virtual { position: relative; width: 100%; min-width: 0; }\n.hive-lane-virtual .hive-card {\n position: absolute;\n left: 0;\n right: 0;\n display: flex;\n align-items: center;\n height: 26px;\n min-height: 26px;\n padding: 2px 8px;\n overflow: hidden;\n border-radius: var(--hive-radius-sm);\n}\n.hive-lane-virtual .hive-card-title {\n width: 100%;\n overflow: hidden;\n font-size: 12px;\n line-height: 16px;\n text-overflow: ellipsis;\n white-space: nowrap;\n}\n\n.hive-agent-count { font: inherit; cursor: pointer; }\n.hive-agent-count:disabled { cursor: default; }\n\n\n/* The DSH design-token bridge is bundled in panel.css; this file is kept for package layout compatibility. */\n"
|
|
6251
6470
|
function ensureHivePanelCss() {
|
|
6252
6471
|
if (typeof document === 'undefined') return
|
|
6253
6472
|
if (document.querySelector('style[data-hive-panel-css]') !== null) return
|