@floless/app 0.158.0 → 0.160.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 (43) hide show
  1. package/dist/floless-server.cjs +140655 -117708
  2. package/dist/schemas/drawing-check.profile.v1.schema.json +33 -1
  3. package/dist/schemas/steel.model.v2.schema.json +1 -0
  4. package/dist/skills/floless-app-actions/SKILL.md +23 -5
  5. package/dist/skills/floless-app-bridge/SKILL.md +5 -3
  6. package/dist/skills/floless-app-onboarding/SKILL.md +69 -5
  7. package/dist/skills/floless-app-onboarding/references/floless-surfaces.md +8 -6
  8. package/dist/skills/floless-app-queue/SKILL.md +3 -1
  9. package/dist/skills/floless-app-rfi/SKILL.md +29 -1
  10. package/dist/skills/floless-app-steel-model/SKILL.md +11 -5
  11. package/dist/skills/floless-app-steel-takeoff/SKILL.md +28 -8
  12. package/dist/skills/floless-app-workflows/SKILL.md +6 -3
  13. package/dist/web/agents.js +12 -5
  14. package/dist/web/app.css +266 -159
  15. package/dist/web/app.js +23 -51
  16. package/dist/web/aware.js +533 -546
  17. package/dist/web/chat-question-card.js +24 -1
  18. package/dist/web/chat.css +170 -48
  19. package/dist/web/chat.js +1406 -208
  20. package/dist/web/commands-shell.js +1104 -177
  21. package/dist/web/commands-steel.js +2 -0
  22. package/dist/web/drawing-check-editor.html +10 -0
  23. package/dist/web/drawing-check-editor.js +44 -0
  24. package/dist/web/guide.js +12 -2
  25. package/dist/web/index.html +62 -48
  26. package/dist/web/instructor.js +33 -12
  27. package/dist/web/pages.js +186 -31
  28. package/dist/web/panels.js +19 -1
  29. package/dist/web/project-access.js +67 -8
  30. package/dist/web/project-modules.js +474 -0
  31. package/dist/web/project-rfis.js +715 -0
  32. package/dist/web/project-workflows.js +506 -0
  33. package/dist/web/run-history.js +198 -0
  34. package/dist/web/run-page-view.js +12 -2
  35. package/dist/web/steel-3d-core.js +75 -1
  36. package/dist/web/steel-3d-view.js +8 -38
  37. package/dist/web/steel-editor.html +263 -59
  38. package/dist/web/steel-model-v2-projection.js +7 -0
  39. package/dist/web/workspace-root-recovery.js +119 -0
  40. package/dist/web/workspaces.js +493 -161
  41. package/launch-starting-page.mjs +5 -2
  42. package/launch.mjs +136 -78
  43. package/package.json +6 -1
@@ -100,6 +100,7 @@
100
100
  * files: { list(q) → [{ attachmentId, fileName, url }], uploading(q) → n, error(q) → '', attach(q, files),
101
101
  * remove(q, file), max } — optional; without it the Other… box has no paperclip,
102
102
  * otherHint: what the Other… row says under its name, when not the default (optional),
103
+ * hide: { carrier, run(), tip } — optional; a chevron in the head (and Esc inside the card) that puts the card aside,
103
104
  * repaint(), submit(),
104
105
  * }
105
106
  */
@@ -160,6 +161,18 @@
160
161
  if (question.header) head.append(el('span', 'ai-chat-ask-chip', question.header));
161
162
  if (questions.length > 1) head.append(el('span', 'ai-chat-ask-step', `${step + 1} of ${questions.length}`));
162
163
  else if (question.progress) head.append(el('span', 'ai-chat-ask-step', `${question.progress.index + 1} of ${question.progress.total}`));
164
+ // A card the caller lets the person put aside (owner, 2026-10-23: a drawing read's card took half the chat). Hiding
165
+ // keeps the draft and every answer; Esc anywhere inside the card does the same.
166
+ if (opts.hide) {
167
+ // The chevron of an open card (#2678, owner 2026-10-24: an icon to expand and collapse, never the word Show).
168
+ const hide = control('button', opts.hide.carrier, question.header, 'ai-chat-card-hide', '›');
169
+ hide.setAttribute('aria-label', 'Collapse this question for now');
170
+ hide.dataset.tip = opts.hide.tip || 'Collapse for now. Your answers and typing are kept.';
171
+ // Not while an answer is on its way: a refusal must land on a card the person can see (UX review).
172
+ block(hide, busy && 'Wait for your answer to finish sending, then collapse the card');
173
+ hide.addEventListener('click', () => { if (!busy) opts.hide.run(); });
174
+ head.append(hide);
175
+ }
163
176
  const text = el('p', 'ai-chat-ask-question', question.question);
164
177
  text.id = `chat-ask-question-${id}-${step}`;
165
178
  card.setAttribute('aria-labelledby', text.id);
@@ -440,6 +453,7 @@
440
453
  if (!card.dataset.armedAt) card.dataset.armedAt = String(Date.now() + ARM_MS);
441
454
  if (card.askKeydown) card.removeEventListener('keydown', card.askKeydown);
442
455
  card.askKeydown = (event) => {
456
+ if (opts.hide && !busy && escapeHides(event)) { event.preventDefault(); event.stopPropagation(); opts.hide.run(); return; }
443
457
  const choosing = event.key === 'Enter' || event.key === ' ' || /^[1-9]$/.test(event.key);
444
458
  const typing = event.target instanceof HTMLElement && event.target.matches('input, textarea, [contenteditable="true"]');
445
459
  if (event.repeat) { if (choosing && !typing) event.preventDefault(); return; }
@@ -466,6 +480,15 @@
466
480
  return card;
467
481
  }
468
482
 
