@floless/app 0.139.1 → 0.141.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 (41) hide show
  1. package/dist/floless-server.cjs +32765 -36490
  2. package/dist/skills/floless-app-steel-takeoff/SKILL.md +8 -3
  3. package/dist/skills/floless-app-vectorize/SKILL.md +1 -1
  4. package/dist/skills/floless-app-vectorize/scripts/extract_pdf.py +7 -1
  5. package/dist/skills/floless-app-vectorize/scripts/vision_to_contract.py +7 -1
  6. package/dist/web/app.css +163 -3
  7. package/dist/web/aware.js +657 -66
  8. package/dist/web/chat.css +387 -25
  9. package/dist/web/chat.js +2005 -108
  10. package/dist/web/commands-filter.js +86 -8
  11. package/dist/web/commands-revit.js +2 -1
  12. package/dist/web/commands-shell.js +249 -13
  13. package/dist/web/commands-steel.js +34 -24
  14. package/dist/web/commands.js +19 -0
  15. package/dist/web/filter-ai-context.js +57 -0
  16. package/dist/web/filter-ai-proposal.js +87 -0
  17. package/dist/web/filter-guidance.js +8 -0
  18. package/dist/web/index.html +72 -11
  19. package/dist/web/instructor.js +231 -33
  20. package/dist/web/left-pane.js +185 -18
  21. package/dist/web/local-discovery.js +297 -0
  22. package/dist/web/model-editor-revit-adapter.js +3 -1
  23. package/dist/web/model-editor-steel-adapter.js +3 -1
  24. package/dist/web/model-editor.css +4 -4
  25. package/dist/web/model-revit-module.js +63 -0
  26. package/dist/web/model-viewport-toolbar.js +13 -1
  27. package/dist/web/model-viewport.js +16 -1
  28. package/dist/web/overlay-escape.js +79 -0
  29. package/dist/web/revit-editor.css +7 -0
  30. package/dist/web/revit-editor.html +5 -5
  31. package/dist/web/revit-editor.js +20 -10
  32. package/dist/web/steel-detail-refs.js +0 -69
  33. package/dist/web/steel-editor.html +103 -264
  34. package/dist/web/steel-filter-core.js +298 -12
  35. package/dist/web/steel-filter-hit.js +526 -0
  36. package/dist/web/steel-filter.html +1647 -75
  37. package/dist/web/steel-split-view.js +1 -1
  38. package/dist/web/vector-3d.html +3 -0
  39. package/dist/web/vector-editor.html +9 -1
  40. package/dist/web/workspaces.js +198 -25
  41. package/package.json +5 -2
package/dist/web/chat.css CHANGED
@@ -19,7 +19,23 @@
19
19
  height: 100%;
20
20
  display: grid;
21
21
  grid-template-columns: minmax(0, 1fr);
22
- grid-template-rows: auto auto minmax(0, 1fr) auto auto auto 0;
22
+ /* Row 2 is the ⚙ settings strip. It is minmax(0, auto), not a plain auto, so that in a short
23
+ panel it gives height back instead of pushing the feed to 0 and the composer out through the
24
+ host's overflow: hidden edge (#1492). The composer keeps its rigid auto row — it is the one
25
+ thing that must never leave the shell.
26
+ Row 5, the attachments about to be sent, is min-content rather than auto: that row scrolls
27
+ sideways, and a scroll container's automatic minimum height in a grid is 0, so an auto row gave
28
+ its chips up to the 6px padding whenever the shell ran short. The AI Chat floor (#1515), which
29
+ keeps every row that does not shrink in view, would then have measured and kept that. A
30
+ min-height: min-content on the row itself does not do it — Chromium still sized the track from
31
+ the padding alone; the track's own min-content sizing does. */
32
+ grid-template-rows: auto minmax(0, auto) minmax(0, 1fr) auto min-content minmax(0, auto) auto 0;
33
+ /* Size container so the approval tray's 50cqh cap below measures the shell's own height. Without
34
+ it the cap does not vanish, it silently mis-measures: cqh then falls back to the small viewport,
35
+ which is far taller than a short panel and leaves the tray effectively uncapped. Note this also
36
+ applies layout/size containment, so a position: fixed descendant would be trapped in the shell
37
+ — there are none today. */
38
+ container-type: size;
23
39
  background: var(--surface);
24
40
  color: var(--text);
25
41
  /* Keep ordinary chat copy and controls readable without changing the app-wide theme. */
@@ -33,19 +49,20 @@
33
49
  min-height: 43px;
34
50
  padding: 7px 8px 7px 10px;
35
51
  display: grid;
36
- grid-template-columns: minmax(0, 1fr);
52
+ grid-template-columns: minmax(0, 1fr) auto;
37
53
  align-items: center;
38
54
  gap: 7px;
39
55
  border-bottom: 1px solid var(--border);
40
56
  }
41
57
 
