@floless/app 0.139.1 → 0.140.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.
@@ -16,7 +16,7 @@
16
16
  drawing palette — a separate piece of work — and #602's reporter names keeping the drawing dark as the
17
17
  acceptable choice as long as it is a deliberate one.
18
18
  THE FURNITURE FLOATING ON THE STAGE STAYS DARK WITH IT, and that is the same rule rather than an
19
- exception to it: a light zoom bar / 3D toolbar / legend over a dark model would put --text (near-black
19
+ exception to it: a light view band / 3D toolbar / legend over a dark model would put --text (near-black
20
20
  in light) on fills nobody re-tinted and drop its shadow into nothing. They are re-pinned wholesale by
21
21
  the ".island" block below — see it for the mechanism and the exact membership. */
22
22
  :root{
@@ -77,7 +77,6 @@
77
77
  --warn:#fbbf24;--warn-soft:#fcd34d;--warn-bg:#713f12;--warn-edge:#713f12; /* amber = "needs review", never an error */
78
78
  --ok:#86efac;--ok-bg:#166534;--ok-edge:#166534; /* green = human-confirmed */
79
79
  --ok-border:#16a34a;--ok-ink:#dcfce7; /* the FILLED success button (Dedupe done / Reviewed) */
80
- --hi:#4ade80;--hi-bg:#14532d; /* the confidence report's "high" band, one stop off --ok */
81
80
  --err:#fca5a5;--err-bg:#7f1d1d;--err-border:#991b1b;--err-edge:#7f1d1d;--err-ink:#fecaca;
82
81
  --err-underline:rgba(254,202,202,.55);
83
82
  --cyan:#22d3ee;--cyan-soft:rgba(34,211,238,.10); /* the "non-default, click to act" chip */
@@ -134,7 +133,6 @@
134
133
  --warn:#b45309;--warn-soft:#b45309;--warn-bg:#fef3c7;--warn-edge:#b45309;
135
134
  --ok:#15803d;--ok-bg:#dcfce7;--ok-edge:#15803d;
136
135
  --ok-border:#16a34a;--ok-ink:#15803d;
137
- --hi:#14532d;--hi-bg:#dcfce7; /* light keeps the two greens apart by INK depth, not a second tint */
138
136
  --err:#b91c1c;--err-bg:#fee2e2;--err-border:#ef4444;--err-edge:#b91c1c;--err-ink:#b91c1c;
139
137
  --err-underline:rgba(185,28,28,.55);
140
138
  --cyan:#155e75;--cyan-soft:rgba(21,94,117,.10);
@@ -162,7 +160,7 @@
162
160
  The 3D panel's tabs (#m3dLegend) and their row menus are out: they live in the main window's left Model
163
161
  section now (showLegendTab), not over the stage. */
164
162
  [data-theme="light"] #stage,[data-theme="light"] #stage3d,[data-theme="light"] #pane2d,[data-theme="light"] #pane3d,
165
- [data-theme="light"] #zoombar,[data-theme="light"] #connCrumb,[data-theme="light"] #bottomDock,
163
+ [data-theme="light"] #viewBar2d,[data-theme="light"] #connCrumb,[data-theme="light"] #bottomDock,
166
164
  [data-theme="light"] #selFly,[data-theme="light"] #m3dBar,[data-theme="light"] #m3dToolBar,
167
165
  [data-theme="light"] #propPop,[data-theme="light"] #snapMenu,[data-theme="light"] #dimEditPop,[data-theme="light"] #cmHud,
168
166
  [data-theme="light"] #m3dCube,[data-theme="light"] #m3dAxes,[data-theme="light"] #plHint,
@@ -207,7 +205,7 @@
207
205
  --ink-max:#fff;
208
206
  --warn:#fbbf24;--warn-soft:#fcd34d;--warn-bg:#713f12;--warn-edge:#713f12;
209
207
  --ok:#86efac;--ok-bg:#166534;--ok-edge:#166534;
210
- --ok-border:#16a34a;--ok-ink:#dcfce7;--hi:#4ade80;--hi-bg:#14532d;
208
+ --ok-border:#16a34a;--ok-ink:#dcfce7;
211
209
  --err:#fca5a5;--err-bg:#7f1d1d;--err-border:#991b1b;--err-edge:#7f1d1d;--err-ink:#fecaca;
212
210
  --err-underline:rgba(254,202,202,.55);
213
211
  --cyan:#22d3ee;--cyan-soft:rgba(34,211,238,.10);
@@ -335,9 +333,6 @@
335
333
  same inset bar, so no new colour enters the baseline. */
336
334
  body.split-view #pane2d.pane-active::after,body.split-view #pane3d.pane-active::after{content:"";position:absolute;inset:0;pointer-events:none;box-shadow:inset 0 0 0 2px var(--brand);border-radius:2px;z-index:7}
337
335
  svg{display:block;touch-action:none;flex:none}
338
- #zoombar{position:absolute;left:12px;bottom:12px;display:flex;align-items:center;gap:8px;background:var(--panel);border:1px solid var(--line);border-radius:8px;padding:6px 10px;box-shadow:0 4px 14px rgba(0,0,0,.45);z-index:5}
339
- #zoombar button{padding:1px 9px;font-size:15px}
340
- #zoombar input[type=range]{width:120px} /* SIZING only — the theming is the global input[type=range] rule below */
341
336
  /* placed-detail inspector (Slice 4): ft-in fields in a row + a themed opacity slider (no native widgets) */
342
337
  .detrow{display:flex;gap:6px;margin:2px 0}
343
338
  .detf{display:flex;flex-direction:column;gap:2px;flex:1;min-width:0;font-size:11px;color:var(--mut)}
@@ -355,8 +350,7 @@
355
350
  INTO, so an unusual profile cannot grow the rail. */
356
351
  #posSecSvg{display:block;width:100%;height:150px;background:var(--sunken);border:1px solid var(--line);border-radius:6px}
357
352
  #detOpacity{flex:1;min-width:0} /* SIZING only — the theming is the global input[type=range] rule below */
358
- #zoombar #zPct{min-width:40px;text-align:right;color:var(--mut);font-variant-numeric:tabular-nums}
359
- /* Connection Component breadcrumb (Slice A) — a floating chip over the 3D canvas, same recipe as #zoombar. */
353
+ /* Connection Component breadcrumb (Slice A) — a floating chip over the 3D canvas, same card recipe as the bands. */
360
354
  /* #935 — the plan-registration refusal, said out loud on the canvas the wrong geometry is drawn on.
361
355
  Floats over #pane2d the way #connCrumb floats over #pane3d (same recipe: absolute chip, themed
362
356
  chrome, its own z above the canvas), and wears .read-diag's amber triple because it reports
@@ -557,8 +551,8 @@
557
551
  `appearance:none` DELETES Chromium's thumb unless ::-webkit-slider-thumb re-declares it, exactly as
558
552
  it deletes the radio's dot, and Firefox does not implement that pseudo-element.
559
553
  WHAT THIS COSTS, said out loud rather than left for the next reader to discover: accent-color also
560
- tinted the FILLED part of the track, and Chromium has no pseudo-element for it, so these three
561
- sliders no longer show how far along the value is — the rail is one uniform var(--line). That is a
554
+ tinted the FILLED part of the track, and Chromium has no pseudo-element for it, so these sliders
555
+ (two since #1428 — the zoom bar's went with the bar) no longer show how far along the value is — the rail is one uniform var(--line). That is a
562
556
  real trade (a correct dark control, minus a cue), not a pure leak fix. Firefox DOES expose the
563
557
  filled portion as ::-moz-range-progress, so it is authored below; leaving it unauthored would have
564
558
  put a UA default over an authored track, which is the one-engine asymmetry this file rejects
@@ -1399,11 +1393,8 @@ rect.lblhot:focus-visible{outline:2px solid var(--brand);outline-offset:2px;stro
1399
1393
  #confStat{cursor:pointer;text-decoration:underline dotted} #confStat:hover b{filter:brightness(1.25)}
1400
1394
  .conf-cats{display:grid;grid-template-columns:repeat(2,1fr);gap:10px;padding:14px;border-bottom:1px solid var(--line)}
1401
1395
  .ccard{background:var(--bg);border:1px solid var(--line);border-radius:8px;padding:10px 12px}
1402
- .ccard.click{cursor:pointer} .ccard.click:hover{border-color:var(--brand)} .ccard.on{border-color:var(--brand)}
1403
1396
  .ccard .cc-label{font-size:10px;text-transform:uppercase;letter-spacing:.08em;color:var(--mut);margin-bottom:4px}
1404
1397
  .ccard .cc-score{font-size:22px;font-weight:700;line-height:1;margin-bottom:6px}
1405
- .ccard .cc-bar{height:4px;border-radius:2px;background:var(--line);margin-bottom:6px;overflow:hidden}
1406
- .ccard .cc-fill{height:100%;border-radius:2px}
1407
1398
  .ccard .cc-counts{font-size:11px;color:var(--mut);display:flex;gap:8px;flex-wrap:wrap}
1408
1399
  .conf-filter{display:flex;gap:12px;flex-wrap:wrap;padding:12px 14px;border-bottom:1px solid var(--line);align-items:center}
1409
1400
  .conf-filter .glab{font-size:10px;text-transform:uppercase;letter-spacing:.06em;color:var(--mut)}
@@ -1412,10 +1403,9 @@ rect.lblhot:focus-visible{outline:2px solid var(--brand);outline-offset:2px;stro
1412
1403
  .conf-filter .grp button.on{background:var(--brand);color:var(--brand-ink)}
1413
1404
  .conf-body{padding:0 14px 14px;overflow:auto;flex:1;min-height:0}
1414
1405
  .chip{display:inline-block;padding:1px 6px;border-radius:4px;font-size:10px;border:1px solid var(--line);color:var(--mut);margin:0 3px 3px 0}
1415
- .chip.assumed,.chip.weak{border-color:var(--warn-edge);color:var(--warn)} .chip.fail{border-color:var(--err-edge);color:var(--err)}
1416
- /* Human-confirmed. The same #166534/#86efac pair as the confidence report's `verified` band
1417
- (BANDPILL.verified) and the inspector's Mark-verified button — the TOKENS are shared, not the
1418
- treatment: this one is outlined like its .chip.fail/.chip.assumed siblings, BANDPILL's is filled. */
1406
+ .chip.assumed{border-color:var(--warn-edge);color:var(--warn)}
1407
+ /* Human-confirmed. The same --ok green as the Mark-verified buttons — the TOKENS are shared, not the
1408
+ treatment: this one is outlined like its .chip.assumed sibling. */
1419
1409
  .chip.verified{border-color:var(--ok-edge);color:var(--ok)}
1420
1410
  /* "user" = a value a human typed. Its blue holds on BOTH grounds (3.9:1 on light --panel, a clear edge
1421
1411
  on dark --panel), so only the INK steps down; the border is one of the few values needing no twin. */
@@ -1443,8 +1433,8 @@ rect.lblhot:focus-visible{outline:2px solid var(--brand);outline-offset:2px;stro
1443
1433
  .cbuilds{font-size:11px;line-height:1.4;color:var(--mut);margin-top:3px}
1444
1434
  .cbuilds b{color:var(--text);font-weight:600}
1445
1435
  .cbuilds .cundef{font-style:italic}
1446
- /* An authoring mistake the row itself can see — unreachable, not "waiting on you". Reuses the existing
1447
- .chip.fail tones rather than introducing a colour. */
1436
+ /* An authoring mistake the row itself can see — unreachable, not "waiting on you". Uses the --err tones
1437
+ rather than introducing a colour. */
1448
1438
  .cbuilds .cwarn{display:inline-block;margin-left:6px;padding:0 5px;border-radius:4px;font-size:10px;
1449
1439
  border:1px solid var(--err-edge);color:var(--err);cursor:default}
1450
1440
  .connset{opacity:.55}
@@ -1827,22 +1817,26 @@ text.mlentx{fill:#e2e8f0;text-anchor:middle;dominant-baseline:central;font-famil
1827
1817
  The sibling swatch `.swc` needs nothing — being an <input type=color> it already carries a
1828
1818
  1px border of its own. */
1829
1819
  [data-theme="light"] .epdot{box-shadow:0 0 0 1px var(--mut)}
1830
- /* 3D-only floating chrome (parity with AWARE viewer-3d): toolbar TL, ViewCube BR */
1820
+ /* Floating chrome over the panes (3D parity with AWARE viewer-3d): view bands TL, ViewCube BR */
1831
1821
  /* TWO BANDS over the viewport, not one bar and not a rail. The bar this began as was nine TEXT
1832
1822
  controls spanning left:12 to right:12 — near the full stage width, wrapping to extra rows on a
1833
1823
  narrow pane. As 30px icons the same nine come to ~280px in a single row that floats over the
1834
1824
  canvas rather than taking layout from it, which is a different proposition from what was moved.
1835
- The MODEL band (#m3dToolBar) is the other one: alone in 2D, where there is no view band, beside
1836
- this one in 3D and under it in Split — see the rules below. */
1825
+ The MODEL band (#m3dToolBar) is the other one: beside the 2D view band (#viewBar2d, #1428) in 2D,
1826
+ beside this one in 3D and under it in Split — see the rules below. */
1837
1827
  /* CAPPED SHORT OF THE CUBE. The cube hangs from the same top edge at right:12 (84px square), and this band
1838
1828
  wraps freely: in Split inside a project's Model step the 3D pane is ~345px, the band filled its width and
1839
1829
  sat over the cube, so a click on the cube hit the band. 124 = 12 left + 84 cube + 12 inset + 16 gap. */
1840
1830
  /* SIDE BY SIDE and both docked LEFT, view band first. The model band therefore starts where the
1841
1831
  view band ends, and that width is measured (--m3d-view-w) rather than assumed, because the view
1842
1832
  band wraps to a second row on a narrow pane and its own width is not fixed.
1843
- The offset applies ONLY when 3D is the only pane: Split has no room for the pair side by side, so
1844
- there the model band stacks under the view band instead (the Split rule below). In 2D there is no
1845
- view band at all, and the plain left:12 below is already right. */
1833
+ The offset applies when ONE pane is on screen: Split has no room for the pair side by side, so
1834
+ there the model band stacks under the view band instead (the Split rule below). 2D has its own,
1835
+ shorter view band (#viewBar2d — Fit all / Zoom to selected, #1428) in the same corner, so the base
1836
+ rule below docks off THAT one's measured width; 3D's rule swaps in the 3D band's. Both widths are
1837
+ measured by the same block of ResizeObserver hooks (one per band, just after the model shell mounts),
1838
+ so neither is assumed. The 2D rule sits AFTER the model band's own card rule below (same
1839
+ specificity, so order decides); these two outrank it by class. */
1846
1840
  body.v3d #m3dToolBar{left:calc(var(--m3d-view-w, 335px) + 22px)}
1847
1841
  /* Split gives the 3D half about 498px and the two bands want 486 of it, so side by side they sit flush
1848
1842
  against the pane edge and spill the moment the split is dragged narrower. In split the model band
@@ -1852,17 +1846,26 @@ text.mlentx{fill:#e2e8f0;text-anchor:middle;dominant-baseline:central;font-famil
1852
1846
  /* The model band: same card, always on — Add member and Dimension work in 2D as well as 3D. */
1853
1847
  #m3dToolBar{position:absolute;top:12px;left:12px;display:flex;flex-direction:row;flex-wrap:wrap;gap:2px;align-items:center;z-index:59;
1854
1848
  padding:4px;background:var(--panel);border:1px solid var(--line);border-radius:9px;box-shadow:0 6px 20px rgba(0,0,0,.5)} /* bounded to the stage so narrow windows wrap this local toolbar instead of widening the whole document; above the model-glued label chips (z:3-4, under the 3D chrome — #614), below toasts (60) */
1849
+ /* The 2D VIEW band (#1428): the 2D pane's counterpart of the 3D view band, in the same corner. It is the
1850
+ model band's card, declaration for declaration — steel-2d-view-band.test.ts holds the two rules equal,
1851
+ so they cannot drift — written as its own rule because steel-more-menu-stacking.test.ts reads the
1852
+ model band's `#m3dToolBar{` line by its own anchor (a shared selector list would break its z-index
1853
+ read). For the same reason the card rule above must stay ABOVE the `left:` re-statement below, which
1854
+ matches that anchor too and carries no z-index. */
1855
+ #viewBar2d{position:absolute;top:12px;left:12px;display:flex;flex-direction:row;flex-wrap:wrap;gap:2px;align-items:center;z-index:59;
1856
+ padding:4px;background:var(--panel);border:1px solid var(--line);border-radius:9px;box-shadow:0 6px 20px rgba(0,0,0,.5)}
1857
+ #m3dToolBar{left:calc(var(--v2d-view-w, 72px) + 22px)} /* 2D-only: beside #viewBar2d (the v3d / split rules above win by specificity); 72 is nominal — sync2d() overwrites it before first paint */
1855
1858
  /* Flat inside the card - the band carries the one shadow now. */
1856
- #m3dToolBar .m3dwrap>button,#m3dToolBar>button,#m3dToolBar .cmwrap>button,#m3dDim{width:30px;height:30px;padding:0;display:flex;align-items:center;justify-content:center;
1859
+ #m3dToolBar .m3dwrap>button,#m3dToolBar>button,#m3dToolBar .cmwrap>button,#m3dDim,#viewBar2d>button{width:30px;height:30px;padding:0;display:flex;align-items:center;justify-content:center;
1857
1860
  background:transparent;border:1px solid transparent;border-radius:6px;box-shadow:none;color:var(--mut)}
1858
- #m3dToolBar button:hover{background:var(--btn-hover);color:var(--text)}
1861
+ #m3dToolBar button:hover,#viewBar2d button:hover{background:var(--btn-hover);color:var(--text)}
1859
1862
  /* ONE ACTIVE LOOK for every kind of 'this is on': a mode that is armed (.on), a menu that is open,
1860
1863
  and a trigger that does announce aria-expanded. They are the same statement to the reader, so
1861
1864
  they get the same brand tint and border rather than three near-misses. */
1862
1865
  #m3dToolBar button[aria-expanded=true],#m3dToolBar button.on,
1863
1866
  #m3dToolBar .m3dwrap:has(> .m3dmenu.open) > button,
1864
1867
  #m3dToolBar .cmwrap:has(> .cmmenu.open) > button{background:#16243d;color:var(--brand);border-color:var(--brand)}
1865
- #m3dToolBar svg{width:16px;height:16px;display:block;fill:none;stroke:currentColor;stroke-width:1.6;stroke-linecap:round;stroke-linejoin:round}
1868
+ #m3dToolBar svg,#viewBar2d svg{width:16px;height:16px;display:block;fill:none;stroke:currentColor;stroke-width:1.6;stroke-linecap:round;stroke-linejoin:round}
1866
1869
  /* STATE IS THE ICON on the two buttons that have modes. CSS cannot compare one attribute to
1867
1870
  another, so each pairing is spelled out; the button carries data-proj / data-mode and only the
1868
1871
  matching glyph is drawn. Enumerated rather than swapped in JS because innerHTML would fight
@@ -1880,7 +1883,7 @@ text.mlentx{fill:#e2e8f0;text-anchor:middle;dominant-baseline:central;font-famil
1880
1883
  /* Disabled keeps the flat band shape and only loses contrast — the global button:disabled paints a
1881
1884
  --btn fill, which would read as a pressed pill sitting in the middle of a row of flat icons. */
1882
1885
  #m3dToolBar button:disabled{opacity:.38;cursor:default;background:transparent;border-color:transparent;box-shadow:none}
1883
- #m3dToolBar .rlbl{position:absolute;width:1px;height:1px;margin:-1px;padding:0;overflow:hidden;clip-path:inset(50%);white-space:nowrap;border:0}
1886
+ #m3dToolBar .rlbl,#viewBar2d .rlbl{position:absolute;width:1px;height:1px;margin:-1px;padding:0;overflow:hidden;clip-path:inset(50%);white-space:nowrap;border:0}
1884
1887
  /* position:relative anchors each menu to its own button and must stay; the pill padding and the
1885
1888
  per-button shadow are the old horizontal bar's and must not — the rail is one card with one
1886
1889
  shadow. The wrapper is sized to its button so it cannot widen the column around it. */
@@ -2757,12 +2760,15 @@ text.mlentx{fill:#e2e8f0;text-anchor:middle;dominant-baseline:central;font-famil
2757
2760
  <button data-command-id="steel.provisional-source" id=provisionalSourceBtn type=button hidden>Open source</button>
2758
2761
  </div>
2759
2762
  </div>
2760
- <div id=zoombar>
2761
- <button data-command-id="steel.zoom" id=zOut data-tip="Zoom out">−</button>
2762
- <input data-command-id="steel.zoom" aria-label="Zoom level" id=zRange type=range min=10 max=400 step=1 value=100>
2763
- <button data-command-id="steel.zoom" id=zIn data-tip="Zoom in">+</button>
2764
- <span id=zPct>100%</span>
2765
- <button data-command-id="steel.zoom-fit" id=zFit data-tip="Zoom to fit (Home)">Fit</button>
2763
+ <!-- The 2D VIEW band (#1428): the same two view controls the 3D band leads with, in the same corner, with
2764
+ the same glyphs and the same words, so the plan and the model read as one editor. It replaced the
2765
+ bottom-left zoom bar (−/slider/+/percent/Fit) — the tester asked for parity with 3D, which has no
2766
+ numeric readout either; wheel zoom at the cursor, Home and Alt+Z all remain. The glyphs are the
2767
+ ICON map of web/model-viewport-toolbar.js (via modelToolbarIcon) verbatim (a test holds them equal), and the tips are the 3D
2768
+ adapter's. No wrapper: each button IS the carrier, so the two ids are what Instructor focuses. -->
2769
+ <div id=viewBar2d role=toolbar aria-label="2D view controls">
2770
+ <button data-command-id="steel.zoom-fit" id=fit2d type=button data-tip="Fit all to view (Home)"><svg viewBox="0 0 16 16" aria-hidden="true"><path d="M2 6V2h4M14 6V2h-4M2 10v4h4M14 10v4h-4"/></svg><span class=rlbl>Fit all to view</span></button>
2771
+ <button data-command-id="steel.zoom-selection" id=fitSel2d type=button data-tip="Zoom to selected — frame just the selected members (Alt+Z)"><svg viewBox="0 0 16 16" aria-hidden="true"><path d="M2 5.5V2h3.5M14 5.5V2h-3.5M2 10.5V14h3.5M14 10.5V14h-3.5"/><path d="M5.9 6.3h4.2v3.4H5.9z"/></svg><span class=rlbl>Zoom to selected</span></button>
2766
2772
  </div>
2767
2773
  </div>
2768
2774
  <div id=splitBar role=separator aria-orientation=vertical aria-label="Resize the plan and model panes" tabindex=0 aria-valuemin=15 aria-valuemax=85 aria-valuenow=50 data-tip="Drag to resize · double-click to reset"></div>
@@ -3543,7 +3549,7 @@ const SPLIT_MODE_KEY='steel:viewMode:v2', SPLIT_RATIO_KEY='steel:splitRatio:v2';
3543
3549
  // pane happens to be active.
3544
3550
  const DOCK_MIN_LEFT_PX=36;
3545
3551
  // How far INSIDE the 3D pane the docked group sits: the same 12px every other pane-anchored control on this
3546
- // stage is inset by (#zoombar, and #bottomDock itself, are left:12px), so nothing in it sits on the divider.
3552
+ // stage is inset by (#viewBar2d, and #bottomDock itself, are left:12px), so nothing in it sits on the divider.
3547
3553
  const DOCK_GUTTER_PX=12;
3548
3554
  // Extra room required to switch the per-pane layout ON, over what is required to keep it on. Wide enough
3549
3555
  // that a hand shaking on the divider cannot sit astride the boundary — the switch relocates the hint by
@@ -8334,7 +8340,7 @@ function dupScore(m){let s=0;if(_wtPlf(m.profile)!=null)s+=2;if(m.profile&&!/^MF
8334
8340
  // Coincident-member dedupe → the redundant ids. Group by 2D footprint; within a footprint: ≤1 distinct EXPLICIT
8335
8341
  // elevation ⇒ all copies of one member ⇒ keep the best (highest rankFn; an elevation-tagged copy wins ties), rest
8336
8342
  // redundant; ≥2 explicit elevations ⇒ distinct levels ⇒ keep the best per level, unset copies kept (ambiguous).
8337
- // MIRROR of server/steel-confidence.ts redundantDupIds — keep in sync.
8343
+ // The same footprint rule the server's duplicate check applies (`dedupeFootprintIds`), so both agree.
8338
8344
  function dedupeFootprintIds(members,rankFn){const byFoot={};for(const m of members){const k=dupFoot(m);if(!k)continue;(byFoot[k]=byFoot[k]||[]).push(m);}
8339
8345
  const out=[],keepBest=grp=>{if(grp.length<2)return;grp.sort((a,b)=>rankFn(b)-rankFn(a)||((dupElev(b)!=='na')-(dupElev(a)!=='na')));for(let i=1;i<grp.length;i++)out.push(grp[i].id);};
8340
8346
  for(const k in byFoot){const grp=byFoot[k];if(grp.length<2)continue;
@@ -8419,9 +8425,7 @@ function applyZoom(z,ax,ay){z=Math.max(ZMIN,Math.min(ZMAX,z));
8419
8425
  const pt=(ax!=null)?toSvg({clientX:ax,clientY:ay}):null;
8420
8426
  zoom=z;svg.setAttribute('width',EXTX*zoom);svg.setAttribute('height',EXTY*zoom);
8421
8427
  if(pt){const m=svg.getScreenCTM();stage.scrollLeft+=(m.a*pt.x+m.e)-ax;stage.scrollTop+=(m.d*pt.y+m.f)-ay;}
8422
- document.getElementById('zRange').value=Math.round(zoom*100);
8423
- document.getElementById('zPct').textContent=Math.round(zoom*100)+'%';updateBadges();refreshProfileLabelOverlay();}
8424
- function zoomCentered(z){const r=stage.getBoundingClientRect();applyZoom(z,r.left+stage.clientWidth/2,r.top+stage.clientHeight/2);}
8428
+ updateBadges();refreshProfileLabelOverlay();}
8425
8429
  function fitToWindow(){applyZoom(Math.min(stage.clientWidth/EXTX,stage.clientHeight/EXTY)*0.98);}
8426
8430
  // --- duplicate the selected member(s) in place (Ctrl+D) ---
8427
8431
  function doDup(){const arr=sel2d();if(!arr.length)return;return runSteelAuthoring('copy',{source:'duplicate',selection:arr.map(m=>m.id)},()=>{const o=12,pv=snapshot(),ns=new Set();
@@ -10199,7 +10203,7 @@ function panel(){
10199
10203
  <div class="f"><div class=elab>Profile</div><div style="display:flex;gap:6px"><input data-command-id="steel.member-profile" aria-label="Profile" id=pf class=combo data-src=profiles value="${esc(m.profile)}" style="flex:1" autocomplete=off><button data-command-id="steel.browse-profile-catalog" id=profileBrowseS class=ghost aria-label="Search the profile catalog" data-tip="Search the profile catalog — 4,516 profiles, by designation or alias"><svg viewBox="0 0 16 16" aria-hidden=true width=13 height=13 fill=none stroke=currentColor stroke-width=1.4 stroke-linecap=round><circle cx="6.9" cy="6.9" r="4.3"/><path d="M10.1 10.1 13.7 13.7"/></svg></button><button data-command-id="steel.pick-profile" id=pickProf class="ghost${(picking&&pickKind==='profile')?' on':''}" aria-pressed="${(picking&&pickKind==='profile')?'true':'false'}" aria-label="Pick profile from a drawing label" data-tip="Pick profile from drawing labels by click, Enter, or Space">⌖</button></div>${(picking&&pickKind==='profile')?'<div class="hint" data-profile-pick-status role=status aria-live=polite style="margin-top:4px;font-style:italic;color:var(--brand)">'+esc(profilePickGuidance())+'</div>':''}</div>
10200
10204
  <div class="f"><div class=elab>Material grade</div><div style="display:flex;gap:6px"><input data-command-id="steel.member-material" aria-label="Material grade" id=mat class=combo data-src=materials value="${esc(m.material||'')}" placeholder="Profile default · ${esc(profileDefaultMaterial(m.profile))}" style="flex:1" autocomplete=off data-tip="${m.material?'This member carries its own grade, so it will not follow a profile change':'Empty — follows the profile’s default grade. Type or browse to give this member its own.'}"><button data-command-id="steel.browse-material-catalog" id=materialBrowseS class=ghost aria-label="Search material grades" data-tip="Search the material catalog by name or alias"><svg viewBox="0 0 16 16" aria-hidden=true width=13 height=13 fill=none stroke=currentColor stroke-width=1.4 stroke-linecap=round><circle cx="6.9" cy="6.9" r="4.3"/><path d="M10.1 10.1 13.7 13.7"/></svg></button><span class=pslot aria-hidden=true></span></div></div>
10201
10205
  <div class="row hint">Length <b>${L}</b> · ${wpf==null?'<span id=rfiPill class="pill pill-clickable" role=button tabindex=0 data-tip="Open the RFI list, focused on this member" style="background:var(--err-bg)">RFI — size unresolved</span>':'Weight <b>'+(_lenFt(m)*wpf).toFixed(0)+' lb</b> · '+_plf2(wpf)+' lb/ft'}</div>
10202
- <div class=elab>Verified</div><span class=vwrap data-panel-control><button data-command-id="steel.member-verified" id=verifyBtn class="vbtn${m.verified?' on':''}" aria-pressed="${m.verified?'true':'false'}" data-tip="Mark this member human-confirmed → 100% in the confidence report">${m.verified?'✓ Human-confirmed':'Mark verified'}</button></span>
10206
+ <div class=elab>Verified</div><span class=vwrap data-panel-control><button data-command-id="steel.member-verified" id=verifyBtn class="vbtn${m.verified?' on':''}" aria-pressed="${m.verified?'true':'false'}" data-tip="Mark this member human-confirmed">${m.verified?'✓ Human-confirmed':'Mark verified'}</button></span>
10203
10207
  ${appearanceSect}
10204
10208
  ${braceSect}
10205
10209
  ${mfSug.length?`<div class="row" style="border:1px solid var(--purple);border-radius:6px;padding:7px 8px;background:rgba(168,85,247,.07)"><div class=elab style="color:var(--purple-ink);margin:0">Moment-frame girder · ${_lvl==='roof'?'roof':'2nd floor'} (from Frames)</div><div style="display:flex;flex-wrap:wrap;gap:5px;margin-top:5px">${mfSug.map(s=>`<button data-command-id="steel.member-profile-suggestion#${esc(s)}" class="ghost mfsug${s===m.profile?' on':''}" data-s="${esc(s)}">${esc(s)}</button>`).join('')}</div></div>`:''}
@@ -10807,10 +10811,10 @@ function snapClear(){const c=document.getElementById('snapMark');if(c)c.remove()
10807
10811
  function _effTos(o){return o?(o.tosDef!==false?defaultTosMm:o.tosMm):undefined;} // beam end / column top → effective TOS in WORLD MM, default-aware
10808
10812
  // True 3D member length in feet = straight-line distance between the member's two end NODES, exactly as the 3D
10809
10813
  // scene places them — so it's correct for sloped members (braces, ramped beams, battered columns), not just the
10810
- // plan projection. Plan XY is in plan px (÷ppf→ft); elevations (TOS/BOS) are in inches (÷12→ft). Elevation is
10814
+ // plan projection. Plan XY is in plan px (÷ppf→ft); elevations (TOS/BOS) are in millimetres (÷FT_TO_MM→ft). Elevation is
10811
10815
  // default-aware (dTos = the plan datum a default-follow end/top rides; a null column base sits on the 0 datum).
10812
- // Shared by the display (_lenFt, active-plan default) and the confidence roll-up (_mConfTons /
10813
- // _mTonnage, per-plan default) so they agree.
10816
+ // Reached through _lenFt / _lenMm (active-plan default) only for a member with no canonical v2 twin — a
10817
+ // transient or synthetic display member; see _lenFt.
10814
10818
  function _len3dFt(m,ppf,dTos){
10815
10819
  const a=m.wp&&m.wp[0], b=m.wp&&m.wp[1]; if(!a||!b)return 0;
10816
10820
  const p=ppf>0?ppf:1, dx=(b[0]-a[0])/p, dy=(b[1]-a[1])/p; // plan run, feet
@@ -12560,8 +12564,8 @@ function syncEnvChip(){
12560
12564
  // material one's details pane is built by the same code path.
12561
12565
  // EVERY SURFACE THAT SPEAKS UNITS, in one place — see the declaration: the SSE handler is page scope.
12562
12566
  // `render()` ends at `updConf()`, which repaints the confidence CHIP and not the report behind it,
12563
- // and slice 4 made that report units-dependent in three ways (its `Tons`/`t` header, its per-row
12564
- // tonnage and its evidence lines). Its own refresh idiom is the `updConf();if(confOpen())renderConf();`
12567
+ // and the report's recorded elevation fields are printed in display units (`readValueText`), so an open
12568
+ // report goes stale on a switch. Its own refresh idiom is the `updConf();if(confOpen())renderConf();`
12565
12569
  // pair used elsewhere in this file; without it a switch arriving from another tab left an open report
12566
12570
  // stating the old system's word beside the new system's numbers. (The picker `refresh()` calls are
12567
12571
  // here for the same reason, found the same way — an open control cannot repaint itself.)
@@ -12818,11 +12822,11 @@ addEventListener('keydown',e=>{
12818
12822
  if(selIds.size||selDimIds.size||selGridIds.size)clearWholeReferenceSelection();
12819
12823
  render();}
12820
12824
  else if(k==='s'){e.preventDefault();persist();(window.flushContract?window.flushContract():Promise.resolve()).then(()=>toast('Saved ✓')).catch(()=>toast('Save failed'));}}); // edits autosave; Ctrl+S just flushes now (no browser "save page" dialog)
12821
- // zoom bar
12822
- document.getElementById('zIn').onclick=()=>zoomCentered(zoom*1.25);
12823
- document.getElementById('zOut').onclick=()=>zoomCentered(zoom/1.25);
12824
- document.getElementById('zFit').onclick=fitToWindow;
12825
- document.getElementById('zRange').oninput=e=>zoomCentered(+e.target.value/100);
12825
+ // The 2D view band (#1428): the same pair as #m3dFit/#m3dFitSel, on the plan's own framing. Fit is
12826
+ // also Home; Zoom to selected is also Alt+Z / Shift+Space, and with nothing selected it frames the whole
12827
+ // plan, exactly as the 3D pair does with an empty selection — so neither button is ever disabled.
12828
+ document.getElementById('fit2d').onclick=fitToWindow;
12829
+ document.getElementById('fitSel2d').onclick=zoomToSelection;
12826
12830
  // --- "More" overflow menu: click-toggles a themed popup; closes on item-click, click-outside, or Esc. ---
12827
12831
  const moreBtn=document.getElementById('moreBtn'),moreMenu=document.getElementById('moreMenu');
12828
12832
  function moreOpen(){return moreMenu.classList.contains('open');}
@@ -12923,7 +12927,17 @@ let modelShellMount=null;
12923
12927
  // Measure once up front too: the observer's first callback is async, so without this the model band
12924
12928
  // would paint one frame at the 335px/40px defaults before jumping to the measured position.
12925
12929
  syncBand();new ResizeObserver(syncBand).observe(toolbar);
12926
- }}
12930
+ }
12931
+ // The 2D view band (#1428) is measured the same way for the same reason: in 2D-only the model band docks
12932
+ // off ITS right edge (`#m3dToolBar{left:calc(var(--v2d-view-w)…)}`), and a width assumed in CSS is what
12933
+ // #1455 found overlapping. offsetWidth reads 0 while the band is display:none (3D-only), so the write is
12934
+ // SKIPPED rather than recorded: a 0 written on the way out would leave the 2D-only rule at left:22px for
12935
+ // the first frame back, until the observer's async callback re-measures.
12936
+ {const band2d=document.getElementById('viewBar2d');
12937
+ if(band2d&&window.ResizeObserver){
12938
+ const sync2d=()=>{if(band2d.offsetWidth)document.body.style.setProperty('--v2d-view-w',band2d.offsetWidth+'px');};
12939
+ sync2d();new ResizeObserver(sync2d).observe(band2d);
12940
+ }}}
12927
12941
  // The split divider. Deliberately the #panelResizer recipe above, gesture for gesture — drag,
12928
12942
  // double-click to reset, arrow keys with a Shift coarse step — so the editor's two separators behave the
12929
12943
  // same. The difference is the UNIT: this one stores a RATIO, not a width, so the split survives a window
@@ -20323,7 +20337,7 @@ function reflectViewChrome(){
20323
20337
  {const tb=document.getElementById('m3dToolBar'),host=document.getElementById(view3dShown?'pane3d':'stagewrap');
20324
20338
  if(tb&&host&&tb.parentElement!==host)host.appendChild(tb);}
20325
20339
  if(view3dShown)try{updateBandStateMarks();}catch(_){} // state the band already holds on arrival
20326
- document.getElementById('zoombar').style.display=chrome.zoombar?'':'none'; // zoom slider addresses the plan canvas
20340
+ document.getElementById('viewBar2d').style.display=chrome.viewBar2d?'':'none'; // the 2D view band addresses the plan canvas
20327
20341
  // Plan switcher is 2D-only (3D shows the whole model). Hidden by `display`, not the `hidden` attribute:
20328
20342
  // .plan-combo carries an author `display:inline-flex`, which beats the UA's [hidden] rule by ORIGIN, so
20329
20343
  // `hidden = true` would quietly do nothing here.
@@ -24024,12 +24038,7 @@ document.getElementById('rfiModal').addEventListener('keydown',e=>{e.stopPropaga
24024
24038
  if(rfiFormFor&&rfiFormFor.busy){toast('Still recording — wait for it to finish, or close the dialog and check the row.');return;}
24025
24039
  if(rfiFormFor){rfiCloseForm();return;}
24026
24040
  closeRFI();return;}if(e.key!=='Tab')return;const f=[...document.querySelectorAll('#rfiModal button,#rfiModal input,#rfiModal textarea,#rfiModal [tabindex]:not([tabindex="-1"])')].filter(n=>!n.disabled&&n.offsetParent!==null);if(!f.length)return;const first=f[0],last=f[f.length-1];if(e.shiftKey&&document.activeElement===first){e.preventDefault();last.focus();}else if(!e.shiftKey&&document.activeElement===last){e.preventDefault();first.focus();}});
24027
- // ===== Confidence report — evidence-based score (MIRROR of server/steel-confidence.ts; keep in sync) =====
24028
- // Deterministic: scores ONLY observable evidence already in the contract, never a model self-report.
24029
- const BANDW={verified:1,high:.9,med:.65,low:.35,rfi:0};
24030
- const BANDLAB={verified:'Verified',high:'High',med:'Medium',low:'Low',rfi:'RFI'};
24031
- const BANDC={verified:'var(--ok)',high:'var(--hi)',med:'var(--warn)',low:'var(--err)',rfi:'var(--err)'};
24032
- const BANDPILL={verified:'background:var(--ok-bg);color:var(--ok)',high:'background:var(--hi-bg);color:var(--hi)',med:'background:var(--warn-bg);color:var(--warn)',low:'background:var(--err-bg);color:var(--err)',rfi:'background:var(--err-bg);color:var(--err)'};
24041
+ // ===== Section weights, and the unit words a quantity is spelled with =====
24033
24042
  // The AISC catalogue weight — the only way most of the catalogue can be weighed at all. Nothing in
24034
24043
  // "HSS4X4X3/8" encodes 17.27 lb/ft (40.9 kg/m), so before the table carried weights every hollow section, angle
24035
24044
  // and double angle read as "not in the AISC table", was flagged RFI, and contributed 0 lb to the
@@ -24055,9 +24064,8 @@ function _wtKgM(profile){if(!profile)return null;
24055
24064
  // (UK epic, slice 4).
24056
24065
  //
24057
24066
  // _wtKgM the contract's own number, kg/m, untouched.
24058
- // _wtPlf lb/ft, ALWAYS. Two callers need this whatever the project displays: `contract_edited`'s
24059
- // machine-readable `weight_plf` field, whose NAME says pounds per foot, and the confidence
24060
- // weighting, which must keep its exact legacy arithmetic (see `_mConfTons`).
24067
+ // _wtPlf lb/ft, ALWAYS. `contract_edited`'s machine-readable `weight_plf` field needs this whatever
24068
+ // the project displays: its NAME says pounds per foot.
24061
24069
  // _wtBill the unit weight a PERSON is shown — lb/ft or kg/m, per the project's display units.
24062
24070
  //
24063
24071
  // All three are null for exactly the same profiles, by construction: each is `_wtKgM` plus arithmetic
@@ -24069,8 +24077,8 @@ function _wtBill(profile){const kgm=_wtKgM(profile);
24069
24077
  return kgm==null?null:(displayUnits()===DisplayUnits.MM?kgm:kgm/LB_PER_FT_TO_KG_PER_M);}
24070
24078
  // The words a quantity is spelled with, per system — the same spellings `server/bom-units.ts` uses, so
24071
24079
  // a number and the sentence about it cannot disagree. `t` is the SI symbol for a tonne; `T` is a tesla.
24072
- const UNIT_WORDS={'ft-in':{weight:'lb',unitWeight:'lb/ft',tonnage:'tons'},
24073
- mm:{weight:'kg',unitWeight:'kg/m',tonnage:'t'}};
24080
+ const UNIT_WORDS={'ft-in':{weight:'lb',tonnage:'tons'},
24081
+ mm:{weight:'kg',tonnage:'t'}};
24074
24082
  const _uw=()=>UNIT_WORDS[displayUnits()]||UNIT_WORDS['ft-in'];
24075
24083
  /*
24076
24084
  * A MEMBER'S DISPLAYED MASS, from the member itself and the unit weight `_wtBill` returned.
@@ -24100,93 +24108,6 @@ const _plf2=(plf)=>plf==null?null:Math.round(plf*100)/100;
24100
24108
  // erases the tail the kg/m division introduces (26.000000000000004 -> 26) without inventing or
24101
24109
  // discarding a digit that was actually there.
24102
24110
  const _plfWire=(plf)=>plf==null?null:Number(plf.toPrecision(12));
24103
- const _isMf=p=>!!p&&/(^|[^A-Z])MF($|[^A-Z])/i.test(p);
24104
- // Elevation-aware coincident dedupe for the browser confidence panel — same footprint+wildcard-elevation logic as
24105
- // redundantDups / the server, so the in-browser confidence report and the server score agree on stacked members.
24106
- function _confDupIds(members){return new Set(dedupeFootprintIds(members,m=>{let s=0;if(m.profile&&!_isMf(m.profile))s++;if(m.profile&&m.profile.trim()!=='')s++;return s;}));}
24107
- function _elevAssumed(m){if(m.role==='column')return !(m.col&&m.col.tosDef===false);const en=m.ends||[];if(!en.length)return true;return en.some(e=>e.tosDef!==false);}
24108
- function _scoreMember(m,dup){const plf=_wtPlf(m.profile),shown=_plf2(_wtBill(m.profile));const F=[];
24109
- // Same three reasons the RFI list gives, through the SAME euro-section predicate — this detail string
24110
- // is a second copy of that message, and the pair it already sits beside (/^MF/i here vs _isMf there)
24111
- // is the standing demonstration of what happens when two copies are left to be kept in step by hand.
24112
- if(plf==null){F.push({key:'profile',label:'Profile',state:'fail',detail:(!m.profile||!m.profile.trim())?'no profile assigned':_isMf(m.profile)?('unresolved mark "'+m.profile+'" — not a '+_catalogLabel()+' size'):_aiscKgM(m.profile)!=null?('this model records no weight for "'+m.profile+'" — the designation is a standard '+_catalogLabel()+' shape'):_isEuroSection(m.profile)?('"'+m.profile+'" is a European/British section — this catalogue holds AISC (US) shapes only'):('"'+m.profile+'" not in the '+_catalogLabel()+' weight table')});return {band:'rfi',factors:F};}
24113
- // The PROBE above is `_wtPlf` (unit-free: can this be priced at all); the number rendered HERE is the
24114
- // one the reader sees, so it is `_wtBill` in the reader's own units. Reporting "46.1 plf" over a
24115
- // kilogram-per-metre figure is the mislabelling this whole slice exists to remove. (Design review.)
24116
- const sched=m.mf===true,uwWord=_uw().unitWeight;
24117
- F.push({key:'profile',label:'Profile',state:sched?'assumed':'ok',detail:sched?(m.profile+' — resolved from the frame schedule ('+shown+' '+uwWord+')'):(m.profile+' ('+shown+' '+uwWord+', '+_catalogLabel()+')')});
24118
- const asm=_elevAssumed(m);F.push({key:'elevation',label:'Elevation',state:asm?'assumed':'ok',detail:asm?'plan default (UNO) — no local callout':'from a drawing callout'});
24119
- const isd=dup.has(m.id);if(isd)F.push({key:'dup',label:'Duplicate',state:'fail',detail:'coincident with a kept member — deleting dedupes the BOM'});
24120
- if(m.verified===true)F.push({key:'verified',label:'Verified',state:'ok',detail:'human-confirmed'});
24121
- const band=m.verified===true?'verified':isd?'low':(sched||asm)?'med':'high';return {band,factors:F};}
24122
- // `ptPerFt` is DISPLAY POINTS PER FOOT, not a view's stored `mm_per_px` — it forwards to `_len3dFt`,
24123
- // which divides plan px by it. Callers pass `ppfOf(plan)`.
24124
- // THE WEIGHT A MEMBER CARRIES IN THE CONFIDENCE MEAN. Legacy short tons, in BOTH unit systems, and
24125
- // deliberately so: it is a weight in a weighted average, its scale cancels, and the only thing that
24126
- // must not move is its arithmetic. `server/steel-model-score.ts` keeps the identical expression for
24127
- // the identical reason — accumulating a differently-scaled number and dividing later is the same sum
24128
- // in real arithmetic and a different one in IEEE, and it would shift a reported percentage.
24129
- function _mConfTons(m,ptPerFt,dTos){const plf=_wtPlf(m.profile);if(plf==null)return 0;
24130
- return _len3dFt(m,ptPerFt,dTos)*plf/2000;} // true 3D length × lb/ft — the expression this has always used
24131
- // THE MASS A PERSON IS SHOWN — short tons or tonnes, per the project. A separate calculation from the
24132
- // weight above, not a rescaling of it.
24133
- function _mTonnage(m,ptPerFt,dTos){const w=_wtBill(m.profile);if(w==null)return 0;
24134
- const lenFt=_len3dFt(m,ptPerFt,dTos);
24135
- // metric: metres x kg/m -> kg, then /1000 -> tonnes. imperial: feet x lb/ft -> lb, then /2000.
24136
- // NOT `_lenMm`, and not a defect: `_len3dFt` derives its length from PLAN PIXELS, so there is no
24137
- // stored millimetre here to be faithful to and `x 304.8` is a plain conversion rather than the
24138
- // round trip `_lenMm` exists to avoid. Left alone deliberately — see `_lenMm`.
24139
- return displayUnits()===DisplayUnits.MM?(lenFt*FT_TO_MM/1000)*w/1000:lenFt*w/2000;}
24140
- function _detSheet(t){const m=String(t||'').toUpperCase().match(/S-?\s?\d{2,3}/);return m?m[0].replace(/\s/g,''):null;}
24141
- const _cnt0=()=>({verified:0,high:0,med:0,low:0,rfi:0});
24142
- function _scoreConnections(){
24143
- const rows={};for(const c of (C.connections||[]))if(c&&c.id)rows[c.id]=c;
24144
- const bandEnd=(end)=>{const row=end.conn?rows[end.conn]:null;
24145
- const complete=!!(row&&row.type&&row.detail&&row.targets&&Object.keys(row.targets).length>0);
24146
- const hasNote=!!(end.note&&end.note.trim()!=='');
24147
- // Only a drawing callout counts as evidence — a company-rules/user row assignment is a mapping, not drawing-confirmed.
24148
- const evidence=hasNote||(row&&row.source==='drawing');
24149
- if(end.connVerified===true)return{band:'verified',reason:''};
24150
- if(!end.conn&&!hasNote)return{band:'rfi',reason:'no connection assigned'};
24151
- if(complete&&evidence)return{band:'high',reason:''};
24152
- if(complete)return{band:'med',reason:'connection type assumed (no drawing note)'};
24153
- if(hasNote&&end.detail&&end.detail.trim()!=='')return{band:'med',reason:'free-text note + detail (not a mapped library row)'};
24154
- if(end.conn&&!row)return{band:'low',reason:'references an unknown connection row'};
24155
- return{band:'low',reason:row?'library row has a type only (no detail/component id)':'connection type only (no detail)'};};
24156
- const byEnd=[];
24157
- (C.plans||[]).forEach((plan,pi)=>{for(const m of (plan.members||[])){
24158
- if(isBrace(m))continue; // a brace's ends are not beam shear connections — mirrors server scoreConnections (Codex review)
24159
- if(m.role==='column'){const r=bandEnd(m.col||{});byEnd.push({id:m.id+'#col',pi,sheet:plan.sheet||'',memberId:m.id,which:'col',band:r.band,reason:r.reason});}
24160
- else{const ends=m.ends||[];for(const w of [0,1]){const r=bandEnd(ends[w]||{});byEnd.push({id:m.id+'#'+w,pi,sheet:plan.sheet||'',memberId:m.id,which:w,band:r.band,reason:r.reason});}}}});
24161
- const counts=_cnt0();let num=0,den=0;
24162
- for(const e of byEnd){counts[e.band]++;if(e.band==='rfi')continue;num+=BANDW[e.band];den+=1;}
24163
- return{cat:{score:den>0?Math.round(num/den*100):null,tons:0,counts},ends:byEnd};}
24164
- function scoreContractJS(){const plans=C.plans||[];const byMember=[],byDetail=[];let segs=0;
24165
- const _conn=_scoreConnections();
24166
- const known=new Set();for(const p of plans)if(p.sheet)known.add(p.sheet.toUpperCase());for(const s of Object.keys(C.detail_bubbles||{}))known.add(s.toUpperCase());
24167
- plans.forEach((plan,pi)=>{segs+=(plan.segments||[]).length;const ms=plan.members||[];const dup=_confDupIds(ms);
24168
- // TWO quantities per member, deliberately kept apart (mirrors `server/steel-model-score.ts`):
24169
- // `w` the WEIGHT in the confidence mean — legacy short tons in both systems. Its scale cancels
24170
- // in a weighted average, so the only thing that must not move is its arithmetic.
24171
- // `tons` the MASS SHOWN — short tons or tonnes, per the project. Displayed, never averaged with.
24172
- for(const m of ms){const r=_scoreMember(m,dup);byMember.push({id:m.id,planIdx:pi,sheet:plan.sheet||'',role:m.role==='column'?'column':'beam',isBrace:isBrace(m)||undefined,profile:m.profile||'',band:r.band,w:r.band==='rfi'?0:_mConfTons(m,ppfOf(plan),plan.default_tos_mm),tons:r.band==='rfi'?0:_mTonnage(m,ppfOf(plan),plan.default_tos_mm),factors:r.factors});} // isBrace mirrors the server MemberScore so the report can label it Brace
24173
- // The details[]+callouts[] union minus sections/elevations (#401). Both scorers call the SAME helper
24174
- // in steel-detail-refs.js rather than each spelling the rule out, because a rule written twice is a
24175
- // rule that drifts. The banding below still mirrors steel-confidence.ts BY HAND; what keeps this call
24176
- // site honest is the pair of #401 tests in steel-editor-draft.test.ts, which boot the real page and
24177
- // assert the row count this produces. See the note at its matching loop for what is still unpinned.
24178
- for(const d of DetailRefs.planScoredDetails(plan)){const sh=_detSheet(d.text)??d.targetSheet;const ok=sh!=null&&known.has(sh.toUpperCase());byDetail.push({text:d.text,planIdx:pi,sheet:plan.sheet||'',band:ok?'high':'low',reason:ok?('references '+sh+' (in the set)'):sh?('references '+sh+' — not found in the set'):'no sheet reference parsed'});}});
24179
- // The MEAN weights by `m.w` (legacy short tons); the TOTAL reported is `m.tons` (the project's own
24180
- // units). Using one number for both would either move a US percentage or report the wrong mass.
24181
- const roll=(arr,cw)=>{const c=_cnt0();let n=0,d=0,t=0;for(const m of arr){c[m.band]++;if(m.band==='rfi')continue;const w=cw?1:m.w;n+=w*BANDW[m.band];d+=w;t+=m.tons;}return {score:d>0?Math.round(n/d*100):null,tons:t,counts:c};};
24182
- const dRoll=arr=>{const c=_cnt0();let n=0,d=0;for(const x of arr){c[x.band]++;n+=BANDW[x.band];d++;}return {score:d>0?Math.round(n/d*100):null,tons:0,counts:c};};
24183
- const beams=roll(byMember.filter(m=>m.role==='beam'));const columns=roll(byMember.filter(m=>m.role==='column'));const details=dRoll(byDetail);
24184
- const sc=byMember.filter(m=>m.band!=='rfi');const n=sc.reduce((s,m)=>s+m.w*BANDW[m.band],0),d=sc.reduce((s,m)=>s+m.w,0);
24185
- // `tons` on the overall row is the MASS SHOWN, summed from `m.tons`; `d` is the mean's denominator
24186
- // and is in legacy short tons, so reporting `d` here would have printed a short-ton figure under a
24187
- // tonne label in a metric project — the mislabelling this slice exists to remove.
24188
- return {byMember,byDetail,byConnection:_conn.ends,byCategory:{beams,columns,details,connections:_conn.cat},coverage:{members:byMember.length,segments:segs,note:'Approximate — precise per-segment binding is not available yet.'},overall:{score:d>0?Math.round(n/d*100):null,tons:sc.reduce((s,m)=>s+m.tons,0),rfiCount:byMember.filter(m=>m.band==='rfi').length}};}
24189
- function bandColorForPct(p){return p==null?'var(--mut)':p>=95?BANDC.verified:p>=80?BANDC.high:p>=50?BANDC.med:BANDC.low;}
24190
24111
  // Effective target: the user's per-read override (in the contract) wins; else the app's
24191
24112
  // target_confidence input default (read in boot()); else none. Editing the override never touches
24192
24113
  // the .flo, so it can't disarm the Run gate.
@@ -24218,9 +24139,9 @@ function readFieldsHtml(row,target){return (row.observations||[]).map(observatio
24218
24139
  let confReadBand='all',confRestoreMember=null,confRestoreControl=null;
24219
24140
  function rememberConfControl(control,kind){confRestoreControl={kind,value:control.dataset[kind]};}
24220
24141
  function restoreConfControl(){if(!confRestoreControl)return false;const pending=confRestoreControl;confRestoreControl=null;
24221
- const selectors={readBand:'#confFilter [data-read-band]',readCat:'#confFilter [data-read-cat]',band:'#confFilter [data-band]',fcat:'#confFilter [data-fcat]'};
24142
+ const selectors={readBand:'#confFilter [data-read-band]',readCat:'#confFilter [data-read-cat]'};
24222
24143
  const selector=selectors[pending.kind];if(!selector)return false;const next=[...document.querySelectorAll(selector)].find(control=>control.dataset[pending.kind]===pending.value);if(!next)return false;next.focus();return true;}
24223
- function renderReadConf(){const projection=readConfidenceProjection(),target=effectiveTarget(),summary=ReadConfidence.summarizeReadConfidence(projection,target);
24144
+ function renderConf(){const projection=readConfidenceProjection(),target=effectiveTarget(),summary=ReadConfidence.summarizeReadConfidence(projection,target);
24224
24145
  if(!['all','beams','columns'].includes(confCat))confCat='all';if(target==null)confReadBand='all';readTargetControl();
24225
24146
  const metric=(label,value,note)=>'<div class=ccard><div class=cc-label>'+label+'</div><div class=cc-score>'+value+'</div><div class=cc-counts><span>'+note+'</span></div></div>';
24226
24147
  document.getElementById('confCats').innerHTML=metric('Recorded fields',summary.totalFields,'immutable drawing values')+metric('Below target',target==null?'—':summary.belowFields,target==null?'No target set':('strictly below '+target+'%'))+metric('Members affected',target==null?'—':summary.affectedMembers,'review destinations')+metric('Not recorded',summary.notRecordedMembers,'members without field confidence');
@@ -24253,101 +24174,12 @@ async function locateReadMember(id,projection){const row=projection.rows.find(r=
24253
24174
  render();await setView('3d');if(!view3d){svg.focus();toast('Selected '+id+', but it has no editable 2D plan view and 3D is unavailable.');return;}
24254
24175
  document.getElementById('stage3d').focus();toast('Selected '+id+' in 3D — no editable 2D plan view is available.');}
24255
24176
  function updConf(){const el=document.getElementById('confStat');if(!el)return;
24256
- if(nativeElevationModel()){const projection=readConfidenceProjection();if(!projection.rows.length){el.style.display='none';return;}el.style.display='';const target=effectiveTarget(),summary=ReadConfidence.summarizeReadConfidence(projection,target),unread=summary.diagnosticCount;document.getElementById('confLabel').textContent='Read confidence';document.getElementById('confPct').textContent=summary.totalFields+' field'+(summary.totalFields===1?'':'s');const tg=document.getElementById('confTgt');tg.textContent=(target==null?(summary.lowest==null?' · not recorded':(' · lowest '+summary.lowest+'%')):(' · '+summary.belowFields+' below '+target+'%'+(summary.notRecordedMembers?' · '+summary.notRecordedMembers+' members not recorded':'')))+(unread?' · '+unread+' unread':'');tg.style.color=(target!=null&&summary.belowFields)||unread?'var(--warn)':'';el.dataset.tip=(unread?unread+' drawing-confidence record'+(unread===1?' could':'s could')+' not be read; the result is incomplete. ':'')+(target==null?'No confidence target is set. Click to review recorded drawing fields.':summary.belowFields+' recorded drawing field'+(summary.belowFields===1?' is':'s are')+' below the '+target+'% target. Click to review them.');return;}
24257
- const s=scoreContractJS();
24258
- if(!s.byMember.length){el.style.display='none';return;}el.style.display='';
24259
- document.getElementById('confLabel').textContent='Confidence';
24260
- const sc=s.overall.score,col=bandColorForPct(sc),tgt=effectiveTarget();
24261
- const b=document.getElementById('confPct');b.textContent=sc==null?'—':sc+'%';b.style.color=col;
24262
- // Goal suffix: "· target N%" (muted, static) + "(−G%)" gap in the band color, shown only while below target.
24263
- const tg=document.getElementById('confTgt');
24264
- if(tg){
24265
- if(tgt==null||sc==null)tg.textContent='';
24266
- else{const gap=tgt-sc;
24267
- tg.innerHTML=' · <span style="color:var(--mut)">target '+tgt+'%</span>'+(gap>0?' <span style="color:'+col+'">(−'+gap+'%)</span>':'');}
24268
- }
24269
- // The tonnage WORD comes from the per-system table, like every other unit word on this page. It was a
24270
- // literal `t` in both systems: right for a metric tonne, and wrong for a US project, whose number is
24271
- // SHORT TONS — a different unit about 10% away. (`T` would be a tesla, so that is not the fix either;
24272
- // the US convention is `tons`.) It shipped that way because slice 4's ruling kept US rendered output
24273
- // byte-unchanged; #1103 is the explicit decision to move these four characters.
24274
- //
24275
- // AND NOTHING ON SCREEN CHANGES, because EVERYTHING FROM `scoreContractJS()` DOWN IS UNREACHABLE in
24276
- // this build. `C` is assigned in exactly one place, after boot refuses any contract whose `type` is
24277
- // not `steel.model/v2`; nothing ever writes `C.type`; so `nativeElevationModel()` is true whenever
24278
- // there is a model at all, and the early `return` above always takes it. Both `scoreContractJS()`
24279
- // call sites — here and in `renderConf()` — sit behind that same guard. Proven by running the real
24280
- // page through the editor harness, not by reading: a v2 boot renders the Read-confidence tooltip, and
24281
- // a `steel.model/v1` boot never reaches `C` at all (it shows the unsupported-format empty state).
24282
- //
24283
- // The fix is made anyway because it is right either way and costs nothing, and the dead surface is
24284
- // filed rather than deleted here — removing it is a larger change than #1103 asked for. A reader who
24285
- // finds this branch looking for a bug on screen should start with that: it cannot be on screen.
24286
- el.dataset.tip='Confidence '+(sc==null?'—':sc+'%')+(tgt!=null?' vs target '+tgt+'%':'')+' — '+s.overall.tons.toFixed(1)+' '+_uw().tonnage+' scored · '+s.overall.rfiCount+' RFI. Click for the report.';}
24177
+ const projection=readConfidenceProjection();if(!projection.rows.length){el.style.display='none';return;}el.style.display='';const target=effectiveTarget(),summary=ReadConfidence.summarizeReadConfidence(projection,target),unread=summary.diagnosticCount;document.getElementById('confLabel').textContent='Read confidence';document.getElementById('confPct').textContent=summary.totalFields+' field'+(summary.totalFields===1?'':'s');const tg=document.getElementById('confTgt');tg.textContent=(target==null?(summary.lowest==null?' · not recorded':(' · lowest '+summary.lowest+'%')):(' · '+summary.belowFields+' below '+target+'%'+(summary.notRecordedMembers?' · '+summary.notRecordedMembers+' members not recorded':'')))+(unread?' · '+unread+' unread':'');tg.style.color=(target!=null&&summary.belowFields)||unread?'var(--warn)':'';el.dataset.tip=(unread?unread+' drawing-confidence record'+(unread===1?' could':'s could')+' not be read; the result is incomplete. ':'')+(target==null?'No confidence target is set. Click to review recorded drawing fields.':summary.belowFields+' recorded drawing field'+(summary.belowFields===1?' is':'s are')+' below the '+target+'% target. Click to review them.');}
24287
24178
  // --- the report modal ---
24288
- let confBand='all',confCat='all',confExpand=null;
24179
+ let confCat='all',confExpand=null;
24289
24180
  function openConf(){confExpand=null;renderConf();document.getElementById('confModal').style.display='flex';document.getElementById('confClose').focus();}
24290
24181
  function closeConf(restore=true){document.getElementById('confModal').style.display='none';if(restore)document.getElementById('confStat').focus();}
24291
24182
  function confOpen(){return document.getElementById('confModal').style.display==='flex';}
24292
- function _bar(pct){return '<div class=cc-bar><div class=cc-fill style="width:'+(pct||0)+'%;background:'+bandColorForPct(pct)+';'+(pct==null?'opacity:0':'')+'"></div></div>';}
24293
- function _countsHtml(c){const out=['verified','high','med','low','rfi'].filter(k=>c[k]>0).map(k=>'<span style="color:'+BANDC[k]+'">'+BANDLAB[k][0]+' <b>'+c[k]+'</b></span>').join('');return out||'<span>—</span>';}
24294
- function renderConf(){if(nativeElevationModel()){renderReadConf();return;}const s=scoreContractJS();const cat=s.byCategory;
24295
- const ct=document.getElementById('confTarget');if(ct&&document.activeElement!==ct){ // value = the per-read OVERRIDE only; the app default shows as a placeholder (empty = using default)
24296
- ct.value=typeof C.target_confidence==='number'?C.target_confidence:'';ct.placeholder='—';}readTargetControl();
24297
- const card=(key,label,cs,stub)=>'<div class="ccard'+(stub?' stub':' click')+(confCat===key?' on':'')+'" data-cat="'+key+'"'+(stub?' data-tip="not scored yet"':'')+'>'+
24298
- '<div class=cc-label>'+label+'</div>'+
24299
- '<div class=cc-score style="color:'+(stub?'var(--mut)':bandColorForPct(cs.score))+'">'+(stub||cs.score==null?'—':cs.score+'%')+'</div>'+
24300
- _bar(stub?null:cs.score)+
24301
- '<div class=cc-counts>'+(stub?'<span>reserved slot</span>':_countsHtml(cs.counts))+'</div></div>';
24302
- document.getElementById('confCats').innerHTML=card('beams','Beams',cat.beams)+card('columns','Columns',cat.columns)+card('details','Details',cat.details)+card('connections','Connections',cat.connections);
24303
- const bands=['all','verified','high','med','low','rfi'],cats=['all','beams','columns','details','connections'];
24304
- document.getElementById('confFilter').innerHTML=
24305
- '<span class=glab>Band</span><span class=grp>'+bands.map(b=>'<button data-command-id="steel.confidence-filter#band '+b+'" data-band="'+b+'" class="'+(confBand===b?'on':'')+'" aria-pressed="'+(confBand===b?'true':'false')+'">'+(b==='all'?'All':BANDLAB[b])+'</button>').join('')+'</span>'+
24306
- '<span class=glab>Category</span><span class=grp>'+cats.map(c=>'<button data-command-id="steel.confidence-filter#category '+c+'" data-fcat="'+c+'" class="'+(confCat===c?'on':'')+'" aria-pressed="'+(confCat===c?'true':'false')+'">'+(c==='all'?'All':c[0].toUpperCase()+c.slice(1))+'</button>').join('')+'</span>'+
24307
- '<span class=glab style="margin-left:auto">Coverage: '+s.coverage.members+' members · '+s.coverage.segments+' segments (approx.)</span>';
24308
- document.getElementById('confBody').innerHTML=confBodyHtml(s);
24309
- wireConf();restoreConfControl();}
24310
- function confBodyHtml(s){
24311
- if(!s.byMember.length&&!s.byDetail.length)return '<div class=hint style="padding:14px 0">No members in the model yet.</div>';
24312
- if(confCat==='connections'){
24313
- // worst-first so the RFIs / unmapped ends surface at the top (the "what to fix next" view)
24314
- const _ord={rfi:0,low:1,med:2,high:3,verified:4};
24315
- let conn=s.byConnection.slice().sort((a,b)=>_ord[a.band]-_ord[b.band]);
24316
- if(confBand!=='all')conn=conn.filter(e=>e.band===confBand);
24317
- if(!conn.length)return '<div class=hint style="padding:14px 0">Nothing matches this filter.</div>';
24318
- const whichLabel=w=>w==='col'?'Column':w===0?'End 1':'End 2';
24319
- let h='<table class=ftab><thead><tr><th>Band</th><th>Member</th><th>End</th><th>Sheet</th><th>Reason</th><th></th></tr></thead><tbody>';
24320
- conn.forEach(e=>{h+='<tr><td><span class=pill style="'+BANDPILL[e.band]+'">'+BANDLAB[e.band]+'</span></td>'+
24321
- '<td>'+esc(e.memberId)+'</td>'+
24322
- '<td>'+whichLabel(e.which)+'</td>'+
24323
- '<td>'+esc(e.sheet)+'</td>'+
24324
- '<td><span class=hint>'+esc(e.reason||'—')+'</span></td>'+
24325
- '<td><button data-command-id="steel.locate-member#'+esc(e.memberId)+'" class=ghost data-loc="'+esc(e.memberId)+'" data-pi="'+e.pi+'">Locate</button></td></tr>';});
24326
- h+='</tbody></table>';return h;}
24327
- let mem=s.byMember.slice();
24328
- if(confCat==='beams')mem=mem.filter(m=>m.role==='beam');else if(confCat==='columns')mem=mem.filter(m=>m.role==='column');else if(confCat==='details')mem=[];
24329
- if(confBand!=='all')mem=mem.filter(m=>m.band===confBand);
24330
- let det=(confCat==='all'||confCat==='details')?s.byDetail.slice():[];
24331
- if(confBand!=='all')det=det.filter(d=>d.band===confBand);
24332
- // The unit lives in the HEADER and the cells stay bare, which is what this table has always done —
24333
- // and the convention the design review picked out as the right one for a dense numeric column. US
24334
- // keeps `Tons` exactly; a metric project reads `t`.
24335
- let h='<table class=ftab><thead><tr><th>Band</th><th>Element</th><th>Sheet</th><th>'+(displayUnits()===DisplayUnits.MM?'t':'Tons')+'</th><th>Evidence</th><th></th></tr></thead><tbody>';
24336
- mem.forEach(m=>{const chips=m.factors.map(f=>'<span class="chip '+(f.state==='ok'?'':f.state)+'">'+esc(f.label)+(f.state==='ok'?' ✓':f.state==='fail'?' ✗':' ●')+'</span>').join('');
24337
- h+='<tr class=confrow data-mid="'+esc(m.id)+'" data-pi="'+m.planIdx+'"><td><span class=pill style="'+BANDPILL[m.band]+'">'+BANDLAB[m.band]+'</span></td>'+
24338
- '<td>'+(esc(m.profile)||'<span style="color:var(--mut)">(no profile)</span>')+' <span style="color:var(--mut);font-size:11px">'+esc(m.isBrace?'brace':m.role)+'</span></td>'+ // a brace carries role 'beam' — label it honestly
24339
- '<td>'+esc(m.sheet)+'</td><td>'+(m.tons?m.tons.toFixed(2):'—')+'</td><td>'+chips+'</td>'+
24340
- '<td><button data-command-id="steel.locate-member#'+esc(m.id)+'" class=ghost data-loc="'+esc(m.id)+'" data-pi="'+m.planIdx+'">Locate</button></td></tr>';
24341
- if(confExpand===m.id)h+='<tr><td></td><td colspan=5 class=conf-expand>'+m.factors.map(f=>'<div>• <b>'+esc(f.label)+':</b> '+esc(f.detail)+'</div>').join('')+'</td></tr>';});
24342
- det.forEach(d=>{h+='<tr><td><span class=pill style="'+BANDPILL[d.band]+'">'+BANDLAB[d.band]+'</span></td><td>'+(esc(d.text)||'(detail)')+' <span style="color:var(--mut);font-size:11px">detail</span></td><td>'+esc(d.sheet)+'</td><td>—</td><td><span class=hint>'+esc(d.reason)+'</span></td><td></td></tr>';});
24343
- if(!mem.length&&!det.length)h+='<tr><td colspan=6><div class=hint style="padding:14px 0">Nothing matches this filter.</div></td></tr>';
24344
- h+='</tbody></table>';return h;}
24345
- function wireConf(){
24346
- document.querySelectorAll('#confCats .ccard.click').forEach(c=>c.onclick=()=>{confCat=(confCat===c.dataset.cat?'all':c.dataset.cat);renderConf();});
24347
- document.querySelectorAll('#confFilter [data-band]').forEach(b=>b.onclick=()=>{rememberConfControl(b,'band');confBand=b.dataset.band;renderConf();});
24348
- document.querySelectorAll('#confFilter [data-fcat]').forEach(b=>b.onclick=()=>{rememberConfControl(b,'fcat');confCat=b.dataset.fcat;renderConf();});
24349
- document.querySelectorAll('#confBody tr.confrow').forEach(r=>r.onclick=e=>{if(e.target.closest('button'))return;const id=r.dataset.mid;confExpand=confExpand===id?null:id;renderConf();});
24350
- document.querySelectorAll('#confBody button[data-loc]').forEach(b=>b.onclick=e=>{e.stopPropagation();const pi=+b.dataset.pi;if(pi!==C.active)setPlan(pi);const m=byId(b.dataset.loc);if(!m)return;selDimIds.clear();modelSelection.replaceMembers([m.id]);geoMode=null;setGeo();closeConf();render();zoomToMember(m);});}
24351
24183
  document.getElementById('confStat').onclick=openConf;
24352
24184
  function commitConfTarget(el){ // per-read target override → contract.target_confidence (never the .flo)
24353
24185
  const raw=String(el.value).trim(),had=typeof C.target_confidence==='number',before=had?C.target_confidence:null;let after=null;
@@ -24628,8 +24460,8 @@ function buildJointFromDetail(m,which,res){
24628
24460
  if(!Array.isArray(C.joints))C.joints=[];
24629
24461
  C.joints=C.joints.filter(j=>!(j&&j.main===m.id&&(j.at===at||(which==='col'&&j.kind==='base-plate'&&!j.at))));
24630
24462
  C.joints.push(joint);
24631
- // Point the end at the row it was built from, on BOTH sides: the end gains the library reference the
24632
- // confidence report scores, and the joint cites the same row for its type/detail identity.
24463
+ // Point the end at the row it was built from, on BOTH sides: the end and the joint cite the same row,
24464
+ // so type/detail identity and the "unassigned" state cannot disagree between them.
24633
24465
  const end=endObjFor(m,which);if(end)end.conn=res.rowId;
24634
24466
  return id;}
24635
24467
  /**
@@ -24706,8 +24538,8 @@ function openCaptureModal(m,which){
24706
24538
  const type=el('input');type.placeholder='shear · moment · pinned — the drawing’s word';type.autocomplete='off';
24707
24539
  type.value=(existing&&existing.type)||'';
24708
24540
  body.append(type);
24709
- const typeHint=el('div','margin-top:4px','Without this the confidence report can never rate these ends highly — it is one word off the drawing.');
24710
- typeHint.className='hint';body.append(typeHint);
24541
+ const typeHint=el('div','margin-top:4px','One word off the drawing — it is how this connection is named wherever it is listed.');
24542
+ typeHint.className='hint';typeHint.id='capTypeHint';body.append(typeHint);
24711
24543
  const scopeLab=el('div',null,'Use these numbers for');scopeLab.className='elab';body.append(scopeLab);
24712
24544
  const group=el('div','display:flex;flex-direction:column;gap:2px');
24713
24545
  opts.forEach((o,i)=>{
@@ -24847,7 +24679,7 @@ function captureDetailRecipe(m,which,opt,type){
24847
24679
  // so this is for the reader, not for correctness.
24848
24680
  sched.sort((a,b)=>schedRank(a&&a.match)-schedRank(b&&b.match));
24849
24681
  rec.schedule=sched;}
24850
- ModelCmd.patchEnd(e,{conn:rowId});j.conn=rowId; // the end and the joint both cite the row, so the confidence report sees the reference
24682
+ ModelCmd.patchEnd(e,{conn:rowId});j.conn=rowId; // the end and the joint both cite the row, so neither can read as unassigned while the other is built
24851
24683
  });
24852
24684
  return {rowId:rowId,droppedSchedule:droppedSchedule};}
24853
24685
  const comboPop=document.createElement('div');comboPop.id='comboPop';document.body.appendChild(comboPop);
@@ -25718,9 +25550,6 @@ if(new URLSearchParams(location.search).get('selftest')==='1'){(function(){
25718
25550
  ok(near(_lenFt({role:'beam',wp:[[0,0],[36,0]],ends:[{tosMm:0,tosDef:false},{tosMm:ft(3),tosDef:false}]}),Math.hypot(3,0,3)),'_lenFt sloped beam = true 3D length (plan run + TOS rise)');
25719
25551
  // battered column: 4 ft plan lean + 12 ft rise → √(4²+12²), not the bare height
25720
25552
  ok(near(_lenFt({role:'column',wp:[[0,0],[48,0]],col:{bosMm:0,tosMm:ft(12),tosDef:false}}),Math.hypot(4,0,12)),'_lenFt battered column includes the plan lean');
25721
- // _mConfTons shares the SAME 3D helper → agrees with the inspector (no BOM-vs-display divergence), incl. default-follow
25722
- const dc={role:'column',profile:'W10X49',col:{bosMm:0,tosMm:null,tosDef:true}};
25723
- ok(near(_mConfTons(dc,10,ft(17)), _lenFt(dc)*49/2000),'_mConfTons shares _len3dFt with the display (agree even for a default-follow column)');
25724
25553
  FT=sf;defaultTosMm=st;}
25725
25554
  // 12) Tekla area-select — window (L→R drag) = fully enclosed; crossing (R→L drag) = touched
25726
25555
  {const r=[0,0,10,10],win=(a,b)=>inRect(a,r)&&inRect(b,r),crs=(a,b)=>rectHit(a,b,r);
@@ -25898,13 +25727,6 @@ if(new URLSearchParams(location.search).get('selftest')==='1'){(function(){
25898
25727
  modelSelection.replaceMembers(['jA:plate','C1']);ok(!selIsConnOnly(),'selIsConnOnly false when a member is mixed in');
25899
25728
  C.joints=sj;modelSelection.replaceMembers(ss);partsById=sPb;C.plans=sPl;C.active=sA;C.members=sCm;}
25900
25729
 
25901
- // the editor's confidence mirror: brace ends are not scored as beam connections
25902
- {const spl=C.plans,sa=C.active;
25903
- C.plans=[{sheet:'T',members:[normBrace(mk({id:'brC',wp:[[0,0],[100,0]]})),{id:'bC',role:'beam',profile:'W16X26',wp:[[0,50],[100,50]],ends:[{},{}]}]}];
25904
- const ids=_scoreConnections().ends.map(e=>e.memberId);
25905
- ok(!ids.includes('brC')&&ids.includes('bC'),'_scoreConnections skips brace ends, still scores beams');
25906
- C.plans=spl;C.active=sa;}
25907
-
25908
25730
  P.members=sm2;}
25909
25731
 
25910
25732
  P.members=sm;zoom=sz;P.mm_per_px=sp;defaultTosMm=st;}