483
+ /**
484
+ * An Esc that puts a card aside: not one an input method is composing with (keyCode 229 on older engines) or an inner
485
+ * control already used, and without a modifier. Shared with AI Chat's approval cards and its conversation cards (#2678).
486
+ */
487
+ function escapeHides(event) {
488
+ return event.key === 'Escape' && !event.defaultPrevented && !event.isComposing && event.keyCode !== 229
489
+ && !event.altKey && !event.ctrlKey && !event.metaKey && !event.shiftKey;
490
+ }
491
+
469
492
  /** Put keyboard focus on the row the cursor names (the recommended answer when the card arrives). */
470
493
  function focusCursor(card) {
471
494
  const rows = [...card.querySelectorAll('.ai-chat-ask-option')];
@@ -473,5 +496,5 @@
473
496
  target?.focus({ preventScroll: true });
474
497
  }
475
498
 
476
- window.FlolessQuestionCard = { order, createDraft, answered, answersFor, paint, focusCursor };
499
+ window.FlolessQuestionCard = { order, createDraft, answered, answersFor, paint, focusCursor, escapeHides };
477
500
  })();
package/dist/web/chat.css CHANGED
@@ -135,7 +135,8 @@
135
135
  .ai-chat-runtime button:focus-visible,
136
136
  .ai-chat-attachment button:focus-visible,
137
137
  .ai-chat-provider-switch:focus-visible,
138
- #chat-input:focus-visible { outline: 2px solid var(--accent); outline-offset: 1px; }
138
+ /* Text fields show focus as an accent border with a soft halo, never a second ring outside their own border. */
139
+ #chat-input:focus-visible { outline: none; border-color: var(--accent); box-shadow: 0 0 0 2px var(--accent-soft); }
139
140
 
140
141
  .ai-chat-settings {
141
142
  grid-row: 2;
@@ -270,7 +271,9 @@
270
271
  scrollbar-color: var(--text-dim) var(--surface-2);
271
272
  }
272
273
  .ai-chat-picker[hidden] { display: none; }
273
- .ai-chat-scope-controls { position: relative; display: flex; flex-wrap: wrap; align-items: center; gap: 5px; margin-bottom: 6px; }
274
+ /* The scope and access chips sit in the composer's one toolbar, under the message box: the wrapper lays its chips
275
+ straight into that row, and the Scope picker opens above the whole composer (.ai-chat-composer is its anchor). */
276
+ .ai-chat-scope-controls { display: contents; }
274
277
  .ai-chat-scope-controls[hidden] { display: none; }
275
278
  .ai-chat-scope-controls > button,
276
279
  .ai-chat-scope-action,
@@ -279,13 +282,29 @@
279
282
  .ai-chat-scope-controls button:hover { background: var(--accent-soft); }
280
283
  .ai-chat-scope-controls button:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
281
284
  .ai-chat-scope-controls button:disabled { cursor: default; opacity: .55; }
282
- #chat-scope-disclosure { color: var(--text-muted); font: 10px/1.4 var(--ui); flex-basis: 100%; }
283
- #chat-scope-disclosure[hidden] { display: none; }
284
- #chat-access-explanation { display: inline-flex; align-items: center; gap: 3px; }
285
- #chat-access-explanation strong { font-weight: 600; }
285
+ /* Basis 0 so the row breaks only when the fixed chips themselves do not fit; it grows back to its own width, no wider. */
286
+ #chat-scope-toggle { flex: 1 1 0; max-width: max-content; min-width: 0; display: inline-flex; align-items: center; gap: 4px; }
287
+ #chat-scope-toggle > span { min-width: 0; overflow: hidden; text-overflow: ellipsis; }
288
+ #chat-scope-toggle svg, .ai-chat-units-chip svg { flex: none; width: 11px; height: 11px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; color: var(--text-muted); }
289
+ #chat-access-chip { flex: none; display: inline-flex; align-items: center; gap: 3px; }
290
+ #chat-access-chip strong { font-weight: 600; }
286
291
  .ai-chat-access-chevron { display: inline-block; margin-left: 3px; }
287
- #chat-access-explanation[aria-expanded="true"] .ai-chat-access-chevron { transform: rotate(180deg); }
288
- .ai-chat-scope-picker { top: auto; bottom: calc(100% + 6px); left: 0; right: 0; padding: 8px; max-height: min(320px, 48vh); }
292
+ #chat-access-chip[aria-expanded="true"] .ai-chat-access-chevron { transform: rotate(180deg); }
293
+ /* The Access quick switch opens above the whole composer (its anchor), on the units menu's surface. One row per level:
294
+ the name, its one-line note underneath, and a check in a reserved column for the level in force. Hover and focus
295
+ take the accent wash; the check alone marks the selection, so the two never look alike. */
296
+ .ai-chat-access-menu { position: absolute; z-index: 30; bottom: calc(100% + 6px); left: 8px; right: 8px; max-width: 320px;
297
+ max-height: min(260px, 48vh); overflow-y: auto; display: grid; gap: 1px; padding: 4px; border: 1px solid var(--border-strong);
298
+ border-radius: 7px; background: var(--surface); box-shadow: 0 14px 34px rgba(0, 0, 0, .42); }
299
+ .ai-chat-access-menu[hidden] { display: none; }
300
+ .ai-chat-access-menu-head { padding: 5px 8px 4px 22px; color: var(--text-muted); font: 9px/1.2 var(--mono); letter-spacing: .06em; text-transform: uppercase; }
301
+ .ai-chat-access-menu button { appearance: none; position: relative; display: grid; gap: 2px; min-height: 36px; padding: 6px 8px 6px 22px;
302
+ border: 0; border-radius: 5px; background: transparent; color: var(--text); text-align: left; cursor: pointer; }
303
+ .ai-chat-access-menu button:hover, .ai-chat-access-menu button:focus-visible { background: var(--accent-soft); outline: none; }
304
+ .ai-chat-access-menu button strong { font: 600 11px/1.3 var(--ui); }
305
+ .ai-chat-access-menu button small { color: var(--text-muted); font: 10px/1.35 var(--ui); }
306
+ .ai-chat-access-menu button[aria-checked="true"]::before { content: '✓'; position: absolute; left: 7px; top: 6px; color: var(--accent); font: 11px/1.3 var(--ui); }
307
+ .ai-chat-scope-picker { top: auto; bottom: calc(100% + 6px); left: 8px; right: 8px; padding: 8px; max-height: min(320px, 48vh); }
289
308
  .ai-chat-scope-head, .ai-chat-scope-row { display: flex; align-items: center; justify-content: space-between; gap: 7px; }