58
+ /* Holds only the screen-reader tab now; the history / new / refresh / settings controls sit in the
59
+ header row beside the conversation's name, so this row takes no room. */
42
60
  .ai-chat-controls {
43
- min-height: 31px;
44
- padding: 3px 8px;
61
+ min-height: 0;
62
+ padding: 0;
45
63
  display: flex;
46
64
  align-items: center;
47
65
  justify-content: flex-end;
48
- border-bottom: 1px solid var(--border);
49
66
  background: var(--surface);
50
67
  --text-muted: #c3ccd9;
51
68
  --text-dim: #8996a8;
@@ -69,7 +86,7 @@
69
86
  padding: 0;
70
87
  background: transparent;
71
88
  color: var(--text-muted);
72
- font: 14px/1 var(--sans);
89
+ font: 14px/1 var(--ui);
73
90
  cursor: pointer;
74
91
  opacity: 0;
75
92
  transition: opacity .12s ease, background .12s ease, color .12s ease;
@@ -116,18 +133,31 @@
116
133
  .ai-chat-approval button:focus-visible,
117
134
  .ai-chat-runtime button:focus-visible,
118
135
  .ai-chat-attachment button:focus-visible,
136
+ .ai-chat-provider-switch:focus-visible,
119
137
  #chat-input:focus-visible { outline: 2px solid var(--accent); outline-offset: 1px; }
120
138
 
121
139
  .ai-chat-settings {
122
140
  grid-row: 2;
123
141
  display: grid;
124
- grid-template-columns: repeat(4, minmax(0, 1fr));
142
+ grid-template-columns: repeat(3, minmax(0, 1fr));
125
143
  gap: 1px;
126
144
  padding: 1px 8px;
127
145
  border-bottom: 1px solid var(--border);
128
146
  background: var(--border);
147
+ /* Open, Settings is its own view in the conversation's place (below), so it scrolls within that
148
+ space; with the feed and composer hidden it cannot push the composer out of the shell (#1492). */
149
+ min-height: 0;
150
+ overflow-y: auto;
151
+ overscroll-behavior: contain;
152
+ scrollbar-width: thin;
153
+ scrollbar-color: var(--border-strong) var(--surface);
129
154
  }
130
155
  .ai-chat-settings[hidden] { display: none; }
156
+ /* Settings is its own view, like History: open, it takes the conversation's place rather than
157
+ sitting above it, and the pressed ⚙ closes it again. */
158
+ .ai-chat-shell:has(> .ai-chat-settings:not([hidden])) > .ai-chat-settings { grid-row: 2 / 8; align-self: start; max-height: 100%; }
159
+ .ai-chat-shell:has(> .ai-chat-settings:not([hidden])) > :is(.ai-chat-feed, .ai-chat-offscreen-activity, .ai-chat-approval-tray, .ai-chat-runtime, .ai-chat-recovery, .ai-chat-attachments, .ai-chat-skills, .ai-chat-composer) { display: none; }
160
+ .ai-chat-tab-actions .ai-chat-icon[aria-expanded="true"] { border-color: var(--border-strong); background: var(--surface-2); color: var(--text); }
131
161
  .ai-chat-setting {
132
162
  appearance: none;
133
163
  min-width: 0;
@@ -140,12 +170,45 @@
140
170
  text-align: left;
141
171
  }
142
172
  .ai-chat-setting:hover { background: var(--surface-2); }
143
- .ai-chat-setting > span { display: block; color: var(--text); font: 8px/1.2 var(--mono); letter-spacing: .08em; text-transform: uppercase; }
173
+ /* When the strip scrolls, keyboard focus must not land flush under the toolbar's hairline. */
174
+ .ai-chat-setting, .ai-chat-provider { scroll-margin-block: 4px; }
175
+ /* Settings text has three tiers, used the same way everywhere: dim uppercase labels, bright values,
176
+ and readable muted prose for the notes. */
177
+ .ai-chat-setting > span { display: block; color: var(--text-dim); font: 8px/1.2 var(--mono); letter-spacing: .08em; text-transform: uppercase; }
144
178
  .ai-chat-setting > strong { display: block; margin-top: 2px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--text); font: 10px/1.25 var(--mono); font-weight: 500; }
145
179
  .ai-chat-setting:disabled { cursor: default; opacity: 1; }
146
180
  .ai-chat-setting:disabled > strong { color: var(--text-dim); }
147
- .ai-chat-provider { cursor: default; }
181
+ .ai-chat-provider {
182
+ grid-column: 1 / -1;
183
+ display: grid;
184
+ grid-template-columns: minmax(0, 1fr) auto;
185
+ grid-template-rows: auto auto;
186
+ column-gap: 8px;
187
+ align-items: center;
188
+ cursor: default;
189
+ }
148
190
  .ai-chat-provider:hover { background: var(--surface); }
191
+ .ai-chat-provider > span { grid-column: 1; grid-row: 1; }
192
+ .ai-chat-provider > strong { grid-column: 1; grid-row: 2; }
193
+ .ai-chat-provider-switch {
194
+ grid-column: 2;
195
+ grid-row: 1 / span 2;
196
+ appearance: none;
197
+ padding: 3px 8px;
198
+ border: 1px solid var(--border-strong);
199
+ border-radius: 3px;
200
+ background: var(--surface);
201
+ color: var(--text-muted);
202
+ font: 10px/1.25 var(--ui);
203
+ cursor: pointer;
204
+ white-space: nowrap;
205
+ }
206
+ .ai-chat-provider-switch:hover { color: var(--text); border-color: var(--accent-dim); background: var(--surface-2); }
207
+ /* `aria-disabled` is the empty state's pending sign-in (#1514): focusable, but it must read — and
208
+ hover — exactly like a disabled one. After :hover so it wins at equal specificity. */
209
+ .ai-chat-provider-switch:disabled,
210
+ .ai-chat-provider-switch[aria-disabled="true"] { cursor: default; color: var(--text-dim); border-color: var(--border); background: var(--surface); }
211
+ .ai-chat-provider-switch[hidden] { display: none; }
149
212
  .ai-chat-integration-setting {
150
213
  grid-column: 1 / -1;
151
214
  display: flex;
@@ -176,14 +239,14 @@
176
239
  letter-spacing: .08em;
177
240
  text-transform: uppercase;
178
241
  }
