@floless/app 0.159.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.
@@ -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
@@ -282,18 +282,28 @@
282
282
  .ai-chat-scope-controls button:hover { background: var(--accent-soft); }
283
283
  .ai-chat-scope-controls button:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
284
284
  .ai-chat-scope-controls button:disabled { cursor: default; opacity: .55; }
285
- /* The access explanation wraps onto its own line under the toolbar, so it never squeezes the chips. */
286
- #chat-scope-disclosure { order: 99; color: var(--text-muted); font: 10px/1.4 var(--ui); flex-basis: 100%; }
287
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. */
288
286
  #chat-scope-toggle { flex: 1 1 0; max-width: max-content; min-width: 0; display: inline-flex; align-items: center; gap: 4px; }
289
287
  #chat-scope-toggle > span { min-width: 0; overflow: hidden; text-overflow: ellipsis; }
290
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); }
291
- #chat-access-explanation { flex: none; }
292
- #chat-scope-disclosure[hidden] { display: none; }
293
- #chat-access-explanation { display: inline-flex; align-items: center; gap: 3px; }
294
- #chat-access-explanation strong { font-weight: 600; }
289
+ #chat-access-chip { flex: none; display: inline-flex; align-items: center; gap: 3px; }
290
+ #chat-access-chip strong { font-weight: 600; }
295
291
  .ai-chat-access-chevron { display: inline-block; margin-left: 3px; }
296
- #chat-access-explanation[aria-expanded="true"] .ai-chat-access-chevron { transform: rotate(180deg); }
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); }
297
307
  .ai-chat-scope-picker { top: auto; bottom: calc(100% + 6px); left: 8px; right: 8px; padding: 8px; max-height: min(320px, 48vh); }
298
308
  .ai-chat-scope-head, .ai-chat-scope-row { display: flex; align-items: center; justify-content: space-between; gap: 7px; }
299
309
  .ai-chat-scope-head strong, .ai-chat-scope-picker > strong { color: var(--text); font: 600 11px var(--ui); }
@@ -543,8 +553,11 @@
543
553
  .ai-chat-feed::after { content: ''; flex: none; }
544
554
  .ai-chat-feed::before { height: 0; }
545
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. */
546
559
  .ai-chat-offscreen-activity {
547
- grid-row: 4;
560
+ grid-row: 3;
548
561
  grid-column: 1;
549
562
  justify-self: center;
550
563
  align-self: end;
@@ -801,20 +814,17 @@
801
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; }
802
815
  .ai-chat-request-sources { display: flex; flex-wrap: wrap; gap: 5px; margin-top: 8px; }
803
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; }
804
- .ai-chat-request-card[hidden] { display: none; }
805
817
  .ai-chat-request-head { position: relative; }
806
818
  .ai-chat-request-head strong { flex: 1; min-width: 0; }
807
- /* #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, ...). */
808
820
  .ai-chat-request-card[data-request-state="waiting"][data-attention="needs-you"] .ai-chat-request-status { color: var(--accent-bright); }
809
821
  .ai-chat-request-card[data-request-state="gone"] { border-left-color: var(--ok); }
810
- /* 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. */
811
823
  .ai-chat-request-card.ai-chat-request-aside { border-left-color: var(--border-strong); }
812
824
  .ai-chat-request-card.ai-chat-request-aside > p { color: var(--text-muted); }
813
- .ai-chat-request-dismiss { appearance: none; display: inline-flex; align-items: center; justify-content: center; width: 24px; height: 24px; padding: 0;
814
- border: 1px solid transparent; border-radius: 4px; background: transparent; color: var(--text-dim); font-size: 14px; line-height: 1; cursor: pointer; flex-shrink: 0; }
815
- .ai-chat-request-dismiss:hover:not(:disabled) { color: var(--text); border-color: var(--border-strong); background: var(--surface); }
816
- .ai-chat-request-dismiss:focus-visible { outline: 2px solid var(--accent); outline-offset: 1px; }
817
- .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; }
818
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); }
819
829
  .ai-chat-request-ask p { margin: 0; color: var(--text-muted); font-size: 11px; line-height: 1.45; }
820
830
  .ai-chat-request-note { margin: 6px 0 0; color: var(--warn-text); font-size: 11px; line-height: 1.45; }
