@floless/app 0.174.0 → 0.175.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (89) hide show
  1. package/autostart.mjs +117 -10
  2. package/dist/floless-server.cjs +2 -2
  3. package/dist/pdf-engine/floless_pdf/__init__.py +53 -0
  4. package/dist/pdf-engine/floless_pdf/backend_pdfium.py +823 -0
  5. package/dist/pdf-engine/floless_pdf/backend_pymupdf.py +245 -0
  6. package/dist/pdf-engine/floless_pdf/geometry.py +115 -0
  7. package/dist/pdf-engine/floless_pdf/images.py +75 -0
  8. package/dist/pdf-engine/floless_pdf/pages.py +136 -0
  9. package/dist/pdf-engine/floless_pdf/textrules.py +200 -0
  10. package/dist/schemas/steel.model.v2.schema.json +45 -1
  11. package/dist/skills/floless-app-approval/SKILL.md +28 -3
  12. package/dist/skills/floless-app-knowledge/SKILL.md +3 -2
  13. package/dist/skills/floless-app-sketches/SKILL.md +71 -0
  14. package/dist/skills/floless-app-sketches/references/steel-plate.md +15 -0
  15. package/dist/skills/floless-app-steel-model/SKILL.md +14 -1
  16. package/dist/skills/floless-app-steel-model/references/elements.md +90 -23
  17. package/dist/skills/floless-app-steel-takeoff/SKILL.md +18 -7
  18. package/dist/skills/floless-app-tweak-contract/SKILL.md +3 -2
  19. package/dist/web/agents.js +1 -1
  20. package/dist/web/app.css +120 -15
  21. package/dist/web/app.js +89 -38
  22. package/dist/web/aware-hold.js +10 -0
  23. package/dist/web/aware.js +405 -51
  24. package/dist/web/boot-watchdog.js +249 -0
  25. package/dist/web/card-details.js +88 -0
  26. package/dist/web/chat.css +29 -0
  27. package/dist/web/chat.js +430 -128
  28. package/dist/web/commands-connection-design.js +23 -0
  29. package/dist/web/commands-revit.js +3 -0
  30. package/dist/web/commands-shell.js +226 -10
  31. package/dist/web/commands-steel.js +95 -5
  32. package/dist/web/commands-tekla-parser.js +21 -1
  33. package/dist/web/connection-design-editor.html +71 -0
  34. package/dist/web/connection-design-editor.js +794 -61
  35. package/dist/web/connection-design-handles.js +9 -3
  36. package/dist/web/element-approval.js +74 -0
  37. package/dist/web/element-context.js +76 -6
  38. package/dist/web/element-geometry.js +8 -2
  39. package/dist/web/element-holds.js +68 -5
  40. package/dist/web/element-type-actions.js +22 -3
  41. package/dist/web/element-types.js +12 -5
  42. package/dist/web/element-words.js +15 -11
  43. package/dist/web/grid-place.js +51 -0
  44. package/dist/web/guide.js +2 -0
  45. package/dist/web/index.html +13 -16
  46. package/dist/web/instructor.js +5 -2
  47. package/dist/web/missed-routines.js +6 -1
  48. package/dist/web/model-change-findings.js +147 -32
  49. package/dist/web/model-change-review.js +435 -32
  50. package/dist/web/model-clash-check.css +100 -0
  51. package/dist/web/model-clash-check.js +681 -0
  52. package/dist/web/model-clip-box.js +204 -0
  53. package/dist/web/model-clip-list.js +153 -3
  54. package/dist/web/model-clip-session.js +3 -3
  55. package/dist/web/model-clip-three-overlay.js +135 -25
  56. package/dist/web/model-editor.css +2 -0
  57. package/dist/web/model-elements.js +273 -18
  58. package/dist/web/model-fit-checks.js +354 -0
  59. package/dist/web/model-spatial-panel.js +9 -3
  60. package/dist/web/model-spatial-tools.js +12 -3
  61. package/dist/web/model-tekla-selection.js +74 -0
  62. package/dist/web/model-view-query.js +70 -14
  63. package/dist/web/model-viewport-revit-adapter.js +8 -7
  64. package/dist/web/model-viewport-toolbar.js +8 -4
  65. package/dist/web/pages.js +78 -1
  66. package/dist/web/project-history.js +31 -1
  67. package/dist/web/revit-editor.css +34 -1
  68. package/dist/web/revit-editor.js +176 -55
  69. package/dist/web/run-history.js +8 -0
  70. package/dist/web/sketch-editor.js +141 -2
  71. package/dist/web/sketches.js +192 -6
  72. package/dist/web/start-place.js +46 -0
  73. package/dist/web/steel-3d-core.js +70 -0
  74. package/dist/web/steel-3d-view.js +288 -47
  75. package/dist/web/steel-change-review.css +29 -0
  76. package/dist/web/steel-custom-connection.js +6 -0
  77. package/dist/web/steel-editor.html +532 -33
  78. package/dist/web/steel-filter.html +8 -3
  79. package/dist/web/steel-model-checks.css +76 -0
  80. package/dist/web/steel-model-commands.js +1 -1
  81. package/dist/web/steel-model-v2-commands.js +17 -0
  82. package/dist/web/steel-view-generation.js +6 -2
  83. package/dist/web/teams.js +259 -19
  84. package/dist/web/tekla-editor.html +1 -0
  85. package/dist/web/terminal-requests.js +6 -0
  86. package/dist/web/vendor/connection-engine.js +890 -89
  87. package/dist/web/workspaces.js +630 -48
  88. package/package.json +4 -1
  89. package/preferences-file.mjs +27 -0