179
- .ai-chat-desktop-status strong { color: var(--text-muted); font: 10px/1.25 var(--mono); font-weight: 500; }
180
- .ai-chat-desktop-status small { display: block; margin-top: 4px; color: var(--text-dim); font: 9px/1.35 var(--sans); }
242
+ .ai-chat-desktop-status strong { color: var(--text); font: 10px/1.25 var(--mono); font-weight: 500; }
243
+ .ai-chat-desktop-status small { display: block; margin-top: 4px; color: var(--text-muted); font: 9px/1.35 var(--ui); }
181
244
  .ai-chat-desktop-status p {
182
245
  margin: 7px 0 0;
183
246
  padding-top: 7px;
184
247
  border-top: 1px solid var(--border);
185
- color: var(--text-dim);
186
- font: 9px/1.4 var(--sans);
248
+ color: var(--text-muted);
249
+ font: 9px/1.4 var(--ui);
187
250
  }
188
251
 
189
252
  .ai-chat-picker {
@@ -206,14 +269,19 @@
206
269
  .ai-chat-picker::-webkit-scrollbar,
207
270
  .ai-chat-history::-webkit-scrollbar,
208
271
  .ai-chat-feed::-webkit-scrollbar,
272
+ .ai-chat-settings::-webkit-scrollbar,
209
273
  .ai-chat-skills::-webkit-scrollbar { width: 7px; height: 7px; }
210
274
  .ai-chat-picker::-webkit-scrollbar-track,
211
275
  .ai-chat-history::-webkit-scrollbar-track,
212
276
  .ai-chat-feed::-webkit-scrollbar-track,
213
277
  .ai-chat-skills::-webkit-scrollbar-track { background: transparent; }
278
+ /* The strip paints its hairline grid with a var(--border) background, so a transparent track
279
+ would read as a stripe of hairline colour — give it the tile surface instead. */
280
+ .ai-chat-settings::-webkit-scrollbar-track { background: var(--surface); }
214
281
  .ai-chat-picker::-webkit-scrollbar-thumb,
215
282
  .ai-chat-history::-webkit-scrollbar-thumb,
216
283
  .ai-chat-feed::-webkit-scrollbar-thumb,
284
+ .ai-chat-settings::-webkit-scrollbar-thumb,
217
285
  .ai-chat-skills::-webkit-scrollbar-thumb { background: var(--border-strong); border-radius: 7px; }
218
286
  .ai-chat-choice {
219
287
  appearance: none;
@@ -257,7 +325,7 @@
257
325
  .ai-chat-history[hidden] { display: none; }
258
326
  .ai-chat-shell.history-open .ai-chat-history { display: block; grid-row: 3 / 8; }
259
327
  .ai-chat-shell.history-open .ai-chat-feed,
260
- .ai-chat-shell.history-open .ai-chat-approval,
328
+ .ai-chat-shell.history-open .ai-chat-approval-tray,
261
329
  .ai-chat-shell.history-open .ai-chat-runtime,
262
330
  .ai-chat-shell.history-open .ai-chat-recovery,
263
331
  .ai-chat-shell.history-open .ai-chat-attachments,
@@ -343,7 +411,7 @@
343
411
  place-items: center;
344
412
  background: transparent;
345
413
  color: var(--text-muted);
346
- font: 13px/1 var(--sans);
414
+ font: 13px/1 var(--ui);
347
415
  cursor: pointer;
348
416
  transition: border-color .12s ease, color .12s ease, background .12s ease;
349
417
  }
@@ -374,7 +442,7 @@
374
442
  border: 1px solid var(--accent);
375
443
  border-radius: 3px;
376
444
  padding: 1px 4px;
377
- background: var(--surface-1);
445
+ background: var(--surface-2);
378
446
  color: var(--text);
379
447
  font: inherit;
380
448
  line-height: 1.25;
@@ -393,6 +461,7 @@
393
461
 
394
462
  .ai-chat-feed {
395
463
  grid-row: 3;
464
+ grid-column: 1;
396
465
  box-sizing: border-box;
397
466
  min-height: 0;
398
467
  min-width: 0;
@@ -401,11 +470,64 @@
401
470
  display: flex;
402
471
  flex-direction: column;
403
472
  gap: 12px;
404
- padding: 12px 12px 28px 14px;
473
+ /* Horizontal gutters stay in padding; the vertical ones are flex spacers below. Vertical padding
474
+ would floor the feed's border-box height at 40px even when its grid track is 0 — an invisible
475
+ box lying over the composer in a short panel (#1492). Content is clipped by overflow; padding
476
+ is not, so the gutters have to be content. */
477
+ padding: 0 12px 0 14px;
405
478
  scrollbar-width: thin;
406
479
  scrollbar-color: var(--border-strong) var(--surface);
407
480
  overscroll-behavior: contain;
481
+ /* A named size container so the empty state can ask how tall the conversation area ACTUALLY is
482
+ (#1501). The shell's own container is no use here: it stays 250px whether the ⚙ strip is open
483
+ or closed, while the feed underneath it goes from 85px to nothing. Size containment costs
484
+ nothing — this row is minmax(0, 1fr), so the grid already sets the feed's height and its
485
+ content never did — and the one overlay that could have been trapped by it, .ai-chat-picker,
486
+ is a sibling of the feed, not a descendant. The name is required: a @container rule can only
487
+ match DESCENDANTS of its container, so the rules below target .ai-chat-empty, never the feed. */
488
+ container: aiChatFeed / size;
408
489
  }
490
+ /* The spacers reproduce the old 12px top / 28px bottom gutters exactly: the 12px flex gap sits
491
+ between each spacer and the nearest row, so the top one needs no height of its own and the
492
+ bottom one needs 16px. Keeping them as content is what lets the feed collapse to nothing. */
493
+ .ai-chat-feed::before,
494
+ .ai-chat-feed::after { content: ''; flex: none; }
495
+ .ai-chat-feed::before { height: 0; }
496
+ .ai-chat-feed::after { height: 16px; }
497
+ .ai-chat-offscreen-activity {
498
+ grid-row: 4;
499
+ grid-column: 1;
500
+ justify-self: center;
501
+ align-self: end;
502
+ z-index: 2;
503
+ display: inline-flex;
504
+ align-items: center;
505
+ justify-content: center;
506
+ min-width: 38px;
507
+ min-height: 26px;
508
+ margin-bottom: 7px;
509
+ padding: 5px 9px;
510
+ border: 1px solid var(--border-strong);
511
+ border-radius: 14px;
512
+ background: var(--surface-2);
513
+ box-shadow: 0 2px 8px color-mix(in srgb, #000 20%, transparent);
514
+ color: var(--accent);
515
+ pointer-events: none;
516
+ }
517
+ .ai-chat-offscreen-activity[hidden],
518
+ .ai-chat-shell.history-open .ai-chat-offscreen-activity { display: none; }
519
+ /* Those gutters exist to keep MESSAGES clear of the toolbar and the composer. When the feed's
520
+ content is the empty-state card instead, they buy nothing and cost 40px — 12px of gap above the
521
+ card, 12px of gap plus the 16px spacer below it — which is subtracted from the card's budget at
522
+ every height. At a very short panel that is more than the whole conversation area, so the card
523
+ began below the visible edge and the user saw a blank strip with the action nowhere (#1501).
524
+ The card centres itself with `margin: auto 0` whenever there is free space, so dropping the
525
+ gutters is invisible at a tall panel and is the difference between fitting and not at a short
526
+ one. Not a container query: a @container rule cannot style its own container's pseudo-elements,
527
+ and this has to reach the feed's own ::after. */
528
+ .ai-chat-feed:has(> .ai-chat-empty) { gap: 0; }
529
+ .ai-chat-feed:has(> .ai-chat-empty)::before,
530
+ .ai-chat-feed:has(> .ai-chat-empty)::after { height: 0; }
409
531
  .ai-chat-empty {
410
532
  margin: auto 0;
411
533
  padding: 22px 14px;
@@ -417,11 +539,85 @@
417
539
  text-align: center;
418
540
  }
419
541
  .ai-chat-empty strong { display: block; margin-bottom: 4px; color: var(--text); font-size: 13px; }
542
+ /* The sign-in button inside the empty state: the settings strip's control, not a primary CTA — the
543
+ dashed muted box sets the tone. Inline so text-align centres it; the grid placement the shared
544
+ class carries is inert outside the settings grid. */
545
+ .ai-chat-empty-signin { display: inline-flex; margin-top: 10px; padding: 4px 10px; font-size: 11px; }
420
546
  .ai-chat-provider-row { display: grid; grid-template-columns: 1fr 1fr; gap: 7px; margin-top: 12px; }
547
+ .ai-chat-provider-accounts { display: grid; grid-template-columns: 1fr 1fr; gap: 7px; margin-top: 8px; color: var(--text-dim); font: 9.5px/1.4 var(--mono); }
548
+ .ai-chat-provider-accounts > span { min-width: 0; overflow-wrap: anywhere; }
421
549
  .ai-chat-start-provider { min-width: 0; padding: 7px 8px; font-size: 11px; }
550
+ /* In a short panel the card is TALLER than the conversation area it is centred in, so the control
551
+ the empty state exists for — the Sign in… button of #1484, or the provider choice — is painted
552
+ below the feed's visible edge and only scrolling reveals it (#1501). The card therefore gives up
553
+ its explanation, which is the expendable part, before it gives up its action.
554
+
555
+ Because the gutters above are dropped for this card, its budget IS the feed's height. Every
556
+ threshold below is the TALLEST form of that tier measured in the browser at 1280x720, rounded up
557
+ a few px for sub-pixel and border rounding. The tallest is what sets them: one threshold serves
558
+ four empty states, so sizing it to the signed-out card alone would leave the provider chooser —
559
+ the tallest of them — overflowing in the band just above it. Measured full cards, for the record:
560
+ chooser 202.48px, pending sign-in 156.57px, signed-out 120.93px.
561
+
562
+ ≤ 208px: the full card no longer fits. Tallest is the chooser at 202.48px, so the prose and the
563
+ signed-in account line go and the padding tightens, leaving title over action.
564
+ ≤ 94px: that stacked form no longer fits either — tallest is again the chooser, at 88.4px — so
565
+ the card collapses to a single centred row.
566
+ ≤ 52px: the row no longer fits; tallest is the chooser's at 48.25px.
567
+ ≤ 44px: not even the bare action fits; tallest is the chooser's at 40.25px.
568
+
569
+ Do NOT scale the 7px radius or drop the dashed border on the way down — the box is baseline
570
+ chrome at every size; only the padding compresses. */
571
+ @container aiChatFeed (max-height: 208px) {
572
+ .ai-chat-empty { padding: 11px 14px; }
573
+ .ai-chat-empty-copy, .ai-chat-provider-accounts { display: none; }
574
+ .ai-chat-empty-signin { margin-top: 8px; }
575
+ }
576
+ @container aiChatFeed (max-height: 94px) {
577
+ /* One row of "title, plus a trailing control if this state has one" — two of the four empty
578
+ states carry no button at all, so this must read correctly with the control absent. */
579
+ .ai-chat-empty {
580
+ display: flex;
581
+ flex-wrap: wrap;
582
+ align-items: center;
583
+ justify-content: center;
584
+ gap: 4px 8px;
585
+ padding: 7px 10px;
586
+ }
587
+ .ai-chat-empty strong { margin-bottom: 0; font-size: 12px; }
588
+ .ai-chat-empty-signin { margin-top: 0; }
589
+ .ai-chat-provider-row { margin-top: 0; }
590
+ /* No title-hiding rule for the pending sign-in here any more: its title ("Waiting for sign-in…")
591
+ and its button ("Sign-in window open") no longer carry the same words (#1516), so side by side
592
+ they read as state + object, and the title keeps naming the state in this band. */
593
+ }
594
+ /* Below the height where even that row fits — the tallest is the chooser's at 48.25px, so 52px
595
+ with the same rounding — the priority order takes its last step: the title goes, the action
596
+ stays. Gated on there BEING a live action: two of the four empty states carry no button at all,
597
+ and dropping their title would leave an empty dashed box, which is worse than a clipped one.
598
+ The pending sign-in's button is `aria-disabled`, not `:disabled`, so it is kept here too, on
599
+ purpose (#1514): it is focusable, its name says a sign-in window is open and its description
600
+ carries the prose, so it is the part of that card that still tells every user the state. */
601
+ @container aiChatFeed (max-height: 52px) {
602
+ .ai-chat-empty:has(button:not(:disabled)) strong { display: none; }
603
+ .ai-chat-empty { padding: 3px 8px; }
604
+ }
605
+ /* And below the height where the bare action itself fits, nothing does. A partly visible button is
606
+ worse than no button: it offers an affordance it cannot deliver, and because negative free space
607
+ collapses the card's `margin: auto 0` to 0 and start-aligns it, what gets clipped is the BOTTOM
608
+ — the button — not the box around it. So the card goes. Tallest bare-action card measured is
609
+ again the chooser's, at 40.25px, hence 44px.
610
+
611
+ This is not a new idea: #1492 already accepts "too short shows nothing" for the feed's own grid
612
+ track. This extends that floor up to where the ACTIONABLE states stop fitting, instead of
613
+ starting below them. It needs no new copy — the composer's hint line still names the state. */
614
+ @container aiChatFeed (max-height: 44px) {
615
+ .ai-chat-empty { display: none; }
616
+ }
422
617
 
423
618
  .ai-chat-message { display: flex; flex-direction: column; gap: 4px; min-width: 0; max-width: 100%; }
424
- .ai-chat-message-head { display: flex; justify-content: space-between; gap: 8px; color: var(--text); font: 8.5px/1.35 var(--mono); letter-spacing: .08em; text-transform: uppercase; }
619
+ /* Speaker and time sit together, as on the person's own messages, not pinned to opposite edges. */
620
+ .ai-chat-message-head { display: flex; justify-content: flex-start; gap: 8px; color: var(--text); font: 8.5px/1.35 var(--mono); letter-spacing: .08em; text-transform: uppercase; }
425
621
  .ai-chat-message.user .ai-chat-message-head { color: var(--accent); }
426
622
  .ai-chat-message-body {
427
623
  max-width: 92%;
@@ -446,6 +642,12 @@
446
642
  .ai-chat-message-body a { color: var(--accent); text-decoration: underline; }
447
643
  .ai-chat-message.user { align-items: flex-end; }
448
644
  .ai-chat-message.user .ai-chat-message-head { align-self: flex-end; width: auto; justify-content: flex-end; }
645
+ .ai-chat-message-delivery { align-self: flex-end; color: var(--text-dim); font: 10px/1.35 var(--mono); }
646
+ .ai-chat-message-delivery-detail { max-width: min(100%, 360px); text-align: right; font: 11px/1.4 var(--ui); }
647
+ .ai-chat-followup-resolve { align-self: flex-end; min-height: 24px; padding: 3px 7px; border: 1px solid var(--border-strong); border-radius: 4px; background: var(--surface); color: var(--text-muted); font: 10px/1.35 var(--ui); cursor: pointer; }
648
+ .ai-chat-followup-resolve:hover { color: var(--text); background: var(--surface-3); }
649
+ .ai-chat-followup-resolve:focus-visible { outline: 2px solid var(--accent); outline-offset: 1px; }
650
+ .ai-chat-followup-resolve:disabled { opacity: .55; cursor: wait; }
449
651
  .ai-chat-message.user .ai-chat-message-body { border-left: 0; border-right: 2px solid var(--accent); background: var(--accent-soft); color: var(--text); }
450
652
  .ai-chat-message.answer-jump {
451
653
  outline: 2px solid var(--accent);
@@ -502,6 +704,47 @@
502
704
  .ai-chat-request-actions button:hover { color: var(--text); background: var(--surface-3); }
503
705
  .ai-chat-request-actions button:focus-visible { outline: 2px solid var(--accent); outline-offset: 1px; }
504
706
 
707
+ .ai-chat-filter-card {
708
+ margin-top: 6px;
709
+ padding: 10px;
710
+ border: 1px solid var(--border-strong);
711
+ border-left: 2px solid var(--accent);
712
+ border-radius: 6px;
713
+ background: var(--surface-2);
714
+ color: var(--text);
715
+ }
716
+ .ai-chat-filter-card-head { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; font-size: 11px; line-height: 15px; }
717
+ .ai-chat-filter-card-head strong { font-weight: 600; }
718
+ .ai-chat-filter-state { color: var(--text-dim); font: 600 8px/1.3 var(--mono); letter-spacing: .08em; text-transform: uppercase; white-space: nowrap; }
719
+ .ai-chat-filter-changes { display: flex; flex-direction: column; gap: 4px; max-height: 180px; margin: 8px 0 0; padding: 0; overflow-y: auto; list-style: none;
720
+ scrollbar-width: thin; scrollbar-color: var(--border-strong) var(--surface-2); }
721
+ .ai-chat-filter-changes::-webkit-scrollbar { width: 8px; }
722
+ .ai-chat-filter-changes::-webkit-scrollbar-thumb { border-radius: 4px; background: var(--border-strong); }
723
+ .ai-chat-filter-changes::-webkit-scrollbar-track { background: var(--surface-2); }
724
+ .ai-chat-filter-change { display: flex; gap: 6px; color: var(--text); font-size: 11px; line-height: 15px; overflow-wrap: anywhere; }
725
+ .ai-chat-filter-change-glyph { flex: none; width: 1em; color: var(--text-muted); font: 11px/15px var(--mono); text-align: center; }
726
+ .ai-chat-filter-change.include .ai-chat-filter-change-glyph::before { content: '+'; }
727
+ .ai-chat-filter-change.exclude .ai-chat-filter-change-glyph::before { content: '\2212'; }
728
+ .ai-chat-filter-change.match .ai-chat-filter-change-glyph::before { content: '\2022'; }
729
+ .ai-chat-filter-note { margin: 8px 0 0; color: var(--text-muted); font-size: 10.5px; line-height: 14px; overflow-wrap: anywhere; }
730
+ .ai-chat-filter-note:empty { display: none; }
731
+ .ai-chat-filter-note:focus-visible { outline: 2px solid var(--accent); outline-offset: 1px; }
732
+ .ai-chat-filter-actions { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 6px; margin-top: 8px; }
733
+ .ai-chat-filter-actions[hidden] { display: none; }
734
+ .ai-chat-filter-actions button { 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; }
735
+ .ai-chat-filter-actions button:hover { color: var(--text); background: var(--surface-3); }
736
+ .ai-chat-filter-actions .ai-chat-filter-apply { border-color: var(--accent); background: var(--accent); color: #fff; }
737
+ .ai-chat-filter-actions .ai-chat-filter-apply:hover { background: var(--accent); filter: brightness(1.08); }
738
+ .ai-chat-filter-actions button[aria-disabled="true"] { cursor: default; opacity: .45; filter: none; }
739
+ .ai-chat-filter-actions .ai-chat-filter-apply[aria-disabled="true"] { border-color: var(--border-strong); background: var(--surface); color: var(--text-dim); }
740
+ .ai-chat-filter-actions button[aria-disabled="true"]:hover { background: var(--surface); color: var(--text-dim); filter: none; }
741
+ .ai-chat-filter-actions button:focus-visible { outline: 2px solid var(--accent); outline-offset: 1px; }
742
+ /* Status under the person's own (right-aligned) message. Outranks the shared left-aligned, one-line
743
+ live status, so a longer note wraps under the message instead of being cut off at the left edge. */
744
+ .ai-chat-live-status.ai-chat-filter-pending { align-self: flex-end; gap: 6px; height: auto; max-width: min(100%, 360px); margin: 2px 0 0; color: var(--text-muted); font-size: 10px; line-height: 1.4; }
745
+ .ai-chat-filter-pending .ai-chat-live-label { white-space: normal; text-align: right; overflow-wrap: anywhere; }
746
+ .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; }
747
+
505
748
  .ai-chat-event {
506
749
  border: 1px solid var(--border);
507
750
  border-radius: 5px;
@@ -551,15 +794,42 @@
551
794
  @keyframes ai-chat-history-spin { to { transform: translateY(-50%) rotate(360deg); } }
552
795
 
553
796
  .ai-chat-approval {
797
+ flex: none;
554
798
  border: 1px solid color-mix(in srgb, var(--warn) 50%, var(--border));
555
799
  border-radius: 6px;
556
800
  padding: 9px;
557
801
  background: color-mix(in srgb, var(--warn) 7%, var(--surface-2));
558
802
  }
803
+ .ai-chat-approval-tray {
804
+ grid-row: 6;
805
+ min-height: 0;
806
+ /* A pending decision and the compact request grant fit together in ordinary short panels;
807
+ the feed yields space while the composer keeps its fixed row. */
808
+ max-height: 50cqh;
809
+ overflow-y: auto;
810
+ overscroll-behavior: contain;
811
+ display: flex;
812
+ flex-direction: column;
813
+ gap: 6px;
814
+ margin: 8px 8px 0;
815
+ scrollbar-width: thin;
816
+ scrollbar-color: var(--border-strong) var(--surface);
817
+ }
818
+ .ai-chat-approval-tray:empty { display: none; }
559
819
  .ai-chat-approval strong { display: block; color: var(--text); font-size: 11px; }
560
820
  .ai-chat-approval p { margin: 5px 0 8px; color: var(--text-muted); font-size: 11px; line-height: 1.45; }
561
- .ai-chat-approval-actions { display: flex; justify-content: flex-end; gap: 6px; }
821
+ .ai-chat-approval-actions { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 6px; }
562
822
  .ai-chat-approval button { padding: 5px 9px; font-size: 10px; }
823
+ .ai-chat-approval-scope {
824
+ display: grid;
825
+ grid-template-columns: minmax(0, 1fr) auto;
826
+ align-items: center;
827
+ gap: 8px;
828
+ padding: 6px 8px;
829
+ border-color: var(--border-strong);
830
+ background: var(--surface-2);
831
+ }
832
+ .ai-chat-approval-scope strong { min-width: 0; line-height: 1.3; }
563
833
  .ai-chat-approval .allow { border-color: var(--accent); color: var(--text); }
564
834
  /* Managed runtime setup (FloLess installing its tested Claude Code / Codex). Neutral while setting up —
565
835
  nothing has gone wrong — with the approval card's warn tint only once setup failed. There is no byte
@@ -626,6 +896,77 @@
626
896
  .ai-chat-attachment img { width: 24px; height: 24px; object-fit: cover; border-radius: 3px; background: var(--surface-3); }
627
897
  .ai-chat-attachment button { width: 18px; height: 18px; padding: 0; flex: none; }
628
898
 
899
+ /* The Tekla model library carried over from a Graft receipt. It sits in the composer's rigid row,
900
+ above the input, and wraps rather than ellipsising: it states exactly what the binding permits,
901
+ so a cut-off line would hide the permission. Deliberately neutral — no success colour or icon —
902
+ because it is not a verification claim; each approved read gets its own receipt card. */
903
+ .ai-chat-tekla-context { margin-bottom: 6px; }
904
+ .ai-chat-tekla-context[hidden] { display: none; }
905
+ .ai-chat-tekla-chip {
906
+ display: flex;
907
+ align-items: flex-start;
908
+ gap: 8px;
909
+ padding: 6px 6px 6px 9px;
910
+ border: 1px solid var(--border);
911
+ border-radius: 5px;
912
+ background: var(--surface-2);
913
+ color: var(--text-muted);
914
+ font: 10.5px/1.45 var(--ui);
915
+ }
916
+ .ai-chat-tekla-chip-copy { flex: 1; min-width: 0; overflow-wrap: anywhere; }
917
+ .ai-chat-tekla-chip-copy strong { color: var(--text); font-weight: 600; }
918
+ .ai-chat-tekla-chip-state { color: var(--text-dim); }
919
+ .ai-chat-tekla-remove {
920
+ flex: none;
921
+ appearance: none;
922
+ padding: 3px 8px;
923
+ border: 1px solid var(--border-strong);
924
+ border-radius: 4px;
925
+ background: var(--surface);
926
+ color: var(--text-muted);
927
+ font: 10px var(--ui);
928
+ cursor: pointer;
929
+ }
930
+ .ai-chat-tekla-remove:hover:not(:disabled) { color: var(--text); background: var(--surface-3); }
931
+ .ai-chat-tekla-remove:focus-visible { outline: 2px solid var(--accent); outline-offset: 1px; }
932
+ .ai-chat-tekla-remove:disabled { cursor: wait; opacity: .65; }
933
+ .ai-chat-tekla-context[data-state="error"] .ai-chat-tekla-chip { border-color: color-mix(in srgb, var(--err) 42%, var(--border)); }
934
+ .ai-chat-tekla-context[data-state="removing"] .ai-chat-tekla-chip,
935
+ .ai-chat-tekla-context[data-state="binding"] .ai-chat-tekla-chip { opacity: .75; }
936
+ .ai-chat-tekla-error { margin: 5px 2px 0; color: var(--err); font: 10.5px/1.45 var(--ui); }
937
+
938
+ /* A server-authored receipt of one approved live Tekla read, in the Graft receipt's look. */
939
+ .ai-chat-tekla-read {
940
+ display: flex;
941
+ flex-direction: column;
942
+ gap: 7px;
943
+ padding: 8px 9px;
944
+ border: 1px solid var(--border);
945
+ border-left: 3px solid var(--ok);
946
+ border-radius: 0 5px 5px 0;
947
+ background: color-mix(in srgb, var(--ok) 8%, var(--surface-2));
948
+ color: var(--text);
949
+ font: 11px/1.45 var(--ui);
950
+ }
951
+ .ai-chat-tekla-read.unverified {
952
+ border-left-color: var(--warn);
953
+ background: color-mix(in srgb, var(--warn) 8%, var(--surface-2));
954
+ }
955
+ .ai-chat-tekla-read > strong { font-size: 11px; font-weight: 600; }
956
+ .ai-chat-tekla-read p { margin: 0; color: var(--text-muted); }
957
+ .ai-chat-tekla-read dl {
958
+ margin: 0;
959
+ padding: 7px 9px;
960
+ display: grid;
961
+ grid-template-columns: auto 1fr;
962
+ gap: 4px 10px;
963
+ border: 1px solid var(--border-strong);
964
+ border-radius: 5px;
965
+ background: var(--surface-2);
966
+ }
967
+ .ai-chat-tekla-read dt { margin: 0; align-self: baseline; color: var(--text-muted); font-size: 9px; letter-spacing: .04em; text-transform: uppercase; }
968
+ .ai-chat-tekla-read dd { margin: 0; min-width: 0; font: 10px/1.45 var(--mono); overflow-wrap: anywhere; }
969
+
629
970
  .ai-chat-skills {
630
971
  position: absolute;
631
972
  z-index: 19;
@@ -646,7 +987,7 @@
646
987
  .ai-chat-skill-origin { color: var(--text-dim); font: 8px/1.3 var(--mono); text-transform: uppercase; }
647
988
 
648
989
  .ai-chat-composer {
649
- grid-row: 6;
990
+ grid-row: 7;
650
991
  margin-top: 8px;
651
992
  padding: 7px 8px 8px;
652
993
  border-top: 1px solid var(--border);
@@ -664,19 +1005,37 @@
664
1005
  border-radius: 6px;
665
1006
  background: var(--surface-2);
666
1007
  color: var(--text);
667
- font: 12px/1.45 var(--sans);
1008
+ font: 12px/1.45 var(--ui);
668
1009
  caret-color: var(--accent);
669
1010
  scrollbar-width: thin;
670
1011
  scrollbar-color: var(--border-strong) var(--surface-2);
671
1012
  }
672
1013
  #chat-input::placeholder { color: var(--text-dim); }
673
1014
  #chat-input:disabled { opacity: .52; cursor: not-allowed; }
674
- .ai-chat-compose-actions { display: flex; align-items: center; gap: 6px; padding-top: 6px; }
675
- .ai-chat-compose-hint { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--text-dim); font: 8px/1.3 var(--mono); }
1015
+ .ai-chat-compose-actions { display: flex; align-items: center; gap: 10px; padding-top: 6px; }
1016
+ /* The data-handling disclosure, in the composer's rigid grid row so no conversation-area height can
1017
+ take it away (#1501, owner ruling 2026-09-23: "I think disclosure line should be guaranteed, we
1018
+ should not make shortcuts and do it right"). Deliberately NOT part of .ai-chat-compose-hint: that
1019
+ is one mutable string chosen by a priority chain, so a capability, runtime or recovery notice
1020
+ would overwrite the disclosure exactly when a new user is most likely to be reading it — the same
1021
+ shortcut the ruling forbids, moved one element over. It is also block-level and wraps rather than
1022
+ ellipsising, because the disclosure must remain readable at the narrowest panel width,
1023
+ and a disclosure that is present but cut off is not a disclosure. Never a data-tip either: a
1024
+ hover-gated line is not disclosed to anyone who does not hover. */
1025
+ .ai-chat-composer-disclosure {
1026
+ margin: 0 0 6px;
1027
+ color: var(--text-dim);
1028
+ font: 9px/1.4 var(--mono);
1029
+ overflow-wrap: anywhere;
1030
+ }
1031
+ .ai-chat-composer-disclosure[hidden] { display: none; }
1032
+ .ai-chat-compose-hint { flex: 1; min-width: 0; color: var(--text-dim); font: 8px/1.4 var(--mono); overflow-wrap: anywhere; }
676
1033
  .ai-chat-compose-hint.working { display: inline-flex; align-items: center; min-height: 16px; padding-left: 4px; }
677
- .ai-chat-compose-context { min-height: 12px; padding: 5px 0 0 30px; color: var(--text-dim); font: 8px/1.3 var(--mono); }
1034
+ .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; }
678
1035
  .ai-chat-compose-context strong { color: var(--text-muted); font-weight: 600; }
679
- .ai-chat-send, .ai-chat-stop { min-width: 48px; padding: 6px 9px; font-size: 10px; font-weight: 600; }
1036
+ .ai-chat-send, .ai-chat-stop { flex: none; min-width: 48px; padding: 6px 9px; font-size: 10px; font-weight: 600; }
1037
+ .ai-chat-compose-actions .ai-chat-stop { margin-left: auto; }
1038
+ .ai-chat-compose-actions .ai-chat-stop[hidden] + .ai-chat-send { margin-left: auto; }
680
1039
  .ai-chat-send { border-color: var(--accent); background: var(--accent); color: #fff; }
681
1040
  .ai-chat-send:hover { filter: brightness(1.08); }
682
1041
  .ai-chat-send:disabled, .ai-chat-stop:disabled, .ai-chat-icon:disabled, .ai-chat-start-provider:disabled { cursor: default; opacity: .45; filter: none; }
@@ -685,6 +1044,9 @@
685
1044
 
686
1045
  @media (max-width: 900px) {
687
1046
  .ai-chat-settings { grid-template-columns: repeat(2, minmax(0, 1fr)); }
1047
+ /* Two columns leave model | effort on one row and Access alone on the next. The strip's own
1048
+ background is the 1px grid line colour, so the empty half-row reads as a solid block. */
1049
+ #chat-permission { grid-column: 1 / -1; }
688
1050
  .ai-chat-picker { top: 112px; }
689
1051
  }
690
1052
  @media (prefers-reduced-motion: reduce) {