@d86e/hive-panel 1.0.26 → 1.0.27

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/package.json +1 -1
  2. package/public/panel.js +8 -3
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@d86e/hive-panel",
3
- "version": "1.0.26",
3
+ "version": "1.0.27",
4
4
  "description": "A read-only board for a Hive swarm: agents, task lanes and the event tail, served from the refs and files you already have.",
5
5
  "type": "module",
6
6
  "bin": {
package/public/panel.js CHANGED
@@ -2428,6 +2428,7 @@ export const messages = Object.freeze({
2428
2428
  "limits.saveAria": "Save agent concurrency for {repo}",
2429
2429
  "limits.saving": "Saving...",
2430
2430
  "limits.saved": "Agent concurrency saved.",
2431
+ "limits.noChanges": "No limit changes to save.",
2431
2432
  "limits.failed": "Could not save agent concurrency",
2432
2433
  "limits.invalid": "Every limit must be an integer from 0 to 999.",
2433
2434
  "limits.none": "No role data for this repository.",
@@ -2816,6 +2817,7 @@ export const messages = Object.freeze({
2816
2817
  "limits.saveAria": "保存 {repo} 的智能体并发上限",
2817
2818
  "limits.saving": "正在保存…",
2818
2819
  "limits.saved": "智能体的并发上限已保存。",
2820
+ "limits.noChanges": "没有需要保存的限额改动。",
2819
2821
  "limits.failed": "保存智能体的并发上限失败",
2820
2822
  "limits.invalid": "每个上限都必须是 0–999 的整数。",
2821
2823
  "limits.none": "这个仓库没有角色数据。",
@@ -5477,7 +5479,9 @@ export function mount(root, options = {}) {
5477
5479
  setAttr(input, "step", "1");
5478
5480
  setAttr(input, "inputmode", "numeric");
5479
5481
  setAttr(input, "aria-label", translate("limits.limitAria").replace("{role}", role.role));
5480
- input.value = supervisorNumber(role.limit) === null ? "5" : String(supervisorNumber(role.limit));
5482
+ const effectiveLimit = supervisorNumber(role.limit);
5483
+ input.value = effectiveLimit === null ? "" : String(effectiveLimit);
5484
+ if (effectiveLimit === null) setAttr(input, "placeholder", "—");
5481
5485
  input.disabled = !writable || !supervisorAvailable;
5482
5486
  roleRow.appendChild(input);
5483
5487
  const sourceKey = role.source === "limits" ? "limits.source.limits" : role.source === "config" ? "limits.source.config" : "limits.source.default";
@@ -5498,7 +5502,7 @@ export function mount(root, options = {}) {
5498
5502
  roleRow.appendChild(element(doc, "span", "hive-limits-cell is-action", ""));
5499
5503
  }
5500
5504
  table.appendChild(roleRow);
5501
- rowNodes.push({ role: role.role, input });
5505
+ rowNodes.push({ role: role.role, input, initial: String(input.value) });
5502
5506
  }
5503
5507
  limitsSection.appendChild(table);
5504
5508
  limitsSection.appendChild(element(doc, "div", "hive-limits-hint", translate("limits.defaultHint")));
@@ -5737,6 +5741,7 @@ export function mount(root, options = {}) {
5737
5741
  let invalid = false;
5738
5742
  for (const entry of state.rows) {
5739
5743
  const raw = String(entry.input.value === null || entry.input.value === undefined ? "" : entry.input.value).trim();
5744
+ if (raw === String(entry.initial ?? "")) continue;
5740
5745
  const number = Number(raw);
5741
5746
  if (!/^\d+$/.test(raw) || !Number.isInteger(number) || number < 0 || number > 999) {
5742
5747
  invalid = true;
@@ -5750,7 +5755,7 @@ export function mount(root, options = {}) {
5750
5755
  return;
5751
5756
  }
5752
5757
  if (Object.keys(roleLimits).length === 0) {
5753
- setLimitsError(translate("limits.none"));
5758
+ setLimitsError(translate("limits.noChanges"));
5754
5759
  return;
5755
5760
  }
5756
5761
  if (!fetchImpl) {