290
309
  .ai-chat-scope-head strong, .ai-chat-scope-picker > strong { color: var(--text); font: 600 11px var(--ui); }
291
310
  .ai-chat-scope-row { padding: 6px 0; border-bottom: 1px solid var(--border); margin-bottom: 4px; color: var(--text); font: 11px var(--ui); }
@@ -534,8 +553,11 @@
534
553
  .ai-chat-feed::after { content: ''; flex: none; }
535
554
  .ai-chat-feed::before { height: 0; }
536
555
  .ai-chat-feed::after { height: 16px; }
556
+ /* Laid over the bottom of the feed, never in a row of its own: a row shrank the feed the moment the reader scrolled up,
557
+ which snapped a near-the-end reader back down and put the badge's row under the cursor, so the wheel stopped
558
+ scrolling the conversation (owner, 2026-10-23: "bouncing up and down"). pointer-events: none lets the wheel through. */
537
559
  .ai-chat-offscreen-activity {
538
- grid-row: 4;
560
+ grid-row: 3;
539
561
  grid-column: 1;
540
562
  justify-self: center;
541
563
  align-self: end;
@@ -792,20 +814,17 @@
792
814
  .ai-chat-request-card p { margin: 7px 0 0; color: var(--text); font-size: 11.5px; line-height: 1.5; white-space: pre-wrap; overflow-wrap: anywhere; }
793
815
  .ai-chat-request-sources { display: flex; flex-wrap: wrap; gap: 5px; margin-top: 8px; }
794
816
  .ai-chat-request-sources span { max-width: 100%; padding: 3px 6px; border: 1px solid var(--border); border-radius: 4px; color: var(--text-dim); font: 9px/1.3 var(--mono); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
795
- .ai-chat-request-card[hidden] { display: none; }
796
817
  .ai-chat-request-head { position: relative; }
797
818
  .ai-chat-request-head strong { flex: 1; min-width: 0; }
798
- /* #2185: the live word (Waiting for the AI, The AI is working, ...) and the always-visible ✕. */
819
+ /* #2185: the live word (Waiting for the AI, The AI is working, ...). */
799
820
  .ai-chat-request-card[data-request-state="waiting"][data-attention="needs-you"] .ai-chat-request-status { color: var(--accent-bright); }
800
821
  .ai-chat-request-card[data-request-state="gone"] { border-left-color: var(--ok); }
801
- /* Set aside: only the body quiets down - never the status word, Undo or the ✕, which must stay readable in both themes. */
822
+ /* Set aside: only the body quiets down - never the status word or Undo, which must stay readable in both themes. */
802
823
  .ai-chat-request-card.ai-chat-request-aside { border-left-color: var(--border-strong); }
803
824
  .ai-chat-request-card.ai-chat-request-aside > p { color: var(--text-muted); }
804
- .ai-chat-request-dismiss { appearance: none; display: inline-flex; align-items: center; justify-content: center; width: 24px; height: 24px; padding: 0;
805
- border: 1px solid transparent; border-radius: 4px; background: transparent; color: var(--text-dim); font-size: 14px; line-height: 1; cursor: pointer; flex-shrink: 0; }
806
- .ai-chat-request-dismiss:hover:not(:disabled) { color: var(--text); border-color: var(--border-strong); background: var(--surface); }
807
- .ai-chat-request-dismiss:focus-visible { outline: 2px solid var(--accent); outline-offset: 1px; }
808
- .ai-chat-request-dismiss:disabled { opacity: .5; cursor: default; }
825
+ /* #2678: Dismiss is a named button in the actions row (it used to be the ×; the card's chevron, on its shell, only folds
826
+ the card). */
827
+ .ai-chat-request-actions button.ai-chat-request-dismiss:disabled { opacity: .5; cursor: default; }
809
828
  .ai-chat-request-ask { margin-top: 8px; padding: 8px; border: 1px solid var(--border-strong); border-left: 2px solid var(--warn); border-radius: 4px; background: var(--surface); }
810
829
  .ai-chat-request-ask p { margin: 0; color: var(--text-muted); font-size: 11px; line-height: 1.45; }
811
830
  .ai-chat-request-note { margin: 6px 0 0; color: var(--warn-text); font-size: 11px; line-height: 1.45; }
@@ -888,7 +907,7 @@
888
907
  .ai-chat-height-input { appearance: none; box-sizing: border-box; flex: 1; min-width: 0; height: 26px; padding: 3px 7px; border: 1px solid var(--border-strong); border-radius: 4px;
889
908
  background: var(--surface-2); color: var(--text); font: 11px var(--mono); caret-color: var(--accent); }
890
909
  .ai-chat-height-input::placeholder { color: var(--text-dim); }
891
- .ai-chat-height-input:focus-visible { outline: 2px solid var(--accent); outline-offset: 1px; }
910
+ .ai-chat-height-input:focus-visible { outline: none; border-color: var(--accent); box-shadow: 0 0 0 2px var(--accent-soft); }
892
911
  .ai-chat-height-row button { flex: none; min-height: 26px; padding: 4px 9px; border: 1px solid var(--border-strong); border-radius: 4px; background: var(--surface); color: var(--text-muted); font-size: 10px; font-weight: 600; cursor: pointer; }
893
912
  .ai-chat-height-row button:hover { color: var(--text); background: var(--surface-3); }
894
913
  .ai-chat-height-row button.ai-chat-filter-apply { border-color: var(--accent); background: var(--accent); color: #fff; }
@@ -1082,8 +1101,47 @@
1082
1101
  .ai-chat-source button.ai-chat-source-open:hover { background: transparent; color: var(--accent); }
1083
1102
  .ai-chat-source .ai-chat-source-marks { flex: none; color: var(--text-dim); font: 8.5px/1.25 var(--mono); letter-spacing: .03em; }
1084
1103
  .ai-chat-source.unresolved { flex-wrap: wrap; max-width: 100%; border-style: dashed; border-color: color-mix(in srgb, var(--warn) 55%, var(--border)); }
1104
+ .ai-chat-source.unresolved .ai-chat-source-cited { color: var(--text); font: 9.5px/1.25 var(--mono); white-space: normal; overflow-wrap: anywhere; max-width: 100%; }
1085
1105
  .ai-chat-source.unresolved .ai-chat-source-why { color: var(--warn-text); white-space: normal; overflow-wrap: anywhere; }
1086
1106
  .ai-chat-source button.ai-chat-source-action { width: auto; height: auto; min-height: 20px; padding: 2px 7px; font: 10px/1.3 var(--ui); white-space: nowrap; }
1107
+ .ai-chat-source button.ai-chat-source-action[aria-busy="true"] { cursor: progress; color: var(--text-muted); }
1108
+ /* #2642: the person went on with the claim as an assumption. Decided, so no warn edge; dashed, so never a source. */
1109
+ .ai-chat-source.assumed { flex-wrap: wrap; max-width: 100%; border-style: dashed; border-color: var(--border-strong); }
1110
+ .ai-chat-source.assumed .ai-chat-source-why { color: var(--text-muted); white-space: normal; overflow-wrap: anywhere; }
1111
+ /* #2643: the ways on from a claim with no source wrap between buttons, never inside one; a chosen source says so in words. */
1112
+ .ai-chat-source .ai-chat-source-actions { display: inline-flex; flex-wrap: wrap; gap: 4px; max-width: 100%; }
1113
+ .ai-chat-source button.ai-chat-source-action.quiet { border-color: transparent; background: transparent; color: var(--text-muted); }
1114
+ .ai-chat-source button.ai-chat-source-action.quiet:hover { border-color: var(--border-strong); color: var(--text); }
1115
+ .ai-chat-source.chosen { flex-wrap: wrap; max-width: 100%; }
1116
+ .ai-chat-source-picker { position: fixed; z-index: 40; display: flex; flex-direction: column; gap: 6px; padding: 8px; border: 1px solid var(--border-strong);
1117
+ border-radius: 6px; background: var(--surface-2); color: var(--text); box-shadow: 0 12px 30px rgba(0, 0, 0, .35); }
1118
+ .ai-chat-source-picker-head { margin: 0; color: var(--text); font: 600 11px/1.35 var(--ui); }
1119
+ .ai-chat-source-picker-projects { display: flex; flex-wrap: wrap; gap: 4px; }
1120
+ .ai-chat-source-picker-projects[hidden] { display: none; }
1121
+ .ai-chat-source-picker-project { appearance: none; min-height: 22px; padding: 2px 8px; border: 1px solid var(--border-strong); border-radius: 5px;
1122
+ background: var(--surface); color: var(--text-muted); font: 10px/1.3 var(--ui); cursor: pointer; }
1123
+ .ai-chat-source-picker-project[aria-pressed="true"] { border-color: var(--accent); background: var(--accent-soft); color: var(--text); }
1124
+ .ai-chat-source-picker-input { appearance: none; box-sizing: border-box; width: 100%; padding: 6px 8px; border: 1px solid var(--border-strong); border-radius: 5px;
1125
+ background: var(--surface); color: var(--text); font: 11px/1.4 var(--ui); caret-color: var(--accent); outline: none; }
1126
+ .ai-chat-source-picker-input::placeholder { color: var(--text-dim); }
1127
+ .ai-chat-source-picker-input::-webkit-search-cancel-button { display: none; }
1128
+ .ai-chat-source-picker-input:focus-visible, .ai-chat-source-picker button:focus-visible { outline: 2px solid var(--accent); outline-offset: 1px; }
1129
+ .ai-chat-source-picker-list { max-height: 240px; overflow: auto; scrollbar-width: thin; scrollbar-color: var(--text-dim) var(--surface-2); }
1130
+ .ai-chat-source-picker-list::-webkit-scrollbar { width: 7px; height: 7px; }
1131
+ .ai-chat-source-picker-list::-webkit-scrollbar-track { background: transparent; }
1132
+ .ai-chat-source-picker-list::-webkit-scrollbar-thumb { background: var(--text-dim); border-radius: 7px; }
1133
+ .ai-chat-source-picker-list .ai-chat-mention-option { display: grid; grid-template-columns: auto 1fr; align-items: baseline; gap: 8px; text-align: left; }
1134
+ .ai-chat-source-picker-list .ai-chat-mention-option .ai-chat-skill-origin { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--text-muted); }
1135
+ [data-theme="light"] .ai-chat-source-picker-list .ai-chat-mention-option .ai-chat-skill-origin { color: #475569; }
1136
+ .ai-chat-source-picker-list .ai-chat-mention-option[aria-selected="true"] { background: var(--surface-3); }
1137
+ .ai-chat-source-picker-list .ai-chat-mention-option[aria-disabled="true"] { cursor: progress; opacity: .6; }
1138
+ .ai-chat-source-picker-list .ai-chat-mention-option[aria-busy="true"] { opacity: 1; outline: 1px dashed var(--border-strong); }
1139
+ .ai-chat-source-picker-foot { margin: 0; min-height: 0; color: var(--text-muted); font: 10px/1.4 var(--ui); }
1140
+ .ai-chat-source-picker-foot:empty { display: none; }
1141
+ .ai-chat-source-picker-foot.warn { color: var(--warn-text); }
1142
+ .ai-chat-source-picker-limit { margin: 0; color: var(--text-dim); font: 9.5px/1.4 var(--ui); }
1143
+ .ai-chat-source .ai-chat-source-note { flex-basis: 100%; color: var(--text-muted); font: 9.5px/1.3 var(--ui); white-space: normal; overflow-wrap: anywhere; }
1144
+ .ai-chat-source .ai-chat-source-note.warn { color: var(--warn-text); }
1087
1145
  /* The marker after a claim: a small numbered button in the text; "?" when no source was found. */
1088
1146
  .ai-chat-message-body button.ai-chat-cite { appearance: none; display: inline-grid; place-items: center; min-width: 16px; height: 15px; margin: 0 1px; padding: 0 3px; vertical-align: .15em; border: 1px solid var(--border-strong); border-radius: 3px; background: var(--surface-3); color: var(--text); font: 9px/1 var(--mono); cursor: pointer; }
1089
1147
  .ai-chat-message-body button.ai-chat-cite:hover { border-color: var(--accent); color: var(--accent); }
@@ -1091,12 +1149,16 @@
1091
1149
  .ai-chat-message-body button.ai-chat-cite:focus-visible,
1092
1150
  .ai-chat-source button:focus-visible,
1093
1151
  .ai-chat-source-viewer button:focus-visible { outline: 2px solid var(--accent); outline-offset: 1px; }
1152
+ .ai-chat-message-body button.ai-chat-cite.unresolved.assumed { border-color: var(--border-strong); color: var(--text-dim); }
1153
+ /* The person's assumption tag: a solid edge tells it from the AI's own dashed one; the words say who decided. */
1154
+ .ai-chat-message-body .ai-chat-assume.by-person { border-style: solid; }
1094
1155
  .ai-chat-message-body .ai-chat-assume { display: inline-block; margin: 0 2px; padding: 0 4px; vertical-align: .1em; border: 1px dashed var(--border-strong); border-radius: 3px; color: var(--text-dim); font: 8.5px/1.5 var(--mono); text-transform: uppercase; letter-spacing: .04em; cursor: help; }
1095
1156
  /* The cited sheet or page, over the app (a dialog: the shell's size containment would trap a fixed overlay). */
1096
1157
  /* `margin: auto` centres the modal: the app's global reset zeroes every margin, the dialog's default included. */
1097
1158
  .ai-chat-source-viewer { width: min(920px, 94vw); max-height: 90vh; margin: auto; padding: 0; border: 1px solid var(--border-strong); border-radius: 8px; background: var(--surface); color: var(--text); box-shadow: 0 18px 48px rgba(0, 0, 0, .5); overflow: hidden; }
1098
1159
  .ai-chat-source-viewer[open] { display: flex; flex-direction: column; }
1099
- .ai-chat-source-viewer::backdrop { background: rgba(2, 6, 23, .6); }
1160
+ /* #2582: opened with show() inside the app's own .modal-backdrop (not the top layer), so the Instructor stays above it. */
1161
+ .ai-chat-viewer-backdrop .ai-chat-source-viewer { position: static; flex: none; }
1100
1162
  .ai-chat-source-viewer-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 10px 12px 4px; }
1101
1163
  .ai-chat-source-viewer-head strong { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font: 600 13px/1.3 var(--ui); }
1102
1164
  .ai-chat-source-viewer-note { padding: 0 12px 8px; border-bottom: 1px solid var(--border); color: var(--text-dim); font: 9.5px/1.4 var(--mono); }
@@ -1121,7 +1183,6 @@
1121
1183
  .ai-chat-source-viewer-text::-webkit-scrollbar-thumb { background: var(--text-dim); border-radius: 8px; }
1122
1184
  .ai-chat-source-viewer-text::-webkit-scrollbar-corner { background: var(--surface-2); }
1123
1185
  .ai-chat-source-viewer-text:focus-visible { outline: 2px solid var(--accent); outline-offset: 1px; }
1124
- [data-theme="light"] .ai-chat-source-viewer::backdrop { background: rgba(15, 23, 42, .35); }
1125
1186
  [data-theme="light"] .ai-chat-sources, [data-theme="light"] .ai-chat-source-viewer { --text-muted: #475569; }
1126
1187
  /* The light theme's dim text is 2.7:1 on a chip, and its warning text 4.1:1 on a marker: below the 4.5:1 floor at these
1127
1188
  small sizes, so the provenance marks, the Assumption tag and the "?" marker take the darker slate the chat uses. */
@@ -1129,6 +1190,7 @@
1129
1190
  [data-theme="light"] .ai-chat-sources-head,
1130
1191
  [data-theme="light"] .ai-chat-message-body .ai-chat-assume { color: #475569; }
1131
1192
  [data-theme="light"] .ai-chat-message-body button.ai-chat-cite.unresolved { color: var(--text); }
1193
+ [data-theme="light"] .ai-chat-source .ai-chat-source-note.warn { color: var(--text); }
1132
1194
  /* The chat model's object links (#1653): a quiet receipt under its answer. */
1133
1195
  .ai-chat-event.links { border-color: color-mix(in srgb, var(--accent) 24%, var(--border)); }
1134
1196
  .ai-chat-event.evidence:not(.error) { border-color: color-mix(in srgb, var(--accent) 24%, var(--border)); }
@@ -1247,19 +1309,9 @@
1247
1309
  }
1248
1310
  .ai-chat-approval-scope strong { min-width: 0; line-height: 1.3; }
1249
1311
  .ai-chat-approval .allow { border-color: var(--accent); color: var(--text); }
1250
- /* Epic #2185 Slice A: the two wider choices, each beside the line that says exactly what it covers. They are plain
1251
- (outline) buttons on purpose: only Approve once looks like the expected answer. The covers line wraps under the button
1252
- in a narrow panel and stays visible text, never a tooltip alone. */
1253
- .ai-chat-approval-wide {
1254
- display: flex; flex-direction: column; gap: 6px;
1255
- margin-top: 8px; padding-top: 8px;
1256
- border-top: 1px solid color-mix(in srgb, var(--warn) 30%, var(--border));
1257
- }
1258
- .ai-chat-approval-wide-caption { color: var(--text-dim); font: 10px/1.3 var(--ui); }
1259
- .ai-chat-approval-wide-row { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 8px; }
1260
- .ai-chat-approval-wide-row button { flex: 0 0 auto; min-height: 28px; }
1261
- .ai-chat-approval-covers { flex: 1 1 170px; min-width: 0; color: var(--text-muted); font: 11px/1.45 var(--ui); }
1262
- .ai-chat-approval-wide .ai-chat-approval-warning { margin: 0; font-size: 11px; }
1312
+ /* Epic #2185 Slice A: the two wider choices sit in the same row as Deny and Approve once (owner, 2026-10-23). They are
1313
+ plain (outline) buttons on purpose: only Approve once looks like the expected answer. What each covers is its tooltip,
1314
+ and a hidden line read to screen readers. */
1263
1315
  /* Managed runtime setup (FloLess installing its tested Claude Code / Codex). Neutral while setting up —
1264
1316
  nothing has gone wrong — with the approval card's warn tint only once setup failed. There is no byte
1265
1317
  progress, so aliveness is the panel's own live dots, never a bar or a clock. */
@@ -1401,17 +1453,20 @@
1401
1453
  so a cut-off line would hide the permission. Deliberately neutral — no success colour or icon —
1402
1454
  because it is not a verification claim; each approved read gets its own receipt card. */
1403
1455
  .ai-chat-tekla-context { margin-bottom: 6px; }
1404
- /* #1890: a workspace conversation's units — asked once above the message box, then a quiet line to change them. */
1405
- .ai-chat-units {
1406
- display: flex;
1407
- flex-wrap: wrap;
1408
- align-items: center;
1409
- gap: 6px 8px;
1410
- margin-bottom: 6px;
1411
- color: var(--text-muted);
1412
- font: 10.5px/1.45 var(--ui);
1413
- }
1456
+ /* #1890: a workspace conversation's units — asked once in the conversation, then a chip in the composer toolbar
1457
+ ("ft-in ⌄") whose two-item menu opens above the composer, right-aligned. */
1458
+ .ai-chat-units { display: flex; flex: none; align-items: center; color: var(--text-muted); font: 10.5px/1.45 var(--ui); }
1414
1459
  .ai-chat-units[hidden] { display: none; }
1460
+ .ai-chat-units-chip { appearance: none; display: inline-flex; align-items: center; gap: 4px; border: 1px solid var(--border-strong); border-radius: 5px; background: var(--surface-2); color: var(--text); font: 10px var(--ui); padding: 4px 7px; cursor: pointer; white-space: nowrap; }
1461
+ .ai-chat-units-chip:hover { background: var(--accent-soft); }
1462
+ .ai-chat-units-chip:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
1463
+ .ai-chat-units-chip[aria-expanded="true"] .ai-chat-access-chevron { transform: rotate(180deg); }
1464
+ .ai-chat-units-menu { position: absolute; z-index: 30; bottom: calc(100% + 6px); right: 8px; display: grid; gap: 2px; min-width: 150px; padding: 4px; border: 1px solid var(--border-strong); border-radius: 7px; background: var(--surface); box-shadow: 0 14px 34px rgba(0, 0, 0, .42); }
1465
+ .ai-chat-units-menu[hidden] { display: none; }
1466
+ .ai-chat-units-menu button { appearance: none; display: flex; align-items: center; gap: 6px; padding: 6px 8px; border: 0; border-radius: 5px; background: transparent; color: var(--text); font: 11px var(--ui); text-align: left; cursor: pointer; }
1467
+ .ai-chat-units-menu button:hover, .ai-chat-units-menu button:focus-visible { background: var(--accent-soft); outline: none; }
1468
+ .ai-chat-units-menu button::before { content: ''; width: 10px; flex: none; color: var(--accent); }
1469
+ .ai-chat-units-menu button[aria-checked="true"]::before { content: '✓'; }
1415
1470
  /* #1907: the person's own connectors allowed for this conversation, each with its own Revoke. */
1416
1471
  .ai-chat-connectors { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 6px; margin-bottom: 6px; color: var(--text-muted); font: 10.5px/1.45 var(--ui); }
1417
1472
  .ai-chat-connectors[hidden] { display: none; }
@@ -1645,6 +1700,7 @@
1645
1700
  .ai-chat-skill-origin { color: var(--text-dim); font: 8px/1.3 var(--mono); text-transform: uppercase; }
1646
1701
 
1647
1702
  .ai-chat-composer {
1703
+ position: relative;
1648
1704
  grid-row: 7;
1649
1705
  margin-top: 8px;
1650
1706
  padding: 7px 8px 8px;
@@ -1670,7 +1726,9 @@
1670
1726
  }
1671
1727
  #chat-input::placeholder { color: var(--text-dim); }
1672
1728
  #chat-input:disabled { opacity: .52; cursor: not-allowed; }
1673
- .ai-chat-compose-actions { display: flex; align-items: center; gap: 10px; padding-top: 6px; }
1729
+ /* One toolbar under the message box: attach, the scope / access / units chips, then Stop and Send at the right.
1730
+ Only the Scope chip shrinks (with an ellipsis); a very narrow panel wraps the row rather than clipping Send. */
1731
+ .ai-chat-compose-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; padding-top: 6px; }
1674
1732
  /* The data-handling disclosure, in the composer's rigid grid row so no conversation-area height can
1675
1733
  take it away (#1501, owner ruling 2026-09-23: "I think disclosure line should be guaranteed, we
1676
1734
  should not make shortcuts and do it right"). Deliberately NOT part of .ai-chat-compose-hint: that
@@ -1687,7 +1745,10 @@
1687
1745
  overflow-wrap: anywhere;
1688
1746
  }
1689
1747
  .ai-chat-composer-disclosure[hidden] { display: none; }
1690
- .ai-chat-compose-hint { flex: 1; min-width: 0; color: var(--text-dim); font: 8px/1.4 var(--mono); overflow-wrap: anywhere; }
1748
+ /* Its own line under the message box, shown only when it says something about this moment (working, an error, a
1749
+ capability notice). The idle keyboard hint is the same node made screen-reader-only, so no row is spent on it. */
1750
+ .ai-chat-compose-hint { display: block; padding-top: 5px; color: var(--text-dim); font: 9px/1.4 var(--mono); overflow-wrap: anywhere; }
1751
+ .ai-chat-compose-hint.is-idle { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }
1691
1752
  .ai-chat-compose-hint.working { display: inline-flex; align-items: center; min-height: 16px; padding-left: 4px; }
1692
1753
  /* The refusal the composer itself reports — "could not send", a filter note. chat.js toggles this
1693
1754
  class at five sites (adds at 361, 443, 476; removes at 437, 999) and no rule ever styled it, so
@@ -1913,6 +1974,65 @@
1913
1974
  .ai-chat-approval .ai-chat-ask-question { margin: 6px 0 8px; color: var(--text); font: 600 12px/1.45 var(--ui); overflow-wrap: anywhere; }
1914
1975
  .ai-chat-ask-options { display: flex; flex-direction: column; gap: 4px; }
1915
1976
  .ai-chat-drawing-step { container-type: inline-size; }
1977
+ /* Owner, 2026-10-23: every card above the message box can be hidden to one line (its chevron, Esc; a drawing read's card also by
1978
+ itself once the person sends a message). A drawing card's head sticks to the top of the tray, as the action row sticks to
1979
+ its bottom, so the chevron stays in reach in a short panel (an AI question card keeps Flo in its head, so its head does not stick). */
1980
+ .ai-chat-ask-card.ai-chat-drawing-step .ai-chat-ask-head {
1981
+ position: sticky; top: -4px; z-index: 2; margin: -9px -9px 0; padding: 9px 9px 2px; border-radius: 5px 5px 0 0; background: var(--surface-2);
1982
+ }
1983
+ /* A height group's own sticky name sits just under that head (35px tall, stuck 4px above the tray's content edge). */
1984
+ .ai-chat-drawing-step .ai-chat-height-group { top: 31px; }
1985
+ .ai-chat-approval button.ai-chat-card-hide, .ai-chat-feed-card > button.ai-chat-card-hide {
1986
+ display: grid; place-items: center; flex: none; width: 24px; height: 24px; margin-left: auto; padding: 0;
1987
+ border: 1px solid transparent; border-radius: 4px; background: transparent; color: var(--text-muted); font: 600 16px/1 var(--ui);
1988
+ /* Owner, 2026-10-24: an icon to expand and collapse. An open card's chevron points down, its folded line's to the right,
1989
+ as the receipt fold's does (.ai-chat-fold-chevron). The square button turns as a whole, so its outline is unchanged. */
1990
+ transform: rotate(90deg);
1991
+ }
1992
+ /* An approval or proposal card has no head row, and the tray scrolls it to its buttons: its chevron floats in the top corner, with
1993
+ the heading wrapping beside it, and sticks to the top of the tray so it stays in reach in a short panel. */
1994
+ .ai-chat-approval:not(.ai-chat-ask-card) > button.ai-chat-card-hide {
1995
+ float: right; position: sticky; top: 0; z-index: 1; margin: -4px -4px 2px 6px; background: inherit;
1996
+ }
1997
+ :is(.ai-chat-approval, .ai-chat-feed-card) button.ai-chat-card-hide:hover { background: var(--surface-3); color: var(--text); }
1998
+ :is(.ai-chat-approval, .ai-chat-feed-card) button.ai-chat-card-hide:focus-visible { outline: 2px solid var(--accent); outline-offset: -2px; }
1999
+ /* #2678: a card in the conversation keeps its chevron on a shell around it (the card may repaint itself), in its top-right corner,
2000
+ level with its first line; that line keeps clear of it. A card already folded to one quiet line of its own (set aside,
2001
+ Not now, used) needs no chevron (Esc leaves it too: feedCardFolded); one its renderer keeps hidden shows nothing at all. */
2002
+ .ai-chat-feed-card { position: relative; min-width: 0; }
2003
+ .ai-chat-feed-card > :first-child { margin-top: 0; margin-bottom: 0; }
2004
+ .ai-chat-feed-card > button.ai-chat-card-hide { position: absolute; top: 5px; right: 5px; z-index: 1; margin: 0; }
2005
+ .ai-chat-feed-card > .ai-chat-tekla-read + button.ai-chat-card-hide { top: 4px; right: 4px; }
2006
+ .ai-chat-feed-card > :first-child > :first-child { padding-right: 30px; }
2007
+ .ai-chat-feed-card:has(> .is-collapsed, > .is-dismissed, > * > .ai-chat-connection-collapsed) > button.ai-chat-card-hide { display: none; }
2008
+ .ai-chat-feed-card:has(> [hidden]) { display: none; }
2009
+ /* The hidden card: one line in the card's place that says what still waits for the person, and opens the card again. */
2010
+ :is(.ai-chat-approval-tray, .ai-chat-feed) > button.ai-chat-hidden-line {
2011
+ display: flex; align-items: center; gap: 8px; width: 100%; min-height: 28px; box-sizing: border-box; padding: 4px 8px;
2012
+ border: 1px solid var(--accent-dim); border-radius: 6px; background: var(--surface-2); color: var(--text);
2013
+ font: 11px/1.35 var(--ui); text-align: left; cursor: pointer;
2014
+ }
2015
+ /* Above the message box: a decision waiting (an approval or proposal) keeps the approval card's amber, a question the ask
2016
+ card's blue. In the conversation: amber for anything waiting on the person, blue while the AI's side works (below). */
2017
+ :is(.ai-chat-approval-tray, .ai-chat-feed) > button.ai-chat-hidden-line.is-decision {
2018
+ border-color: color-mix(in srgb, var(--warn) 50%, var(--border)); background: color-mix(in srgb, var(--warn) 7%, var(--surface-2));
2019
+ }
2020
+ :is(.ai-chat-approval-tray, .ai-chat-feed) > button.ai-chat-hidden-line:hover { background: var(--surface-3); color: var(--text); }
2021
+ /* A finished card's line is quiet, like a receipt: blue or amber would make an old card look pending again (UX review).
2022
+ Blue (the line's own colour) is for one still going on the AI's side, amber for one waiting on the person. */
2023
+ .ai-chat-feed > button.ai-chat-feed-hidden:not(.is-decision, .is-open) {
2024
+ border-color: var(--border); background: color-mix(in srgb, var(--surface-2) 72%, transparent); color: var(--text-muted);
2025
+ }
2026
+ .ai-chat-feed > button.ai-chat-feed-hidden:not(.is-decision, .is-open) .ai-chat-hidden-line-toggle { color: var(--text-muted); }
2027
+ .ai-chat-feed > button.ai-chat-feed-hidden:not(.is-decision, .is-open):hover { background: var(--surface-3); color: var(--text); }
2028
+ /* A card expanded again is not new: no arrival pulse (the attribute outlives a repaint's class change). */
2029
+ .ai-chat-approval.ai-chat-ask-card[data-reshown] { animation: none; }
2030
+ :is(.ai-chat-approval-tray, .ai-chat-feed) > button.ai-chat-hidden-line:focus-visible { outline: 2px solid var(--accent); outline-offset: -2px; }
2031
+ .ai-chat-hidden-line .ai-chat-ask-chip { flex: none; }
2032
+ .ai-chat-hidden-line-text { flex: 1; min-width: 0; overflow-wrap: anywhere; }
2033
+ /* The folded line's chevron, pointing right: the fold is closed (the whole line is the button that opens it). */
2034
+ .ai-chat-hidden-line-toggle { flex: none; width: 16px; color: var(--accent-bright); font: 600 16px/1 var(--ui); text-align: center; }
2035
+ [data-theme="light"] .ai-chat-hidden-line-toggle { color: var(--accent); }
1916
2036
  .ai-chat-ask-context { margin: 0 0 8px; font: 10.5px/1.4 var(--ui); color: var(--text-muted); overflow-wrap: anywhere; }
1917
2037
  .ai-chat-ask-tag { align-self: flex-start; max-width: 100%; white-space: normal; overflow-wrap: anywhere; letter-spacing: .04em; }
1918
2038
  .ai-chat-ask-reason-label { display: block; margin-top: 6px; color: var(--text); font: 11px/1.4 var(--ui); }
@@ -1957,15 +2077,17 @@
1957
2077
  .ai-chat-ask-box::before { content: ""; width: 8px; height: 8px; transform: scale(0); background: #fff; clip-path: polygon(14% 44%, 0 65%, 50% 100%, 100% 16%, 80% 0%, 43% 62%); }
1958
2078
  .ai-chat-ask-option.is-chosen .ai-chat-ask-box { border-color: var(--accent); background: var(--accent); }
1959
2079
  .ai-chat-ask-option.is-chosen .ai-chat-ask-box::before { transform: scale(1); }
1960
- .ai-chat-ask-other { display: flex; flex-direction: column; gap: 5px; margin-top: 4px; padding: 6px; border: 1px solid var(--accent); border-radius: 5px; background: var(--surface); }
1961
- .ai-chat-ask-other.drop { border-style: dashed; background: color-mix(in srgb, var(--accent) 8%, transparent); }
2080
+ /* The Other… answer sits under its chosen row with no frame of its own: the row and the field already outline it.
2081
+ A frame shows only while a file is dragged over it, as the drop target. */
2082
+ .ai-chat-ask-other { display: flex; flex-direction: column; gap: 5px; margin-top: 4px; padding: 0; border: 1px dashed transparent; border-radius: 5px; }
2083
+ .ai-chat-ask-other.drop { padding: 6px; border-color: var(--accent); background: color-mix(in srgb, var(--accent) 8%, transparent); }
1962
2084
  .ai-chat-ask-other-line { display: flex; align-items: center; gap: 6px; min-width: 0; }
1963
2085
  .ai-chat-ask-other-input {
1964
2086
  flex: 1; min-width: 0; height: 28px; box-sizing: border-box; padding: 0 8px; border: 1px solid var(--border-strong); border-radius: 4px;
1965
2087
  background: var(--surface); color: var(--text); caret-color: var(--accent); font: 11px var(--ui);
1966
2088
  }
1967
2089
  .ai-chat-ask-other-input::placeholder { color: var(--text-muted); opacity: 1; }
1968
- .ai-chat-ask-other-input:focus-visible { outline: 2px solid var(--accent); outline-offset: 1px; border-color: var(--accent); }
2090
+ .ai-chat-ask-other-input:focus-visible { outline: none; border-color: var(--accent); box-shadow: 0 0 0 2px var(--accent-soft); }
1969
2091
  .ai-chat-approval.ai-chat-ask-card button.ai-chat-ask-clip { flex: none; width: 28px; height: 26px; padding: 0; display: grid; place-items: center; background: var(--surface); color: var(--text-muted); }
1970
2092
  .ai-chat-approval.ai-chat-ask-card button.ai-chat-ask-clip:hover { color: var(--text); background: var(--surface-3); }
1971
2093
  .ai-chat-ask-files { margin-top: 1px; }