@songsid/agend 2.4.0-beta.16 → 2.4.0-beta.18

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 (172) hide show
  1. package/dist/auth-api.js +2 -0
  2. package/dist/auth-api.js.map +1 -1
  3. package/dist/backend/claude-code.d.ts +10 -1
  4. package/dist/backend/claude-code.js +7 -2
  5. package/dist/backend/claude-code.js.map +1 -1
  6. package/dist/backend/claude-transcript-errors.d.ts +4 -0
  7. package/dist/backend/claude-transcript-errors.js +5 -1
  8. package/dist/backend/claude-transcript-errors.js.map +1 -1
  9. package/dist/backend/types.d.ts +6 -0
  10. package/dist/backend/types.js.map +1 -1
  11. package/dist/build-provenance.json +1 -1
  12. package/dist/claude-credential-launch.d.ts +1 -0
  13. package/dist/claude-credential-launch.js +13 -2
  14. package/dist/claude-credential-launch.js.map +1 -1
  15. package/dist/claude-credential-vault.d.ts +7 -1
  16. package/dist/claude-credential-vault.js +26 -1
  17. package/dist/claude-credential-vault.js.map +1 -1
  18. package/dist/claude-request-observation.d.ts +7 -0
  19. package/dist/claude-request-observation.js +26 -0
  20. package/dist/claude-request-observation.js.map +1 -0
  21. package/dist/cli-audited.js +11 -8
  22. package/dist/cli-audited.js.map +1 -1
  23. package/dist/daemon.d.ts +8 -0
  24. package/dist/daemon.js +68 -13
  25. package/dist/daemon.js.map +1 -1
  26. package/dist/fleet-context.d.ts +1 -0
  27. package/dist/fleet-manager.d.ts +28 -0
  28. package/dist/fleet-manager.js +222 -10
  29. package/dist/fleet-manager.js.map +1 -1
  30. package/dist/fleet-windows-runtime.d.ts +1 -1
  31. package/dist/fleet-windows-runtime.js +1 -1
  32. package/dist/fleet-windows-runtime.js.map +1 -1
  33. package/dist/fleet-yaml-stringify.d.ts +3 -0
  34. package/dist/fleet-yaml-stringify.js +79 -0
  35. package/dist/fleet-yaml-stringify.js.map +1 -0
  36. package/dist/general-knowledge/skills/web-dashboard/SKILL.md +17 -3
  37. package/dist/host-monitoring-alert-policy.d.ts +71 -0
  38. package/dist/host-monitoring-alert-policy.js +150 -0
  39. package/dist/host-monitoring-alert-policy.js.map +1 -0
  40. package/dist/host-monitoring-alert-resources.d.ts +11 -0
  41. package/dist/host-monitoring-alert-resources.js +16 -0
  42. package/dist/host-monitoring-alert-resources.js.map +1 -0
  43. package/dist/host-monitoring-alert-settings.d.ts +14 -0
  44. package/dist/host-monitoring-alert-settings.js +63 -0
  45. package/dist/host-monitoring-alert-settings.js.map +1 -0
  46. package/dist/host-monitoring-alert-store.d.ts +49 -0
  47. package/dist/host-monitoring-alert-store.js +228 -0
  48. package/dist/host-monitoring-alert-store.js.map +1 -0
  49. package/dist/host-monitoring-alert-text.d.ts +7 -0
  50. package/dist/host-monitoring-alert-text.js +10 -0
  51. package/dist/host-monitoring-alert-text.js.map +1 -0
  52. package/dist/host-monitoring-alerts.d.ts +76 -0
  53. package/dist/host-monitoring-alerts.js +261 -0
  54. package/dist/host-monitoring-alerts.js.map +1 -0
  55. package/dist/host-monitoring-config.d.ts +2 -1
  56. package/dist/host-monitoring-config.js +8 -3
  57. package/dist/host-monitoring-config.js.map +1 -1
  58. package/dist/host-monitoring-footprint-policy.d.ts +45 -0
  59. package/dist/host-monitoring-footprint-policy.js +150 -0
  60. package/dist/host-monitoring-footprint-policy.js.map +1 -0
  61. package/dist/host-monitoring-footprint.d.ts +42 -0
  62. package/dist/host-monitoring-footprint.js +169 -0
  63. package/dist/host-monitoring-footprint.js.map +1 -0
  64. package/dist/host-monitoring-history-files.d.ts +2 -0
  65. package/dist/host-monitoring-history-files.js +16 -0
  66. package/dist/host-monitoring-history-files.js.map +1 -0
  67. package/dist/host-monitoring-history-policy.d.ts +57 -0
  68. package/dist/host-monitoring-history-policy.js +107 -0
  69. package/dist/host-monitoring-history-policy.js.map +1 -0
  70. package/dist/host-monitoring-history-store.d.ts +52 -0
  71. package/dist/host-monitoring-history-store.js +178 -0
  72. package/dist/host-monitoring-history-store.js.map +1 -0
  73. package/dist/host-monitoring-history-worker.d.ts +1 -0
  74. package/dist/host-monitoring-history-worker.js +66 -0
  75. package/dist/host-monitoring-history-worker.js.map +1 -0
  76. package/dist/host-monitoring-history.d.ts +80 -0
  77. package/dist/host-monitoring-history.js +301 -0
  78. package/dist/host-monitoring-history.js.map +1 -0
  79. package/dist/host-monitoring-platform.d.ts +73 -0
  80. package/dist/host-monitoring-platform.js +273 -0
  81. package/dist/host-monitoring-platform.js.map +1 -0
  82. package/dist/host-monitoring-process-identity.d.ts +8 -0
  83. package/dist/host-monitoring-process-identity.js +81 -0
  84. package/dist/host-monitoring-process-identity.js.map +1 -0
  85. package/dist/host-monitoring-runtime.d.ts +42 -0
  86. package/dist/host-monitoring-runtime.js +95 -0
  87. package/dist/host-monitoring-runtime.js.map +1 -0
  88. package/dist/host-monitoring-settings-store.d.ts +5 -0
  89. package/dist/host-monitoring-settings-store.js +49 -0
  90. package/dist/host-monitoring-settings-store.js.map +1 -0
  91. package/dist/host-monitoring.d.ts +108 -0
  92. package/dist/host-monitoring.js +157 -0
  93. package/dist/host-monitoring.js.map +1 -0
  94. package/dist/instance-lifecycle.js +2 -2
  95. package/dist/instance-lifecycle.js.map +1 -1
  96. package/dist/needs-you-hub.d.ts +1 -0
  97. package/dist/needs-you-hub.js +1 -0
  98. package/dist/needs-you-hub.js.map +1 -1
  99. package/dist/needs-you.d.ts +3 -2
  100. package/dist/needs-you.js +1 -0
  101. package/dist/needs-you.js.map +1 -1
  102. package/dist/public-web-gateway.js +11 -1
  103. package/dist/public-web-gateway.js.map +1 -1
  104. package/dist/runtime-cli-install.js +17 -16
  105. package/dist/runtime-cli-install.js.map +1 -1
  106. package/dist/settings-api.d.ts +5 -0
  107. package/dist/settings-api.js +70 -7
  108. package/dist/settings-api.js.map +1 -1
  109. package/dist/settings-baseline.d.ts +1 -0
  110. package/dist/settings-baseline.js +6 -4
  111. package/dist/settings-baseline.js.map +1 -1
  112. package/dist/settings-change.js +8 -0
  113. package/dist/settings-change.js.map +1 -1
  114. package/dist/settings-effect.d.ts +4 -0
  115. package/dist/settings-effect.js +25 -4
  116. package/dist/settings-effect.js.map +1 -1
  117. package/dist/topic-commands.js +4 -0
  118. package/dist/topic-commands.js.map +1 -1
  119. package/dist/transcript-monitor.d.ts +1 -0
  120. package/dist/transcript-monitor.js +18 -0
  121. package/dist/transcript-monitor.js.map +1 -1
  122. package/dist/ui/accounts-view.js +7 -5
  123. package/dist/ui/chat-store.js +21 -4
  124. package/dist/ui/claude-credentials.js +12 -1
  125. package/dist/ui/fleet-office-pack.js +2 -2
  126. package/dist/ui/fleet-office-play.js +142 -3
  127. package/dist/ui/fleet-office-skin.js +67 -2
  128. package/dist/ui/fleet-office-store.js +41 -0
  129. package/dist/ui/fleet-office-zones.js +15 -8
  130. package/dist/ui/fleet-office.js +126 -21
  131. package/dist/ui/host-alerts.js +23 -0
  132. package/dist/ui/host-footprint.js +17 -0
  133. package/dist/ui/host-health-model.js +42 -0
  134. package/dist/ui/host-health.js +79 -0
  135. package/dist/ui/host-time.js +5 -0
  136. package/dist/ui/panel-chat.js +101 -43
  137. package/dist/ui/panel-fleet.js +24 -11
  138. package/dist/ui/panel-hub.js +5 -1
  139. package/dist/ui/panel-needs.js +27 -16
  140. package/dist/ui/panel-settings.js +4 -3
  141. package/dist/ui/search-dialog.js +8 -1
  142. package/dist/ui/settings-capabilities.js +2 -0
  143. package/dist/ui/settings-host-alerts.js +22 -0
  144. package/dist/ui/settings-host-monitoring.js +37 -18
  145. package/dist/ui/settings-registry.js +4 -1
  146. package/dist/ui/shared/accounts.css +8 -4
  147. package/dist/ui/shared/agent-sheet.js +5 -2
  148. package/dist/ui/shared/app-i18n.js +2 -2
  149. package/dist/ui/shared/app-route.js +1 -1
  150. package/dist/ui/shared/app.css +87 -9
  151. package/dist/ui/shared/app.js +1 -0
  152. package/dist/ui/shared/chat-render.js +24 -9
  153. package/dist/ui/shared/chat-strings.js +4 -4
  154. package/dist/ui/shared/chat-thread.js +45 -11
  155. package/dist/ui/shared/instance-nav.js +47 -5
  156. package/dist/ui/shared/jump-idle.js +36 -0
  157. package/dist/ui/shared/theme.js +6 -2
  158. package/dist/ui/shared/ui-menu.js +17 -11
  159. package/dist/web-api.d.ts +3 -0
  160. package/dist/web-api.js +249 -4
  161. package/dist/web-api.js.map +1 -1
  162. package/dist/web-chat-history.d.ts +47 -2
  163. package/dist/web-chat-history.js +149 -11
  164. package/dist/web-chat-history.js.map +1 -1
  165. package/dist/web-guest-access.js +4 -4
  166. package/dist/web-guest-access.js.map +1 -1
  167. package/dist/web-shell-routes.d.ts +1 -1
  168. package/dist/web-shell-routes.js +1 -1
  169. package/dist/web-shell-routes.js.map +1 -1
  170. package/dist/web-upload.d.ts +1 -1
  171. package/dist/web-upload.js.map +1 -1
  172. package/package.json +1 -1