@@ -0,0 +1,249 @@
1
+ // Recovery must work before the stylesheet or any of the app scripts have loaded.
2
+ (function () {
3
+ 'use strict';
4
+
5
+ const missing = new Set(['aware.js', 'workspaces.js', 'guide.js']);
6
+ const reloadCountKey = 'floless:boot-reloads';
7
+ const scriptErrors = [];
8
+ const uncaughtErrors = [];
9
+ const retryTimers = [];
10
+ let reachedCheckpoint = false;
11
+ let reloading = false;
12
+ let card, style, app, previousFocus, wasInert, health, lastReport;
13
+ const deadline = setTimeout(() => check(false), 45_000);
14
+ const clean = (value, max = 180) => String(value ?? '').replace(/\s+/g, ' ').trim().slice(0, max);
15
+ const stripUrl = (value) => value.split(/[?#]/, 1)[0].replace(/^((?:[a-z][a-z\d+.-]*:)?\/\/)[^/]*@/i, '$1');
16
+ const source = (value) => clean(stripUrl(String(value ?? '').trim()));
17
+ const message = (value) => clean(String(value ?? '')
18
+ .replace(/(?:[a-z][a-z\d+.-]*:\/\/|\/\/|\/(?=[\w.%~-]))[^\s<>"'`]+/gi, stripUrl)
19
+ .replace(/([?&][\w.-]*(?:token|secret|password|credential|signature|api[_-]?key|auth[_-]?key)[\w.-]*=)[^\s&#<>"'`]+/gi, '$1[redacted]'));
20
+ const add = (list, entry) => { if (list.length < 4) list.push(entry); };
21
+
22
+ window.addEventListener('error', (event) => {
23
+ if (event.target?.tagName === 'SCRIPT') {
24
+ add(scriptErrors, { src: source(event.target.src), event: 'error' });
25
+ } else if (event.target === window && event.message) {
26
+ add(uncaughtErrors, { filename: source(event.filename), line: Number(event.lineno) || 0, message: message(event.message) });
27
+ }
28
+ }, true);
29
+ window.addEventListener('load', () => check(true), { once: true });
30
+
31
+ function cancelRetry() {
32
+ for (const timer of retryTimers) clearTimeout(timer);
33
+ retryTimers.length = 0;
34
+ }
35
+
36
+ window.flolessBoot = {
37
+ isReady: () => missing.size === 0,
38
+ hasRetried: () => retryUsed(),
39
+ stalled: () => reachedCheckpoint && missing.size > 0,
40
+ beforeReload() {
41
+ cancelRetry();
42
+ if (reloading || !missing.size) return Promise.resolve(false);
43
+ reloading = true;
44
+ markAttempt();
45
+ return record().then(() => missing.size > 0);
46
+ },
47
+ ready(name) {
48
+ if (!missing.delete(name) || missing.size) return;
49
+ clearTimeout(deadline);
50
+ cancelRetry();
51
+ card?.remove();
52
+ style?.remove();
53
+ if (app) app.inert = wasInert;
54
+ if (card && previousFocus?.isConnected) previousFocus.focus();
55
+ try { sessionStorage.removeItem(reloadCountKey); } catch { /* storage unavailable */ }
56
+ },
57
+ };
58
+
59
+ function retryUsed() {
60
+ try { return !!sessionStorage.getItem(reloadCountKey); } catch { return true; }
61
+ }
62
+
63
+ function markAttempt() {
64
+ try {
65
+ sessionStorage.setItem(reloadCountKey, '1');
66
+ return true;
67
+ } catch { return false; }
68
+ }
69
+
70
+ async function checkHealth() {
71
+ if (typeof fetch !== 'function') return 'unreachable';
72
+ const controller = new AbortController();
73
+ let timeout;
74
+ try {
75
+ return await Promise.race([
76
+ fetch('/api/health', { signal: controller.signal, cache: 'no-store' })
77
+ .then((response) => response.status, () => 'unreachable'),
78
+ new Promise((resolve) => {
79
+ timeout = setTimeout(() => { controller.abort(); resolve('unreachable'); }, 700);
80
+ }),
81
+ ]);
82
+ } catch { return 'unreachable'; }
83
+ finally { clearTimeout(timeout); }
84
+ }
85
+
86
+ function snapshot(serverStatus) {
87
+ return { missing: [...missing], scriptErrors: [...scriptErrors], uncaughtErrors: [...uncaughtErrors], serverStatus };
88
+ }
89
+
90
+ function detailLines(report) {
91
+ return [
92
+ 'Scripts that did not finish: ' + (report.missing.join(', ') || 'none'),
93
+ 'Script load errors: ' + (report.scriptErrors.map((item) => item.src + ' (' + item.event + ')').join(', ') || 'none'),
94
+ 'Uncaught errors: ' + (report.uncaughtErrors.map((item) => item.filename + ':' + item.line + ' ' + item.message).join(' | ') || 'none'),
95
+ 'Server health: ' + (typeof report.serverStatus === 'number' ? 'HTTP ' + report.serverStatus : report.serverStatus),
96
+ ];
97
+ }
98
+
99
+ async function record() {
100
+ const serverStatus = await (health ??= checkHealth());
101
+ const report = snapshot(serverStatus);
102
+ const body = JSON.stringify(report);
103
+ const lines = detailLines(report);
104
+ const details = card?.querySelector('pre');
105
+ if (details) details.textContent = lines.join('\n');
106
+ if (body !== lastReport) {
107
+ lastReport = body;
108
+ console.error('[boot-stalled] ' + lines.join(' | '));
109
+ if (typeof fetch === 'function') {
110
+ try {
111
+ void fetch('/api/boot-diagnostics', {
112
+ method: 'POST', headers: { 'Content-Type': 'application/json' },
113
+ body, keepalive: true,
114
+ }).catch(() => {});
115
+ } catch { /* the browser console and card still carry the details */ }
116
+ }
117
+ }
118
+ return report;
119
+ }
120
+
121
+ function check(loaded) {
122
+ if (!missing.size || card) return;
123
+ clearTimeout(deadline);
124
+ const retry = !retryUsed();
125
+ health = checkHealth();
126
+
127
+ style = document.createElement('style');
128
+ style.textContent = `
129
+ #boot-stalled {
130
+ --boot-surface: #131a25; --boot-border: #334155; --boot-text: #f8fafc;
131
+ --boot-muted: #a4b3c6; --boot-secondary: #1e293b; --boot-accent: #60a5fa; --boot-on-accent: #020817;
132
+ --boot-page: #020817;
133
+ position: fixed; z-index: 100002; top: 50%; left: 50%; transform: translate(-50%, -50%);
134
+ box-sizing: border-box; width: min(460px, calc(100% - 32px)); max-height: calc(100vh - 32px);
135
+ overflow: auto; padding: 28px; border: 1px solid var(--border-strong, var(--boot-border)); border-radius: 14px;
136
+ background: var(--boot-card-surface, var(--surface, var(--boot-surface))); color: var(--boot-card-text, var(--text, var(--boot-text)));
137
+ /* the outer ring covers the dead shell beneath with the page background, as the licence gate does */
138
+ box-shadow: 0 0 0 100vmax var(--bg, var(--boot-page)), 0 20px 60px rgba(0, 0, 0, .35); font: 14px/1.5 var(--ui, system-ui, sans-serif);
139
+ scrollbar-width: thin; scrollbar-color: var(--border-strong, var(--boot-border)) transparent;
140
+ text-align: center;
141
+ }
142
+ @media (prefers-color-scheme: light) {
143
+ html:not([data-theme]) #boot-stalled {
144
+ --boot-surface: #fff; --boot-border: #cbd5e1; --boot-text: #0f172a;
145
+ --boot-muted: #475569; --boot-secondary: #f1f5f9; --boot-accent: #2563eb; --boot-on-accent: #fff; --boot-page: #f8fafc;
146
+ --boot-card-surface: var(--boot-surface); --boot-card-text: var(--boot-text);
147
+ }
148
+ }
149
+ html[data-theme="light"] #boot-stalled {
150
+ --boot-surface: #fff; --boot-border: #cbd5e1; --boot-text: #0f172a;
151
+ --boot-muted: #475569; --boot-secondary: #f1f5f9; --boot-accent: #2563eb; --boot-on-accent: #fff; --boot-page: #f8fafc;
152
+ }
153
+ #boot-stalled h1 { margin: 0 0 8px; font-size: 20px; font-weight: 600; }
154
+ #boot-stalled p { margin: 0 0 14px; }
155
+ #boot-stalled .boot-status { color: var(--boot-muted); }
156
+ #boot-stalled button, #boot-stalled summary { cursor: pointer; }
157
+ #boot-stalled button {
158
+ appearance: none; font: inherit; font-weight: 600; padding: 8px 16px; margin: 0 4px;
159
+ border-radius: 8px; border: 1px solid var(--boot-border); background: var(--boot-secondary); color: inherit;
160
+ }
161
+ #boot-stalled .boot-reload { background: var(--boot-accent); border-color: var(--boot-accent); color: var(--boot-on-accent); }
162
+ #boot-stalled button:hover { filter: brightness(1.08); }
163
+ #boot-stalled :is(button, summary):focus-visible { outline: 2px solid var(--boot-accent); outline-offset: 3px; }
164
+ #boot-stalled details { margin-top: 16px; text-align: left; }
165
+ #boot-stalled pre {
166
+ font: 12px/1.5 var(--mono, monospace); margin: 6px 0 0; padding: 10px; border-radius: 6px;
167
+ white-space: pre-wrap; overflow-wrap: anywhere; background: var(--boot-secondary);
168
+ }
169
+ #boot-stalled::-webkit-scrollbar { width: 8px; }
170
+ #boot-stalled::-webkit-scrollbar-track { background: transparent; }
171
+ #boot-stalled::-webkit-scrollbar-thumb { background: var(--boot-border); border-radius: 8px; }
172
+ #boot-stalled [hidden] { display: none !important; }
173
+ @media (prefers-reduced-motion: reduce) { #boot-stalled, #boot-stalled * { animation: none; transition: none; } }
174
+ `;
175
+ document.head.append(style);
176
+
177
+ card = document.createElement('div');
178
+ card.id = 'boot-stalled';
179
+ card.setAttribute('role', 'alert');
180
+ card.innerHTML = `
181
+ <h1>FloLess didn’t finish starting</h1>
182
+ <p>Part of FloLess didn't load, which can happen right after an update. Reloading usually fixes it.</p>
183
+ <p class="boot-status" aria-live="polite"></p>
184
+ <button type="button" class="boot-reload" data-command-id="shell.boot-reload">Reload</button>
185
+ <button type="button" class="boot-report" data-command-id="shell.boot-report-issue"${retry ? ' hidden' : ''}>Report an issue</button>
186
+ <p class="boot-copy-status" aria-live="polite" hidden></p>
187
+ <details><summary>Startup details</summary><pre></pre></details>
188
+ `;
189
+ const reload = card.querySelector('.boot-reload');
190
+ const report = card.querySelector('.boot-report');
191
+ const status = card.querySelector('.boot-status');
192
+ const details = card.querySelector('pre');
193
+ const copyStatus = card.querySelector('.boot-copy-status');
194
+ const manual = () => {
195
+ status.textContent = 'This happened again. Reload when you’re ready, or report it if it keeps happening.';
196
+ report.hidden = false;
197
+ };
198
+ const countdown = (seconds) => { status.textContent = 'Reloading in ' + seconds + (seconds === 1 ? ' second…' : ' seconds…'); };
199
+ async function reloadWindow(automatic) {
200
+ cancelRetry();
201
+ if (reloading || (automatic && !missing.size)) return;
202
+ if (!markAttempt() && automatic) { manual(); return; }
203
+ reloading = true;
204
+ await record();
205
+ if (!automatic || missing.size) {
206
+ window.flolessStartPlace?.markRetry?.();
207
+ location.reload();
208
+ }
209
+ }
210
+ reload.addEventListener('click', () => { void reloadWindow(false); });
211
+ report.addEventListener('click', async () => {
212
+ const facts = await record();
213
+ details.textContent = detailLines(facts).join('\n');
214
+ try {
215
+ await navigator.clipboard.writeText(details.textContent);
216
+ copyStatus.textContent = 'Copied startup details.';
217
+ } catch {
218
+ card.querySelector('details').open = true;
219
+ copyStatus.textContent = 'Select and copy the startup details to include in your report.';
220
+ }
221
+ copyStatus.hidden = false;
222
+ });
223
+
224
+ details.textContent = detailLines(snapshot('checking…')).join('\n');
225
+ void health.then((serverStatus) => {
226
+ details.textContent = detailLines(snapshot(serverStatus)).join('\n');
227
+ // If a script fails after the deadline, the next record includes the new error.
228
+ if (!retry && missing.size) void record();
229
+ });
230
+ app = document.getElementById('app');
231
+ previousFocus = document.activeElement;
232
+ if (app) { wasInert = app.inert === true; app.inert = true; }
233
+ (document.body || document.documentElement).append(card);
234
+ reload.focus();
235
+ function offerRetry() {
236
+ reachedCheckpoint = true;
237
+ if (!retry) { manual(); return; }
238
+ countdown(3);
239
+ retryTimers.push(setTimeout(() => countdown(2), 1000), setTimeout(() => countdown(1), 2000),
240
+ setTimeout(() => { void reloadWindow(true); }, 3000));
241
+ }
242
+ if (loaded) offerRetry();
243
+ else void health.then((serverStatus) => {
244
+ if (!missing.size || reloading) return;
245
+ if (serverStatus !== 200 || scriptErrors.length || uncaughtErrors.length) offerRetry();
246
+ else status.textContent = 'FloLess is still starting. You can wait or reload.';
247
+ });
248
+ }
249
+ })();
@@ -0,0 +1,88 @@
1
+ /* Sketches S1c (#3648): a card's full details (plan docs/superpowers/specs/2026-11-25-sketches-s1c-PLAN.md §6.3, §8):
2
+ every fact, difference, assumption and answer it claims, uncut, in a themed scrolling list. ONE renderer for the
3
+ chat's card (chat.js) and the request dialog (terminal-requests.js), so a card proposed from a terminal shows the
4
+ person exactly what one proposed in the chat does. Styles: web/chat.css (.ai-chat-action-details*). */
5
+ (() => {
6
+ 'use strict';
7
+ /**
8
+ * A card's details (#3648): its title, a count line and every row, grouped as facts, departures, assumptions, answers and
9
+ * shapes not converted. Nothing is cut: the list scrolls. Null when the card has none.
10
+ */
11
+ const DETAIL_KINDS = [['fact', 'What it does'], ['departure', 'Differs from the sketch'], ['assumption', 'Assumed'], ['answer', 'Your answers'], ['unlinked', 'Not converted']];
12
+ /**
13
+ * Plan §6.3: "this builds from an older version" is a fact about NOW, so a card still waiting for the person reads it
14
+ * when it is shown, not only when it was made. It is outside the evidence the card is bound to (a newer version does
15
+ * not change what this card builds), so it is a note beside the list, never one of its rows.
16
+ */
17
+ async function liveSketchNote(subject, box, hasRow) {
18
+ if (subject?.kind !== 'sketch' || typeof subject.projectId !== 'string' || typeof subject.sketchId !== 'string') return;
19
+ let text = '';
20
+ try {
21
+ const res = await fetch(`/api/projects/${encodeURIComponent(subject.projectId)}/sketches`, { headers: { accept: 'application/json' } });
22
+ if (!res.ok) return;
23
+ const data = await res.json();
24
+ const sk = (data?.sketches ?? []).find((x) => x?.id === subject.sketchId);
25
+ if (!sk) text = 'The sketch this card builds from was deleted after it was made. Ask the AI again if you still want the plate.';
26
+ // A row made with the card already names the newest version then; only a version newer than that is news.
27
+ else if (Number.isSafeInteger(sk.latest) && sk.latest > subject.version && !(hasRow && sk.latest === subject.latest)) {
28
+ text = `This builds from version ${subject.version}; the sketch now has version ${sk.latest}. Ask for the newer one if that is what you meant.`;
29
+ }
30
+ } catch { return; /* unread: the card's own rows still say everything it claims */ }
31
+ if (!text || !box.isConnected) return;
32
+ const note = document.createElement('p');
33
+ note.className = 'ai-chat-action-details-live';
34
+ note.setAttribute('role', 'note');
35
+ note.textContent = text;
36
+ box.append(note);
37
+ }
38
+
39
+ function render(details, proposalId, opts = {}) {
40
+ const rows = Array.isArray(details?.rows) ? details.rows.filter((r) => r && typeof r.text === 'string') : [];
41
+ if (!rows.length) return null;
42
+ const box = document.createElement('section');
43
+ box.className = 'ai-chat-action-details';
44
+ const titleId = `chat-action-details-${proposalId}`;
45
+ box.setAttribute('aria-labelledby', titleId);
46
+ const head = document.createElement('p');
47
+ head.className = 'ai-chat-action-details-head';
48
+ head.id = titleId;
49
+ const strong = document.createElement('strong');
50
+ strong.textContent = String(details.title || 'What this card claims');
51
+ const count = (kind, one, many) => { const n = rows.filter((r) => r.kind === kind).length; return n ? `${n} ${n === 1 ? one : many}` : ''; };
52
+ const counts = [count('departure', 'departure', 'departures'), count('assumption', 'assumption', 'assumptions'), count('unlinked', 'shape not converted', 'shapes not converted')].filter(Boolean).join(' · ');
53
+ head.append(strong);
54
+ if (counts) { const c = document.createElement('span'); c.className = 'ai-chat-action-details-count'; c.textContent = counts; head.append(c); }
55
+ box.append(head);
56
+ const list = document.createElement('div');
57
+ list.className = 'ai-chat-action-details-list';
58
+ list.tabIndex = 0;
59
+ list.setAttribute('role', 'region');
60
+ list.setAttribute('aria-label', 'Every claim this card makes');
61
+ list.dataset.commandId = `shell.chat-action-details#${proposalId}`;
62
+ for (const [kind, label] of DETAIL_KINDS) {
63
+ const group = rows.filter((r) => (r.kind || 'fact') === kind);
64
+ if (!group.length) continue;
65
+ const h = document.createElement('p');
66
+ h.className = 'ai-chat-action-details-kind';
67
+ h.textContent = label;
68
+ const ul = document.createElement('ul');
69
+ ul.className = `ai-chat-action-details-rows kind-${kind}`;
70
+ for (const r of group) {
71
+ const li = document.createElement('li');
72
+ if (r.label) { const b = document.createElement('span'); b.className = 'ai-chat-action-details-label'; b.textContent = `${r.label}: `; li.append(b); }
73
+ li.append(document.createTextNode(r.text));
74
+ ul.append(li);
75
+ }
76
+ list.append(h, ul);
77
+ }
78
+ box.append(list);
79
+ // Only a card the person can still confirm is told what changed since; a finished card says what it did.
80
+ if (opts.live) {
81
+ const hasRow = rows.some((r) => r.label === 'Newer version');
82
+ queueMicrotask(() => { void liveSketchNote(details.subject, box, hasRow); });
83
+ }
84
+ return box;
85
+ }
86
+
87
+ window.flolessCardDetails = Object.freeze({ render });
88
+ })();
package/dist/web/chat.css CHANGED
@@ -900,6 +900,14 @@
900
900
  .ai-chat-filter-actions .ai-chat-filter-apply[aria-disabled="true"] { border-color: var(--border-strong); background: var(--surface); color: var(--text-dim); }
901
901
  .ai-chat-filter-actions button[aria-disabled="true"]:hover { background: var(--surface); color: var(--text-dim); filter: none; }
902
902
  .ai-chat-filter-actions button:focus-visible { outline: 2px solid var(--accent); outline-offset: 1px; }
903
+ /* #4116: an action card's pressed button keeps the keyboard while its answer is on the way, so it is aria-disabled rather
904
+ than :disabled. It keeps the :disabled look (app.css) instead of the dimmer aria-disabled one above, and its ring is
905
+ lifted so it still reads on the faded button. */
906
+ .ai-chat-action-card .ai-chat-filter-actions button[aria-busy="true"][aria-disabled="true"],
907
+ .ai-chat-action-card .ai-chat-filter-actions button[aria-busy="true"][aria-disabled="true"]:hover { opacity: .55; cursor: default; }
908
+ .ai-chat-action-card .ai-chat-filter-actions .ai-chat-filter-apply[aria-busy="true"][aria-disabled="true"],
909
+ .ai-chat-action-card .ai-chat-filter-actions .ai-chat-filter-apply[aria-busy="true"][aria-disabled="true"]:hover { border-color: var(--accent); background: var(--accent); color: #fff; }
910
+ .ai-chat-action-card .ai-chat-filter-actions button[aria-busy="true"][aria-disabled="true"]:focus-visible { opacity: .85; }
903
911
  /* A note under the person's own (right-aligned) message, e.g. that the filter's selection did not go with it. */
904
912
  .ai-chat-filter-notice { align-self: flex-end; max-width: min(100%, 360px); margin: 0; color: var(--text-muted); font-size: 10px; line-height: 1.4; text-align: right; overflow-wrap: anywhere; }
905
913
 
@@ -1936,6 +1944,8 @@
1936
1944
  hsl(215.4 16.3% 60%), which on the composer's white --surface is 3.0:1 — worse than the 3.5:1
1937
1945
  error row #1864 was filed for. Error ink, same token as the row. */
1938
1946
  .ai-chat-compose-hint.error { color: var(--err-text); }
1947
+ .ai-chat-compose-hint.retrying { color: var(--text-muted); }
1948
+ .ai-chat-compose-hint.warn { color: var(--warn-text); }
1939
1949
  .ai-chat-compose-context { min-height: 12px; padding: 5px 0 0 30px; color: var(--text-dim); font: 8px/1.3 var(--mono); overflow-wrap: anywhere; }
1940
1950
  .ai-chat-compose-context strong { color: var(--text-muted); font-weight: 600; }
1941
1951
  /* Send and Stop are icon-only circles: the composer's primary actions, set apart from the square
@@ -1994,6 +2004,22 @@
1994
2004
  .ai-chat-page-card .ai-chat-guide-actions .ai-chat-page-open { border-color: var(--accent); background: var(--accent); color: #fff; }
1995
2005
  .ai-chat-page-card .ai-chat-guide-actions .ai-chat-page-open:hover { filter: brightness(1.08); border-color: var(--accent); background: var(--accent); color: #fff; }
1996
2006
  .ai-chat-action-summary { margin: 6px 0 0; color: var(--text); font-size: 12px; line-height: 16px; overflow-wrap: anywhere; }
2007
+ /* #3648 (Sketches S1c): a card's details, every row uncut, in a themed scrolling list. Amber only for what differs. */
2008
+ .ai-chat-action-details { margin: 8px 0 0; border: 1px solid var(--border); border-radius: 6px; background: var(--surface-2); }
2009
+ .ai-chat-action-details-head { margin: 0; padding: 6px 8px; display: flex; flex-wrap: wrap; gap: 4px 10px; align-items: baseline; font-size: 12px; color: var(--text); border-bottom: 1px solid var(--border); }
2010
+ .ai-chat-action-details-count { color: var(--text-muted); font-size: 11px; }
2011
+ .ai-chat-action-details-live { margin: 6px 10px 8px; color: var(--warn-text); font-size: 11px; line-height: 1.45; }
2012
+ .ai-chat-action-details-list { max-height: 240px; overflow-y: auto; padding: 4px 8px 6px; scrollbar-width: thin; scrollbar-color: var(--text-dim) transparent; }
2013
+ .ai-chat-action-details-list::-webkit-scrollbar { width: 7px; }
2014
+ .ai-chat-action-details-list::-webkit-scrollbar-thumb { background: var(--text-dim); border-radius: 7px; }
2015
+ .ai-chat-action-details-list::-webkit-scrollbar-track { background: transparent; }
2016
+ .ai-chat-action-details-list:focus-visible { outline: 2px solid var(--accent); outline-offset: -2px; }
2017
+ .ai-chat-action-details-kind { margin: 6px 0 2px; font-size: 10px; font-weight: 600; letter-spacing: .04em; text-transform: uppercase; color: var(--text-muted); }
2018
+ .ai-chat-action-details-rows { margin: 0; padding-left: 16px; font-size: 12px; line-height: 16px; color: var(--text); overflow-wrap: anywhere; }
2019
+ .ai-chat-action-details-rows li + li { margin-top: 2px; }
2020
+ .ai-chat-action-details-label { color: var(--text-muted); }
2021
+ .ai-chat-action-details-rows.kind-departure li::marker { color: var(--warn); }
2022
+ .ai-chat-action-details-rows.kind-unlinked { color: var(--text-muted); }
1997
2023
  .ai-chat-action-why { color: var(--text-muted); }
1998
2024
  .ai-chat-action-changed { margin-top: 6px; color: var(--text); }
1999
2025
  /* #2521 row 3a: what confirming a Quick model read agrees to. Set apart from the summary and never clamped. */
@@ -2016,6 +2042,9 @@
2016
2042
  /* #2427: the last click is the person's: an accent edge, not the red of a failure or the green of a finish. */
2017
2043
  .ai-chat-action-card.is-handed-over { border-left: 3px solid var(--accent); }
2018
2044
  .ai-chat-action-card.is-collapsed { padding: 6px 10px; border-left-color: var(--border-strong); }
2045
+ /* #4116: the keyboard that pressed Not now or Stop lands on the folded card; the ring shows only for the keyboard. */
2046
+ .ai-chat-action-card.is-collapsed:focus { outline: none; }
2047
+ .ai-chat-action-card.is-collapsed:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
2019
2048
  .ai-chat-action-line { margin: 0; color: var(--text-muted); font-size: 11px; line-height: 15px; overflow-wrap: anywhere; }
2020
2049
 
2021
2050
  /* #2399 PR C2 — a next step the assistant suggested in a project, workflow or workspace chat. The action card's shell (no