@floless/app 0.106.0 → 0.108.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.
@@ -122,7 +122,14 @@ with an explicit OK at each kind (this is the interactive heart — never one-sh
122
122
  - **Framing plans** — the sheets that get read into members. Confirm the list before reading.
123
123
  - **Elevations / sections** — used for member heights (TOS/BOS), moment-frame schedules, and as
124
124
  jump targets for clickable callouts (stage 6). Confirm which sheets these are.
125
- - **Details** — the connection details the callouts point to. Confirm the detail sheets.
125
+ - **Details — CHASED TO A FIXED POINT, not one hop.** The plans' callouts get you to the first rank of
126
+ detail sheets; those details then reference further sheets, usually for the numbers (a schedule held
127
+ elsewhere, a related connection type drawn on another sheet), and those may reference on again. Walk the
128
+ references sheet-to-sheet until a pass turns up nothing new, and confirm the WHOLE resolved set with the
129
+ user, not just the sheets the plans happened to name. Follow references written as PROSE inside a detail,
130
+ not only drawn bubbles. If the chain leaves the set, say which sheet is missing and what it cost: a
131
+ connection whose schedule sheet is absent has an arrangement but no sizes, and must be reported that way
132
+ rather than read as complete. (See `reading-structural-drawings` → "The set is a GRAPH".)
126
133
  - **A sample line + profile** — on the first plan, read ONE member (its segment + profile label)
127
134
  and show it back; get an OK that the geometry + size mapping is right before reading the rest.
128
135
 
@@ -141,6 +148,28 @@ the user at the editor:
141
148
  - **Pre-fill the connection library** from `company-rules.md` (stage 2): emit the firm's rows into
142
149
  the contract's `connections[]` with `source:"company-rules"`; the user reviews/assigns them per
143
150
  member end in the editor's **Connections** panel (the per-end picker + confidence card).
151
+ - **Read the CHASED details into that same library — this is the point of chasing them.** Once the
152
+ reference graph is resolved (stage 5), each terminal detail says how its connection is actually built.
153
+ Put that on the `connections[]` row it belongs to, with `source:"drawing"`:
154
+ - `detail` — the callout as drawn, in whatever form this set writes it; that string is what a member
155
+ end's callout is matched against, so keep it verbatim rather than normalising it to a house style;
156
+ - `recipe.kind` — what it builds (`shear-plate`, `base-plate`);
157
+ - `recipe.params` — the numbers on the typical figure itself (plate thickness, weld leg, bolt Ø);
158
+ - `recipe.schedule[]` — the table that varies those numbers by member size, **which often lives on the
159
+ sheet the detail points AT rather than the detail's own sheet**, so it only exists if the chain was
160
+ followed; one row per size band, matched by `profile` / `profilePrefix` / `depth`;
161
+ - `recipe.notes[]` — the rules written round the figure (material grades, oversize-hole notes, weld
162
+ callouts, finish requirements). Carry them verbatim; they are not decoration, and floless surfaces
163
+ them on every end that uses the detail.
164
+
165
+ A row with a `recipe` is what lets a member end carrying that callout be **built** (issue #386). A row
166
+ read from the drawing but whose schedule sheet was missing must be left WITHOUT a schedule and said so —
167
+ an invented size band is worse than an end that honestly refuses to build.
168
+ - **Bind callouts to member ends where the drawing shows it.** A detail bubble on a plan has a leader
169
+ pointing at a specific connection; that link is legible at read time and guesswork afterwards. Where the
170
+ leader clearly lands on a member end, set that end's `detail` to the callout text so the end is buildable
171
+ without the user re-picking it by hand. Where it is ambiguous, leave it unset — the editor's ⌖ pick is
172
+ the fallback, and a wrong binding is worse than none.
144
173
  - **Point at the rest of the canvas:** the **filter** view (refine the kept linework), **Approve**
145
174
  (bake the lock — the determinism gate), **3D** model, **IFC** / **Tekla** export, the **BOM**
146
175
  (exportable to **CSV / Excel**), the **confidence report**, and the **callout bubbles** (click a
@@ -71,6 +71,34 @@ The vector linework is ground truth; your judgement binds LABELS to it, it does
71
71
  The same applies to the **linked detail/section sheets a callout points to** — extract each referenced
72
72
  sheet to vector SVG (e.g. PyMuPDF `get_svg_image`, strip the embedded raster) so the callout opens crisp.
73
73
 
74
+ ## The set is a GRAPH — follow every callout to a fixed point, not one hop
75
+
76
+ **A plan callout is the START of a chain, never the end.** It gets you to a sheet; the detail on that
77
+ sheet then points onward for the numbers — a schedule held on a different sheet, a related connection
78
+ type drawn elsewhere — and that sheet may point on again. Reading only the sheets the *plans* name leaves
79
+ you with a picture of the connection and none of its numbers: the arrangement without the sizes.
80
+
81
+ **Resolve the reference graph transitively:**
82
+
83
+ 1. Start from every callout on every framing plan (detail bubbles, section marks — whatever form this set
84
+ uses; read the set's own conventions rather than assuming a numbering scheme).
85
+ 2. Extract each referenced sheet, then **read ITS callouts and its in-detail cross-references too** —
86
+ including references written as PROSE inside a detail ("see schedule on …", "per detail …", "see sheet
87
+ … for …"), not just drawn bubbles. Those are the ones a bubble-only extractor misses.
88
+ 3. Repeat until a pass adds no new sheets. That fixed point is the set you actually have to read.
89
+ 4. **Record the edges** (which sheet/detail references which), so the chain is traceable afterwards and
90
+ a gap is visible rather than silent.
91
+
92
+ **A missing link is a FINDING, not a shrug.** If the chain reaches a sheet that is not in the PDF — or you
93
+ stop early — say so explicitly and name what it cost: *"this detail sizes its plate from a schedule sheet
94
+ that is not in this set, so the connection cannot be sized."* Silently keeping the one-hop read produces a
95
+ model that looks detailed and has no fabrication numbers behind it.
96
+
97
+ **Assume the plans under-name the set.** On a set measured while writing this rule, the framing plans'
98
+ callouts reached only a small minority of the connection-detail sheets directly — the rest were reachable
99
+ only on a second or third hop, and the sheet carrying the plate schedule was two hops from the plan. Let
100
+ the graph tell you the real extent; the plans' own callout list is a starting point, not an inventory.
101
+
74
102
  ## Symbols mean what THIS set's legend says — never a remembered mapping
75
103
 
76
104
  A framing plan draws several things as "a line with marks on its ends", and they are not the same kind
package/dist/web/app.css CHANGED
@@ -1322,6 +1322,14 @@
1322
1322
  color:var(--text-muted); font:500 11px/1.55 var(--mono);
1323
1323
  scrollbar-width:thin; scrollbar-color:var(--border-strong) transparent;
1324
1324
  }
1325
+ /* Live footnote under a form's fields (formModal `onChange`) — the running cost of what is
1326
+ currently picked. Muted and rule-separated because it reports on the form rather than being
1327
+ part of it. Set via textContent (never innerHTML), so it carries no markup — the estimate
1328
+ instead leads with its number, which is the part read at a glance. */
1329
+ .fm-footnote {
1330
+ margin-top: 13px; padding-top: 11px; border-top: 1px solid var(--border);
1331
+ color: var(--text-muted); font: 500 12px/1.5 var(--ui);
1332
+ }
1325
1333
  .fm-note::-webkit-scrollbar { width:9px; height:9px; }
1326
1334
  .fm-note::-webkit-scrollbar-thumb { background:var(--border-strong); border-radius:5px; }
1327
1335
  .fm-note::-webkit-scrollbar-track { background:transparent; }
@@ -3763,6 +3771,37 @@ body.mode-workspaces #menu .menu-item[data-action="bake"] { display:none; }
3763
3771
  .ecard .e-link { background:none; border:none; padding:0; font:inherit; font-size:11px; color:var(--text-muted); cursor:pointer; }
3764
3772
  .ecard .e-link:hover { color:var(--accent); }
3765
3773
  .ecard .e-link + .e-link { border-left:1px solid var(--border); padding-left:8px; } /* thin divider, keeps them tertiary */
3774
+ /* The rendered-files list. Every other card reports ONE artifact; this one accumulates a still per
3775
+ viewpoint plus turntables, so it is the only .e-meta that can grow without bound — and because
3776
+ the grid stretches a row to its tallest card, an uncapped list pushed all four siblings down.
3777
+ The cap is ~4.5 rows: a half-row peeking under the fold is what says "there is more" without a
3778
+ count. Themed scrollbar (never the native white bar) — a new scroll container is themed in the
3779
+ same pass that creates it. */
3780
+ .ecard .e-renders { align-self:stretch; width:100%; display:flex; flex-direction:column; gap:6px;
3781
+ max-height:104px; overflow-y:auto; overscroll-behavior:contain; padding-right:3px;
3782
+ scrollbar-width:thin; scrollbar-color:var(--border-strong) transparent; }
3783
+ .ecard .e-renders::-webkit-scrollbar { width:8px; }
3784
+ .ecard .e-renders::-webkit-scrollbar-thumb { background:var(--border-strong); border-radius:4px; }
3785
+ .ecard .e-renders::-webkit-scrollbar-track { background:transparent; }
3786
+ .ecard .e-renders:focus-visible { outline:1px solid var(--accent-dim); outline-offset:2px; border-radius:4px; }
3787
+ /* One line per artifact: name left, links right. Two lines each (the previous stacking) doubled a
3788
+ list that is already the tallest thing on the card. */
3789
+ .ecard .e-render-row { display:flex; align-items:center; justify-content:space-between; gap:10px; }
3790
+ /* The render preview. Mirrors the .fm-thumb / .req-thumb frame recipe (1px strong border, dark
3791
+ inset, object-fit cover) rather than inventing a treatment — this is the first arbitrary-coloured
3792
+ imagery in this UI, so the token palette must still own every pixel of chrome around it. No glow,
3793
+ no accent ring, no shadow. It makes this card ~86px taller and the grid stretches items, so the
3794
+ whole row grows; .e-act is bottom-pinned above, which keeps every button aligned regardless. */
3795
+ .ecard .e-thumb { display:block; width:100%; height:80px; margin:0 0 10px; padding:0; overflow:hidden;
3796
+ border:1px solid var(--border-strong); border-radius:6px; background:var(--bg); cursor:pointer;
3797
+ transition:border-color .15s; }
3798
+ .ecard .e-thumb:hover { border-color:var(--accent-dim); }
3799
+ .ecard .e-thumb img { width:100%; height:100%; object-fit:cover; display:block; }
3800
+ /* A 200 that will not decode: say so plainly instead of a broken-image glyph in a card that
3801
+ otherwise reports success. */
3802
+ .ecard .e-thumb-failed { display:flex; align-items:center; justify-content:center; height:34px;
3803
+ font-size:11px; color:var(--text-dim); cursor:default; }
3804
+ .ecard .e-thumb-failed:hover { border-color:var(--border-strong); }
3766
3805
  .ecard .e-act { margin-top:auto; }
3767
3806
  .ecard .e-act button { width:100%; padding:7px 10px; font-size:12px; border-radius:5px; font-family:var(--ui);
3768
3807
  background:var(--surface-2); border:1px solid var(--border-strong); color:var(--text-muted); cursor:pointer; transition:all .15s; }
package/dist/web/aware.js CHANGED
@@ -2890,7 +2890,10 @@
2890
2890
  // END of setup (not here) so a synchronous setup error can't latch it shut for the whole
2891
2891
  // session; done() clears it on every close.
2892
2892
  let _formModalOpen = false;
2893
- function formModal({ title, sub = '', fields, okLabel = 'Save', danger = false, hideCancel = false, returnFocusTo = null, returnFocusFallback = null }) {
2893
+ // `onChange(values) -> string` makes the dialog able to answer a question no static label can:
2894
+ // one whose answer DEPENDS on the choices (five viewpoints cost five times one). Its return value
2895
+ // becomes the footnote line under the fields. Optional — dialogs that don't pass it are unchanged.
2896
+ function formModal({ title, sub = '', fields, okLabel = 'Save', danger = false, hideCancel = false, returnFocusTo = null, returnFocusFallback = null, footnote = '', onChange = null }) {
2894
2897
  return new Promise((resolve) => {
2895
2898
  if (_formModalOpen) { console.warn('formModal: a modal is already open — refusing re-entry'); resolve(null); return; }
2896
2899
  const returnFocus = returnFocusTo instanceof HTMLElement
@@ -2958,15 +2961,28 @@
2958
2961
  // the combo just displays a friendly label and updates that input. Popover flows
2959
2962
  // in-line (not absolute) so it can't be clipped by the modal body's scroll.
2960
2963
  const opts = Array.isArray(f.options) ? f.options : [];
2961
- const sel = opts.find((o) => String(o.value) === val);
2964
+ // `multiple` keeps the SAME control — the value is just a comma-joined list, and the
2965
+ // popover toggles instead of replacing. Picking several viewpoints in one pass is the
2966
+ // reason it exists: rendering them one at a time meant reopening this dialog per angle.
2967
+ const multi = !!f.multiple;
2968
+ const chosen = multi ? val.split(',').map((s) => s.trim()).filter(Boolean) : [];
2969
+ const isOn = (o) => (multi ? chosen.includes(String(o.value)) : String(o.value) === val);
2970
+ const sel = opts.find(isOn);
2962
2971
  const disabled = !opts.length;
2972
+ const summarise = () => {
2973
+ const on = opts.filter(isOn);
2974
+ if (!on.length) return f.placeholder || 'Select…';
2975
+ if (on.length <= 2) return on.map((o) => o.label).join(', ');
2976
+ return `${on.length} selected`;
2977
+ };
2963
2978
  const trigLabel = disabled ? (f.disabledLabel || 'None available')
2979
+ : multi ? summarise()
2964
2980
  : sel ? sel.label + (sel.meta ? ` (${sel.meta})` : '') : (f.placeholder || 'Select…');
2965
2981
  const rows = opts.map((o) =>
2966
- `<div class="wf-option" role="option" data-id="${escapeAttr(String(o.value))}" data-search="${escapeAttr(String(o.search || o.label).toLowerCase())}" tabindex="-1" aria-selected="${String(o.value) === val ? 'true' : 'false'}"><span class="wf-option-name">${escapeHtml(o.label)}</span>${o.meta ? `<span class="wf-option-meta">${escapeHtml(o.meta)}</span>` : ''}</div>`).join('');
2967
- ctl = `<div class="wf-combo fm-select" data-fm-select="${escapeAttr(f.name)}">
2982
+ `<div class="wf-option${isOn(o) ? ' selected' : ''}" role="option" data-id="${escapeAttr(String(o.value))}" data-search="${escapeAttr(String(o.search || o.label).toLowerCase())}" tabindex="-1" aria-selected="${isOn(o) ? 'true' : 'false'}"><span class="wf-option-name">${escapeHtml(o.label)}</span>${o.meta ? `<span class="wf-option-meta">${escapeHtml(o.meta)}</span>` : ''}</div>`).join('');
2983
+ ctl = `<div class="wf-combo fm-select${multi ? ' fm-select-multi' : ''}" data-fm-select="${escapeAttr(f.name)}"${multi ? ' data-multi="1"' : ''}${f.placeholder ? ` data-placeholder="${escapeAttr(f.placeholder)}"` : ''}>
2968
2984
  <input type="hidden" data-fm="${escapeHtml(f.name)}" value="${escapeAttr(val)}">
2969
- <button type="button" class="wf-trigger fm-select-trigger" aria-haspopup="listbox" aria-expanded="false"${disabled ? ' disabled' : ''}>
2985
+ <button type="button" class="wf-trigger fm-select-trigger" aria-haspopup="listbox" aria-expanded="false"${multi ? ' aria-multiselectable="true"' : ''}${disabled ? ' disabled' : ''}>
2970
2986
  <span class="wf-trigger-label fm-select-label"${sel ? '' : ' data-empty="1"'}>${escapeHtml(trigLabel)}</span>
2971
2987
  <svg class="wf-caret" width="10" height="6" viewBox="0 0 10 6" aria-hidden="true"><path fill="currentColor" d="M0 0l5 6 5-6z"/></svg>
2972
2988
  </button>
@@ -2982,6 +2998,12 @@
2982
2998
  }
2983
2999
  return `<div class="modal-field"><label for="${id}">${escapeHtml(f.label || f.name)}</label>${ctl}</div>`;
2984
3000
  }).join('');
3001
+ // The footnote sits below every field because what it reports is a property of the whole
3002
+ // form, not of any one control. aria-live so a screen reader hears the cost change too.
3003
+ if (footnote || onChange) {
3004
+ $body.insertAdjacentHTML('beforeend',
3005
+ `<div class="fm-footnote" data-fm-footnote role="status" aria-live="polite"${footnote ? '' : ' hidden'}>${escapeHtml(footnote)}</div>`);
3006
+ }
2985
3007
  $ok.textContent = okLabel;
2986
3008
  // A destructive confirm flips the emphasis: the commit button is neutral→red
2987
3009
  // (.danger) and the SAFE Cancel becomes the accent primary + gets focus, so a
@@ -2991,9 +3013,23 @@
2991
3013
  $cancel.classList.toggle('primary', !!danger);
2992
3014
  $cancel.hidden = !!hideCancel;
2993
3015
  showModal($formModal);
2994
- // Prefer a real text input; else a file drop zone (so keyboard users land somewhere
2995
- // actionable rather than a possibly-disabled OK button).
2996
- const first = $body.querySelector('input:not(.fm-file-input),textarea')
3016
+ // Prefer a real text input; else a select's trigger; else a file drop zone (so keyboard
3017
+ // users land somewhere actionable rather than a possibly-disabled OK button).
3018
+ //
3019
+ // `[type="hidden"]` must be excluded, and it is not theoretical: a `type: 'select'` field
3020
+ // renders its value carrier as a hidden input FIRST inside the control, so a dialog whose
3021
+ // fields are all selects matched that, `.focus()` did nothing, and the `$ok.focus()` fallback
3022
+ // was skipped because `first` was truthy. Focus then stayed on the button behind the
3023
+ // backdrop — and since the Esc/Tab handler is bound to $formModal, the dialog could not be
3024
+ // dismissed with Escape and the focus trap never engaged. The render options dialog is the
3025
+ // first all-select caller, so it hit this every single time.
3026
+ // `.wf-search` must be excluded too: a select renders a search box inside its POPOVER, which
3027
+ // is `hidden` until the trigger is opened. It is a visible-typed text input, so excluding
3028
+ // only `[type=hidden]` still selected it — and focusing an input inside a hidden container
3029
+ // is exactly as much of a no-op as focusing the hidden one. Caught by driving the dialog,
3030
+ // not by reading it: the DOM says both are inputs.
3031
+ const first = $body.querySelector('input:not(.fm-file-input):not([type="hidden"]):not(.wf-search),textarea')
3032
+ || $body.querySelector('.fm-select-trigger:not([disabled])')
2997
3033
  || $body.querySelector('.fm-files .fm-drop, .fm-file .fm-drop, .fm-images .fm-drop');
2998
3034
  if (first) { first.focus(); if (first.select) first.select(); }
2999
3035
  else if (danger && !hideCancel) $cancel.focus();
@@ -3165,6 +3201,9 @@
3165
3201
  renderList(); syncDrop();
3166
3202
  });
3167
3203
  // ── select field setup (themed picker: search + keyboard + click-to-choose) ──
3204
+ // Assigned once collect() exists (below); the combo handlers below only ever CALL it, and
3205
+ // they can't run before then because a click is needed to reach them.
3206
+ let fireChange = () => {};
3168
3207
  $body.querySelectorAll('.fm-select').forEach((box) => {
3169
3208
  const hidden = box.querySelector('input[type="hidden"][data-fm]');
3170
3209
  const trigger = box.querySelector('.fm-select-trigger');
@@ -3192,16 +3231,56 @@
3192
3231
  };
3193
3232
  const open = () => { popover.hidden = false; trigger.classList.add('open'); trigger.setAttribute('aria-expanded', 'true'); if (search) { search.value = ''; filter(''); setTimeout(() => search.focus(), 0); } };
3194
3233
  const close = (focusTrig) => { popover.hidden = true; trigger.classList.remove('open'); trigger.setAttribute('aria-expanded', 'false'); clearHi(); if (focusTrig) trigger.focus(); };
3234
+ const multi = box.dataset.multi === '1';
3235
+ const nameOf = (o) => { const n = o.querySelector('.wf-option-name'); return n ? n.textContent : o.dataset.id; };
3195
3236
  const choose = (opt) => {
3237
+ if (multi) {
3238
+ // Toggle, and deliberately DO NOT close — picking three viewpoints should be three
3239
+ // clicks, not three round trips through the trigger.
3240
+ const on = !opt.classList.contains('selected');
3241
+ opt.classList.toggle('selected', on);
3242
+ opt.setAttribute('aria-selected', on ? 'true' : 'false');
3243
+ const picked = opts().filter((o) => o.classList.contains('selected'));
3244
+ if (hidden) hidden.value = picked.map((o) => o.dataset.id).join(',');
3245
+ if (label) {
3246
+ // The field's own placeholder, not a hardcoded 'Select…' — emptying a multi-select
3247
+ // used to replace "Pick one or more" with generic filler the caller never asked for.
3248
+ label.textContent = !picked.length ? (box.dataset.placeholder || 'Select…')
3249
+ : picked.length <= 2 ? picked.map(nameOf).join(', ')
3250
+ : `${picked.length} selected`;
3251
+ if (picked.length) label.removeAttribute('data-empty'); else label.setAttribute('data-empty', '1');
3252
+ }
3253
+ fireChange();
3254
+ return;
3255
+ }
3196
3256
  if (hidden) hidden.value = opt.dataset.id;
3197
3257
  opts().forEach((o) => { const s = o === opt; o.classList.toggle('selected', s); o.setAttribute('aria-selected', s ? 'true' : 'false'); });
3198
- const nm = opt.querySelector('.wf-option-name');
3199
3258
  const mt = opt.querySelector('.wf-option-meta');
3200
- if (label) { label.textContent = (nm ? nm.textContent : opt.dataset.id) + (mt ? ` (${mt.textContent})` : ''); label.removeAttribute('data-empty'); }
3259
+ if (label) { label.textContent = nameOf(opt) + (mt ? ` (${mt.textContent})` : ''); label.removeAttribute('data-empty'); }
3260
+ fireChange();
3201
3261
  close(true);
3202
3262
  };
3203
- trigger.addEventListener('click', (e) => { e.stopPropagation(); popover.hidden ? open() : close(false); });
3204
- trigger.addEventListener('keydown', (e) => { if (e.key === 'ArrowDown' || e.key === 'Enter' || e.key === ' ') { e.preventDefault(); open(); } });
3263
+ // Close any OTHER expanded combo. These popovers expand in-line rather than overlaying, so
3264
+ // two open at once push the remaining fields below the modal's scroll fold — and the
3265
+ // outside-click handler cannot do it, because the trigger handler below stops the event
3266
+ // from ever reaching it. Called from BOTH the pointer and the keyboard path: opening with
3267
+ // Enter went straight to open() and reproduced the same stacking for keyboard users.
3268
+ const closeOthers = () => {
3269
+ $body.querySelectorAll('.fm-select').forEach((other) => {
3270
+ if (other === box) return;
3271
+ const pop = other.querySelector('.fm-select-popover');
3272
+ if (!pop || pop.hidden) return;
3273
+ pop.hidden = true;
3274
+ const t = other.querySelector('.fm-select-trigger');
3275
+ if (t) { t.classList.remove('open'); t.setAttribute('aria-expanded', 'false'); }
3276
+ });
3277
+ };
3278
+ trigger.addEventListener('click', (e) => {
3279
+ e.stopPropagation();
3280
+ closeOthers();
3281
+ popover.hidden ? open() : close(false);
3282
+ });
3283
+ trigger.addEventListener('keydown', (e) => { if (e.key === 'ArrowDown' || e.key === 'Enter' || e.key === ' ') { e.preventDefault(); closeOthers(); open(); } });
3205
3284
  list.addEventListener('click', (e) => { const o = e.target.closest('.wf-option'); if (o) { e.stopPropagation(); choose(o); } });
3206
3285
  if (search) search.addEventListener('input', () => filter(search.value));
3207
3286
  // Keep combo keys inside the combo — don't submit/cancel the whole modal.
@@ -3301,6 +3380,20 @@
3301
3380
  });
3302
3381
  return out;
3303
3382
  };
3383
+ if (onChange) {
3384
+ const $note = $body.querySelector('[data-fm-footnote]');
3385
+ fireChange = () => {
3386
+ let text = '';
3387
+ // A throwing estimator must not take the dialog's controls down with it — the form still
3388
+ // works without its footnote, so degrade to hiding the line.
3389
+ try { text = String(onChange(collect()) || ''); }
3390
+ catch (err) { console.warn('formModal: onChange failed', err); }
3391
+ if (!$note) return;
3392
+ $note.textContent = text;
3393
+ $note.hidden = !text;
3394
+ };
3395
+ fireChange(); // state the cost of the DEFAULTS, before anything is touched
3396
+ }
3304
3397
  const done = (result) => {
3305
3398
  _formModalOpen = false;
3306
3399
  modalClosed = true;
@@ -5354,6 +5447,11 @@
5354
5447
  // (installing only) → dim ticker; `status`/`reason` drive the card state.
5355
5448
  if (m.line != null) setBootstrapLogLine(m.line);
5356
5449
  if (m.status) updateBootstrap({ status: m.status, reason: m.reason ?? null, remediation: m.remediation ?? null });
5450
+ } else if (m.type === 'render-progress') {
5451
+ // Relayed as a DOM event rather than widening the bridge: workspaces.js owns the Exports
5452
+ // card and is the only listener, and a render can outlive several repaints of it.
5453
+ try { window.dispatchEvent(new CustomEvent('floless:render-progress', { detail: m })); }
5454
+ catch { /* a listener throwing must not break the SSE loop */ }
5357
5455
  } else if (m.type === 'contract-changed' && typeof m.appId === 'string' && !m.project) {
5358
5456
  // A receipt belongs to the exact scene that was exported. Once its contract changes, remove
5359
5457
  // the session summary immediately so an earlier model cannot masquerade as the current one.