@@ -1,36 +1,51 @@
1
- import { html, useEffect } from '/assets/app-html.js';
1
+ import {HostAlertSettings} from './settings-host-alerts.js';
2
+ import { html, useEffect, useRef, useState } from '/assets/app-html.js';
2
3
  import { register, t } from '/assets/app-i18n.js';
3
4
  import { confirmDialog } from '/assets/ui-confirm.js';
4
5
  import { useDraft, syncStage } from './settings-draft.js';
6
+ import { fleetPath } from '/assets/app-route.js';
7
+ import { hostMonitoringVisible } from './settings-capabilities.js';
5
8
  register('hostMonitoring', {
6
- en: { title:'Host monitoring', enabled:'Monitor this computer', agents:'Include agent footprint',
7
- hint:'When on, samples every 30–60 seconds; estimated 2–4 MiB RAM and 1–4 MiB of local writes per hour.',
8
- agentHint:'Optional process snapshot every minute; for 32 agents, an estimated extra 2–8 MiB RAM and 1–4 MiB of writes per hour.',
9
+ en: { open:'View host health',title:'Host monitoring', enabled:'Monitor this computer', agents:'Include agent footprint',
10
+ hint:'Samples every 30–60 seconds with a background history worker; keeps up to 64 MiB locally. Memory and writes vary by computer.',
11
+ agentHint:'Optional: samples agent CPU and memory every minute, up to 128 agents and 4096 processes on this computer. Above either limit, the sample is unavailable. Cost grows with agent and process counts; reads known file metadata without scanning workspaces.',
9
12
  off:'Off by default. While off, there is no monitoring collector, timer or history file.',
10
13
  agentUnavailable:'Agent footprint is not available in this version of AgEnD.',
11
- stopTitle:'Turn off host monitoring?', stopBody:'This stops monitoring and its alerts, and removes the recorded host history. Turning it on again starts a new history.', stop:'Turn off', },
12
- 'zh-TW': { title:'主機監測', enabled:'監測這台電腦', agents:'包含 Agent 資源用量',
13
- hint:'開啟後每 30–60 秒取樣;估計使用 2–4 MiB 記憶體,每小時本機寫入 1–4 MiB。',
14
- agentHint:'選用:每分鐘讀取行程資料;32 個 Agent 估計另用 2–8 MiB 記憶體,每小時寫入 1–4 MiB。',
15
- off:'預設關閉。關閉時沒有監測收集器、計時器或歷史檔案。',
14
+ stopTitle:'Turn off host monitoring?', stopBody:'This stops monitoring and its alerts, and removes the recorded host history. Turning it on again starts a new history.', stop:'Turn off',
15
+ drive:'Windows drive holding this WSL distribution', auto:'Identify automatically', refresh:'Refresh drive list', driveHint:'If automatic identification is unavailable, choose the drive that holds this distribution’s virtual disk. Mounted local drives are listed from the latest sample while monitoring is on; Refresh reads that sample without starting a probe.', },
16
+ 'zh-TW': { open:'查看主機狀態',title:'主機監測', enabled:'監測這台電腦', agents:'包含 Agent 資源用量',
17
+ hint:'每 30–60 秒取樣並在背景保存歷史,本機資料最多 64 MiB。記憶體與寫入量依電腦而異。',
18
+ agentHint:'選用:每分鐘讀取 Agent 的 CPU 和記憶體用量,每次最多 128 個 Agent、全機 4096 個行程。超過任一上限時,該次讀數會顯示無法取得。Agent 與行程越多,耗用的資源越多;只讀已知檔案的資訊,不掃描工作區。',
19
+ off:'預設關閉。關閉時不會取樣、啟動監測計時器或建立歷史檔案。',
16
20
  agentUnavailable:'這個 AgEnD 版本尚未提供 Agent 資源用量。',
17
- stopTitle:'關閉主機監測?', stopBody:'這會停止監測與通知,並移除已記錄的主機歷史。重新開啟時會建立新的歷史。', stop:'關閉', },
21
+ stopTitle:'關閉主機監測?', stopBody:'這會停止監測與通知,並移除已記錄的主機歷史。重新開啟時會建立新的歷史。', stop:'關閉',
22
+ drive:'這個 WSL 發行版本的 Windows 磁碟', auto:'自動辨識', refresh:'重新整理磁碟清單', driveHint:'無法自動辨識時,請選擇存放這個發行版本虛擬磁碟的磁碟。監測開啟後會依最新取樣列出已掛載的本機磁碟;重新整理只讀取該取樣,不會啟動探測。', },
18
23
  });
19
24
  const copy = k => t(`hostMonitoring.${k}`);
20
25
  export function HostMonitoringSettings({ ctx }) {
21
- const available = ctx.schema?.host_monitoring === true;
22
- useEffect(() => { if (!available) syncStage(ctx, 'host-monitoring', null); }, [available]);
23
- // Keep the dormant controls out of Settings until a real collector is wired.
26
+ const available = hostMonitoringVisible(ctx.schema);
27
+ useEffect(() => { if (!available) {syncStage(ctx, 'host-monitoring', null);syncStage(ctx,'host-alerts',null);} }, [available]);
28
+ // A collector alone is not a visible feature: S-207 must provide its page too.
24
29
  // A separate child keeps hook order stable across capability transitions.
25
30
  return available ? html`<${AvailableHostMonitoringSettings} ctx=${ctx} />` : null;
26
31
  }