@@ -1091,8 +1101,47 @@
1091
1101
  .ai-chat-source button.ai-chat-source-open:hover { background: transparent; color: var(--accent); }
1092
1102
  .ai-chat-source .ai-chat-source-marks { flex: none; color: var(--text-dim); font: 8.5px/1.25 var(--mono); letter-spacing: .03em; }
1093
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%; }
1094
1105
  .ai-chat-source.unresolved .ai-chat-source-why { color: var(--warn-text); white-space: normal; overflow-wrap: anywhere; }
1095
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); }
1096
1145
  /* The marker after a claim: a small numbered button in the text; "?" when no source was found. */
1097
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; }
1098
1147
  .ai-chat-message-body button.ai-chat-cite:hover { border-color: var(--accent); color: var(--accent); }
@@ -1100,6 +1149,9 @@
1100
1149
  .ai-chat-message-body button.ai-chat-cite:focus-visible,
1101
1150
  .ai-chat-source button:focus-visible,
1102
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; }
1103
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; }
1104
1156
  /* The cited sheet or page, over the app (a dialog: the shell's size containment would trap a fixed overlay). */
1105
1157
  /* `margin: auto` centres the modal: the app's global reset zeroes every margin, the dialog's default included. */
@@ -1138,6 +1190,7 @@
1138
1190
  [data-theme="light"] .ai-chat-sources-head,
1139
1191
  [data-theme="light"] .ai-chat-message-body .ai-chat-assume { color: #475569; }
1140
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); }
1141
1194
  /* The chat model's object links (#1653): a quiet receipt under its answer. */
1142
1195
  .ai-chat-event.links { border-color: color-mix(in srgb, var(--accent) 24%, var(--border)); }
1143
1196
  .ai-chat-event.evidence:not(.error) { border-color: color-mix(in srgb, var(--accent) 24%, var(--border)); }
@@ -1256,19 +1309,9 @@
1256
1309
  }
1257
1310
  .ai-chat-approval-scope strong { min-width: 0; line-height: 1.3; }
1258
1311
  .ai-chat-approval .allow { border-color: var(--accent); color: var(--text); }
1259
- /* Epic #2185 Slice A: the two wider choices, each beside the line that says exactly what it covers. They are plain
1260
- (outline) buttons on purpose: only Approve once looks like the expected answer. The covers line wraps under the button
1261
- in a narrow panel and stays visible text, never a tooltip alone. */
1262
- .ai-chat-approval-wide {
1263
- display: flex; flex-direction: column; gap: 6px;
1264
- margin-top: 8px; padding-top: 8px;
1265
- border-top: 1px solid color-mix(in srgb, var(--warn) 30%, var(--border));
1266
- }
1267
- .ai-chat-approval-wide-caption { color: var(--text-dim); font: 10px/1.3 var(--ui); }
1268
- .ai-chat-approval-wide-row { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 8px; }
1269
- .ai-chat-approval-wide-row button { flex: 0 0 auto; min-height: 28px; }
1270
- .ai-chat-approval-covers { flex: 1 1 170px; min-width: 0; color: var(--text-muted); font: 11px/1.45 var(--ui); }
1271
- .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. */
1272
1315
  /* Managed runtime setup (FloLess installing its tested Claude Code / Codex). Neutral while setting up —
1273
1316
  nothing has gone wrong — with the approval card's warn tint only once setup failed. There is no byte
1274
1317
  progress, so aliveness is the panel's own live dots, never a bar or a clock. */
@@ -1931,6 +1974,65 @@
1931
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; }
1932
1975
  .ai-chat-ask-options { display: flex; flex-direction: column; gap: 4px; }
1933
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); }
1934
2036
  .ai-chat-ask-context { margin: 0 0 8px; font: 10.5px/1.4 var(--ui); color: var(--text-muted); overflow-wrap: anywhere; }
1935
2037
  .ai-chat-ask-tag { align-self: flex-start; max-width: 100%; white-space: normal; overflow-wrap: anywhere; letter-spacing: .04em; }
1936
2038
  .ai-chat-ask-reason-label { display: block; margin-top: 6px; color: var(--text); font: 11px/1.4 var(--ui); }