dsh-hive-panel 1.0.14 → 1.0.16
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 +32 -0
- package/lib/client.js +356 -23
- package/package.json +1 -1
- package/src/panel.css +36 -0
- package/src/panel.js +355 -22
package/CHANGELOG.md
CHANGED
|
@@ -4,6 +4,34 @@ All notable changes to this project are documented in this file. The format is
|
|
|
4
4
|
based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/) and this project
|
|
5
5
|
adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
|
|
6
6
|
|
|
7
|
+
## [1.0.16] - 2026-12-05
|
|
8
|
+
|
|
9
|
+
### Changed
|
|
10
|
+
|
|
11
|
+
- Renderer and stylesheet re-synced from hive-panel 1.0.10: the detail subtitle drops the
|
|
12
|
+
repository path, the work-scope block reads "the directories/files this task changes"
|
|
13
|
+
and is collapsible, the first paint shows a loading skeleton with disabled actions, and
|
|
14
|
+
the last-run output renders as markdown. Browser bundle rebuilt.
|
|
15
|
+
|
|
16
|
+
### Tests
|
|
17
|
+
|
|
18
|
+
- 48 checks pass, including the synced skeleton, scope block and markdown last-run.
|
|
19
|
+
|
|
20
|
+
## [1.0.15] - 2026-12-05
|
|
21
|
+
|
|
22
|
+
### Reverted
|
|
23
|
+
|
|
24
|
+
- Renderer re-synced from hive-panel 1.0.9: the 1.0.14 task-row prefix stripping is
|
|
25
|
+
reverted, so task titles render exactly as stored again. Browser bundle rebuilt.
|
|
26
|
+
|
|
27
|
+
### Tests
|
|
28
|
+
|
|
29
|
+
- 48 checks pass.
|
|
30
|
+
|
|
31
|
+
### Published
|
|
32
|
+
|
|
33
|
+
- npm: `dsh-hive-panel@1.0.15` on 2026-12-05.
|
|
34
|
+
|
|
7
35
|
## [1.0.14] - 2026-12-05
|
|
8
36
|
|
|
9
37
|
### Fixed
|
|
@@ -15,6 +43,10 @@ adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
|
|
|
15
43
|
|
|
16
44
|
- 48 checks pass, including the synced prefix stripping and the full-title detail.
|
|
17
45
|
|
|
46
|
+
### Published
|
|
47
|
+
|
|
48
|
+
- npm: `dsh-hive-panel@1.0.14` on 2026-12-05.
|
|
49
|
+
|
|
18
50
|
## [1.0.13] - 2026-12-05
|
|
19
51
|
|
|
20
52
|
### Fixed
|
package/lib/client.js
CHANGED
|
@@ -2110,6 +2110,39 @@ dialog.hive-dialog .hive-dialog-body { flex: 1 1 auto; min-height: 0; overflow:
|
|
|
2110
2110
|
.hive-supervisor-inline-state.is-normal::before { background: var(--hive-ok); }
|
|
2111
2111
|
.hive-supervisor-inline-state.is-paused::before { background: var(--hive-warn); }
|
|
2112
2112
|
.hive-supervisor-inline-state.is-unresponsive::before { background: var(--hive-fg-faint); }
|
|
2113
|
+
/* Lightweight markdown in the last-run output. */
|
|
2114
|
+
.hive-markdown { color: var(--hive-fg-soft); font-size: 12px; line-height: 1.6; overflow-wrap: anywhere; }
|
|
2115
|
+
.hive-markdown p { margin: 0 0 8px; white-space: pre-wrap; }
|
|
2116
|
+
.hive-markdown p:last-child { margin-bottom: 0; }
|
|
2117
|
+
.hive-markdown .hive-md-heading { margin: 8px 0 6px; color: var(--hive-fg); font-size: 14px; font-weight: 700; line-height: 1.4; }
|
|
2118
|
+
.hive-markdown h1.hive-md-heading { font-size: 16px; }
|
|
2119
|
+
.hive-markdown h2.hive-md-heading { font-size: 15px; }
|
|
2120
|
+
.hive-markdown .hive-md-list { margin: 0 0 8px; padding-left: 20px; }
|
|
2121
|
+
.hive-markdown .hive-md-list li { margin: 2px 0; }
|
|
2122
|
+
.hive-markdown .hive-md-code-inline { padding: 1px 4px; border: 1px solid var(--hive-line-2); border-radius: var(--hive-radius-sm); background: var(--hive-bg-layer-1); color: var(--hive-fg); font-family: var(--hive-mono); font-size: 11px; }
|
|
2123
|
+
.hive-markdown .hive-md-code-block { max-width: 100%; margin: 8px 0; padding: 10px; overflow-x: auto; border: 1px solid var(--hive-line); border-radius: var(--hive-radius-md); background: var(--hive-bg-layer-1); color: var(--hive-fg); font-family: var(--hive-mono); font-size: 11px; line-height: 1.55; white-space: pre; scrollbar-color: var(--hive-line) transparent; scrollbar-width: thin; }
|
|
2124
|
+
.hive-markdown .hive-md-code-block code { padding: 0; border: 0; background: transparent; color: inherit; font: inherit; white-space: pre; }
|
|
2125
|
+
.hive-markdown .hive-md-quote { margin: 8px 0; padding: 2px 0 2px 10px; border-left: 2px solid var(--hive-line); color: var(--hive-fg-soft); }
|
|
2126
|
+
.hive-markdown .hive-md-link { color: var(--hive-accent); text-decoration: underline; text-underline-offset: 2px; }
|
|
2127
|
+
.hive-markdown .hive-markdown-empty { color: var(--hive-fg-faint); font-size: 12px; }
|
|
2128
|
+
/* Initial loading skeleton and progress. */
|
|
2129
|
+
.hive-skeleton { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; flex: 1 1 auto; padding: 8px; min-height: 200px; }
|
|
2130
|
+
.hive-skeleton.is-hidden { display: none; }
|
|
2131
|
+
.hive-skeleton-lane { display: flex; flex-direction: column; gap: 6px; min-width: 0; padding: 8px; border: 1px solid var(--hive-line-2); border-radius: var(--hive-radius-md); background: var(--hive-bg-layer-1); }
|
|
2132
|
+
.hive-skeleton-head { color: var(--hive-fg-faint); font-size: 11px; font-weight: 600; line-height: 1.5; }
|
|
2133
|
+
.hive-skeleton-row { height: 26px; border-radius: var(--hive-radius-sm); background: var(--hive-line-2); opacity: 0.65; }
|
|
2134
|
+
.hive-skeleton-pill { width: 44px; height: 22px; border-radius: var(--hive-radius-sm); background: var(--hive-line-2); opacity: 0.65; }
|
|
2135
|
+
.hive-loading { display: flex; align-items: center; justify-content: center; gap: 8px; flex-wrap: wrap; padding: 10px 8px; color: var(--hive-fg-soft); font-size: 12px; line-height: 1.5; }
|
|
2136
|
+
.hive-loading.is-hidden { display: none; }
|
|
2137
|
+
.hive-loading-badge { padding: 2px 7px; border: 1px solid var(--hive-line-2); border-radius: var(--hive-radius-sm); color: var(--hive-fg-soft); font-size: 11px; line-height: 1.4; }
|
|
2138
|
+
.hive-loading-badge.is-hidden { display: none; }
|
|
2139
|
+
/* Card scope block in the task dialog. */
|
|
2140
|
+
.hive-scope-block { display: flex; flex-direction: column; gap: 4px; margin-bottom: 10px; }
|
|
2141
|
+
.hive-scope-title { color: var(--hive-fg); font-size: 12px; font-weight: 700; line-height: 1.5; }
|
|
2142
|
+
.hive-scope-hint { color: var(--hive-fg-faint); font-size: 11px; line-height: 1.5; }
|
|
2143
|
+
.hive-scope-list { display: flex; flex-wrap: wrap; gap: 4px; min-width: 0; }
|
|
2144
|
+
.hive-scope-path { max-width: 100%; padding: 2px 6px; border: 1px solid var(--hive-line-2); border-radius: var(--hive-radius-sm); background: var(--hive-bg-layer-1); color: var(--hive-fg-soft); font-family: var(--hive-mono); font-size: 10.5px; line-height: 1.5; white-space: pre-wrap; overflow-wrap: anywhere; }
|
|
2145
|
+
.hive-scope-more { padding: 2px 6px; font-size: 10.5px; }
|
|
2113
2146
|
`;
|
|
2114
2147
|
|
|
2115
2148
|
const LANE_LABEL_KEYS = Object.freeze({
|
|
@@ -2167,6 +2200,13 @@ const messages = Object.freeze({
|
|
|
2167
2200
|
"stats.byRoleTitle": "by role: ",
|
|
2168
2201
|
"status.actionFailed": "action failed",
|
|
2169
2202
|
"status.disconnected": "disconnected",
|
|
2203
|
+
"loading.updating": "Updating",
|
|
2204
|
+
"loading.label": "Loading",
|
|
2205
|
+
"loading.slow": "Loading · waited {seconds}s",
|
|
2206
|
+
"loading.failed": "Could not load",
|
|
2207
|
+
"loading.retry": "Retry",
|
|
2208
|
+
"loading.retryAria": "Retry loading the board",
|
|
2209
|
+
"loading.aria": "Loading the board",
|
|
2170
2210
|
"agents.openAria": "Open agent",
|
|
2171
2211
|
"agents.runningTooltip": "Running {running} / board identities {identities}",
|
|
2172
2212
|
"agents.fallbackTooltip": "Board identities {identities} (supervisor disconnected or repository not registered)",
|
|
@@ -2196,6 +2236,10 @@ const messages = Object.freeze({
|
|
|
2196
2236
|
"drawer.removeClaimed": "A claimed task must be released or reopened before it can be deleted.",
|
|
2197
2237
|
"drawer.rawJson": "raw json",
|
|
2198
2238
|
"drawer.lastRun": "Last run",
|
|
2239
|
+
"drawer.noOutput": "(no output)",
|
|
2240
|
+
"drawer.scopeTitle": "Work scope",
|
|
2241
|
+
"drawer.scopeHint": "Directories/files this task changes.",
|
|
2242
|
+
"drawer.scopeMore": "+{count} items",
|
|
2199
2243
|
"drawer.runOverlaps": "Also writing",
|
|
2200
2244
|
"drawer.runLessons": "Read {count} lessons",
|
|
2201
2245
|
"drawer.runNoLessons": "No lessons to read",
|
|
@@ -2431,6 +2475,13 @@ const messages = Object.freeze({
|
|
|
2431
2475
|
"stats.byRoleTitle": "按角色:",
|
|
2432
2476
|
"status.actionFailed": "操作失败",
|
|
2433
2477
|
"status.disconnected": "连接断开",
|
|
2478
|
+
"loading.updating": "更新中",
|
|
2479
|
+
"loading.label": "加载中",
|
|
2480
|
+
"loading.slow": "正在读取 · 已等 {seconds}s",
|
|
2481
|
+
"loading.failed": "读取失败",
|
|
2482
|
+
"loading.retry": "重试",
|
|
2483
|
+
"loading.retryAria": "重试读取看板",
|
|
2484
|
+
"loading.aria": "正在读取看板",
|
|
2434
2485
|
"agents.openAria": "打开智能体",
|
|
2435
2486
|
"agents.runningTooltip": "运行中 {running} / 公告板身份 {identities}",
|
|
2436
2487
|
"agents.fallbackTooltip": "公告板身份 {identities}(监督器未连接或未注册该仓库)",
|
|
@@ -2460,6 +2511,10 @@ const messages = Object.freeze({
|
|
|
2460
2511
|
"drawer.removeClaimed": "已认领的任务必须先释放或重开才能删除。",
|
|
2461
2512
|
"drawer.rawJson": "原始 JSON",
|
|
2462
2513
|
"drawer.lastRun": "最近一次执行",
|
|
2514
|
+
"drawer.noOutput": "(无输出)",
|
|
2515
|
+
"drawer.scopeTitle": "工作范围",
|
|
2516
|
+
"drawer.scopeHint": "这个任务改动的目录/文件",
|
|
2517
|
+
"drawer.scopeMore": "+{count} 项",
|
|
2463
2518
|
"drawer.runOverlaps": "同时写入",
|
|
2464
2519
|
"drawer.runLessons": "读取了 {count} 条经验",
|
|
2465
2520
|
"drawer.runNoLessons": "没有可读取的经验",
|
|
@@ -3317,15 +3372,6 @@ function supervisorWorkerCount(row) {
|
|
|
3317
3372
|
return found ? total : null;
|
|
3318
3373
|
}
|
|
3319
3374
|
|
|
3320
|
-
function taskDisplayTitle(title) {
|
|
3321
|
-
const full = asString(title);
|
|
3322
|
-
if (!full) return full;
|
|
3323
|
-
const stripped = full
|
|
3324
|
-
.replace(/^[\w.-]+\/[A-Za-z]?\d+\s*[::]\s*/, "")
|
|
3325
|
-
.replace(/^[A-Za-z]+-\d+\s*[::]\s*/, "");
|
|
3326
|
-
return stripped || full;
|
|
3327
|
-
}
|
|
3328
|
-
|
|
3329
3375
|
function element(doc, tag, className, text) {
|
|
3330
3376
|
const node = doc.createElement(tag);
|
|
3331
3377
|
if (className) node.className = className;
|
|
@@ -3740,6 +3786,10 @@ function mount(root, options = {}) {
|
|
|
3740
3786
|
typeof view.setInterval === "function" ? view.setInterval.bind(view) : globalThis.setInterval.bind(globalThis);
|
|
3741
3787
|
const unschedule =
|
|
3742
3788
|
typeof view.clearInterval === "function" ? view.clearInterval.bind(view) : globalThis.clearInterval.bind(globalThis);
|
|
3789
|
+
const scheduleTimeout =
|
|
3790
|
+
typeof view.setTimeout === "function" ? view.setTimeout.bind(view) : globalThis.setTimeout.bind(globalThis);
|
|
3791
|
+
const clearScheduledTimeout =
|
|
3792
|
+
typeof view.clearTimeout === "function" ? view.clearTimeout.bind(view) : globalThis.clearTimeout.bind(globalThis);
|
|
3743
3793
|
|
|
3744
3794
|
const translator = typeof opts.t === "function" ? opts.t : null;
|
|
3745
3795
|
|
|
@@ -3771,6 +3821,10 @@ function mount(root, options = {}) {
|
|
|
3771
3821
|
let refreshPromise = null;
|
|
3772
3822
|
let lastSnapshot = null;
|
|
3773
3823
|
let lastModel = null;
|
|
3824
|
+
let loadingActive = false;
|
|
3825
|
+
let loadingTicks = 0;
|
|
3826
|
+
let loadingTimer = null;
|
|
3827
|
+
let loadingPanelError = "";
|
|
3774
3828
|
let drawerNode = null;
|
|
3775
3829
|
let drawerState = null;
|
|
3776
3830
|
let drawerTrigger = null;
|
|
@@ -3869,6 +3923,10 @@ function mount(root, options = {}) {
|
|
|
3869
3923
|
const statusNode = element(doc, "span", "hive-status", "");
|
|
3870
3924
|
bar.appendChild(statusNode);
|
|
3871
3925
|
|
|
3926
|
+
const loadingBadge = element(doc, "span", "hive-loading-badge is-hidden", translate("loading.label"));
|
|
3927
|
+
setAttr(loadingBadge, "role", "status");
|
|
3928
|
+
bar.appendChild(loadingBadge);
|
|
3929
|
+
|
|
3872
3930
|
const actionGroup = element(doc, "div", "hive-action-group");
|
|
3873
3931
|
const actionsNode = element(doc, "div", "hive-actions");
|
|
3874
3932
|
actionGroup.appendChild(actionsNode);
|
|
@@ -3980,6 +4038,31 @@ function mount(root, options = {}) {
|
|
|
3980
4038
|
stage.appendChild(stageChips);
|
|
3981
4039
|
stage.appendChild(filterEmpty);
|
|
3982
4040
|
stage.appendChild(lanesNode);
|
|
4041
|
+
const skeletonNode = element(doc, "div", "hive-skeleton");
|
|
4042
|
+
for (const lane of LANE_ORDER) {
|
|
4043
|
+
const laneNode = element(doc, "section", "hive-skeleton-lane");
|
|
4044
|
+
laneNode.appendChild(element(doc, "div", "hive-skeleton-head", laneLabel(lane)));
|
|
4045
|
+
for (let row = 0; row < 3; row += 1) {
|
|
4046
|
+
laneNode.appendChild(element(doc, "div", "hive-skeleton-row", ""));
|
|
4047
|
+
}
|
|
4048
|
+
skeletonNode.appendChild(laneNode);
|
|
4049
|
+
}
|
|
4050
|
+
const loadingPanel = element(doc, "div", "hive-loading is-hidden");
|
|
4051
|
+
setAttr(loadingPanel, "role", "status");
|
|
4052
|
+
setAttr(loadingPanel, "aria-live", "polite");
|
|
4053
|
+
const loadingText = element(doc, "span", "hive-loading-text", "");
|
|
4054
|
+
const loadingRetry = element(doc, "button", "hive-btn hive-loading-retry", translate("loading.retry"));
|
|
4055
|
+
setAttr(loadingRetry, "type", "button");
|
|
4056
|
+
setAttr(loadingRetry, "title", translate("loading.retryAria"));
|
|
4057
|
+
setAttr(loadingRetry, "aria-label", translate("loading.retryAria"));
|
|
4058
|
+
loadingRetry.addEventListener("click", () => {
|
|
4059
|
+
beginLoading();
|
|
4060
|
+
void refresh();
|
|
4061
|
+
});
|
|
4062
|
+
loadingPanel.appendChild(loadingText);
|
|
4063
|
+
loadingPanel.appendChild(loadingRetry);
|
|
4064
|
+
stage.appendChild(skeletonNode);
|
|
4065
|
+
stage.appendChild(loadingPanel);
|
|
3983
4066
|
boardPane.appendChild(stage);
|
|
3984
4067
|
main.appendChild(boardPane);
|
|
3985
4068
|
|
|
@@ -5572,6 +5655,143 @@ function mount(root, options = {}) {
|
|
|
5572
5655
|
* @param {object|null} run - normalized `lastRun` (see normalizeLastRun)
|
|
5573
5656
|
* @returns {HTMLElement}
|
|
5574
5657
|
*/
|
|
5658
|
+
function safeMarkdownHref(raw) {
|
|
5659
|
+
const href = asString(raw).trim();
|
|
5660
|
+
if (!href) return "";
|
|
5661
|
+
if (/^(https?:\/\/|mailto:)/i.test(href)) return href;
|
|
5662
|
+
if (href.startsWith("#") || href.startsWith("/")) return href;
|
|
5663
|
+
return "";
|
|
5664
|
+
}
|
|
5665
|
+
|
|
5666
|
+
function markdownTextNode(doc, text) {
|
|
5667
|
+
if (typeof doc.createTextNode === "function") return doc.createTextNode(text);
|
|
5668
|
+
const node = doc.createElement("span");
|
|
5669
|
+
node.textContent = text;
|
|
5670
|
+
return node;
|
|
5671
|
+
}
|
|
5672
|
+
|
|
5673
|
+
function appendInlineMarkdown(doc, parent, text) {
|
|
5674
|
+
const pattern = /(\x60[^\x60\n]+\x60|\*\*[^*\n]+\*\*|__[^_\n]+__|\*[^*\n]+\*|_[^_\n]+_|\[[^\]\n]+\]\([^)\n]+\))/g;
|
|
5675
|
+
let last = 0;
|
|
5676
|
+
let match = pattern.exec(text);
|
|
5677
|
+
while (match) {
|
|
5678
|
+
if (match.index > last) parent.appendChild(markdownTextNode(doc, text.slice(last, match.index)));
|
|
5679
|
+
const token = match[0];
|
|
5680
|
+
if (token.startsWith("\x60") && token.endsWith("\x60")) {
|
|
5681
|
+
parent.appendChild(element(doc, "code", "hive-md-code-inline", token.slice(1, -1)));
|
|
5682
|
+
} else if ((token.startsWith("**") && token.endsWith("**")) || (token.startsWith("__") && token.endsWith("__"))) {
|
|
5683
|
+
parent.appendChild(element(doc, "strong", null, token.slice(2, -2)));
|
|
5684
|
+
} else if ((token.startsWith("*") && token.endsWith("*")) || (token.startsWith("_") && token.endsWith("_"))) {
|
|
5685
|
+
parent.appendChild(element(doc, "em", null, token.slice(1, -1)));
|
|
5686
|
+
} else if (token.startsWith("[")) {
|
|
5687
|
+
const link = /^\[([^\]]+)\]\(([^)]+)\)$/.exec(token);
|
|
5688
|
+
const href = link ? safeMarkdownHref(link[2]) : "";
|
|
5689
|
+
if (link && href) {
|
|
5690
|
+
const anchor = element(doc, "a", "hive-md-link", link[1]);
|
|
5691
|
+
setAttr(anchor, "href", href);
|
|
5692
|
+
setAttr(anchor, "rel", "noreferrer noopener");
|
|
5693
|
+
parent.appendChild(anchor);
|
|
5694
|
+
} else {
|
|
5695
|
+
parent.appendChild(markdownTextNode(doc, token));
|
|
5696
|
+
}
|
|
5697
|
+
} else {
|
|
5698
|
+
parent.appendChild(markdownTextNode(doc, token));
|
|
5699
|
+
}
|
|
5700
|
+
last = pattern.lastIndex;
|
|
5701
|
+
match = pattern.exec(text);
|
|
5702
|
+
}
|
|
5703
|
+
if (last < text.length) parent.appendChild(markdownTextNode(doc, text.slice(last)));
|
|
5704
|
+
}
|
|
5705
|
+
|
|
5706
|
+
function renderMarkdownInto(doc, host, source) {
|
|
5707
|
+
const lines = String(source).replace(/\r\n?/g, "\n").split("\n");
|
|
5708
|
+
let index = 0;
|
|
5709
|
+
let paragraph = [];
|
|
5710
|
+
const flushParagraph = () => {
|
|
5711
|
+
if (paragraph.length === 0) return;
|
|
5712
|
+
const p = element(doc, "p", "hive-md-p");
|
|
5713
|
+
appendInlineMarkdown(doc, p, paragraph.join("\n"));
|
|
5714
|
+
host.appendChild(p);
|
|
5715
|
+
paragraph = [];
|
|
5716
|
+
};
|
|
5717
|
+
|
|
5718
|
+
while (index < lines.length) {
|
|
5719
|
+
const line = lines[index];
|
|
5720
|
+
if (/^\s*\x60\x60\x60/.test(line)) {
|
|
5721
|
+
flushParagraph();
|
|
5722
|
+
const fence = /^\s*\x60\x60\x60\s*([^\s]*)/.exec(line);
|
|
5723
|
+
const language = fence ? fence[1] : "";
|
|
5724
|
+
const codeLines = [];
|
|
5725
|
+
index += 1;
|
|
5726
|
+
while (index < lines.length && !/^\s*\x60\x60\x60/.test(lines[index])) {
|
|
5727
|
+
codeLines.push(lines[index]);
|
|
5728
|
+
index += 1;
|
|
5729
|
+
}
|
|
5730
|
+
if (index < lines.length) index += 1;
|
|
5731
|
+
const pre = element(doc, "pre", "hive-md-code-block");
|
|
5732
|
+
if (language) setAttr(pre, "data-lang", language);
|
|
5733
|
+
const code = element(doc, "code", null, codeLines.join("\n"));
|
|
5734
|
+
pre.appendChild(code);
|
|
5735
|
+
host.appendChild(pre);
|
|
5736
|
+
continue;
|
|
5737
|
+
}
|
|
5738
|
+
if (/^\s*$/.test(line)) {
|
|
5739
|
+
flushParagraph();
|
|
5740
|
+
index += 1;
|
|
5741
|
+
continue;
|
|
5742
|
+
}
|
|
5743
|
+
const heading = /^\s*(#{1,6})\s+(.*)$/.exec(line);
|
|
5744
|
+
if (heading) {
|
|
5745
|
+
flushParagraph();
|
|
5746
|
+
const level = heading[1].length;
|
|
5747
|
+
const node = element(doc, "h" + String(level), "hive-md-heading");
|
|
5748
|
+
appendInlineMarkdown(doc, node, heading[2]);
|
|
5749
|
+
host.appendChild(node);
|
|
5750
|
+
index += 1;
|
|
5751
|
+
continue;
|
|
5752
|
+
}
|
|
5753
|
+
if (/^\s*>\s?/.test(line)) {
|
|
5754
|
+
flushParagraph();
|
|
5755
|
+
const quote = element(doc, "blockquote", "hive-md-quote");
|
|
5756
|
+
while (index < lines.length && /^\s*>\s?/.test(lines[index])) {
|
|
5757
|
+
const p = element(doc, "p", "hive-md-p");
|
|
5758
|
+
appendInlineMarkdown(doc, p, lines[index].replace(/^\s*>\s?/, ""));
|
|
5759
|
+
quote.appendChild(p);
|
|
5760
|
+
index += 1;
|
|
5761
|
+
}
|
|
5762
|
+
host.appendChild(quote);
|
|
5763
|
+
continue;
|
|
5764
|
+
}
|
|
5765
|
+
if (/^\s*[-*+]\s+/.test(line)) {
|
|
5766
|
+
flushParagraph();
|
|
5767
|
+
const list = element(doc, "ul", "hive-md-list");
|
|
5768
|
+
while (index < lines.length && /^\s*[-*+]\s+/.test(lines[index])) {
|
|
5769
|
+
const item = element(doc, "li", null);
|
|
5770
|
+
appendInlineMarkdown(doc, item, lines[index].replace(/^\s*[-*+]\s+/, ""));
|
|
5771
|
+
list.appendChild(item);
|
|
5772
|
+
index += 1;
|
|
5773
|
+
}
|
|
5774
|
+
host.appendChild(list);
|
|
5775
|
+
continue;
|
|
5776
|
+
}
|
|
5777
|
+
if (/^\s*\d+[.)]\s+/.test(line)) {
|
|
5778
|
+
flushParagraph();
|
|
5779
|
+
const list = element(doc, "ol", "hive-md-list");
|
|
5780
|
+
while (index < lines.length && /^\s*\d+[.)]\s+/.test(lines[index])) {
|
|
5781
|
+
const item = element(doc, "li", null);
|
|
5782
|
+
appendInlineMarkdown(doc, item, lines[index].replace(/^\s*\d+[.)]\s+/, ""));
|
|
5783
|
+
list.appendChild(item);
|
|
5784
|
+
index += 1;
|
|
5785
|
+
}
|
|
5786
|
+
host.appendChild(list);
|
|
5787
|
+
continue;
|
|
5788
|
+
}
|
|
5789
|
+
paragraph.push(line);
|
|
5790
|
+
index += 1;
|
|
5791
|
+
}
|
|
5792
|
+
flushParagraph();
|
|
5793
|
+
}
|
|
5794
|
+
|
|
5575
5795
|
function buildRunSection(run, actionHost) {
|
|
5576
5796
|
const section = element(doc, "div", "hive-card-run");
|
|
5577
5797
|
const addAction = (node) => {
|
|
@@ -5617,7 +5837,14 @@ function mount(root, options = {}) {
|
|
|
5617
5837
|
? translate("drawer.runLessons").replace("{count}", String(lessonCount))
|
|
5618
5838
|
: translate("drawer.runNoLessons");
|
|
5619
5839
|
section.appendChild(element(doc, "div", "hive-card-run-meta", lessonsText));
|
|
5620
|
-
|
|
5840
|
+
const output = element(doc, "div", "hive-card-run-output hive-markdown");
|
|
5841
|
+
const outputText = asString(run.output);
|
|
5842
|
+
if (outputText.trim() === "") {
|
|
5843
|
+
output.appendChild(element(doc, "div", "hive-markdown-empty", translate("drawer.noOutput")));
|
|
5844
|
+
} else {
|
|
5845
|
+
renderMarkdownInto(doc, output, outputText);
|
|
5846
|
+
}
|
|
5847
|
+
section.appendChild(output);
|
|
5621
5848
|
const foot = element(doc, "div", "hive-card-run-foot");
|
|
5622
5849
|
const copy = element(doc, "button", "hive-btn hive-btn-ghost hive-card-run-copy", translate("drawer.copyOutput"));
|
|
5623
5850
|
setAttr(copy, "type", "button");
|
|
@@ -5663,7 +5890,6 @@ function mount(root, options = {}) {
|
|
|
5663
5890
|
const id = card.id || translate("card.noId");
|
|
5664
5891
|
const role = asString(card.role) || "—";
|
|
5665
5892
|
const status = laneLabel(lane);
|
|
5666
|
-
const repo = lastModel ? lastModel.repo : "";
|
|
5667
5893
|
const ariaLabel = translate("drawer.cardAria") + " " + (card.title || card.id || translate("card.untitled"));
|
|
5668
5894
|
|
|
5669
5895
|
const dialog = element(doc, "dialog", "hive-dialog hive-card-dialog hive-drawer");
|
|
@@ -5676,7 +5902,7 @@ function mount(root, options = {}) {
|
|
|
5676
5902
|
const titleBox = element(doc, "div", "hive-dialog-head-title");
|
|
5677
5903
|
titleBox.appendChild(element(doc, "h2", "hive-dialog-title", title));
|
|
5678
5904
|
const subline = element(doc, "div", "hive-card-subline");
|
|
5679
|
-
const sublineText = [id, role, status
|
|
5905
|
+
const sublineText = [id, role, status].filter(Boolean).join(" · ");
|
|
5680
5906
|
subline.textContent = sublineText;
|
|
5681
5907
|
setAttr(subline, "title", sublineText);
|
|
5682
5908
|
titleBox.appendChild(subline);
|
|
@@ -5689,14 +5915,40 @@ function mount(root, options = {}) {
|
|
|
5689
5915
|
|
|
5690
5916
|
const body = element(doc, "div", "hive-dialog-body hive-card-body");
|
|
5691
5917
|
if (Array.isArray(card.scope) && card.scope.length > 0) {
|
|
5692
|
-
const
|
|
5693
|
-
|
|
5694
|
-
|
|
5695
|
-
|
|
5696
|
-
|
|
5918
|
+
const scopeBlock = element(doc, "div", "hive-scope-block");
|
|
5919
|
+
scopeBlock.appendChild(element(doc, "div", "hive-scope-title", translate("drawer.scopeTitle")));
|
|
5920
|
+
scopeBlock.appendChild(element(doc, "div", "hive-scope-hint", translate("drawer.scopeHint")));
|
|
5921
|
+
const scopeList = element(doc, "div", "hive-scope-list");
|
|
5922
|
+
const scopes = card.scope.filter((scope) => asString(scope) !== "");
|
|
5923
|
+
const visibleScopes = scopes.slice(0, 5);
|
|
5924
|
+
for (const scope of visibleScopes) {
|
|
5925
|
+
const path = element(doc, "code", "hive-scope-path", asString(scope));
|
|
5926
|
+
setAttr(path, "title", asString(scope));
|
|
5927
|
+
scopeList.appendChild(path);
|
|
5928
|
+
}
|
|
5929
|
+
const hiddenScopes = scopes.slice(5);
|
|
5930
|
+
if (hiddenScopes.length > 0) {
|
|
5931
|
+
const more = element(
|
|
5932
|
+
doc,
|
|
5933
|
+
"button",
|
|
5934
|
+
"hive-btn hive-btn-ghost hive-scope-more",
|
|
5935
|
+
translate("drawer.scopeMore").replace("{count}", String(hiddenScopes.length)),
|
|
5936
|
+
);
|
|
5937
|
+
setAttr(more, "type", "button");
|
|
5938
|
+
more.addEventListener("click", () => {
|
|
5939
|
+
for (const scope of hiddenScopes) {
|
|
5940
|
+
const path = element(doc, "code", "hive-scope-path", asString(scope));
|
|
5941
|
+
setAttr(path, "title", asString(scope));
|
|
5942
|
+
scopeList.appendChild(path);
|
|
5943
|
+
}
|
|
5944
|
+
more.parentNode.removeChild(more);
|
|
5945
|
+
});
|
|
5946
|
+
scopeList.appendChild(more);
|
|
5697
5947
|
}
|
|
5698
|
-
|
|
5948
|
+
scopeBlock.appendChild(scopeList);
|
|
5949
|
+
body.appendChild(scopeBlock);
|
|
5699
5950
|
}
|
|
5951
|
+
|
|
5700
5952
|
const runActions = [];
|
|
5701
5953
|
body.appendChild(buildRunSection(card.lastRun, runActions));
|
|
5702
5954
|
dialog.appendChild(body);
|
|
@@ -6436,8 +6688,7 @@ function mount(root, options = {}) {
|
|
|
6436
6688
|
|
|
6437
6689
|
function renderCard(card, lane, existing) {
|
|
6438
6690
|
const node = existing || element(doc, "article", "hive-card");
|
|
6439
|
-
const
|
|
6440
|
-
const title = taskDisplayTitle(fullTitle);
|
|
6691
|
+
const title = card.title || translate("card.untitled");
|
|
6441
6692
|
if (!existing) {
|
|
6442
6693
|
setAttr(node, "tabindex", "0");
|
|
6443
6694
|
setAttr(node, "role", "button");
|
|
@@ -6455,8 +6706,8 @@ function mount(root, options = {}) {
|
|
|
6455
6706
|
node._hiveCard = card;
|
|
6456
6707
|
node._hiveLane = lane;
|
|
6457
6708
|
node._hiveTitle.textContent = title;
|
|
6458
|
-
setAttr(node, "aria-label", translate("card.openAria") + " " +
|
|
6459
|
-
setAttr(node, "title",
|
|
6709
|
+
setAttr(node, "aria-label", translate("card.openAria") + " " + title);
|
|
6710
|
+
setAttr(node, "title", title);
|
|
6460
6711
|
return node;
|
|
6461
6712
|
}
|
|
6462
6713
|
function renderStageChips(model) {
|
|
@@ -6733,6 +6984,7 @@ function mount(root, options = {}) {
|
|
|
6733
6984
|
closeHelp(false);
|
|
6734
6985
|
openHelp();
|
|
6735
6986
|
}
|
|
6987
|
+
finishLoading();
|
|
6736
6988
|
return model;
|
|
6737
6989
|
}
|
|
6738
6990
|
|
|
@@ -6759,6 +7011,7 @@ function mount(root, options = {}) {
|
|
|
6759
7011
|
if (!destroyed) {
|
|
6760
7012
|
setStatus("status.disconnected", "error");
|
|
6761
7013
|
reportError(error);
|
|
7014
|
+
if (!lastModel || loadingActive) failLoading(error);
|
|
6762
7015
|
}
|
|
6763
7016
|
}
|
|
6764
7017
|
}
|
|
@@ -6802,6 +7055,7 @@ function mount(root, options = {}) {
|
|
|
6802
7055
|
unschedule(timer);
|
|
6803
7056
|
timer = null;
|
|
6804
7057
|
}
|
|
7058
|
+
stopLoadingTimer();
|
|
6805
7059
|
if (typeof doc.removeEventListener === "function") {
|
|
6806
7060
|
doc.removeEventListener("visibilitychange", onVisibilityChange);
|
|
6807
7061
|
}
|
|
@@ -6868,6 +7122,84 @@ function mount(root, options = {}) {
|
|
|
6868
7122
|
}
|
|
6869
7123
|
}
|
|
6870
7124
|
|
|
7125
|
+
|
|
7126
|
+
function setLoadingInteractions(disabled) {
|
|
7127
|
+
frame.className =
|
|
7128
|
+
"hive" +
|
|
7129
|
+
(disabled ? " is-loading" : "") +
|
|
7130
|
+
(lastModel && lastModel.initialised === false ? " is-uninitialised" : "");
|
|
7131
|
+
setAttr(stage, "aria-busy", disabled ? "true" : "false");
|
|
7132
|
+
for (const child of actionsNode.children) {
|
|
7133
|
+
if ("disabled" in child) child.disabled = disabled;
|
|
7134
|
+
}
|
|
7135
|
+
agentsCount.disabled = disabled;
|
|
7136
|
+
}
|
|
7137
|
+
|
|
7138
|
+
function showSkeletonStats() {
|
|
7139
|
+
clearNode(statsNode);
|
|
7140
|
+
for (let index = 0; index < 2; index += 1) {
|
|
7141
|
+
statsNode.appendChild(element(doc, "span", "hive-skeleton-pill", ""));
|
|
7142
|
+
}
|
|
7143
|
+
agentsCount.textContent = "…";
|
|
7144
|
+
agentsCount.disabled = true;
|
|
7145
|
+
queenBadge.className = "hive-queen-badge is-hidden";
|
|
7146
|
+
}
|
|
7147
|
+
|
|
7148
|
+
function showLoadingPanel(text) {
|
|
7149
|
+
loadingText.textContent = text;
|
|
7150
|
+
loadingPanel.className = "hive-loading";
|
|
7151
|
+
}
|
|
7152
|
+
|
|
7153
|
+
function stopLoadingTimer() {
|
|
7154
|
+
if (loadingTimer === null) return;
|
|
7155
|
+
clearScheduledTimeout(loadingTimer);
|
|
7156
|
+
loadingTimer = null;
|
|
7157
|
+
}
|
|
7158
|
+
|
|
7159
|
+
function loadingTick() {
|
|
7160
|
+
if (!loadingActive || destroyed) return;
|
|
7161
|
+
loadingTicks += 1;
|
|
7162
|
+
if (loadingTicks >= 5) {
|
|
7163
|
+
showLoadingPanel(translate("loading.slow").replace("{seconds}", String(loadingTicks)));
|
|
7164
|
+
}
|
|
7165
|
+
loadingTimer = scheduleTimeout(loadingTick, 1000);
|
|
7166
|
+
}
|
|
7167
|
+
|
|
7168
|
+
function beginLoading() {
|
|
7169
|
+
if (destroyed) return;
|
|
7170
|
+
loadingActive = true;
|
|
7171
|
+
loadingTicks = 0;
|
|
7172
|
+
loadingPanelError = "";
|
|
7173
|
+
loadingPanel.className = "hive-loading is-hidden";
|
|
7174
|
+
loadingBadge.className = "hive-loading-badge";
|
|
7175
|
+
loadingBadge.textContent = translate("loading.label");
|
|
7176
|
+
skeletonNode.className = "hive-skeleton";
|
|
7177
|
+
showSkeletonStats();
|
|
7178
|
+
setLoadingInteractions(true);
|
|
7179
|
+
stopLoadingTimer();
|
|
7180
|
+
loadingTimer = scheduleTimeout(loadingTick, 1000);
|
|
7181
|
+
}
|
|
7182
|
+
|
|
7183
|
+
function finishLoading() {
|
|
7184
|
+
loadingActive = false;
|
|
7185
|
+
loadingPanelError = "";
|
|
7186
|
+
stopLoadingTimer();
|
|
7187
|
+
skeletonNode.className = "hive-skeleton is-hidden";
|
|
7188
|
+
loadingPanel.className = "hive-loading is-hidden";
|
|
7189
|
+
loadingBadge.className = "hive-loading-badge is-hidden";
|
|
7190
|
+
setLoadingInteractions(false);
|
|
7191
|
+
}
|
|
7192
|
+
|
|
7193
|
+
function failLoading(error) {
|
|
7194
|
+
loadingActive = false;
|
|
7195
|
+
stopLoadingTimer();
|
|
7196
|
+
const detail = asString(error && error.message) || translate("loading.failed");
|
|
7197
|
+
loadingPanelError = detail;
|
|
7198
|
+
showLoadingPanel(translate("loading.failed") + ": " + detail);
|
|
7199
|
+
loadingBadge.className = "hive-loading-badge is-hidden";
|
|
7200
|
+
setLoadingInteractions(true);
|
|
7201
|
+
}
|
|
7202
|
+
|
|
6871
7203
|
function stopPolling() {
|
|
6872
7204
|
if (timer === null) return;
|
|
6873
7205
|
unschedule(timer);
|
|
@@ -6894,6 +7226,7 @@ function mount(root, options = {}) {
|
|
|
6894
7226
|
if (typeof doc.addEventListener === "function") {
|
|
6895
7227
|
doc.addEventListener("visibilitychange", onVisibilityChange);
|
|
6896
7228
|
}
|
|
7229
|
+
beginLoading();
|
|
6897
7230
|
startPolling();
|
|
6898
7231
|
void refresh();
|
|
6899
7232
|
|
|
@@ -6902,7 +7235,7 @@ function mount(root, options = {}) {
|
|
|
6902
7235
|
|
|
6903
7236
|
return { mount: mount, renderModel: renderModel, messages: messages }
|
|
6904
7237
|
})()
|
|
6905
|
-
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/* Agents dialog */\n.hive-agents-dialog { width: min(560px, 92vw); max-height: 80vh; }\n.hive-agents-body { display: flex; flex-direction: column; gap: 8px; min-height: 0; overflow: auto; }\n.hive-agents-empty-note { padding: 10px 0; color: var(--hive-fg-soft); font-size: 12px; line-height: 1.5; }\n.hive-agent-row { display: flex; align-items: flex-start; gap: 8px; padding: 8px 0; border-bottom: 1px solid var(--hive-line-2); }\n.hive-agent-row-main { display: flex; flex: 1 1 auto; flex-direction: column; gap: 2px; min-width: 0; }\n.hive-agent-row-name { color: var(--hive-fg); font-size: 14px; font-weight: 600; line-height: 1.5; overflow-wrap: anywhere; }\n.hive-agent-row-task { color: var(--hive-fg-soft); font-size: 12px; line-height: 1.5; overflow-wrap: anywhere; }\n.hive-agent-row-meta { color: var(--hive-fg-faint); font-size: 12px; line-height: 1.5; overflow-wrap: anywhere; }\n.hive-agents-workers-title { padding-top: 4px; color: var(--hive-fg); font-size: 14px; font-weight: 700; line-height: 1.5; }\n.hive-agent-worker-row { padding: 8px 0; border-bottom: 1px solid var(--hive-line-2); }\n.hive-agent-worker-task { color: var(--hive-fg); font-size: 14px; font-weight: 600; line-height: 1.5; overflow-wrap: anywhere; }\n.hive-agent-worker-meta { color: var(--hive-fg-soft); font-size: 12px; line-height: 1.5; overflow-wrap: anywhere; }\n.hive-agents-technical { border-top: 1px solid var(--hive-line-2); padding-top: 8px; }\n.hive-agents-technical-summary { color: var(--hive-fg-soft); font-size: 12px; line-height: 1.5; cursor: pointer; }\n.hive-agents-technical-json { max-height: 220px; margin-top: 8px; }\n\n.hive-supervisor-inline-sep { color: var(--hive-fg-faint); }\n.hive-supervisor-inline-state.is-normal::before { background: var(--hive-ok); }\n.hive-supervisor-inline-state.is-paused::before { background: var(--hive-warn); }\n.hive-supervisor-inline-state.is-unresponsive::before { background: var(--hive-fg-faint); }\n\n\n/* The DSH design-token bridge is bundled in panel.css; this file is kept for package layout compatibility. */\n"
|
|
7238
|
+
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/* Agents dialog */\n.hive-agents-dialog { width: min(560px, 92vw); max-height: 80vh; }\n.hive-agents-body { display: flex; flex-direction: column; gap: 8px; min-height: 0; overflow: auto; }\n.hive-agents-empty-note { padding: 10px 0; color: var(--hive-fg-soft); font-size: 12px; line-height: 1.5; }\n.hive-agent-row { display: flex; align-items: flex-start; gap: 8px; padding: 8px 0; border-bottom: 1px solid var(--hive-line-2); }\n.hive-agent-row-main { display: flex; flex: 1 1 auto; flex-direction: column; gap: 2px; min-width: 0; }\n.hive-agent-row-name { color: var(--hive-fg); font-size: 14px; font-weight: 600; line-height: 1.5; overflow-wrap: anywhere; }\n.hive-agent-row-task { color: var(--hive-fg-soft); font-size: 12px; line-height: 1.5; overflow-wrap: anywhere; }\n.hive-agent-row-meta { color: var(--hive-fg-faint); font-size: 12px; line-height: 1.5; overflow-wrap: anywhere; }\n.hive-agents-workers-title { padding-top: 4px; color: var(--hive-fg); font-size: 14px; font-weight: 700; line-height: 1.5; }\n.hive-agent-worker-row { padding: 8px 0; border-bottom: 1px solid var(--hive-line-2); }\n.hive-agent-worker-task { color: var(--hive-fg); font-size: 14px; font-weight: 600; line-height: 1.5; overflow-wrap: anywhere; }\n.hive-agent-worker-meta { color: var(--hive-fg-soft); font-size: 12px; line-height: 1.5; overflow-wrap: anywhere; }\n.hive-agents-technical { border-top: 1px solid var(--hive-line-2); padding-top: 8px; }\n.hive-agents-technical-summary { color: var(--hive-fg-soft); font-size: 12px; line-height: 1.5; cursor: pointer; }\n.hive-agents-technical-json { max-height: 220px; margin-top: 8px; }\n\n.hive-supervisor-inline-sep { color: var(--hive-fg-faint); }\n.hive-supervisor-inline-state.is-normal::before { background: var(--hive-ok); }\n.hive-supervisor-inline-state.is-paused::before { background: var(--hive-warn); }\n.hive-supervisor-inline-state.is-unresponsive::before { background: var(--hive-fg-faint); }\n\n/* Lightweight markdown in the last-run output. */\n.hive-markdown { color: var(--hive-fg-soft); font-size: 12px; line-height: 1.6; overflow-wrap: anywhere; }\n.hive-markdown p { margin: 0 0 8px; white-space: pre-wrap; }\n.hive-markdown p:last-child { margin-bottom: 0; }\n.hive-markdown .hive-md-heading { margin: 8px 0 6px; color: var(--hive-fg); font-size: 14px; font-weight: 700; line-height: 1.4; }\n.hive-markdown h1.hive-md-heading { font-size: 16px; }\n.hive-markdown h2.hive-md-heading { font-size: 15px; }\n.hive-markdown .hive-md-list { margin: 0 0 8px; padding-left: 20px; }\n.hive-markdown .hive-md-list li { margin: 2px 0; }\n.hive-markdown .hive-md-code-inline { padding: 1px 4px; border: 1px solid var(--hive-line-2); border-radius: var(--hive-radius-sm); background: var(--hive-bg-layer-1); color: var(--hive-fg); font-family: var(--hive-mono); font-size: 11px; }\n.hive-markdown .hive-md-code-block { max-width: 100%; margin: 8px 0; padding: 10px; overflow-x: auto; border: 1px solid var(--hive-line); border-radius: var(--hive-radius-md); background: var(--hive-bg-layer-1); color: var(--hive-fg); font-family: var(--hive-mono); font-size: 11px; line-height: 1.55; white-space: pre; scrollbar-color: var(--hive-line) transparent; scrollbar-width: thin; }\n.hive-markdown .hive-md-code-block code { padding: 0; border: 0; background: transparent; color: inherit; font: inherit; white-space: pre; }\n.hive-markdown .hive-md-quote { margin: 8px 0; padding: 2px 0 2px 10px; border-left: 2px solid var(--hive-line); color: var(--hive-fg-soft); }\n.hive-markdown .hive-md-link { color: var(--hive-accent); text-decoration: underline; text-underline-offset: 2px; }\n.hive-markdown .hive-markdown-empty { color: var(--hive-fg-faint); font-size: 12px; }\n\n/* Initial loading skeleton and progress. */\n.hive-skeleton { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; flex: 1 1 auto; padding: 8px; min-height: 200px; }\n.hive-skeleton.is-hidden { display: none; }\n.hive-skeleton-lane { display: flex; flex-direction: column; gap: 6px; min-width: 0; padding: 8px; border: 1px solid var(--hive-line-2); border-radius: var(--hive-radius-md); background: var(--hive-bg-layer-1); }\n.hive-skeleton-head { color: var(--hive-fg-faint); font-size: 11px; font-weight: 600; line-height: 1.5; }\n.hive-skeleton-row { height: 26px; border-radius: var(--hive-radius-sm); background: var(--hive-line-2); opacity: 0.65; }\n.hive-skeleton-pill { width: 44px; height: 22px; border-radius: var(--hive-radius-sm); background: var(--hive-line-2); opacity: 0.65; }\n.hive-loading { display: flex; align-items: center; justify-content: center; gap: 8px; flex-wrap: wrap; padding: 10px 8px; color: var(--hive-fg-soft); font-size: 12px; line-height: 1.5; }\n.hive-loading.is-hidden { display: none; }\n.hive-loading-badge { padding: 2px 7px; border: 1px solid var(--hive-line-2); border-radius: var(--hive-radius-sm); color: var(--hive-fg-soft); font-size: 11px; line-height: 1.4; }\n.hive-loading-badge.is-hidden { display: none; }\n\n/* Card scope block in the task dialog. */\n.hive-scope-block { display: flex; flex-direction: column; gap: 4px; margin-bottom: 10px; }\n.hive-scope-title { color: var(--hive-fg); font-size: 12px; font-weight: 700; line-height: 1.5; }\n.hive-scope-hint { color: var(--hive-fg-faint); font-size: 11px; line-height: 1.5; }\n.hive-scope-list { display: flex; flex-wrap: wrap; gap: 4px; min-width: 0; }\n.hive-scope-path { max-width: 100%; padding: 2px 6px; border: 1px solid var(--hive-line-2); border-radius: var(--hive-radius-sm); background: var(--hive-bg-layer-1); color: var(--hive-fg-soft); font-family: var(--hive-mono); font-size: 10.5px; line-height: 1.5; white-space: pre-wrap; overflow-wrap: anywhere; }\n.hive-scope-more { padding: 2px 6px; font-size: 10.5px; }\n\n\n/* The DSH design-token bridge is bundled in panel.css; this file is kept for package layout compatibility. */\n"
|
|
6906
7239
|
function ensureHivePanelCss() {
|
|
6907
7240
|
if (typeof document === 'undefined') return
|
|
6908
7241
|
if (document.querySelector('style[data-hive-panel-css]') !== null) return
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "dsh-hive-panel",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.16",
|
|
4
4
|
"description": "Hive board and queen mode inside DSH Web: a conversation view scoped to the Session's repository, with allowlisted task-card actions over DSH's shell seam.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "./lib/index.js",
|
package/src/panel.css
CHANGED
|
@@ -1153,3 +1153,39 @@ dialog.hive-dialog .hive-dialog-body { flex: 1 1 auto; min-height: 0; overflow:
|
|
|
1153
1153
|
.hive-supervisor-inline-state.is-paused::before { background: var(--hive-warn); }
|
|
1154
1154
|
.hive-supervisor-inline-state.is-unresponsive::before { background: var(--hive-fg-faint); }
|
|
1155
1155
|
|
|
1156
|
+
/* Lightweight markdown in the last-run output. */
|
|
1157
|
+
.hive-markdown { color: var(--hive-fg-soft); font-size: 12px; line-height: 1.6; overflow-wrap: anywhere; }
|
|
1158
|
+
.hive-markdown p { margin: 0 0 8px; white-space: pre-wrap; }
|
|
1159
|
+
.hive-markdown p:last-child { margin-bottom: 0; }
|
|
1160
|
+
.hive-markdown .hive-md-heading { margin: 8px 0 6px; color: var(--hive-fg); font-size: 14px; font-weight: 700; line-height: 1.4; }
|
|
1161
|
+
.hive-markdown h1.hive-md-heading { font-size: 16px; }
|
|
1162
|
+
.hive-markdown h2.hive-md-heading { font-size: 15px; }
|
|
1163
|
+
.hive-markdown .hive-md-list { margin: 0 0 8px; padding-left: 20px; }
|
|
1164
|
+
.hive-markdown .hive-md-list li { margin: 2px 0; }
|
|
1165
|
+
.hive-markdown .hive-md-code-inline { padding: 1px 4px; border: 1px solid var(--hive-line-2); border-radius: var(--hive-radius-sm); background: var(--hive-bg-layer-1); color: var(--hive-fg); font-family: var(--hive-mono); font-size: 11px; }
|
|
1166
|
+
.hive-markdown .hive-md-code-block { max-width: 100%; margin: 8px 0; padding: 10px; overflow-x: auto; border: 1px solid var(--hive-line); border-radius: var(--hive-radius-md); background: var(--hive-bg-layer-1); color: var(--hive-fg); font-family: var(--hive-mono); font-size: 11px; line-height: 1.55; white-space: pre; scrollbar-color: var(--hive-line) transparent; scrollbar-width: thin; }
|
|
1167
|
+
.hive-markdown .hive-md-code-block code { padding: 0; border: 0; background: transparent; color: inherit; font: inherit; white-space: pre; }
|
|
1168
|
+
.hive-markdown .hive-md-quote { margin: 8px 0; padding: 2px 0 2px 10px; border-left: 2px solid var(--hive-line); color: var(--hive-fg-soft); }
|
|
1169
|
+
.hive-markdown .hive-md-link { color: var(--hive-accent); text-decoration: underline; text-underline-offset: 2px; }
|
|
1170
|
+
.hive-markdown .hive-markdown-empty { color: var(--hive-fg-faint); font-size: 12px; }
|
|
1171
|
+
|
|
1172
|
+
/* Initial loading skeleton and progress. */
|
|
1173
|
+
.hive-skeleton { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; flex: 1 1 auto; padding: 8px; min-height: 200px; }
|
|
1174
|
+
.hive-skeleton.is-hidden { display: none; }
|
|
1175
|
+
.hive-skeleton-lane { display: flex; flex-direction: column; gap: 6px; min-width: 0; padding: 8px; border: 1px solid var(--hive-line-2); border-radius: var(--hive-radius-md); background: var(--hive-bg-layer-1); }
|
|
1176
|
+
.hive-skeleton-head { color: var(--hive-fg-faint); font-size: 11px; font-weight: 600; line-height: 1.5; }
|
|
1177
|
+
.hive-skeleton-row { height: 26px; border-radius: var(--hive-radius-sm); background: var(--hive-line-2); opacity: 0.65; }
|
|
1178
|
+
.hive-skeleton-pill { width: 44px; height: 22px; border-radius: var(--hive-radius-sm); background: var(--hive-line-2); opacity: 0.65; }
|
|
1179
|
+
.hive-loading { display: flex; align-items: center; justify-content: center; gap: 8px; flex-wrap: wrap; padding: 10px 8px; color: var(--hive-fg-soft); font-size: 12px; line-height: 1.5; }
|
|
1180
|
+
.hive-loading.is-hidden { display: none; }
|
|
1181
|
+
.hive-loading-badge { padding: 2px 7px; border: 1px solid var(--hive-line-2); border-radius: var(--hive-radius-sm); color: var(--hive-fg-soft); font-size: 11px; line-height: 1.4; }
|
|
1182
|
+
.hive-loading-badge.is-hidden { display: none; }
|
|
1183
|
+
|
|
1184
|
+
/* Card scope block in the task dialog. */
|
|
1185
|
+
.hive-scope-block { display: flex; flex-direction: column; gap: 4px; margin-bottom: 10px; }
|
|
1186
|
+
.hive-scope-title { color: var(--hive-fg); font-size: 12px; font-weight: 700; line-height: 1.5; }
|
|
1187
|
+
.hive-scope-hint { color: var(--hive-fg-faint); font-size: 11px; line-height: 1.5; }
|
|
1188
|
+
.hive-scope-list { display: flex; flex-wrap: wrap; gap: 4px; min-width: 0; }
|
|
1189
|
+
.hive-scope-path { max-width: 100%; padding: 2px 6px; border: 1px solid var(--hive-line-2); border-radius: var(--hive-radius-sm); background: var(--hive-bg-layer-1); color: var(--hive-fg-soft); font-family: var(--hive-mono); font-size: 10.5px; line-height: 1.5; white-space: pre-wrap; overflow-wrap: anywhere; }
|
|
1190
|
+
.hive-scope-more { padding: 2px 6px; font-size: 10.5px; }
|
|
1191
|
+
|
package/src/panel.js
CHANGED
|
@@ -2037,6 +2037,39 @@ dialog.hive-dialog .hive-dialog-body { flex: 1 1 auto; min-height: 0; overflow:
|
|
|
2037
2037
|
.hive-supervisor-inline-state.is-normal::before { background: var(--hive-ok); }
|
|
2038
2038
|
.hive-supervisor-inline-state.is-paused::before { background: var(--hive-warn); }
|
|
2039
2039
|
.hive-supervisor-inline-state.is-unresponsive::before { background: var(--hive-fg-faint); }
|
|
2040
|
+
/* Lightweight markdown in the last-run output. */
|
|
2041
|
+
.hive-markdown { color: var(--hive-fg-soft); font-size: 12px; line-height: 1.6; overflow-wrap: anywhere; }
|
|
2042
|
+
.hive-markdown p { margin: 0 0 8px; white-space: pre-wrap; }
|
|
2043
|
+
.hive-markdown p:last-child { margin-bottom: 0; }
|
|
2044
|
+
.hive-markdown .hive-md-heading { margin: 8px 0 6px; color: var(--hive-fg); font-size: 14px; font-weight: 700; line-height: 1.4; }
|
|
2045
|
+
.hive-markdown h1.hive-md-heading { font-size: 16px; }
|
|
2046
|
+
.hive-markdown h2.hive-md-heading { font-size: 15px; }
|
|
2047
|
+
.hive-markdown .hive-md-list { margin: 0 0 8px; padding-left: 20px; }
|
|
2048
|
+
.hive-markdown .hive-md-list li { margin: 2px 0; }
|
|
2049
|
+
.hive-markdown .hive-md-code-inline { padding: 1px 4px; border: 1px solid var(--hive-line-2); border-radius: var(--hive-radius-sm); background: var(--hive-bg-layer-1); color: var(--hive-fg); font-family: var(--hive-mono); font-size: 11px; }
|
|
2050
|
+
.hive-markdown .hive-md-code-block { max-width: 100%; margin: 8px 0; padding: 10px; overflow-x: auto; border: 1px solid var(--hive-line); border-radius: var(--hive-radius-md); background: var(--hive-bg-layer-1); color: var(--hive-fg); font-family: var(--hive-mono); font-size: 11px; line-height: 1.55; white-space: pre; scrollbar-color: var(--hive-line) transparent; scrollbar-width: thin; }
|
|
2051
|
+
.hive-markdown .hive-md-code-block code { padding: 0; border: 0; background: transparent; color: inherit; font: inherit; white-space: pre; }
|
|
2052
|
+
.hive-markdown .hive-md-quote { margin: 8px 0; padding: 2px 0 2px 10px; border-left: 2px solid var(--hive-line); color: var(--hive-fg-soft); }
|
|
2053
|
+
.hive-markdown .hive-md-link { color: var(--hive-accent); text-decoration: underline; text-underline-offset: 2px; }
|
|
2054
|
+
.hive-markdown .hive-markdown-empty { color: var(--hive-fg-faint); font-size: 12px; }
|
|
2055
|
+
/* Initial loading skeleton and progress. */
|
|
2056
|
+
.hive-skeleton { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; flex: 1 1 auto; padding: 8px; min-height: 200px; }
|
|
2057
|
+
.hive-skeleton.is-hidden { display: none; }
|
|
2058
|
+
.hive-skeleton-lane { display: flex; flex-direction: column; gap: 6px; min-width: 0; padding: 8px; border: 1px solid var(--hive-line-2); border-radius: var(--hive-radius-md); background: var(--hive-bg-layer-1); }
|
|
2059
|
+
.hive-skeleton-head { color: var(--hive-fg-faint); font-size: 11px; font-weight: 600; line-height: 1.5; }
|
|
2060
|
+
.hive-skeleton-row { height: 26px; border-radius: var(--hive-radius-sm); background: var(--hive-line-2); opacity: 0.65; }
|
|
2061
|
+
.hive-skeleton-pill { width: 44px; height: 22px; border-radius: var(--hive-radius-sm); background: var(--hive-line-2); opacity: 0.65; }
|
|
2062
|
+
.hive-loading { display: flex; align-items: center; justify-content: center; gap: 8px; flex-wrap: wrap; padding: 10px 8px; color: var(--hive-fg-soft); font-size: 12px; line-height: 1.5; }
|
|
2063
|
+
.hive-loading.is-hidden { display: none; }
|
|
2064
|
+
.hive-loading-badge { padding: 2px 7px; border: 1px solid var(--hive-line-2); border-radius: var(--hive-radius-sm); color: var(--hive-fg-soft); font-size: 11px; line-height: 1.4; }
|
|
2065
|
+
.hive-loading-badge.is-hidden { display: none; }
|
|
2066
|
+
/* Card scope block in the task dialog. */
|
|
2067
|
+
.hive-scope-block { display: flex; flex-direction: column; gap: 4px; margin-bottom: 10px; }
|
|
2068
|
+
.hive-scope-title { color: var(--hive-fg); font-size: 12px; font-weight: 700; line-height: 1.5; }
|
|
2069
|
+
.hive-scope-hint { color: var(--hive-fg-faint); font-size: 11px; line-height: 1.5; }
|
|
2070
|
+
.hive-scope-list { display: flex; flex-wrap: wrap; gap: 4px; min-width: 0; }
|
|
2071
|
+
.hive-scope-path { max-width: 100%; padding: 2px 6px; border: 1px solid var(--hive-line-2); border-radius: var(--hive-radius-sm); background: var(--hive-bg-layer-1); color: var(--hive-fg-soft); font-family: var(--hive-mono); font-size: 10.5px; line-height: 1.5; white-space: pre-wrap; overflow-wrap: anywhere; }
|
|
2072
|
+
.hive-scope-more { padding: 2px 6px; font-size: 10.5px; }
|
|
2040
2073
|
`;
|
|
2041
2074
|
|
|
2042
2075
|
const LANE_LABEL_KEYS = Object.freeze({
|
|
@@ -2094,6 +2127,13 @@ export const messages = Object.freeze({
|
|
|
2094
2127
|
"stats.byRoleTitle": "by role: ",
|
|
2095
2128
|
"status.actionFailed": "action failed",
|
|
2096
2129
|
"status.disconnected": "disconnected",
|
|
2130
|
+
"loading.updating": "Updating",
|
|
2131
|
+
"loading.label": "Loading",
|
|
2132
|
+
"loading.slow": "Loading · waited {seconds}s",
|
|
2133
|
+
"loading.failed": "Could not load",
|
|
2134
|
+
"loading.retry": "Retry",
|
|
2135
|
+
"loading.retryAria": "Retry loading the board",
|
|
2136
|
+
"loading.aria": "Loading the board",
|
|
2097
2137
|
"agents.openAria": "Open agent",
|
|
2098
2138
|
"agents.runningTooltip": "Running {running} / board identities {identities}",
|
|
2099
2139
|
"agents.fallbackTooltip": "Board identities {identities} (supervisor disconnected or repository not registered)",
|
|
@@ -2123,6 +2163,10 @@ export const messages = Object.freeze({
|
|
|
2123
2163
|
"drawer.removeClaimed": "A claimed task must be released or reopened before it can be deleted.",
|
|
2124
2164
|
"drawer.rawJson": "raw json",
|
|
2125
2165
|
"drawer.lastRun": "Last run",
|
|
2166
|
+
"drawer.noOutput": "(no output)",
|
|
2167
|
+
"drawer.scopeTitle": "Work scope",
|
|
2168
|
+
"drawer.scopeHint": "Directories/files this task changes.",
|
|
2169
|
+
"drawer.scopeMore": "+{count} items",
|
|
2126
2170
|
"drawer.runOverlaps": "Also writing",
|
|
2127
2171
|
"drawer.runLessons": "Read {count} lessons",
|
|
2128
2172
|
"drawer.runNoLessons": "No lessons to read",
|
|
@@ -2358,6 +2402,13 @@ export const messages = Object.freeze({
|
|
|
2358
2402
|
"stats.byRoleTitle": "按角色:",
|
|
2359
2403
|
"status.actionFailed": "操作失败",
|
|
2360
2404
|
"status.disconnected": "连接断开",
|
|
2405
|
+
"loading.updating": "更新中",
|
|
2406
|
+
"loading.label": "加载中",
|
|
2407
|
+
"loading.slow": "正在读取 · 已等 {seconds}s",
|
|
2408
|
+
"loading.failed": "读取失败",
|
|
2409
|
+
"loading.retry": "重试",
|
|
2410
|
+
"loading.retryAria": "重试读取看板",
|
|
2411
|
+
"loading.aria": "正在读取看板",
|
|
2361
2412
|
"agents.openAria": "打开智能体",
|
|
2362
2413
|
"agents.runningTooltip": "运行中 {running} / 公告板身份 {identities}",
|
|
2363
2414
|
"agents.fallbackTooltip": "公告板身份 {identities}(监督器未连接或未注册该仓库)",
|
|
@@ -2387,6 +2438,10 @@ export const messages = Object.freeze({
|
|
|
2387
2438
|
"drawer.removeClaimed": "已认领的任务必须先释放或重开才能删除。",
|
|
2388
2439
|
"drawer.rawJson": "原始 JSON",
|
|
2389
2440
|
"drawer.lastRun": "最近一次执行",
|
|
2441
|
+
"drawer.noOutput": "(无输出)",
|
|
2442
|
+
"drawer.scopeTitle": "工作范围",
|
|
2443
|
+
"drawer.scopeHint": "这个任务改动的目录/文件",
|
|
2444
|
+
"drawer.scopeMore": "+{count} 项",
|
|
2390
2445
|
"drawer.runOverlaps": "同时写入",
|
|
2391
2446
|
"drawer.runLessons": "读取了 {count} 条经验",
|
|
2392
2447
|
"drawer.runNoLessons": "没有可读取的经验",
|
|
@@ -3244,15 +3299,6 @@ function supervisorWorkerCount(row) {
|
|
|
3244
3299
|
return found ? total : null;
|
|
3245
3300
|
}
|
|
3246
3301
|
|
|
3247
|
-
function taskDisplayTitle(title) {
|
|
3248
|
-
const full = asString(title);
|
|
3249
|
-
if (!full) return full;
|
|
3250
|
-
const stripped = full
|
|
3251
|
-
.replace(/^[\w.-]+\/[A-Za-z]?\d+\s*[::]\s*/, "")
|
|
3252
|
-
.replace(/^[A-Za-z]+-\d+\s*[::]\s*/, "");
|
|
3253
|
-
return stripped || full;
|
|
3254
|
-
}
|
|
3255
|
-
|
|
3256
3302
|
function element(doc, tag, className, text) {
|
|
3257
3303
|
const node = doc.createElement(tag);
|
|
3258
3304
|
if (className) node.className = className;
|
|
@@ -3667,6 +3713,10 @@ export function mount(root, options = {}) {
|
|
|
3667
3713
|
typeof view.setInterval === "function" ? view.setInterval.bind(view) : globalThis.setInterval.bind(globalThis);
|
|
3668
3714
|
const unschedule =
|
|
3669
3715
|
typeof view.clearInterval === "function" ? view.clearInterval.bind(view) : globalThis.clearInterval.bind(globalThis);
|
|
3716
|
+
const scheduleTimeout =
|
|
3717
|
+
typeof view.setTimeout === "function" ? view.setTimeout.bind(view) : globalThis.setTimeout.bind(globalThis);
|
|
3718
|
+
const clearScheduledTimeout =
|
|
3719
|
+
typeof view.clearTimeout === "function" ? view.clearTimeout.bind(view) : globalThis.clearTimeout.bind(globalThis);
|
|
3670
3720
|
|
|
3671
3721
|
const translator = typeof opts.t === "function" ? opts.t : null;
|
|
3672
3722
|
|
|
@@ -3698,6 +3748,10 @@ export function mount(root, options = {}) {
|
|
|
3698
3748
|
let refreshPromise = null;
|
|
3699
3749
|
let lastSnapshot = null;
|
|
3700
3750
|
let lastModel = null;
|
|
3751
|
+
let loadingActive = false;
|
|
3752
|
+
let loadingTicks = 0;
|
|
3753
|
+
let loadingTimer = null;
|
|
3754
|
+
let loadingPanelError = "";
|
|
3701
3755
|
let drawerNode = null;
|
|
3702
3756
|
let drawerState = null;
|
|
3703
3757
|
let drawerTrigger = null;
|
|
@@ -3796,6 +3850,10 @@ export function mount(root, options = {}) {
|
|
|
3796
3850
|
const statusNode = element(doc, "span", "hive-status", "");
|
|
3797
3851
|
bar.appendChild(statusNode);
|
|
3798
3852
|
|
|
3853
|
+
const loadingBadge = element(doc, "span", "hive-loading-badge is-hidden", translate("loading.label"));
|
|
3854
|
+
setAttr(loadingBadge, "role", "status");
|
|
3855
|
+
bar.appendChild(loadingBadge);
|
|
3856
|
+
|
|
3799
3857
|
const actionGroup = element(doc, "div", "hive-action-group");
|
|
3800
3858
|
const actionsNode = element(doc, "div", "hive-actions");
|
|
3801
3859
|
actionGroup.appendChild(actionsNode);
|
|
@@ -3907,6 +3965,31 @@ export function mount(root, options = {}) {
|
|
|
3907
3965
|
stage.appendChild(stageChips);
|
|
3908
3966
|
stage.appendChild(filterEmpty);
|
|
3909
3967
|
stage.appendChild(lanesNode);
|
|
3968
|
+
const skeletonNode = element(doc, "div", "hive-skeleton");
|
|
3969
|
+
for (const lane of LANE_ORDER) {
|
|
3970
|
+
const laneNode = element(doc, "section", "hive-skeleton-lane");
|
|
3971
|
+
laneNode.appendChild(element(doc, "div", "hive-skeleton-head", laneLabel(lane)));
|
|
3972
|
+
for (let row = 0; row < 3; row += 1) {
|
|
3973
|
+
laneNode.appendChild(element(doc, "div", "hive-skeleton-row", ""));
|
|
3974
|
+
}
|
|
3975
|
+
skeletonNode.appendChild(laneNode);
|
|
3976
|
+
}
|
|
3977
|
+
const loadingPanel = element(doc, "div", "hive-loading is-hidden");
|
|
3978
|
+
setAttr(loadingPanel, "role", "status");
|
|
3979
|
+
setAttr(loadingPanel, "aria-live", "polite");
|
|
3980
|
+
const loadingText = element(doc, "span", "hive-loading-text", "");
|
|
3981
|
+
const loadingRetry = element(doc, "button", "hive-btn hive-loading-retry", translate("loading.retry"));
|
|
3982
|
+
setAttr(loadingRetry, "type", "button");
|
|
3983
|
+
setAttr(loadingRetry, "title", translate("loading.retryAria"));
|
|
3984
|
+
setAttr(loadingRetry, "aria-label", translate("loading.retryAria"));
|
|
3985
|
+
loadingRetry.addEventListener("click", () => {
|
|
3986
|
+
beginLoading();
|
|
3987
|
+
void refresh();
|
|
3988
|
+
});
|
|
3989
|
+
loadingPanel.appendChild(loadingText);
|
|
3990
|
+
loadingPanel.appendChild(loadingRetry);
|
|
3991
|
+
stage.appendChild(skeletonNode);
|
|
3992
|
+
stage.appendChild(loadingPanel);
|
|
3910
3993
|
boardPane.appendChild(stage);
|
|
3911
3994
|
main.appendChild(boardPane);
|
|
3912
3995
|
|
|
@@ -5499,6 +5582,143 @@ export function mount(root, options = {}) {
|
|
|
5499
5582
|
* @param {object|null} run - normalized `lastRun` (see normalizeLastRun)
|
|
5500
5583
|
* @returns {HTMLElement}
|
|
5501
5584
|
*/
|
|
5585
|
+
function safeMarkdownHref(raw) {
|
|
5586
|
+
const href = asString(raw).trim();
|
|
5587
|
+
if (!href) return "";
|
|
5588
|
+
if (/^(https?:\/\/|mailto:)/i.test(href)) return href;
|
|
5589
|
+
if (href.startsWith("#") || href.startsWith("/")) return href;
|
|
5590
|
+
return "";
|
|
5591
|
+
}
|
|
5592
|
+
|
|
5593
|
+
function markdownTextNode(doc, text) {
|
|
5594
|
+
if (typeof doc.createTextNode === "function") return doc.createTextNode(text);
|
|
5595
|
+
const node = doc.createElement("span");
|
|
5596
|
+
node.textContent = text;
|
|
5597
|
+
return node;
|
|
5598
|
+
}
|
|
5599
|
+
|
|
5600
|
+
function appendInlineMarkdown(doc, parent, text) {
|
|
5601
|
+
const pattern = /(\x60[^\x60\n]+\x60|\*\*[^*\n]+\*\*|__[^_\n]+__|\*[^*\n]+\*|_[^_\n]+_|\[[^\]\n]+\]\([^)\n]+\))/g;
|
|
5602
|
+
let last = 0;
|
|
5603
|
+
let match = pattern.exec(text);
|
|
5604
|
+
while (match) {
|
|
5605
|
+
if (match.index > last) parent.appendChild(markdownTextNode(doc, text.slice(last, match.index)));
|
|
5606
|
+
const token = match[0];
|
|
5607
|
+
if (token.startsWith("\x60") && token.endsWith("\x60")) {
|
|
5608
|
+
parent.appendChild(element(doc, "code", "hive-md-code-inline", token.slice(1, -1)));
|
|
5609
|
+
} else if ((token.startsWith("**") && token.endsWith("**")) || (token.startsWith("__") && token.endsWith("__"))) {
|
|
5610
|
+
parent.appendChild(element(doc, "strong", null, token.slice(2, -2)));
|
|
5611
|
+
} else if ((token.startsWith("*") && token.endsWith("*")) || (token.startsWith("_") && token.endsWith("_"))) {
|
|
5612
|
+
parent.appendChild(element(doc, "em", null, token.slice(1, -1)));
|
|
5613
|
+
} else if (token.startsWith("[")) {
|
|
5614
|
+
const link = /^\[([^\]]+)\]\(([^)]+)\)$/.exec(token);
|
|
5615
|
+
const href = link ? safeMarkdownHref(link[2]) : "";
|
|
5616
|
+
if (link && href) {
|
|
5617
|
+
const anchor = element(doc, "a", "hive-md-link", link[1]);
|
|
5618
|
+
setAttr(anchor, "href", href);
|
|
5619
|
+
setAttr(anchor, "rel", "noreferrer noopener");
|
|
5620
|
+
parent.appendChild(anchor);
|
|
5621
|
+
} else {
|
|
5622
|
+
parent.appendChild(markdownTextNode(doc, token));
|
|
5623
|
+
}
|
|
5624
|
+
} else {
|
|
5625
|
+
parent.appendChild(markdownTextNode(doc, token));
|
|
5626
|
+
}
|
|
5627
|
+
last = pattern.lastIndex;
|
|
5628
|
+
match = pattern.exec(text);
|
|
5629
|
+
}
|
|
5630
|
+
if (last < text.length) parent.appendChild(markdownTextNode(doc, text.slice(last)));
|
|
5631
|
+
}
|
|
5632
|
+
|
|
5633
|
+
function renderMarkdownInto(doc, host, source) {
|
|
5634
|
+
const lines = String(source).replace(/\r\n?/g, "\n").split("\n");
|
|
5635
|
+
let index = 0;
|
|
5636
|
+
let paragraph = [];
|
|
5637
|
+
const flushParagraph = () => {
|
|
5638
|
+
if (paragraph.length === 0) return;
|
|
5639
|
+
const p = element(doc, "p", "hive-md-p");
|
|
5640
|
+
appendInlineMarkdown(doc, p, paragraph.join("\n"));
|
|
5641
|
+
host.appendChild(p);
|
|
5642
|
+
paragraph = [];
|
|
5643
|
+
};
|
|
5644
|
+
|
|
5645
|
+
while (index < lines.length) {
|
|
5646
|
+
const line = lines[index];
|
|
5647
|
+
if (/^\s*\x60\x60\x60/.test(line)) {
|
|
5648
|
+
flushParagraph();
|
|
5649
|
+
const fence = /^\s*\x60\x60\x60\s*([^\s]*)/.exec(line);
|
|
5650
|
+
const language = fence ? fence[1] : "";
|
|
5651
|
+
const codeLines = [];
|
|
5652
|
+
index += 1;
|
|
5653
|
+
while (index < lines.length && !/^\s*\x60\x60\x60/.test(lines[index])) {
|
|
5654
|
+
codeLines.push(lines[index]);
|
|
5655
|
+
index += 1;
|
|
5656
|
+
}
|
|
5657
|
+
if (index < lines.length) index += 1;
|
|
5658
|
+
const pre = element(doc, "pre", "hive-md-code-block");
|
|
5659
|
+
if (language) setAttr(pre, "data-lang", language);
|
|
5660
|
+
const code = element(doc, "code", null, codeLines.join("\n"));
|
|
5661
|
+
pre.appendChild(code);
|
|
5662
|
+
host.appendChild(pre);
|
|
5663
|
+
continue;
|
|
5664
|
+
}
|
|
5665
|
+
if (/^\s*$/.test(line)) {
|
|
5666
|
+
flushParagraph();
|
|
5667
|
+
index += 1;
|
|
5668
|
+
continue;
|
|
5669
|
+
}
|
|
5670
|
+
const heading = /^\s*(#{1,6})\s+(.*)$/.exec(line);
|
|
5671
|
+
if (heading) {
|
|
5672
|
+
flushParagraph();
|
|
5673
|
+
const level = heading[1].length;
|
|
5674
|
+
const node = element(doc, "h" + String(level), "hive-md-heading");
|
|
5675
|
+
appendInlineMarkdown(doc, node, heading[2]);
|
|
5676
|
+
host.appendChild(node);
|
|
5677
|
+
index += 1;
|
|
5678
|
+
continue;
|
|
5679
|
+
}
|
|
5680
|
+
if (/^\s*>\s?/.test(line)) {
|
|
5681
|
+
flushParagraph();
|
|
5682
|
+
const quote = element(doc, "blockquote", "hive-md-quote");
|
|
5683
|
+
while (index < lines.length && /^\s*>\s?/.test(lines[index])) {
|
|
5684
|
+
const p = element(doc, "p", "hive-md-p");
|
|
5685
|
+
appendInlineMarkdown(doc, p, lines[index].replace(/^\s*>\s?/, ""));
|
|
5686
|
+
quote.appendChild(p);
|
|
5687
|
+
index += 1;
|
|
5688
|
+
}
|
|
5689
|
+
host.appendChild(quote);
|
|
5690
|
+
continue;
|
|
5691
|
+
}
|
|
5692
|
+
if (/^\s*[-*+]\s+/.test(line)) {
|
|
5693
|
+
flushParagraph();
|
|
5694
|
+
const list = element(doc, "ul", "hive-md-list");
|
|
5695
|
+
while (index < lines.length && /^\s*[-*+]\s+/.test(lines[index])) {
|
|
5696
|
+
const item = element(doc, "li", null);
|
|
5697
|
+
appendInlineMarkdown(doc, item, lines[index].replace(/^\s*[-*+]\s+/, ""));
|
|
5698
|
+
list.appendChild(item);
|
|
5699
|
+
index += 1;
|
|
5700
|
+
}
|
|
5701
|
+
host.appendChild(list);
|
|
5702
|
+
continue;
|
|
5703
|
+
}
|
|
5704
|
+
if (/^\s*\d+[.)]\s+/.test(line)) {
|
|
5705
|
+
flushParagraph();
|
|
5706
|
+
const list = element(doc, "ol", "hive-md-list");
|
|
5707
|
+
while (index < lines.length && /^\s*\d+[.)]\s+/.test(lines[index])) {
|
|
5708
|
+
const item = element(doc, "li", null);
|
|
5709
|
+
appendInlineMarkdown(doc, item, lines[index].replace(/^\s*\d+[.)]\s+/, ""));
|
|
5710
|
+
list.appendChild(item);
|
|
5711
|
+
index += 1;
|
|
5712
|
+
}
|
|
5713
|
+
host.appendChild(list);
|
|
5714
|
+
continue;
|
|
5715
|
+
}
|
|
5716
|
+
paragraph.push(line);
|
|
5717
|
+
index += 1;
|
|
5718
|
+
}
|
|
5719
|
+
flushParagraph();
|
|
5720
|
+
}
|
|
5721
|
+
|
|
5502
5722
|
function buildRunSection(run, actionHost) {
|
|
5503
5723
|
const section = element(doc, "div", "hive-card-run");
|
|
5504
5724
|
const addAction = (node) => {
|
|
@@ -5544,7 +5764,14 @@ export function mount(root, options = {}) {
|
|
|
5544
5764
|
? translate("drawer.runLessons").replace("{count}", String(lessonCount))
|
|
5545
5765
|
: translate("drawer.runNoLessons");
|
|
5546
5766
|
section.appendChild(element(doc, "div", "hive-card-run-meta", lessonsText));
|
|
5547
|
-
|
|
5767
|
+
const output = element(doc, "div", "hive-card-run-output hive-markdown");
|
|
5768
|
+
const outputText = asString(run.output);
|
|
5769
|
+
if (outputText.trim() === "") {
|
|
5770
|
+
output.appendChild(element(doc, "div", "hive-markdown-empty", translate("drawer.noOutput")));
|
|
5771
|
+
} else {
|
|
5772
|
+
renderMarkdownInto(doc, output, outputText);
|
|
5773
|
+
}
|
|
5774
|
+
section.appendChild(output);
|
|
5548
5775
|
const foot = element(doc, "div", "hive-card-run-foot");
|
|
5549
5776
|
const copy = element(doc, "button", "hive-btn hive-btn-ghost hive-card-run-copy", translate("drawer.copyOutput"));
|
|
5550
5777
|
setAttr(copy, "type", "button");
|
|
@@ -5590,7 +5817,6 @@ export function mount(root, options = {}) {
|
|
|
5590
5817
|
const id = card.id || translate("card.noId");
|
|
5591
5818
|
const role = asString(card.role) || "—";
|
|
5592
5819
|
const status = laneLabel(lane);
|
|
5593
|
-
const repo = lastModel ? lastModel.repo : "";
|
|
5594
5820
|
const ariaLabel = translate("drawer.cardAria") + " " + (card.title || card.id || translate("card.untitled"));
|
|
5595
5821
|
|
|
5596
5822
|
const dialog = element(doc, "dialog", "hive-dialog hive-card-dialog hive-drawer");
|
|
@@ -5603,7 +5829,7 @@ export function mount(root, options = {}) {
|
|
|
5603
5829
|
const titleBox = element(doc, "div", "hive-dialog-head-title");
|
|
5604
5830
|
titleBox.appendChild(element(doc, "h2", "hive-dialog-title", title));
|
|
5605
5831
|
const subline = element(doc, "div", "hive-card-subline");
|
|
5606
|
-
const sublineText = [id, role, status
|
|
5832
|
+
const sublineText = [id, role, status].filter(Boolean).join(" · ");
|
|
5607
5833
|
subline.textContent = sublineText;
|
|
5608
5834
|
setAttr(subline, "title", sublineText);
|
|
5609
5835
|
titleBox.appendChild(subline);
|
|
@@ -5616,14 +5842,40 @@ export function mount(root, options = {}) {
|
|
|
5616
5842
|
|
|
5617
5843
|
const body = element(doc, "div", "hive-dialog-body hive-card-body");
|
|
5618
5844
|
if (Array.isArray(card.scope) && card.scope.length > 0) {
|
|
5619
|
-
const
|
|
5620
|
-
|
|
5621
|
-
|
|
5622
|
-
|
|
5623
|
-
|
|
5845
|
+
const scopeBlock = element(doc, "div", "hive-scope-block");
|
|
5846
|
+
scopeBlock.appendChild(element(doc, "div", "hive-scope-title", translate("drawer.scopeTitle")));
|
|
5847
|
+
scopeBlock.appendChild(element(doc, "div", "hive-scope-hint", translate("drawer.scopeHint")));
|
|
5848
|
+
const scopeList = element(doc, "div", "hive-scope-list");
|
|
5849
|
+
const scopes = card.scope.filter((scope) => asString(scope) !== "");
|
|
5850
|
+
const visibleScopes = scopes.slice(0, 5);
|
|
5851
|
+
for (const scope of visibleScopes) {
|
|
5852
|
+
const path = element(doc, "code", "hive-scope-path", asString(scope));
|
|
5853
|
+
setAttr(path, "title", asString(scope));
|
|
5854
|
+
scopeList.appendChild(path);
|
|
5855
|
+
}
|
|
5856
|
+
const hiddenScopes = scopes.slice(5);
|
|
5857
|
+
if (hiddenScopes.length > 0) {
|
|
5858
|
+
const more = element(
|
|
5859
|
+
doc,
|
|
5860
|
+
"button",
|
|
5861
|
+
"hive-btn hive-btn-ghost hive-scope-more",
|
|
5862
|
+
translate("drawer.scopeMore").replace("{count}", String(hiddenScopes.length)),
|
|
5863
|
+
);
|
|
5864
|
+
setAttr(more, "type", "button");
|
|
5865
|
+
more.addEventListener("click", () => {
|
|
5866
|
+
for (const scope of hiddenScopes) {
|
|
5867
|
+
const path = element(doc, "code", "hive-scope-path", asString(scope));
|
|
5868
|
+
setAttr(path, "title", asString(scope));
|
|
5869
|
+
scopeList.appendChild(path);
|
|
5870
|
+
}
|
|
5871
|
+
more.parentNode.removeChild(more);
|
|
5872
|
+
});
|
|
5873
|
+
scopeList.appendChild(more);
|
|
5624
5874
|
}
|
|
5625
|
-
|
|
5875
|
+
scopeBlock.appendChild(scopeList);
|
|
5876
|
+
body.appendChild(scopeBlock);
|
|
5626
5877
|
}
|
|
5878
|
+
|
|
5627
5879
|
const runActions = [];
|
|
5628
5880
|
body.appendChild(buildRunSection(card.lastRun, runActions));
|
|
5629
5881
|
dialog.appendChild(body);
|
|
@@ -6363,8 +6615,7 @@ export function mount(root, options = {}) {
|
|
|
6363
6615
|
|
|
6364
6616
|
function renderCard(card, lane, existing) {
|
|
6365
6617
|
const node = existing || element(doc, "article", "hive-card");
|
|
6366
|
-
const
|
|
6367
|
-
const title = taskDisplayTitle(fullTitle);
|
|
6618
|
+
const title = card.title || translate("card.untitled");
|
|
6368
6619
|
if (!existing) {
|
|
6369
6620
|
setAttr(node, "tabindex", "0");
|
|
6370
6621
|
setAttr(node, "role", "button");
|
|
@@ -6382,8 +6633,8 @@ export function mount(root, options = {}) {
|
|
|
6382
6633
|
node._hiveCard = card;
|
|
6383
6634
|
node._hiveLane = lane;
|
|
6384
6635
|
node._hiveTitle.textContent = title;
|
|
6385
|
-
setAttr(node, "aria-label", translate("card.openAria") + " " +
|
|
6386
|
-
setAttr(node, "title",
|
|
6636
|
+
setAttr(node, "aria-label", translate("card.openAria") + " " + title);
|
|
6637
|
+
setAttr(node, "title", title);
|
|
6387
6638
|
return node;
|
|
6388
6639
|
}
|
|
6389
6640
|
function renderStageChips(model) {
|
|
@@ -6660,6 +6911,7 @@ export function mount(root, options = {}) {
|
|
|
6660
6911
|
closeHelp(false);
|
|
6661
6912
|
openHelp();
|
|
6662
6913
|
}
|
|
6914
|
+
finishLoading();
|
|
6663
6915
|
return model;
|
|
6664
6916
|
}
|
|
6665
6917
|
|
|
@@ -6686,6 +6938,7 @@ export function mount(root, options = {}) {
|
|
|
6686
6938
|
if (!destroyed) {
|
|
6687
6939
|
setStatus("status.disconnected", "error");
|
|
6688
6940
|
reportError(error);
|
|
6941
|
+
if (!lastModel || loadingActive) failLoading(error);
|
|
6689
6942
|
}
|
|
6690
6943
|
}
|
|
6691
6944
|
}
|
|
@@ -6729,6 +6982,7 @@ export function mount(root, options = {}) {
|
|
|
6729
6982
|
unschedule(timer);
|
|
6730
6983
|
timer = null;
|
|
6731
6984
|
}
|
|
6985
|
+
stopLoadingTimer();
|
|
6732
6986
|
if (typeof doc.removeEventListener === "function") {
|
|
6733
6987
|
doc.removeEventListener("visibilitychange", onVisibilityChange);
|
|
6734
6988
|
}
|
|
@@ -6795,6 +7049,84 @@ export function mount(root, options = {}) {
|
|
|
6795
7049
|
}
|
|
6796
7050
|
}
|
|
6797
7051
|
|
|
7052
|
+
|
|
7053
|
+
function setLoadingInteractions(disabled) {
|
|
7054
|
+
frame.className =
|
|
7055
|
+
"hive" +
|
|
7056
|
+
(disabled ? " is-loading" : "") +
|
|
7057
|
+
(lastModel && lastModel.initialised === false ? " is-uninitialised" : "");
|
|
7058
|
+
setAttr(stage, "aria-busy", disabled ? "true" : "false");
|
|
7059
|
+
for (const child of actionsNode.children) {
|
|
7060
|
+
if ("disabled" in child) child.disabled = disabled;
|
|
7061
|
+
}
|
|
7062
|
+
agentsCount.disabled = disabled;
|
|
7063
|
+
}
|
|
7064
|
+
|
|
7065
|
+
function showSkeletonStats() {
|
|
7066
|
+
clearNode(statsNode);
|
|
7067
|
+
for (let index = 0; index < 2; index += 1) {
|
|
7068
|
+
statsNode.appendChild(element(doc, "span", "hive-skeleton-pill", ""));
|
|
7069
|
+
}
|
|
7070
|
+
agentsCount.textContent = "…";
|
|
7071
|
+
agentsCount.disabled = true;
|
|
7072
|
+
queenBadge.className = "hive-queen-badge is-hidden";
|
|
7073
|
+
}
|
|
7074
|
+
|
|
7075
|
+
function showLoadingPanel(text) {
|
|
7076
|
+
loadingText.textContent = text;
|
|
7077
|
+
loadingPanel.className = "hive-loading";
|
|
7078
|
+
}
|
|
7079
|
+
|
|
7080
|
+
function stopLoadingTimer() {
|
|
7081
|
+
if (loadingTimer === null) return;
|
|
7082
|
+
clearScheduledTimeout(loadingTimer);
|
|
7083
|
+
loadingTimer = null;
|
|
7084
|
+
}
|
|
7085
|
+
|
|
7086
|
+
function loadingTick() {
|
|
7087
|
+
if (!loadingActive || destroyed) return;
|
|
7088
|
+
loadingTicks += 1;
|
|
7089
|
+
if (loadingTicks >= 5) {
|
|
7090
|
+
showLoadingPanel(translate("loading.slow").replace("{seconds}", String(loadingTicks)));
|
|
7091
|
+
}
|
|
7092
|
+
loadingTimer = scheduleTimeout(loadingTick, 1000);
|
|
7093
|
+
}
|
|
7094
|
+
|
|
7095
|
+
function beginLoading() {
|
|
7096
|
+
if (destroyed) return;
|
|
7097
|
+
loadingActive = true;
|
|
7098
|
+
loadingTicks = 0;
|
|
7099
|
+
loadingPanelError = "";
|
|
7100
|
+
loadingPanel.className = "hive-loading is-hidden";
|
|
7101
|
+
loadingBadge.className = "hive-loading-badge";
|
|
7102
|
+
loadingBadge.textContent = translate("loading.label");
|
|
7103
|
+
skeletonNode.className = "hive-skeleton";
|
|
7104
|
+
showSkeletonStats();
|
|
7105
|
+
setLoadingInteractions(true);
|
|
7106
|
+
stopLoadingTimer();
|
|
7107
|
+
loadingTimer = scheduleTimeout(loadingTick, 1000);
|
|
7108
|
+
}
|
|
7109
|
+
|
|
7110
|
+
function finishLoading() {
|
|
7111
|
+
loadingActive = false;
|
|
7112
|
+
loadingPanelError = "";
|
|
7113
|
+
stopLoadingTimer();
|
|
7114
|
+
skeletonNode.className = "hive-skeleton is-hidden";
|
|
7115
|
+
loadingPanel.className = "hive-loading is-hidden";
|
|
7116
|
+
loadingBadge.className = "hive-loading-badge is-hidden";
|
|
7117
|
+
setLoadingInteractions(false);
|
|
7118
|
+
}
|
|
7119
|
+
|
|
7120
|
+
function failLoading(error) {
|
|
7121
|
+
loadingActive = false;
|
|
7122
|
+
stopLoadingTimer();
|
|
7123
|
+
const detail = asString(error && error.message) || translate("loading.failed");
|
|
7124
|
+
loadingPanelError = detail;
|
|
7125
|
+
showLoadingPanel(translate("loading.failed") + ": " + detail);
|
|
7126
|
+
loadingBadge.className = "hive-loading-badge is-hidden";
|
|
7127
|
+
setLoadingInteractions(true);
|
|
7128
|
+
}
|
|
7129
|
+
|
|
6798
7130
|
function stopPolling() {
|
|
6799
7131
|
if (timer === null) return;
|
|
6800
7132
|
unschedule(timer);
|
|
@@ -6821,6 +7153,7 @@ export function mount(root, options = {}) {
|
|
|
6821
7153
|
if (typeof doc.addEventListener === "function") {
|
|
6822
7154
|
doc.addEventListener("visibilitychange", onVisibilityChange);
|
|
6823
7155
|
}
|
|
7156
|
+
beginLoading();
|
|
6824
7157
|
startPolling();
|
|
6825
7158
|
void refresh();
|
|
6826
7159
|
|