27
32
  function AvailableHostMonitoringSettings({ ctx }) {
28
- const base = { enabled:ctx.fleet.monitoring?.enabled === true, agent_footprint:ctx.fleet.monitoring?.agent_footprint === true };
33
+ const base = { enabled:ctx.fleet.monitoring?.enabled === true, agent_footprint:ctx.fleet.monitoring?.agent_footprint === true,
34
+ ...(typeof ctx.fleet.monitoring?.wsl_drive === 'string' ? {wsl_drive:ctx.fleet.monitoring.wsl_drive} : {}) };
29
35
  const [form, setForm] = useDraft(ctx, 'host-monitoring', () => base);
36
+ const [health,setHealth] = useState(null), [reading,setReading] = useState(false);
37
+ const live=useRef(false),seq=useRef(0);
38
+ const refresh=async()=>{
39
+ const request=++seq.current;setReading(true);
40
+ try {const r=await fetch('/ui/host-health');const snapshot=r.ok?await r.json():null;if(live.current&&request===seq.current)setHealth(snapshot);}
41
+ catch {if(live.current&&request===seq.current)setHealth(null);}
42
+ finally {if(live.current&&request===seq.current)setReading(false);}
43
+ };
44
+ useEffect(()=>{live.current=true;void refresh();return()=>{live.current=false;seq.current++;};},[]);
30
45
  const agentsAvailable = ctx.schema?.host_monitoring_agents === true;
31
46
  useEffect(() => {
32
- const changed = form.enabled !== base.enabled || form.agent_footprint !== base.agent_footprint;
33
- syncStage(ctx, 'host-monitoring', changed ? {label:copy('title'), impact:'now', request:{method:'PUT',url:'/api/settings/fleet/monitoring',body:{enabled:form.enabled,agent_footprint:form.agent_footprint}}} : null);
47
+ const changed = form.enabled !== base.enabled || form.agent_footprint !== base.agent_footprint || (form.wsl_drive ?? '') !== (base.wsl_drive ?? '');
48
+ syncStage(ctx, 'host-monitoring', changed ? {label:copy('title'), impact:'now', request:{method:'PUT',url:'/api/settings/fleet/monitoring',body:{enabled:form.enabled,agent_footprint:form.agent_footprint,...(Object.hasOwn(form,'wsl_drive')?{wsl_drive:form.wsl_drive}:{})}}} : null);
34
49
  }, [form]);
35
50
  const setEnabled = async (checked, control) => {
36
51
  if (!checked && form.enabled && !(await confirmDialog({title:copy('stopTitle'),message:copy('stopBody'),confirmLabel:copy('stop'),danger:true}))) {
@@ -43,9 +58,13 @@ function AvailableHostMonitoringSettings({ ctx }) {
43
58
  };
44
59
  const row = (id,key,hint,disabled,change) => html`<div class="s-setting-row"><div class="s-setting-copy"><label for=${id}>${copy(key)}</label><p class="note" id=${`${id}-hint`}>${copy(hint)}</p></div>
45
60
  <input class="s-ui-toggle" type="checkbox" role="switch" id=${id} checked=${form[key === 'agents' ? 'agent_footprint':'enabled']} disabled=${disabled} aria-describedby=${`${id}-hint`} onChange=${e=>change(e.target.checked, e.target)} /></div>`;
46
- return html`<section class="card s-group" id="host-monitoring"><h3>${copy('title')}</h3>
61
+ return html`<section class="card s-group" id="host-monitoring"><div class="s-group-head"><h3>${copy('title')}</h3><a class="btn btn-sm" href=${fleetPath('host-health')}>${copy('open')}</a></div>
47
62
  ${row('hostMonitoringEnabled','enabled','hint',false,setEnabled)}
48
63
  ${row('hostMonitoringAgents','agents','agentHint',!agentsAvailable || !form.enabled,checked=>setForm(f=>({...f,agent_footprint:checked})))}
64
+ ${health?.platform === 'wsl' || base.wsl_drive ? html`<div class="field"><label for="hostMonitoringDrive">${copy('drive')}</label>
65
+ <select id="hostMonitoringDrive" value=${form.wsl_drive ?? ''} onChange=${e=>setForm(f=>({...f,wsl_drive:e.target.value}))}>
66
+ <option value="">${copy('auto')}</option>${[...new Set([...(health?.disks?.value?.availableDrives ?? []),form.wsl_drive])].filter(v=>typeof v==='string'&&/^[A-Z]$/.test(v)).slice(0,26).map(d=>html`<option value=${d}>${d}:</option>`)}</select>
67
+ <p class="note">${copy('driveHint')}</p><button type="button" class="btn btn-sm" disabled=${reading} onClick=${refresh}>${copy('refresh')}</button></div>` : null}
49
68
  ${!agentsAvailable ? html`<p class="note">${copy('agentUnavailable')}</p>` : null}
50
- <p class="note">${copy('off')}</p></section>`;
69
+ <p class="note">${copy('off')}</p><${HostAlertSettings} ctx=${ctx} health=${health}/></section>`;
51
70
  }
@@ -12,6 +12,7 @@ import "./settings-public-session-strings.js"; // #3708: publicSessionAbsolute
12
12
  import "./settings-access-strings.js"; // …and this one (webLoginQr), added by Access & security (#3061)
13
13
  import "/assets/chat-strings.js";
14
14
  import { GUESTS_SETTINGS } from "./settings-guests-entries.js";
15
+ import { hostMonitoringVisible } from "./settings-capabilities.js";
15
16
  import { CLI_CAPS } from "./cli-caps.js";
16
17
 
17
18
  const L = (en, zh) => ({ en, "zh-TW": zh });
@@ -20,6 +21,7 @@ const L = (en, zh) => ({ en, "zh-TW": zh });
20
21
  const CLI_WORDS = Object.keys(CLI_CAPS).flatMap((id) => [id, id.split("-")[0]]);
21
22
  /** [id, section, target, labelKey | label, config key, words en, words zh] */
22
23
  const ROWS = [
24
+ ["host.monitoring", "notifications", "#host-monitoring", null, "monitoring.enabled", ["host", "health", "monitoring", "disk", "memory", "cpu", "agent footprint"], ["主機", "監測", "磁碟", "記憶體", "資源用量"], L("Host monitoring", "主機監測")],
23
25
  ["general.location", "agent-defaults", "#general-location", null, null, ["general", "windows", "paired PC", "host", "location"], ["General", "Windows", "電腦", "主機", "執行位置"], L("Run General on", "General 執行位置")],
24
26
  // alpha.6 feedback (#2): "hub" found nothing — Settings → Hub's cards. Connect to a Hub is drawn once membership is on.
25
27
  ["hub.membership", "hub", "#hubMemberEnabled", null, "hub_member.enabled", ["hub", "team hub", "membership", "connect", "join", "pair", "share agents"], ["Hub", "團隊 Hub", "成員", "連線", "加入", "配對", "分享"], L("Allow this fleet to connect to a Hub", "允許這個 Fleet 連線至 Hub")],
@@ -155,11 +157,12 @@ const fold = (s) => String(s || "").toLowerCase().normalize("NFKC");
155
157
  * Entries matching `query`: every word in it is found in the entry's name (either language), its config key, or its
156
158
  * words (either language). Ranked: a name that starts with it, then one that contains it, then a config key, then a word.
157
159
  */
158
- export function searchSettings(query) {
160
+ export function searchSettings(query, schema = null) {
159
161
  const terms = fold(query).split(/\s+/).filter(Boolean);
160
162
  if (!terms.length) return [];
161
163
  const scored = [];
162
164
  for (const entry of SETTINGS_REGISTRY) {
165
+ if (entry.id === "host.monitoring" && !hostMonitoringVisible(schema)) continue;
163
166
  const names = [settingLabel(entry, "en"), settingLabel(entry, "zh-TW")].map(fold);
164
167
  const keys = fold(entry.key || "");
165
168
  const words = [...(entry.words.en || []), ...(entry.words["zh-TW"] || [])].map(fold);
@@ -22,15 +22,19 @@
22
22
  curving into the row's rounded corners. Drawn here, on the row's own class, rather than by a class in the markup (#3407
23
23
  review): this sheet loads apart from the shell and its markup, so a tab holding either older half still draws one bar
24
24
  in its state's colour (older markup + this sheet: this bar; this markup is unchanged + an older sheet: the old edge),
25
- never two. The 3px the bar takes is added to the row's padding. */
26
- .s-accounts .s-account-row { display: block; position: relative; min-height: 0; padding: var(--s-3) var(--s-4) var(--s-3) calc(var(--s-4) + 3px); background: var(--bg); overflow: visible; }
25
+ never two. The absolute bar does not change the shared inner padding. */
26
+ .s-accounts .s-account-row { display: flex; flex-direction: column; align-items: stretch; gap: var(--s-2); position: relative; min-height: 0; padding: var(--s-3) var(--s-4); background: var(--bg); overflow: visible; }
27
27
  .s-accounts .s-account-row::before { content: ""; position: absolute; left: 0; top: var(--s-2); bottom: var(--s-2); width: 3px; background: var(--ok); pointer-events: none; }
28
28
  .s-account-row:has(.s-auth-state.is-not_signed_in)::before { background: var(--warn); }
29
29
  .s-account-row:has(.s-auth-state:is(.is-unknown, .is-not_installed, .is-too_old))::before { background: var(--text-3); }
30
30
  .s-account-row details { margin-top: var(--s-3); }
31
31
 
32
- /* Layer 1: the title bar — name, state, default tag on the left; the buttons (`.s-actions`) on the right. */
33
- .s-account-title-bar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: var(--s-2) var(--s-3); }
32
+ /* One spacing rhythm per box; the absolute state bar never shifts its content. */
33
+ .s-accounts .s-account-row > * { margin: 0; }
34
+
35
+ /* Layer 1: name/state, then a left-aligned wrapping action row at the same content edge. */
36
+ .s-account-title-bar { display: flex; flex-direction: column; align-items: stretch; gap: var(--s-2); }
37
+ .s-account-title-bar > .s-actions { margin: 0; justify-content: flex-start; gap: var(--s-2); }
34
38
  .s-account-title-left { flex: 1 1 auto; min-width: 0; display: flex; flex-wrap: wrap; align-items: center; gap: var(--s-1) var(--s-2); }
35
39
  .s-account-title-left strong { font-size: var(--fs-md); line-height: 1.4; overflow-wrap: anywhere; }
36
40
  .s-account-default-tag { background: var(--accent-dim); color: var(--accent); font-weight: var(--fw-semibold); }
@@ -26,7 +26,7 @@ register("agentSheet", {
26
26
  en: { sheet: "{0}: more", search: "Search", files: "Files & changes", card: "Card", usage: "Usage", model: "Model & effort", backend: "CLI backend",
27
27
  textSize: "Text size", textSizes: "Small,Medium,Large", look: "Appearance", agent: "This agent", details: "Agent details",
28
28
  verifiedUntil: "Verified · speaks as you until {0}" },
29
- "zh-TW": { sheet: "{0}:更多", search: "搜尋", files: "檔案與變更", card: "卡片", usage: "用量", model: "模型與推理", backend: "CLI backend",
29
+ "zh-TW": { sheet: "{0}:更多", search: "搜尋", files: "檔案與變更", card: "卡片", usage: "用量", model: "模型與推理", backend: "CLI 後端",
30
30
  textSize: "文字大小", textSizes: "小,中,大", look: "外觀", agent: "這個 Agent", details: "Agent 詳細資料",
31
31
  verifiedUntil: "已驗證 · 以你的身分發言到 {0}" },
32
32
  });
@@ -77,7 +77,7 @@ export function AgentSheetButton({ name, inst, current, items = [], extra = [],
77
77
  ${usage ? html`<${UsageDialog} owner=${navKey} onClose=${() => setUsage(false)} />` : null}`;
78
78
  }
79
79
 
80
- export function AgentSheet({ name, inst, current, items = [], extra = [], chat = null, verifiedUntil = null, onUsage, onClose }) {
80
+ export function AgentSheet({ name, inst, current, items = [], extra = [], chat = null, verifiedUntil = null, onUsage, onClose, targetLabel = null }) {
81
81
  const [look, setLook] = useState(false);
82
82
  const size = useStore(textSizeStore).size;
83
83
  const by = (key) => items.find((i) => i && i.key === key);
@@ -94,6 +94,7 @@ export function AgentSheet({ name, inst, current, items = [], extra = [], chat =
94
94
  const details = by("details") || (current !== "details" && supportsInstanceFeature(inst, "details")
95
95
  ? { key: "details", icon: "info", onSelect: () => navigate(detailsPath(name)) } : null);
96
96
  return html`<${Dialog} title=${t("agentSheet.sheet", name)} onClose=${onClose} cls="chat-sheet">
97
+ ${targetLabel ? html`<h3 class="menu-heading chat-sheet-head">${targetLabel}</h3>` : null}
97
98
  <div class="chat-sheet-tiles">
98
99
  ${current !== "chat" ? tile("chat", t("app.chat"), () => navigate(chatPath(name))) : null}
99
100
  ${current !== "view" && supportsInstanceFeature(inst, "view") ? tile("view", t("app.view"), () => navigate(viewPath(name))) : null}
@@ -115,3 +116,5 @@ export function AgentSheet({ name, inst, current, items = [], extra = [], chat =
115
116
  ${verifiedUntil ? html`<div class="chat-sheet-foot">✓ ${t("agentSheet.verifiedUntil", untilClock(verifiedUntil))}</div>` : null}
116
117
  </${Dialog}>`;
117
118
  }
119
+
120
+ AgentSheet.sidebarTargetVersion = 1;
@@ -121,7 +121,7 @@ register("app", {
121
121
  confirmTitle: "Please confirm", confirmOk: "Continue", cancel: "Cancel",
122
122
  sidePanelLeave: "Leave {0} without saving? Your changes there will be lost.", sidePanelDiscard: "Discard changes",
123
123
  // The server's own wording (src/locale.ts needs.reason.*), so the web says what Discord says.
124
- needs_reason_kiro_choice: "Kiro needs your decision", needs_reason_hang: "Not responding", needs_reason_exited: "Exited", needs_reason_assist: "Waiting at its terminal", needs_reason_question: "Asking you a question", needs_reason_permission: "Permission needed", needs_reason_dangerous_command: "Dangerous command waiting", needs_reason_login: "Waiting to connect its AI account", needs_reason_dialog: "Waiting at a dialog", needs_reason_terminal_input: "May be waiting for input", needs_reason_auth_paused: "Paused: AI account not connected", needs_reason_stale_auth: "Codex needs a restart", needs_stale_auth_detail: "Codex cannot refresh this agent’s current sign-in. Restart the agent; sign in again only if Codex asks.", needs_reason_backend_signin: "AI account needs connecting", needs_reason_config_invalid: "Configuration file needs attention", needs_reason_hub_proposal: "Hub action proposed: review locally", needs_reason_hub_execution_hold: "Hub work held: review locally", needs_reason_hub_unavailable: "Hub not running", needs_reason_config_fallback: "Running on stored configuration", config_history_edit: "{0}, line {1}, column {2}: {3}. AgEnD is still running on the previous settings. The next restart would use the stored valid copy from {4}. Correct the YAML error; the file has not been changed by AgEnD.", config_history_no_history: "{0}, line {1}, column {2}: {3}. AgEnD is still running on the previous settings. No stored valid copy is available, so the next restart cannot recover automatically. Correct the YAML error before restarting; the file has not been changed by AgEnD.", config_history_fallback: "{0}, line {1}, column {2}: {3}. AgEnD started using the stored valid copy from {4}. Correct the YAML error and reload the settings. The file on disk has not been changed by AgEnD.", needs_reason_general_windows_offline: "General’s Windows PC is offline", needs_reason_general_location_hold: "Run General on", needs_reason_native_pane_hold: "Windows agent needs attention", needs_reason_model_switch: "Claude model switched", needs_reason_crashed: "Crashed", needs_reason_backend_missing: "AI CLI not installed", needs_reason_usage_limit: "Usage limit reached · reset time unknown", needs_reason_delivery_uncertain: "Could not confirm delivery", needs_reason_delivery_failed: "Delivery failed", needs_reason_missed_offline: "Missed while AgEnD was offline", needs_reason_task_review: "Waiting for your confirmation", needs_reason_task_blocked: "Blocked: asks you", needs_reason_task_stalled: "Its assignee went quiet",
124
+ needs_reason_kiro_choice: "Kiro needs your decision", needs_reason_hang: "Not responding", needs_reason_exited: "Exited", needs_reason_assist: "Waiting at its terminal", needs_reason_question: "Asking you a question", needs_reason_permission: "Permission needed", needs_reason_dangerous_command: "Dangerous command waiting", needs_reason_login: "Waiting to connect its AI account", needs_reason_dialog: "Waiting at a dialog", needs_reason_terminal_input: "May be waiting for input", needs_reason_auth_paused: "Paused: AI account not connected", needs_reason_host_health: "Host health", needs_reason_stale_auth: "Codex needs a restart", needs_stale_auth_detail: "Codex cannot refresh this agent’s current sign-in. Restart the agent; sign in again only if Codex asks.", needs_reason_backend_signin: "AI account needs connecting", needs_reason_config_invalid: "Configuration file needs attention", needs_reason_hub_proposal: "Hub action proposed: review locally", needs_reason_hub_execution_hold: "Hub work held: review locally", needs_reason_hub_unavailable: "Hub not running", needs_reason_config_fallback: "Running on stored configuration", config_history_edit: "{0}, line {1}, column {2}: {3}. AgEnD is still running on the previous settings. The next restart would use the stored valid copy from {4}. Correct the YAML error; the file has not been changed by AgEnD.", config_history_no_history: "{0}, line {1}, column {2}: {3}. AgEnD is still running on the previous settings. No stored valid copy is available, so the next restart cannot recover automatically. Correct the YAML error before restarting; the file has not been changed by AgEnD.", config_history_fallback: "{0}, line {1}, column {2}: {3}. AgEnD started using the stored valid copy from {4}. Correct the YAML error and reload the settings. The file on disk has not been changed by AgEnD.", needs_reason_general_windows_offline: "General’s Windows PC is offline", needs_reason_general_location_hold: "Run General on", needs_reason_native_pane_hold: "Windows agent needs attention", needs_reason_model_switch: "Claude model switched", needs_reason_crashed: "Crashed", needs_reason_backend_missing: "AI CLI not installed", needs_reason_usage_limit: "Usage limit reached · reset time unknown", needs_reason_delivery_uncertain: "Could not confirm delivery", needs_reason_delivery_failed: "Delivery failed", needs_reason_missed_offline: "Missed while AgEnD was offline", needs_reason_task_review: "Waiting for your confirmation", needs_reason_task_blocked: "Blocked: asks you", needs_reason_task_stalled: "Its assignee went quiet",
125
125
  },
126
126
  "zh-TW": {
127
127
  brand: "AgEnD", fleet: "Fleet", fleetOverview: "Fleet 概覽", view: "檢視", settings: "設定", instances: "Agent", newInstance: "新增 Agent", newAgent: "新增 Agent",
@@ -171,6 +171,6 @@ register("app", {
171
171
  search: "搜尋", searchTitle: "搜尋聊天、agent 之間的訊息與任務({0})",
172
172
  confirmTitle: "請確認", confirmOk: "繼續", cancel: "取消",
173
173
  sidePanelLeave: "不儲存就離開「{0}」?你在那裡的修改會遺失。", sidePanelDiscard: "捨棄修改",
174
- needs_reason_kiro_choice: "Kiro 需要你決定", needs_reason_hang: "沒有回應", needs_reason_exited: "已結束", needs_reason_assist: "在終端機上等待", needs_reason_question: "正在問你問題", needs_reason_permission: "需要權限", needs_reason_dangerous_command: "危險指令待確認", needs_reason_login: "等待連接 AI 帳號", needs_reason_dialog: "停在對話框", needs_reason_terminal_input: "可能在等輸入", needs_reason_auth_paused: "已暫停:AI 帳號未連接", needs_reason_stale_auth: "Codex 需要重新啟動", needs_stale_auth_detail: "Codex 無法更新這個 Agent 執行中使用的登入。請重新啟動 Agent;只有 Codex 要求時才需要重新登入。", needs_reason_backend_signin: "需要連接 AI 帳號", needs_reason_config_invalid: "設定檔需要處理", needs_reason_hub_proposal: "Hub 提議操作:請在本機檢視", needs_reason_hub_execution_hold: "Hub 工作已暫停:請在本機檢視", needs_reason_hub_unavailable: "Hub 未在執行", needs_reason_config_fallback: "正在使用儲存的設定副本", config_history_edit: "{0} 第 {1} 行、第 {2} 欄:{3}。AgEnD 仍使用先前的設定執行。下次重新啟動會改用 {4} 儲存的有效副本。請修正 YAML 錯誤;AgEnD 未更動此檔案。", config_history_no_history: "{0} 第 {1} 行、第 {2} 欄:{3}。AgEnD 仍使用先前的設定執行。沒有可用的有效副本,下次重新啟動將無法自動恢復。請在重新啟動前修正 YAML 錯誤;AgEnD 未更動此檔案。", config_history_fallback: "{0} 第 {1} 行、第 {2} 欄:{3}。AgEnD 已使用 {4} 儲存的有效副本啟動。請修正 YAML 錯誤並重新載入設定。AgEnD 未更動磁碟上的檔案。", needs_reason_general_windows_offline: "General 所在的 Windows 電腦已離線", needs_reason_general_location_hold: "General 執行位置", needs_reason_native_pane_hold: "Windows Agent 需要處理", needs_reason_model_switch: "Claude 模型已切換", needs_reason_crashed: "已崩潰", needs_reason_backend_missing: "AI CLI 沒有安裝", needs_reason_usage_limit: "用量已達上限 · 恢復時間未知", needs_reason_delivery_uncertain: "無法確認是否送達", needs_reason_delivery_failed: "傳送失敗", needs_reason_missed_offline: "AgEnD 離線時錯過", needs_reason_task_review: "等你確認", needs_reason_task_blocked: "卡住,在問你", needs_reason_task_stalled: "接手者很久沒有動靜",
174
+ needs_reason_kiro_choice: "Kiro 需要你決定", needs_reason_hang: "沒有回應", needs_reason_exited: "已結束", needs_reason_assist: "在終端機上等待", needs_reason_question: "正在問你問題", needs_reason_permission: "需要權限", needs_reason_dangerous_command: "危險指令待確認", needs_reason_login: "等待連接 AI 帳號", needs_reason_dialog: "停在對話框", needs_reason_terminal_input: "可能在等輸入", needs_reason_auth_paused: "已暫停:AI 帳號未連接", needs_reason_host_health: "主機狀態", needs_reason_stale_auth: "Codex 需要重新啟動", needs_stale_auth_detail: "Codex 無法更新這個 Agent 執行中使用的登入。請重新啟動 Agent;只有 Codex 要求時才需要重新登入。", needs_reason_backend_signin: "需要連接 AI 帳號", needs_reason_config_invalid: "設定檔需要處理", needs_reason_hub_proposal: "Hub 提議操作:請在本機檢視", needs_reason_hub_execution_hold: "Hub 工作已暫停:請在本機檢視", needs_reason_hub_unavailable: "Hub 未在執行", needs_reason_config_fallback: "正在使用儲存的設定副本", config_history_edit: "{0} 第 {1} 行、第 {2} 欄:{3}。AgEnD 仍使用先前的設定執行。下次重新啟動會改用 {4} 儲存的有效副本。請修正 YAML 錯誤;AgEnD 未更動此檔案。", config_history_no_history: "{0} 第 {1} 行、第 {2} 欄:{3}。AgEnD 仍使用先前的設定執行。沒有可用的有效副本,下次重新啟動將無法自動恢復。請在重新啟動前修正 YAML 錯誤;AgEnD 未更動此檔案。", config_history_fallback: "{0} 第 {1} 行、第 {2} 欄:{3}。AgEnD 已使用 {4} 儲存的有效副本啟動。請修正 YAML 錯誤並重新載入設定。AgEnD 未更動磁碟上的檔案。", needs_reason_general_windows_offline: "General 所在的 Windows 電腦已離線", needs_reason_general_location_hold: "General 執行位置", needs_reason_native_pane_hold: "Windows Agent 需要處理", needs_reason_model_switch: "Claude 模型已切換", needs_reason_crashed: "已崩潰", needs_reason_backend_missing: "AI CLI 沒有安裝", needs_reason_usage_limit: "用量已達上限 · 恢復時間未知", needs_reason_delivery_uncertain: "無法確認是否送達", needs_reason_delivery_failed: "傳送失敗", needs_reason_missed_offline: "AgEnD 離線時錯過", needs_reason_task_review: "等你確認", needs_reason_task_blocked: "卡住,在問你", needs_reason_task_stalled: "接手者很久沒有動靜",
175
175
  },
176
176
  });
@@ -2,7 +2,7 @@
2
2
  // a test runs both over one list of cases). Pure: no DOM, no history.
3
3
 
4
4
  // #2347 §10: Config is gone from Fleet — each of its settings has one home in Settings (/ui/fleet/config leads there).
5
- export const FLEET_TABS = ["tasks", "schedules", "teams", "org", "cache", "usage", "authorizations"];
5
+ export const FLEET_TABS = ["tasks", "schedules", "teams", "org", "cache", "usage", "authorizations", "host-health"];
6
6
  // #2347: two groups — "You" changes only you or this browser; "Fleet" changes AgEnD for everyone.
7
7
  export const SETTINGS_GROUPS = Object.freeze([
8
8
  Object.freeze({ id: "you", sections: Object.freeze(["preferences", "look"]) }),
@@ -551,6 +551,7 @@ html:has(.shell), html:has(.shell) body { overflow: hidden; }
551
551
  /* M-2542: Fleet's tabs on its title row — the title, then the tabs (scrolling sideways if they do not fit), then the
552
552
  header's tools; under 900 px a row of their own under the header, as the instance tabs. Never wider than the page. */
553
553
  .p-fleet .panel-head .panel-title:has(+ .fleet-tabs) { flex: 0 1 auto; } /* M-2542: only when everything fits (panel-fleet) */
554
+ .p-fleet > .fleet-tabs-row { max-width: none; } /* The full tab inventory can exceed the default content column. */
554
555
  .fleet-tabs { display: flex; gap: var(--s-1); flex: 1 1 auto; min-width: 0; overflow-x: auto; }
555
556
  .panel-head .fleet-tabs .seg-item { min-height: 36px; flex-shrink: 0; }
556
557
  @media (max-width: 899px), (pointer: coarse) and (max-height: 500px) and (max-width: 1023px) {
@@ -961,6 +962,8 @@ html:has(.shell), html:has(.shell) body { overflow: hidden; }
961
962
  .msg.status-line .st-more { border: 0; background: none; color: var(--text-2); cursor: pointer; font-size: var(--fs-xs); padding: var(--s-1) 0 0 var(--s-3); }
962
963
  .msg.status-line.folded .st-more { flex: none; padding: 0 var(--s-2) 0 0; white-space: nowrap; }
963
964
  .msg.status-line .st-more:hover { color: var(--text); }
965
+ .msg-resend { display: flex; align-items: center; gap: var(--s-2); margin-top: var(--s-2); }
966
+ @media (pointer: coarse), (max-width: 899px) { .msg-resend .btn { min-height: var(--tap); min-width: var(--tap); } }
964
967
  .msg-tools { display: flex; gap: var(--s-1); margin-top: var(--s-1); opacity: 0; transition: opacity var(--t-fast); }
965
968
  /* #2147: bounded stock toolbar paint, including fixed descendants. Padding preserves focus outlines. */
966
969
  .shell .thread .msg-tools { contain: paint; overflow: clip; overflow-clip-margin: 0px; padding: 4px; margin: 0 -4px -4px; }
@@ -1292,7 +1295,12 @@ img.amb-p { object-fit: contain; }
1292
1295
  position: absolute; bottom: var(--s-3); left: 50%; transform: translateX(-50%); white-space: nowrap; display: inline-flex; align-items: center; gap: var(--s-1);
1293
1296
  background: var(--bg); color: var(--text); border: 1px solid var(--border); border-radius: var(--r-full); box-shadow: var(--shadow-2);
1294
1297
  padding: 6px var(--s-4); font-size: var(--fs-xs); font-weight: var(--fw-semibold); cursor: pointer;
1298
+ transition: opacity 200ms ease;
1295
1299
  }
1300
+ /* M-3492: after JUMP_IDLE_MS without a scroll it fades out and lets taps through to the bubble under it; it stays in the
1301
+ tab order and the accessibility tree, and keyboard focus shows it again. Reduced motion: no fade, just gone. */
1302
+ .jump-latest.is-idle:not(:focus-visible) { opacity: 0; pointer-events: none; }
1303
+ @media (prefers-reduced-motion: reduce) { .jump-latest { transition: none; } }
1296
1304
  .dock { flex-shrink: 0; padding: 0 max(var(--s-5), env(safe-area-inset-right)) max(var(--s-3), env(safe-area-inset-bottom)) max(var(--s-5), env(safe-area-inset-left)); }
1297
1305
  .dock-col { max-width: var(--col); margin: 0 auto; display: flex; flex-direction: column; gap: var(--s-2); }
1298
1306
  .prompts { display: flex; flex-direction: column; gap: var(--s-2); }
@@ -2285,21 +2293,39 @@ textarea.s-yaml { white-space: pre; overflow-x: auto; }
2285
2293
  .nav-count { min-width: 20px; height: 20px; padding: 0 6px; border-radius: var(--r-full); background: var(--danger-fill); color: var(--on-danger);
2286
2294
  font-size: var(--fs-2xs); font-weight: var(--fw-semibold); line-height: 20px; text-align: center; font-variant-numeric: tabular-nums; }
2287
2295
  .n-group { margin-bottom: var(--s-4); }
2288
- .n-group-head { display: flex; align-items: center; gap: var(--s-2); padding: var(--s-2) var(--s-1); color: var(--text-2); font-size: var(--fs-sm); font-weight: var(--fw-semibold); }
2296
+ .n-group-head, .n-settings-head { display: flex; align-items: center; gap: var(--s-2); padding: var(--s-2) var(--s-1); color: var(--text-2); font-size: var(--fs-sm); font-weight: var(--fw-semibold); }
2289
2297
  .n-group-head a { color: inherit; }
2290
2298
  .n-group-head a:hover { text-decoration: underline; }
2291
2299
  /* M-3381: the rooms' restricted-mode suggestions, one closed group: its heading opens it. */
2292
2300
  .n-suggestions > summary { cursor: pointer; }
2293
- .n-item { display: flex; gap: var(--s-3); padding: var(--s-3) var(--s-4); border-radius: var(--r-md); background: var(--surface); margin-bottom: 2px; }
2294
- .n-icon { flex: none; margin-top: 2px; color: var(--warn); }
2301
+ .n-item, .n-notify { display: flex; gap: var(--s-3); padding: var(--s-3) var(--s-4); border-radius: var(--r-md); background: var(--surface); margin-bottom: 2px; }
2302
+ .n-icon, .n-notify-icon { flex: none; margin-top: 2px; color: var(--warn); }
2295
2303
  .n-item.bad .n-icon { color: var(--danger); }
2296
- .n-body { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: var(--s-1); }
2297
- .n-title { display: flex; align-items: baseline; gap: var(--s-2); flex-wrap: wrap; }
2298
- .n-title strong { font-size: var(--fs-sm); }
2304
+ .n-body, .n-notify-body { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: var(--s-1); }
2305
+ .n-title, .n-notify-title { display: flex; align-items: baseline; gap: var(--s-2); flex-wrap: wrap; }
2306
+ .n-title strong, .n-notify-title strong { font-size: var(--fs-sm); }
2299
2307
  .n-age { color: var(--text-3); font-size: var(--fs-xs); font-variant-numeric: tabular-nums; }
2300
- .n-detail { color: var(--text-2); font-size: var(--fs-sm); overflow-wrap: anywhere; white-space: pre-wrap; }
2301
- .n-actions { display: flex; gap: var(--s-2); flex-wrap: wrap; margin-top: var(--s-1); }
2302
- .n-notify { display: flex; flex-direction: column; gap: var(--s-1); }
2308
+ .n-detail, .n-notify-note { color: var(--text-2); font-size: var(--fs-sm); overflow-wrap: anywhere; white-space: pre-wrap; }
2309
+ .n-actions, .n-notify-actions { display: flex; gap: var(--s-2); flex-wrap: wrap; margin-top: var(--s-1); }
2310
+ /* M-3503: a text button in Needs you lines up with the text above it on every width (a phone already did, below). */
2311
+ .n-actions > .btn-ghost { padding-left: 0; padding-right: 0; margin-left: -1px; }
2312
+ /* M-3503 (the user): this device's notify setting is not an item waiting — a section of its own under the list, a rule
2313
+ above it; drawn as an item row (its bell in the icon's place, neutral), so text and buttons share the items' edge. */
2314
+ .n-settings { margin-top: var(--s-6); padding-top: var(--s-4); border-top: 1px solid var(--border); }
2315
+ .n-notify .n-notify-icon { color: var(--text-2); }
2316
+ /* M-3503: no word left alone on the note's last line (a phone's zh line ended with 「知。」 by itself). */
2317
+ .n-notify-note { text-wrap: balance; }
2318
+ /* M-3503: one left edge and one rhythm. The column starts at the header's leading edge (its title on a desk with the
2319
+ sidebar open; its ☰/‹ button otherwise, as on a phone), not centred away from it; the first section label sits one
2320
+ step under the header, a label one small step above its cards, sections one step apart. */
2321
+ .p-needs > .panel-body > .col { margin-inline: 0; padding-top: var(--s-3); padding-inline: max(var(--s-3), env(safe-area-inset-left)) max(var(--s-3), env(safe-area-inset-right)); }
2322
+ /* A plain heading only: the suggestions group's head is its <summary>, a control that keeps its own padding (and a
2323
+ phone's tap height, below). */
2324
+ .p-needs :is(h2.n-group-head, .n-settings-head) { padding: 0 0 var(--s-2); }
2325
+ @media (max-width: 899px), (pointer: coarse) and (max-height: 500px) and (max-width: 1023px) {
2326
+ .p-needs > .panel-body > .col { padding-inline: max(var(--s-4), env(safe-area-inset-left)) max(var(--s-4), env(safe-area-inset-right)); }
2327
+ .p-needs .n-suggestions > summary { min-height: var(--tap); }
2328
+ }
2303
2329
  /* #2910 D2: Notices (a web-only fleet's General) — the Needs you rows; a new one has an accent edge and a "New" tag. */
2304
2330
  .n-item.notice.unread { box-shadow: inset 3px 0 0 var(--accent); }
2305
2331
  .n-item.notice:not(.bad) .n-icon { color: var(--text-2); }
@@ -5093,3 +5119,55 @@ html.oo-immersive .p-fleet > .panel-body { z-index: 50; }
5093
5119
  .credential-dialog .dlg-head, .credential-dialog .dlg-actions { flex: 0 0 auto; }
5094
5120
  .credential-dialog .dlg-body { flex: 1 1 auto; min-height: 0; overscroll-behavior: contain; scroll-padding-block: var(--s-4); padding-bottom: var(--s-6); }
5095
5121
  .credential-dialog .dlg-body > * { flex-shrink: 0; }
5122
+
5123
+ /* M3454/S207: Host health uses the Fleet cards and shared page head. */
5124
+ .host-health { min-width: 0; }
5125
+ .host-health .s-page-actions { display: flex; flex-wrap: wrap; gap: var(--s-2); }
5126
+ .host-health :is(.host-sample-time, .host-load-value) { display: inline-block; white-space: nowrap; overflow-wrap: normal; }
5127
+ .host-health .host-coverage { display: inline-block; white-space: nowrap; overflow-wrap: normal; }
5128
+ .host-health .host-pressure-value { white-space: nowrap; overflow-wrap: normal; }
5129
+ .host-health .host-row { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 8px 16px; }
5130
+ .host-health .host-grid { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr) minmax(0, 1fr); gap: 16px; }
5131
+ .host-health .host-compute { display: contents; }
5132
+ .host-health .host-storage { grid-column: 1; grid-row: 1; }
5133
+ .host-health .host-space-meter { display: block; width: 100%; height: 8px; margin: 12px 0; accent-color: var(--accent); }
5134
+ .host-health .host-chart circle { fill: var(--accent); }
5135
+ .host-health .card { min-width: 0; }
5136
+ .host-health h3, .host-health h4 { margin: 0 0 12px; }
5137
+ .host-health .host-value { margin: 8px 0; font-size: var(--fs-lg); font-weight: var(--fw-semibold); color: var(--text); overflow-wrap: anywhere; }
5138
+ .host-health .host-range { display: flex; flex-wrap: wrap; gap: 8px; margin: 16px 0; }
5139
+ .host-health .host-range .active { border-color: var(--accent); box-shadow: inset 0 0 0 1px var(--accent); }
5140
+ .host-health .host-volume + .host-volume { border-top: 1px solid var(--border); padding-top: 16px; margin-top: 16px; }
5141
+ .host-health .host-chart { min-width: 0; margin: 16px 0 0; }
5142
+ .host-health .host-chart figcaption { font-size: var(--fs-sm); color: var(--text-2); }
5143
+ .host-health .host-chart svg { display: block; width: 100%; height: auto; max-height: 150px; overflow: visible; margin: 8px 0; }
5144
+ .host-health .host-chart polyline { stroke: var(--accent); stroke-width: 2; fill: none; vector-effect: non-scaling-stroke; }
5145
+ .host-health .host-chart line { stroke: var(--border); vector-effect: non-scaling-stroke; }
5146
+ .host-health .host-chart .note { margin: 4px 0; }
5147
+ .host-health .host-no-history { padding: 20px 0; }
5148
+ @media (max-width: 899px), (pointer: coarse) and (max-height: 500px) and (max-width: 1023px) {
5149
+ .p-settings #host-monitoring :is(select, input[type="number"], summary) { min-height: var(--tap); min-width: var(--tap); font-size: max(1rem, var(--fs-sm)); }
5150
+ .host-health .host-grid { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
5151
+ .host-health .host-storage { grid-row: 1; grid-column: 1 / -1; }
5152
+ .host-health .s-page-actions { width: 100%; }
5153
+ .host-health .btn { min-height: 44px; min-width: 44px; }
5154
+ }
5155
+
5156
+ /* Bounded agent table: scroll is confined to the table, never the page. */
5157
+ .host-footprint .table-wrap { max-width: 100%; overflow-x: auto; }
5158
+ .host-footprint table { width: 100%; border-collapse: collapse; text-align: start; }
5159
+ .host-footprint th, .host-footprint td { padding: var(--s-2); border-bottom: 1px solid var(--border); vertical-align: middle; }
5160
+ .host-footprint td { white-space: nowrap; font-variant-numeric: tabular-nums; }
5161
+ .host-footprint th:first-child { min-width: 8rem; }
5162
+ .host-footprint th .btn { white-space: normal; overflow-wrap: anywhere; text-align: start; }
5163
+ .host-footprint [aria-pressed="true"] { border-color: var(--accent); box-shadow: inset 0 0 0 1px var(--accent); }
5164
+
5165
+ @media (max-width: 899px), (pointer: coarse) and (max-height: 500px) and (max-width: 1023px) {
5166
+ .host-footprint th:first-child { min-width: 6rem; }
5167
+ .host-footprint th, .host-footprint td { padding: var(--s-1); }
5168
+ }
5169
+
5170
+ .host-footprint-sample { display: flex; flex-wrap: wrap; gap: var(--s-1) var(--s-3); }
5171
+ .host-footprint-memory { white-space: nowrap; }
5172
+
5173
+ .host-footprint-managed { white-space: nowrap; }
@@ -83,6 +83,7 @@ if (hubPage) {
83
83
  // The chat store this page booted — whichever import succeeded (a Retry loads ?retry=<n>) — is the page's one owner
84
84
  // of its prompts; Needs you finds it here and never imports the chat itself (#1463 review).
85
85
  appStore.set({ chatOwner: m.boot({ stream, boot }) });
86
+ appStore.set({ sidebarChatMenu: !guestPage() && m.SidebarChatMenu?.contextVersion === 1 ? m.SidebarChatMenu : null });
86
87
  // Loaded only after the stream opened (a Retry): the frames sent on connect never reached it — catch up once.
87
88
  if (stream.started()) stream.catchUp();
88
89
  return m;
@@ -416,8 +416,8 @@
416
416
  if (seen[k] !== undefined) {
417
417
  // The same message again (history after the stream): the copy that got further shows its ticks.
418
418
  var had = out[seen[k]];
419
- var next = nextDeliveryState(had.delivery, m.delivery);
420
- if (next !== had.delivery) out[seen[k]] = had = Object.assign({}, had, { delivery: next });
419
+ var updated = deliveryMessage(had, m);
420
+ if (updated !== had) out[seen[k]] = had = updated;
421
421
  // #1266: …and the copy whose buttons got further (open → chosen / expired) shows them.
422
422
  if (m.buttons && (!had.buttons || buttonsRank(m.buttons) > buttonsRank(had.buttons) || (buttonsRank(m.buttons) === buttonsRank(had.buttons) && m.buttons.poll && had.buttons.poll && m.buttons.poll.rev > had.buttons.poll.rev))) out[seen[k]] = Object.assign({}, had, { buttons: m.buttons });
423
423
  return;
@@ -450,15 +450,30 @@
450
450
  }
451
451
 
452
452
  /** The list after a delivery report for `messageId`: the same list when nothing moved, else a copy. */
453
- function applyDelivery(list, messageId, delivery) {
453
+ function deliveryMessage(had, update) {
454
+ var retry = update.retry, old = had.retry;
455
+ if (retry && typeof retry.owner === "string" && Number.isSafeInteger(retry.attempt) && retry.attempt >= 0) {
456
+ if (old && (old.owner !== retry.owner || retry.attempt < old.attempt)) return had;
457
+ if (old && retry.attempt === old.attempt && update.messageId !== had.messageId) return had;
458
+ var newer = !old || retry.attempt > old.attempt;
459
+ var next = newer ? nextDeliveryState(undefined, update.delivery) : nextDeliveryState(had.delivery, update.delivery);
460
+ if (!next) return had;
461
+ if (!newer && next === had.delivery && update.delivery !== had.delivery) return had;
462
+ if (!newer && next === had.delivery && JSON.stringify(retry) === JSON.stringify(old)) return had;
463
+ return Object.assign({}, had, { messageId: update.messageId, delivery: next, retry: Object.assign({}, retry) });
464
+ }
465
+ if (had.retry && update.messageId && update.messageId !== had.messageId) return had;
466
+ var next = nextDeliveryState(had.delivery, update.delivery);
467
+ return next === had.delivery ? had : Object.assign({}, had, { delivery: next });
468
+ }
469
+ function applyDelivery(list, messageId, delivery, update) {
454
470
  var msgs = list || [];
455
471
  for (var i = msgs.length - 1; i >= 0; i--) {
456
- if (!msgs[i] || msgs[i].messageId !== messageId) continue;
457
- var next = nextDeliveryState(msgs[i].delivery, delivery);
458
- if (next === msgs[i].delivery) return msgs;
459
- var out = msgs.slice();
460
- out[i] = Object.assign({}, msgs[i], { delivery: next });
461
- return out;
472
+ var sameRow = update && update.retry && msgs[i] && msgs[i].boot === update.boot && msgs[i].id === update.id;
473
+ if (!msgs[i] || (!sameRow && msgs[i].messageId !== messageId)) continue;
474
+ var next = deliveryMessage(msgs[i], Object.assign({}, update || {}, { messageId: messageId, delivery: delivery }));
475
+ if (next === msgs[i]) return msgs;
476
+ var out = msgs.slice(); out[i] = next; return out;
462
477
  }
463
478
  return msgs;
464
479
  }
@@ -32,7 +32,7 @@ register("chat", {
32
32
  sendFailure_wake_capacity: "No slot is free to wake this instance. Retry when another instance is idle.",
33
33
  sendFailure_wake_credentials: "The instance could not sign in. Connect its AI account in Settings → AI accounts & keys → Accounts, or send /login in chat, then retry.",
34
34
  sendFailure_wake_timeout: "The instance did not become ready in time. Retry, or check its status in Fleet.",
35
- sendFailure_instance_stopped: "This instance was stopped or removed. Start it from the agent's chat menu → Start instance, then retry.",
35
+ sendFailure_instance_stopped: "This instance was stopped or removed. Start it from the agent's chat menu → Start agent, then retry.",
36
36
  sendFailure_delivery_unavailable: "The instance could not receive this message. Check its status in Fleet, then retry.",
37
37
  sendFailure_machine_limit: "This Windows computer already runs its limit of {0} agents: {1}. Stop one of them (or check and unlock one marked “outcome unknown”), then retry.",
38
38
  machineLimitUnknown: "{0} (outcome unknown)",
@@ -145,7 +145,7 @@ register("chat", {
145
145
  previews: "Allow HTML previews",
146
146
  clicked: "Clicked:", clickShow: "Show the message these buttons were on",
147
147
  copy: "Copy", copyMessage: "Copy this reply", copied: "Copied", copyFailed: "Copy failed", wrap: "Wrap", showAll: "Show all {0} lines", showMore: "Show more", showLess: "Show less", showAllShort: "All {0} lines", showMoreShort: "More", jumpLatest: "Latest", newBelow: "{0} new",
148
- disconnected: "disconnected", tick_queued: "Waiting behind another message", tick_processing: "Handed to the agent", tick_delivered: "The agent has it", tick_failed: "Not delivered", tick_cancelled: "Dropped by Stop", reactedBy: "{0} reacted",
148
+ disconnected: "disconnected", tick_queued: "Waiting behind another message", tick_processing: "Handed to the agent", tick_delivered: "The agent has it", tick_failed: "Not delivered", resend: "Resend", resending: "Resending…", resendFailed: "The message could not be resent. Try again.", resendAttachmentGone: "An attached file is no longer available. Write a new message and attach it again.", resendReplyGone: "The quoted message is no longer available. Write a new message without the quote.", tick_cancelled: "Dropped by Stop", reactedBy: "{0} reacted",
149
149
  promptAnswering: "Answering…", promptGone: "This prompt is no longer open", promptTextPlaceholder: "Your answer", promptTextSend: "Send answer", promptFor: "{0}: {1}",
150
150
  working: "{0} is working…", stuck: "{0} looks stuck",
151
151
  metaWorking: "Working", metaStuck: "Looks stuck", metaStopping: "Stopping…", metaAwaiting: "Waiting for you", stopReply: "Stop reply", stopReplyTitle: "Stop the current reply (like Esc) and drop the messages still waiting. The instance keeps running.", stopSent: "Stopped",
@@ -153,7 +153,7 @@ register("chat", {
153
153
  noMessages: "Type a task below.",
154
154
  guestAllHidden: "Nothing here you can see yet", guestAllHiddenHint: "This agent's recent activity is between agents, which guests don't see. Its chat appears here when someone talks in its channel.",
155
155
  pick: "Choose an agent to start chatting.", noAgents: "Create an agent to start chatting.", newAgent: "New agent", notFound: "No instance called “{0}”", notFoundHint: "It may have been deleted or renamed.", backToList: "Choose an agent",
156
- details: "Instance details", fullWidth: "Full width", start: "Start instance", stopInstance: "Stop instance", restart: "Restart instance", delete: "Delete instance…",
156
+ details: "Agent details", fullWidth: "Full width", start: "Start agent", stopInstance: "Stop agent", restart: "Restart agent", delete: "Delete agent…",
157
157
  started: "{0} started", stoppedInst: "{0} stopped", restarted: "{0} restarted", instanceDeleted: "{0} was deleted",
158
158
  deleteTitle: "Delete {0}?", deleteHelp: "This removes the instance from the fleet and stops it, and deletes its chat topic (on Discord, its channel and history). Its working directory is kept. Type “delete {0}” to confirm.", deleteGo: "Delete", cancel: "Cancel",
159
159
  loadFailed: "Failed to load", tour: "Chat tour", tourBtnTitle: "Show the chat tour on an agent's chat", tourNoAgent: "Choose an agent before opening the chat tour.",
@@ -318,7 +318,7 @@ register("chat", {
318
318
  previews: "允許預覽 HTML",
319
319
  clicked: "點選了:", clickShow: "顯示這些按鈕所在的訊息",
320
320
  copy: "複製", copyMessage: "複製這則回覆", copied: "已複製", copyFailed: "複製失敗", wrap: "換行", showAll: "展開全部 {0} 行", showMore: "顯示更多", showLess: "收合", showAllShort: "全部 {0} 行", showMoreShort: "更多", jumpLatest: "最新", newBelow: "{0} 則新訊息",
321
- disconnected: "已斷線", tick_queued: "排在前一則訊息之後", tick_processing: "已交給 agent", tick_delivered: "agent 已收到", tick_failed: "未送達", tick_cancelled: "已被中止取消", reactedBy: "{0} 的回應",
321
+ disconnected: "已斷線", tick_queued: "排在前一則訊息之後", tick_processing: "已交給 agent", tick_delivered: "agent 已收到", tick_failed: "沒有送到", resend: "重新傳送", resending: "正在重新傳送…", resendFailed: "無法重新傳送這則訊息,請再試一次。", resendAttachmentGone: "附件已無法使用。請寫一則新訊息,重新附上檔案。", resendReplyGone: "引用的訊息已無法使用。請寫一則不含引用的新訊息。", tick_cancelled: "已被中止取消", reactedBy: "{0} 的回應",
322
322
  promptAnswering: "回覆中…", promptGone: "這個提示已經結束", promptTextPlaceholder: "你的回答", promptTextSend: "送出回答", promptFor: "{0}:{1}",
323
323
  working: "{0} 處理中…", stuck: "{0} 似乎卡住了",
324
324
  metaWorking: "處理中", metaStuck: "似乎卡住了", metaStopping: "停止中…", metaAwaiting: "等你回應", stopReply: "停止回覆", stopReplyTitle: "停止目前的回覆(同 Esc),並取消還在排隊的訊息。Agent 會繼續運行。", stopSent: "已中止",
@@ -196,6 +196,7 @@ export function createThread(list, scroller, opts) {
196
196
  if (x.role === "status") return statusHtml(x, time);
197
197
  const u = opts.isUser(x);
198
198
  // renderMarkdown escapes the whole text before it adds any tag of its own (chat-render.js).
199
+ const resend = opts.canResend?.(x) ? `<div data-trust="thread-control" class="msg-resend"><span class="muted">${escAttr(tr("chat.tick_failed"))} ·</span><button type="button" class="btn btn-sm" data-act="resend" data-arg="${escAttr(msgKey(x))}" ${x.resending ? "disabled" : ""}>${escAttr(tr(x.resending ? "chat.resending" : "chat.resend"))}</button></div>` : "";
199
200
  const ticks = u && x.delivery ? R().deliveryHtml(x.delivery, TICKS()) : "";
200
201
  const tools = u ? "" : `<div data-trust="thread-control" class="msg-tools"><button type="button" class="chip-btn icon-only" data-act="copyMsg" data-arg="${escAttr(msgKey(x))}" title="${escAttr(tr("chat.copyMessage"))}" aria-label="${escAttr(tr("chat.copyMessage"))}">${COPY}</button></div>`;
201
202
  const buttons = x.role === "agent" ? replyButtonsHtml(x.buttons) : "";
@@ -213,7 +214,7 @@ export function createThread(list, scroller, opts) {
213
214
  // M-3339: a contact request's badge (聯絡申請 #R… / 已准轉交 #R…) — escaped HTML from the Fleet chat's hook; a Hub passes none.
214
215
  const contact = typeof opts.contactBadge === "function" && x.contactTicket ? String(opts.contactBadge(x) || "") : "";
215
216
  // M-3092 (Hub rooms): another person's message, a bubble on the left (`msg-person`); the fleet never sets x.person.
216
- return `<div class="msg ${u ? "user" : "agent"}${x.person ? " msg-person" : ""}" data-key="${escAttr(key)}" tabindex="-1">${act}<div class="meta"><span class="sender"${badge}>${escAttr(x.sender)}</span>${time}${ticks}${contact}</div>${quoteHtml(x.replyTo)}<div class="body">${clicked ? clickHtml(x.click) : `<div class="md">${renderedMarkdown(x.text, x.role === "agent", opts.emojis, opts.mentions, opts.mentionLabels?.())}</div>`}${R().attachmentsHtml(x.attachments, { htmlCards: x.role === "agent", goneTitle: tr(x.archived ? "chat.attNotKeptTitle" : "chat.attGone"), goneLabel: tr(x.archived ? "chat.attNotKept" : "chat.attUnavailable"), inlinePreviews: !PUBLIC_LINK(), textPreviews: true })}${buttons}</div>${Array.isArray(x.reactionBar) ? reactBarHtml(x, key, reactable) : R().reactionsHtml(x.reactions, tr("chat.reactedBy", x.instance || ""))}${tools}</div>`;
217
+ return `<div class="msg ${u ? "user" : "agent"}${x.person ? " msg-person" : ""}" data-key="${escAttr(key)}" tabindex="-1">${act}<div class="meta"><span class="sender"${badge}>${escAttr(x.sender)}</span>${time}${ticks}${contact}</div>${quoteHtml(x.replyTo)}<div class="body">${clicked ? clickHtml(x.click) : `<div class="md">${renderedMarkdown(x.text, x.role === "agent", opts.emojis, opts.mentions, opts.mentionLabels?.())}</div>`}${R().attachmentsHtml(x.attachments, { htmlCards: x.role === "agent", goneTitle: tr(x.archived ? "chat.attNotKeptTitle" : "chat.attGone"), goneLabel: tr(x.archived ? "chat.attNotKept" : "chat.attUnavailable"), inlinePreviews: !PUBLIC_LINK(), textPreviews: true })}${buttons}</div>${Array.isArray(x.reactionBar) ? reactBarHtml(x, key, reactable) : R().reactionsHtml(x.reactions, tr("chat.reactedBy", x.instance || ""))}${tools}${resend}</div>`;
217
218
  }
218
219
  /** M-3127: a room's words for its reaction controls (opts.reactText(key)), English when the page gives none. */
219
220
  function reactText(k, ...a) {
@@ -760,17 +761,47 @@ export function createThread(list, scroller, opts) {
760
761
  * a line with more than two rows always overflows (data-lines). Nothing laid out (no width): the guess it was drawn with.
761
762
  */
762
763
  function fitStatus() {
763
- for (const m of list.querySelectorAll(".msg.status-line.folded")) {
764
- const btn = m.querySelector(".st-more");
765
- if (!btn || btn.dataset.lines) continue;
766
- let measured = false, over = false;
767
- for (const row of [...m.querySelectorAll(".st-ln")].slice(0, STATUS_FOLD_LINES)) {
768
- if (!row.clientWidth) continue;
769
- measured = true;
770
- if (row.scrollWidth > row.clientWidth + 1) over = true;
771
- }
772
- if (measured && m.classList.contains("overflows") !== over) m.classList.toggle("overflows", over);
764
+ for (const m of list.querySelectorAll(".msg.status-line.folded")) if (!fitLine(m)) stale.add(m);
765
+ if (stale.size) watchStale();
766
+ }
767
+ /**
768
+ * One folded line; false when it was not measured because its contents are skipped. M-3486: a line whose contents the
769
+ * browser is skipping (content-visibility on the row while the split divider is dragged, #4277) is not measured:
770
+ * reading a size inside it lays that row out on its own, then locks it again — once per line, each frame (4,560 forced
771
+ * layouts in one drag of two real chats). It keeps its last answer until it is shown again (watchStale).
772
+ */
773
+ function fitLine(m) {
774
+ const btn = m.querySelector(".st-more");
775
+ if (!btn || btn.dataset.lines) return true;
776
+ const rows = [...m.querySelectorAll(".st-ln")].slice(0, STATUS_FOLD_LINES);
777
+ if (rows[0]?.checkVisibility && !rows[0].checkVisibility({ contentVisibilityAuto: true })) return false;
778
+ let measured = false, over = false;
779
+ for (const row of rows) {
780
+ if (!row.clientWidth) continue;
781
+ measured = true;
782
+ if (row.scrollWidth > row.clientWidth + 1) over = true;
773
783
  }
784
+ if (measured && m.classList.contains("overflows") !== over) m.classList.toggle("overflows", over);
785
+ return true;
786
+ }
787
+ /**
788
+ * #4295 review (Prism): a skipped line is measured as soon as it is shown again — the drag ended, or it was scrolled to —
789
+ * by its own check each frame (a style query, no layout) while any is waiting; nothing else is sure to come (the list's
790
+ * size need not change at the release). A line removed meanwhile is dropped. Stops when none waits, or the thread leaves.
791
+ */
792
+ const stale = new Set();
793
+ let staleFrame = null;
794
+ function watchStale() {
795
+ if (staleFrame !== null || disposed || parked || typeof requestAnimationFrame !== "function") return;
796
+ staleFrame = requestAnimationFrame(() => {
797
+ staleFrame = null;
798
+ for (const m of [...stale]) if (!m.isConnected || fitLine(m)) stale.delete(m);
799
+ if (stale.size) watchStale();
800
+ });
801
+ }
802
+ function unwatchStale() {
803
+ if (staleFrame !== null && typeof cancelAnimationFrame === "function") cancelAnimationFrame(staleFrame);
804
+ staleFrame = null;
774
805
  }
775
806
  let ro = typeof ResizeObserver === "function" ? new ResizeObserver(resized) : null;
776
807
  if (ro) { ro.observe(list); ro.observe(scroller); }
@@ -1032,6 +1063,7 @@ export function createThread(list, scroller, opts) {
1032
1063
  else if (act === "reactAdd") { closePicker(true); reactFrom(el, true); } // a quick pick: mine added
1033
1064
  else if (act === "reactToggle") reactFrom(el, el.getAttribute("aria-pressed") !== "true"); // a chip: mine on or off
1034
1065
  else if (act === "jumpQuote") void jumpTo(el.dataset.arg);
1066
+ else if (act === "resend") opts.resendMessage?.(el.dataset.arg);
1035
1067
  else if (act === "retryOut") opts.retryOutgoing?.(el.dataset.arg); // a failed send, again
1036
1068
  else if (act === "putBackOut") opts.putBackOutgoing?.(el.dataset.arg); // back in the composer, to change it
1037
1069
  else if (act === "deleteOut") opts.deleteOutgoing?.(el.dataset.arg);
@@ -1064,6 +1096,7 @@ export function createThread(list, scroller, opts) {
1064
1096
  if (P()) P().stopAll("leave");
1065
1097
  for (const node of list.querySelectorAll(".html-card[data-att], .text-card[data-att]")) { const f = cardDrop.get(node); if (f) f(); }
1066
1098
  if (ro) { ro.disconnect(); ro = null; }
1099
+ unwatchStale();
1067
1100
  if (growFrame !== null && typeof cancelAnimationFrame === "function") cancelAnimationFrame(growFrame);
1068
1101
  if (growTimer !== null) clearTimeout(growTimer);
1069
1102
  growTimer = growFrame = null;
@@ -1086,6 +1119,7 @@ export function createThread(list, scroller, opts) {
1086
1119
  disposed = true;
1087
1120
  if (!parked) watchReader(scroller, false);
1088
1121
  if (ro) ro.disconnect();
1122
+ unwatchStale(); stale.clear();
1089
1123
  if (P()) { if (own) P().stopIn(list); else P().stopAll("leave"); }
1090
1124
  for (const v of nodes.values()) v.handle?.unmount();
1091
1125
  nodes.clear();