@floless/app 0.109.4 → 0.111.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.
@@ -2,7 +2,7 @@
2
2
  name: floless-app-steel-model
3
3
  description: The front-door guide for turning a structural steel drawing SET into an editable model in floless.app — the "Steel Model" flow. This skill orchestrates the whole pipeline — set up a project folder, learn the set into plain-English knowledge files, provision the right AWARE agents (region-specific steel detailer plus any bake targets), confirm which sheets are plans / elevations / details, then hand off to the Steel Takeoff reader to read each plan into a steel.takeoff/v1 contract — with explicit confirm gates between stages. Use it when a user wants to model steel from a drawing SET or asks things like "model this steel job from the drawings", "take off this whole set", "start a steel takeoff project", "turn these structural drawings into a model", "I have a PDF set of framing plans", or "/floless-app-steel-model". It is re-runnable — resume at any stage. For a single already-isolated framing plan the Steel Takeoff reader (floless-app-steel-takeoff) can be used directly; this guide is for driving a real job end to end.
4
4
  metadata:
5
- version: 0.2.0
5
+ version: 0.3.0
6
6
  ---
7
7
 
8
8
  # Steel Model — guide a steel drawing set into an editable model
@@ -162,7 +162,7 @@ the user at the editor:
162
162
  callouts, finish requirements). Carry them verbatim; they are not decoration, and floless surfaces
163
163
  them on every end that uses the detail.
164
164
 
165
- A row with a `recipe` is what lets a member end carrying that callout be **built** (issue #386). A row
165
+ A row with a `recipe` is what lets a member end carrying that callout be **built**. A row
166
166
  read from the drawing but whose schedule sheet was missing must be left WITHOUT a schedule and said so —
167
167
  an invented size band is worse than an end that honestly refuses to build.
168
168
  - **Bind callouts to member ends where the drawing shows it.** A detail bubble on a plan has a leader
@@ -182,6 +182,117 @@ to `~/.floless/exports/steel-model/steel-model-bom.{csv,xlsx}` automatically eve
182
182
  is Run** (two `file/write` export steps at the end of the chain). Tell the user they can **freeze**
183
183
  those export steps (right-click → Freeze) once the BOM is right, so a re-Run won't overwrite the files.
184
184
 
185
+ ### 7. Match each detail to a connection TYPE that models it — or refuse
186
+
187
+ **Before building anything from a detail, decide what KIND of connection it is, and confirm the tool you
188
+ are about to use actually models that kind.** A detail forced into the wrong type produces geometry that is
189
+ dimensionally perfect and physically nonsense — and it renders, and it *exports*.
190
+
191
+ The tell is never in the numbers. It is in the **topology**: what is welded to what, what laps what, which
192
+ member is supported and which is supporting. Ask, per detail:
193
+
194
+ - **What does the plate attach to, and where on it?** Welded to a supporting member's *web* is a different
195
+ connection from welded to its *face* — the two anchor points can be tens of millimetres apart, and a tool
196
+ built for one will place the plate nowhere near the other.
197
+ - **How many plies, and on which sides?** One plate lapping a member is not the same connection as a plate
198
+ **each side** with the member between them in double shear — different part count, different bolt grip.
199
+ - **Which member gets cut, and back to what?** A member meeting a wide face needs far more setback than one
200
+ meeting a thin web, and the amount grows with the skew of the crossing.
201
+ - **What does the detail dimension that the type cannot hold?** A work-point drop, a plate that follows the
202
+ supporting member's depth, a fabrication note. Anything unexpressible must be recorded, not dropped.
203
+
204
+ **If no available type matches, STOP and say so.** An honest "this connection type does not exist yet" is
205
+ worth more than an approximation: a connection attached to nothing looks plausible in the model, passes
206
+ every dimensional check, and is worse than an absent one because nobody knows to question it.
207
+
208
+ **Signals you are forcing a fit** — any one of these means stop and re-examine the type, not the numbers:
209
+
210
+ - you set a parameter to a value the drawing never states, so that some *other* number comes out right;
211
+ - the "supporting" member you must name is not the member the detail says the plate is welded to;
212
+ - the connection builds, but you cannot point at the two faces that bear on each other;
213
+ - each fix makes one dimension correct and leaves the assembly wrong — the surest sign the *type* is wrong.
214
+
215
+ ### 8. Check every built connection for CLASH and exact placement — every time
216
+
217
+ **A connection that matches every dimension on its detail can still be unbuildable.** Size fidelity and
218
+ *fit* are two different questions, and passing the first tells you nothing about the second. Ask both,
219
+ on every detail you build — not once at the end.
220
+
221
+ The failure this exists to stop: a gusset reproduced its drawing to a thousandth of an inch — plate
222
+ thickness, bolt diameter, gauge, edge distance, weld leg, all exact — while the plate ran **through** the
223
+ angle leg, the nut floated inside the member instead of bearing on its far face, and the bolt was sized
224
+ from a grip that counted only the plate. Every number checked out. Nothing touched.
225
+
226
+ **After building a connection, verify each of these — numerically, in world coordinates:**
227
+
228
+ - **Bearing faces meet: zero overlap, zero gap.** A lapped plate's inner face sits ON the *actual face* of
229
+ the ply it laps — a real surface of the real section, never a nominal, a default or zero. Careful here:
230
+ a symmetric web straddles the member's centre, so its two faces sit half a thickness either side — but
231
+ an angle's leg or a channel's web lies **entirely to one side**, and its two faces are not mirror images
232
+ of each other. "Half the thickness from the centre" is a special case, not the rule; find the face.
233
+ - **Nothing interpenetrates** — no connection part inside a member, no part inside another part.
234
+ - **Fasteners bear on real faces.** Head on the outer ply, nut on the far ply's actual face — never on a
235
+ work plane or a centroidal axis.
236
+ - **Grip = the plies actually clamped**, so the bolt length that falls out of it is right. A grip that
237
+ omits a ply yields a short bolt, and the drawing will never tell you.
238
+ - **Welds lie on the joint line the detail draws them on**, not merely at the right leg size.
239
+
240
+ **Check WHICH face, not just how far.** A connection can be the right size, the right distance from the
241
+ member's centre, and still be attached to the wrong part of it — or to nothing. Name the exact face the
242
+ plate bears on and prove the plate is on it:
243
+
244
+ - **The bearing ply must present a BROAD face to the plate** — the leg or web that runs alongside it. A
245
+ section usually has another part that is only edge-on (an angle's other leg is a few millimetres of
246
+ tip); landing on that, or on the air beside it, measures identically to landing correctly.
247
+ - **The bearing ply must cover the connection's full height.** If the plate is taller than the ply it
248
+ bears on, part of it is unsupported — a check that catches "right face, wrong extent".
249
+ - **Signs matter and hide.** A section is drawn in its own axes and then ROLLED to sit in the model, so
250
+ which way a face points depends on that roll. Get the sign wrong and the part lands on the far side of
251
+ the member — with every dimension, distance and thickness still perfect. Derive the mapping from the
252
+ code that actually places the geometry; do not reason it out.
253
+
254
+ **Do BOTH — measure it AND look at it. They catch different failures.**
255
+
256
+ - **Measure** what the eye cannot see: a few millimetres of overlap is invisible at any sensible zoom, so
257
+ contact, grip and bearing have to be computed and compared, never judged from a picture.
258
+ - **Look** at what the numbers do not flag: **zoom in on the built connection every time**. A dimension
259
+ table cannot tell you a plate is absurd for the member it sits on — a 15" plate on a 4" angle reads as
260
+ "plate depth 15.0", perfectly correct against the drawing it was copied from, and is obviously wrong
261
+ the instant you see it. Gross proportion and placement errors are found by eye in one second and can
262
+ survive every numeric check you write.
263
+
264
+ Passing one is not passing the other. A connection is right when the numbers *and* the picture agree.
265
+
266
+ **A check that reuses the thing it is checking proves nothing.** If the measurement repeats the same
267
+ assumption the geometry was built on, it will confirm a wrong answer with impressive precision — a bolt
268
+ "passing through" a leg that it actually misses, because both the code and the check placed that leg the
269
+ same wrong way. Derive the check from an INDEPENDENT source: the renderer's own transform, the drawing,
270
+ the section tables — something that does not share the suspect assumption. When a check and a drawing
271
+ disagree, the drawing wins.
272
+
273
+ **Check the whole assembly, not only the connection.** A connection can be perfect while the members it
274
+ joins are wrong: a brace that runs into the beam it frames into, a member never cut back from the support
275
+ it lands on. Member ends are usually placed at WORK POINTS, which sit on the support's centreline — deep
276
+ inside it — so a member must be trimmed back to the support's actual face plus its erection gap, and that
277
+ distance grows with the skew of the crossing. Verify the trim, not just the joint.
278
+
279
+ **Where this class of bug hides: nominal-vs-real section data.** A designation carries its thickness
280
+ (an angle's leg, a tube's wall) and that token is easy to drop on the way to geometry — leaving a guessed
281
+ or zero thickness behind, which silently misplaces everything that references it. If a placement depends
282
+ on a member's thickness, confirm that thickness came from the designation rather than an assumption.
283
+
284
+ **Never carry a dimension across from the member the detail happens to be DRAWN against.** A typical
285
+ detail is drawn on a representative member, and some of what it shows belongs to *that* member rather
286
+ than to the connection: a gusset drawn filling a beam's clear web depth is sized by that beam, not by the
287
+ rule. Copy it onto a different member and you get a plate several times its host. **Only transfer what
288
+ the detail actually DIMENSIONS.** For anything it merely draws, derive the value from a rule it does
289
+ state — a single bolt row with "1 1/2" TYP" edge distance gives a 3" deep plate — or leave it to the
290
+ engine's own derivation and say in the notes that the detail never dimensioned it.
291
+
292
+ **Report what does not fit, in the connection's `notes[]`, in the same breath as reporting the
293
+ dimensions.** "Every dimension matches" is a misleading statement on its own; a user detailing real steel
294
+ needs to know what bears and what does not.
295
+
185
296
  ---
186
297
 
187
298
  ## Guardrails
@@ -200,3 +311,7 @@ those export steps (right-click → Freeze) once the BOM is right, so a re-Run w
200
311
  - **Tekla (or any platform) component INSERTION at bake is deferred** — the connection library +
201
312
  per-end references + scoring are editor-verifiable today; native component placement is a later,
202
313
  Tekla-gated step. Don't promise it.
314
+ - **Never report a connection as done on its dimensions alone.** Stages 7-8 are not an optional last pass:
315
+ clash and exact placement are checked on *every* detail built, and whatever does not bear is said out
316
+ loud. This is detailing — "the numbers match" is not the same claim as "it fits", and only one of them
317
+ is what the user is actually asking for.
@@ -245,10 +245,21 @@ native/display coords):
245
245
  exact-equality). Mark `steel: true` on layers whose name reads as steel framing (e.g.
246
246
  `*BEAM*STEL*`, `*COL*`, `*BRACE*`, `*JOIST*`) → default **on**; others off. Mark
247
247
  `drawable: false` on pure text/dimension/title-block layers.
248
- 5. Set `filter.mode: "layer"`, `filter.active: 0`. **PUT** the contract
249
- (`PUT /api/contract/steel-model`) **with a precondition header** — `If-Match: <the ETag from your
250
- GET>`, or `If-None-Match: *` if the GET returned no ETag (§5 has the full rule). A PUT carrying
251
- neither is refused with `428`. On a re-read, preserve any existing per-facet `on` flags.
248
+ 5. Set `filter.mode: "layer"`, `filter.active: 0`, then write it back **with a precondition header**
249
+ (§5 has the full rule; a write carrying neither precondition is refused with `428`). Which route
250
+ depends on whether the project already has a contract, and that is the whole rule:
251
+ - **The GET returned a contract** → send only the pre-read blocks to
252
+ **`PUT /api/projects/<projectId>/steel-prepass`** with `{ filter }` and `If-Match: <that ETag>`.
253
+ - **The GET returned nothing** (a project created by dropping a drawing) → this is the create case,
254
+ so compose the whole document and `PUT /api/contract/steel-model` with `If-None-Match: *`.
255
+
256
+ The prepass verb takes `filter`, `datum` and per-sheet `{ grid, datum_at, datum_ref, control2_at,
257
+ control2_ref, elevation_in }` and **refuses `members`, `connections` and `joints` by name**, so it
258
+ cannot replace the model you are about to read. It also cannot create a document or add a sheet — an
259
+ unknown sheet is a `400`, never a new plan — and a sheet name the project holds twice is a `400` too,
260
+ since there is no single plan to write to. `If-Match` must be the **exact** ETag: `If-Match: *` is
261
+ refused, because this verb patches the document you read and `*` cannot detect a write that landed
262
+ since your GET. On a re-read, preserve any existing per-facet `on` flags.
252
263
 
253
264
  ### 1c. Grid lines — read the printed grid (quick, per sheet)
254
265
 
@@ -269,9 +280,12 @@ text layer. You CAN read them: you already have vision on the sheet. So:
269
280
  fractional values. Labels remain whitespace-separated
270
281
  overrides in line order (X: left→right; Y: bottom→up). Sanity-check a bay or two against the
271
282
  printed dimension strings between grid lines — a mismatch means the sheet scale (`pt_per_ft`) is
272
- wrong, which corrupts the whole takeoff, not just the grid. **Then PUT the contract again** —
273
- the 1b PUT already happened, and the user's next Filter-node Save writes back the contract *it
274
- loaded*; an un-PUT grid (and its vision-read labels) would be silently dropped.
283
+ wrong, which corrupts the whole takeoff, not just the grid. **Then write the grid back** — send
284
+ `{ "sheets": { "<sheet>": { "grid": … } } }` to `PUT /api/projects/<projectId>/steel-prepass` with
285
+ `If-Match: <the ETag from the write in 1b>`. The body is **keyed by sheet name, never a positional
286
+ list**: a positional array against a differently-ordered stored document writes each sheet's grid
287
+ onto the other, silently. The 1b write already happened, and the user's next Filter-node Save writes
288
+ back the contract *it loaded*; an unwritten grid (and its vision-read labels) would be silently dropped.
275
289
 
276
290
  Skip silently only when the sheet genuinely has no grid bubbles (rare for framing plans); say so.
277
291
 
@@ -360,6 +374,19 @@ Same flat shape as the datum above — a point plus which intersection it is:
360
374
  re-read later; which intersection the project calls 0,0 is the user's intent and cannot be recovered
361
375
  after the fact.
362
376
 
377
+ **Write the datum block back** through the same verb as the grid — one call carries both:
378
+
379
+ ```
380
+ PUT /api/projects/<projectId>/steel-prepass If-Match: <the current ETag>
381
+ { "datum": { "axis_x": "A", "axis_y": "1" },
382
+ "sheets": { "<sheet>": { "grid": …, "datum_at": [x, y], "datum_ref": …,
383
+ "control2_at": [x, y], "control2_ref": …, "elevation_in": 144 } } }
384
+ ```
385
+
386
+ Those six per-sheet keys and `datum` are the complete set the verb accepts alongside `filter`; anything
387
+ else — `members`, `memberRefs`, `title`, `raster_b64` — is refused **by name** with a `400`, so a write
388
+ that thinks it saved the model will hear about it rather than silently succeeding.
389
+
363
390
  **Then STOP and hand off — checkpoint before the member read.** Tell the user to open the **Filter**
364
391
  node, flip through the sheets, narrow to the steel, and **Save**. The saved `on` flags + `mode` are
365
392
  what step 2 reads — **per sheet** (each sheet's elements passing `mode` + the global `on` flags). Only
@@ -900,7 +927,26 @@ Key field rules:
900
927
 
901
928
  ### 5. Write to the contract store
902
929
 
903
- **Read first, then write.** `GET` the contract before you PUT and keep its `ETag` response header —
930
+ **Two routes, and which one you use is decided by WHAT you are writing, not by preference.**
931
+
932
+ | you are writing | route |
933
+ |---|---|
934
+ | the pre-read blocks — §1b `filter`, §1c `grid`, §1d `datum` + the per-sheet registration keys | **`PUT /api/projects/<projectId>/steel-prepass`** |
935
+ | the finished takeoff (§4's whole document: `members`, profiles, elevations) | `PUT /api/contract/steel-model` |
936
+ | a project's FIRST document, when the `GET` returned nothing at all | `PUT /api/contract/steel-model` with `If-None-Match: *` |
937
+
938
+ The prepass verb exists because the pre-read pass used to GET the contract and PUT the **whole document**
939
+ back. That is a full-document replacement: it can overwrite members, joints and connections that the
940
+ user has already reviewed, and an ETag does not stop it — an ETag makes a write not *stale*, not not
941
+ *canonical*. The verb accepts `filter`, `datum` and per-sheet `{ grid, datum_at, datum_ref, control2_at,
942
+ control2_ref, elevation_in }`, and refuses everything else **by name** with a `400`. It cannot create a
943
+ document and it cannot add a sheet (an unknown sheet is a `400`, never a new plan), so the create case
944
+ above genuinely does belong to the contract route.
945
+
946
+ Both routes take the same preconditions, the same `412`/`428` answers, and the same lock — they share one
947
+ implementation, so the rules below apply to whichever you use.
948
+
949
+ **Read first, then write.** `GET` the contract before you write and keep its `ETag` response header —
904
950
  that tag is what makes the write safe, and you need it even when you are replacing the document
905
951
  wholesale.
906
952
 
package/dist/web/app.css CHANGED
@@ -1250,23 +1250,23 @@
1250
1250
  .fm-select .fm-select-note strong { color: var(--text); font-weight: 600; }
1251
1251
  /* Consent checkbox (fork liability terms) — inline label + fully themed box (no native
1252
1252
  default leaks the dark baseline). Custom checkmark via clip-path, accent on check. */
1253
- .modal-check { display: flex; gap: 9px; align-items: flex-start; cursor: pointer; font-size: 12.5px; line-height: 1.5; color: var(--text-muted); margin: 2px 0 4px; }
1254
- .modal-check input[type="checkbox"] {
1253
+ .modal-check, .rev-check { display: flex; gap: 9px; align-items: flex-start; cursor: pointer; font-size: 12.5px; line-height: 1.5; color: var(--text-muted); margin: 2px 0 4px; }
1254
+ .modal-check input[type="checkbox"], .rev-check input[type="checkbox"] {
1255
1255
  appearance: none; -webkit-appearance: none; flex: none;
1256
1256
  width: 16px; height: 16px; margin: 1px 0 0;
1257
1257
  border: 1px solid var(--border-strong); border-radius: 4px; background: var(--surface-2);
1258
1258
  cursor: pointer; display: grid; place-content: center;
1259
1259
  transition: border-color 0.12s, background 0.12s;
1260
1260
  }
1261
- .modal-check input[type="checkbox"]::before {
1261
+ .modal-check input[type="checkbox"]::before, .rev-check input[type="checkbox"]::before {
1262
1262
  content: ""; width: 10px; height: 10px; transform: scale(0); transition: transform 0.12s ease;
1263
1263
  background: var(--accent-bright);
1264
1264
  clip-path: polygon(14% 44%, 0 65%, 50% 100%, 100% 16%, 80% 0%, 43% 62%);
1265
1265
  }
1266
- .modal-check input[type="checkbox"]:checked { border-color: var(--accent); background: var(--accent-soft); }
1267
- .modal-check input[type="checkbox"]:checked::before { transform: scale(1); }
1268
- .modal-check input[type="checkbox"]:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
1269
- .modal-check span { user-select: none; }
1266
+ .modal-check input[type="checkbox"]:checked, .rev-check input[type="checkbox"]:checked { border-color: var(--accent); background: var(--accent-soft); }
1267
+ .modal-check input[type="checkbox"]:checked::before, .rev-check input[type="checkbox"]:checked::before { transform: scale(1); }
1268
+ .modal-check input[type="checkbox"]:focus-visible, .rev-check input[type="checkbox"]:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
1269
+ .modal-check span, .rev-check span { user-select: none; }
1270
1270
  .modal-categories { display: flex; gap: 5px; margin-top: 7px; flex-wrap: wrap; }
1271
1271
  .modal-categories button {
1272
1272
  background: var(--surface-2);
@@ -3945,9 +3945,69 @@ table.hist tr.current td { background:var(--accent-soft); }
3945
3945
  .hist-change-list li::marker { color:var(--text-dim); }
3946
3946
  .hist-change-list .hist-change-more { color:var(--text-dim); font-style:italic; }
3947
3947
  .hist-change-caution { margin-top:5px; color:var(--warn); font-size:11px; }
3948
- .hist .btn-mini, .ws-drawings-bar .btn-mini, .ws-revision-card .btn-mini { background:none; border:1px solid var(--border-strong); color:var(--text-muted); border-radius:6px;
3948
+ .hist .btn-mini, .ws-drawings-bar .btn-mini, .ws-revision-card .btn-mini, .modal.revreview .btn-mini { background:none; border:1px solid var(--border-strong); color:var(--text-muted); border-radius:6px;
3949
3949
  padding:4px 10px; font-size:11px; cursor:pointer; white-space:nowrap; }
3950
- .hist .btn-mini:hover, .ws-drawings-bar .btn-mini:hover, .ws-revision-card .btn-mini:hover { color:var(--text); border-color:var(--accent); }
3950
+ .hist .btn-mini:hover, .ws-drawings-bar .btn-mini:hover, .ws-revision-card .btn-mini:hover, .modal.revreview .btn-mini:hover { color:var(--text); border-color:var(--accent); }
3951
+
3952
+ /* ── Revision review (unit 5, P6e) — the grouped accept/reject list ──────────────
3953
+ Every rule below is built from existing tokens; no new colour, font or shadow. The
3954
+ modal reuses .modal wholesale and only overrides width and the column layout it needs
3955
+ to keep the counts pinned while the list scrolls. */
3956
+ .modal.revreview { width:720px; max-width:92vw; max-height:86vh; display:flex; flex-direction:column; }
3957
+ /* The inner scroll container. A long proposal list IS a scroll container, and it is exactly where a
3958
+ native white scrollbar leaks into the dark theme — themed here in the same pass that creates it. */
3959
+ .revreview-body { flex:1 1 auto; min-height:0; overflow-y:auto; padding-right:2px; margin:4px 0 2px;
3960
+ scrollbar-width:thin; scrollbar-color:var(--border-strong) transparent; }
3961
+ .revreview-body::-webkit-scrollbar { width:8px; }
3962
+ .revreview-body::-webkit-scrollbar-thumb { background:var(--border-strong); border-radius:5px; }
3963
+ .revreview-body::-webkit-scrollbar-track { background:transparent; }
3964
+
3965
+ /* Counts: informational, and the ABSENCE of chrome is what says so — no border, no card,
3966
+ no icon, no hover. Everything actionable below has at least one. */
3967
+ .rev-counts { font-size:11px; color:var(--text-dim); margin:0 0 10px; }
3968
+ .rev-counts b { color:var(--text-muted); font-weight:600; font-family:var(--mono); }
3969
+
3970
+ /* `flex-wrap` matters here and its absence was a real defect: the banner is a <b> lead plus a trailing
3971
+ text node, i.e. TWO flex items, and without wrapping they lay out as two nowrap columns instead of one
3972
+ flowing paragraph. `.hist-working` carries it for exactly this reason and this copied everything but. */
3973
+ .rev-changed { margin:0 0 11px; padding:9px 12px; display:flex; gap:8px; align-items:flex-start; flex-wrap:wrap;
3974
+ border:1px solid var(--warn); border-radius:8px; background:var(--surface-2); font-size:12px; color:var(--text-muted); }
3975
+ .rev-changed[hidden] { display:none; }
3976
+ .rev-changed b { color:var(--text); font-weight:600; }
3977
+
3978
+ .rev-group { margin:0 0 16px; }
3979
+ .rev-group:last-child { margin-bottom:0; }
3980
+ .rev-group-head { display:flex; align-items:center; justify-content:space-between; gap:12px; margin:0 0 7px; }
3981
+ /* Title and count are ONE flex child, so `space-between` still sees exactly two — the label group and
3982
+ the bulk bar — rather than pushing the count into the middle. */
3983
+ .rev-group-label { display:inline-flex; align-items:center; gap:7px; min-width:0; }
3984
+ .rev-group-title { font-size:10px; text-transform:uppercase; letter-spacing:.14em; color:var(--text-muted); }
3985
+ .rev-group-actions { display:flex; gap:6px; flex:none; }
3986
+
3987
+ .rev-row { display:flex; gap:9px; align-items:flex-start; padding:9px 11px; margin-bottom:6px;
3988
+ border:1px solid var(--border); border-left:3px solid var(--border-strong); border-radius:8px; background:var(--surface-2); }
3989
+ .rev-row:last-child { margin-bottom:0; }
3990
+ .rev-row.k-added { border-left-color:var(--ok); }
3991
+ .rev-row.k-removed { border-left-color:var(--err); }
3992
+ .rev-row.k-changed { border-left-color:var(--accent-bright); }
3993
+ .rev-row.k-binding { border-left-color:var(--info); }
3994
+ .rev-row-main { min-width:0; flex:1 1 auto; }
3995
+ .rev-row-head { display:flex; align-items:baseline; gap:8px; flex-wrap:wrap; }
3996
+ .rev-kind-badge { font-size:9.5px; text-transform:uppercase; letter-spacing:.1em; color:var(--text-dim);
3997
+ border:1px solid var(--border-strong); border-radius:4px; padding:1px 5px; flex:none; }
3998
+ .rev-row-title { font-size:12.5px; font-weight:600; color:var(--text); font-family:var(--mono); overflow-wrap:anywhere; }
3999
+ .rev-row-sub { font-size:11px; color:var(--text-dim); margin-top:3px; }
4000
+ .rev-row-note { font-size:11px; color:var(--text-dim); font-style:italic; margin-top:4px; }
4001
+ .rev-fields { margin:6px 0 0; display:flex; flex-direction:column; gap:3px; }
4002
+ .rev-field { font-size:11.5px; color:var(--text-muted); overflow-wrap:anywhere; }
4003
+ .rev-field-key { font-family:var(--mono); color:var(--text-dim); margin-right:6px; }
4004
+
4005
+ /* The refused list reuses the file's own collapsed-detail idiom (.ws-archived*), and --warn
4006
+ rather than --err: a refusal is the registry correctly declining an out-of-policy change. */
4007
+ .rev-issues { margin-top:4px; }
4008
+ .rev-issue { font-size:11.5px; color:var(--text-muted); padding:6px 0; border-bottom:1px solid var(--border); }
4009
+ .rev-issue:last-child { border-bottom:none; }
4010
+ .rev-issue-path { font-family:var(--mono); font-size:10.5px; color:var(--text-dim); display:block; margin-top:2px; }
3951
4011
 
3952
4012
  /* ── Workspaces: revision re-read (Slice 4b) — attach band + pending/failed card ── */
3953
4013
  .ws-drawings-bar { flex:none; display:flex; align-items:center; gap:10px; padding:8px 14px; border-bottom:1px solid var(--border); background:var(--surface); }
@@ -3962,6 +4022,10 @@ table.hist tr.current td { background:var(--accent-soft); }
3962
4022
  .ws-revision-card.state-failed { border-left:3px solid var(--err); }
3963
4023
  .ws-revision-card.state-failed .wrc-err-ico { color:var(--err); flex:none; }
3964
4024
  .ws-revision-card.state-failed .wrc-err-detail { color:var(--text-dim); }
4025
+ /* Staged: resolved and waiting on the user. A STATIC dot, not the pending spinner — nothing is in
4026
+ flight and an animation would say otherwise. */
4027
+ .ws-revision-card.state-staged { border-left:3px solid var(--accent); }
4028
+ .ws-revision-card.state-staged .wrc-dot { flex:none; width:8px; height:8px; border-radius:50%; background:var(--accent); }
3965
4029
  .ws-revision-card .wrc-actions { display:flex; gap:6px; flex:none; }
3966
4030
  @media (prefers-reduced-motion: reduce) { .ws-revision-card .wrc-spin { animation:none; } }
3967
4031
  .hist .gate-badge.ai-read { background:var(--accent-soft); border-color:var(--accent-dim); color:var(--accent-bright); }
package/dist/web/aware.js CHANGED
@@ -5891,7 +5891,7 @@
5891
5891
  : '';
5892
5892
  const note = req.instruction ? `\nMy note: ${req.instruction}` : '';
5893
5893
  const messageHint = isInitialRead ? '<plain-English what was read>' : '<plain-English what changed>';
5894
- const post = `Only after the review checkpoint is complete, POST /api/projects/${req.project}/revision-read with { contract, message: "${messageHint}", requestId: "${req.id}" }. The server derives the base version + source provenance from this queued request, records a "revision-read" version, and clears the request — do NOT DELETE the request yourself. If you can't read the set, POST /api/projects/${req.project}/revision-requests/${req.id}/fail with { error }.`;
5894
+ const post = `Only after the review checkpoint is complete, POST /api/projects/${req.project}/revision-read with { contract, message: "${messageHint}", requestId: "${req.id}" }. The server derives the base version + source provenance from this queued request. For a steel.takeoff/v1 contract it records a "revision-read" version and clears the request. For a steel.model/v2 model it answers 202 and STAGES the read for the user to review instead — the request stays open until they confirm it in the app, and the version appears then. Either way, do NOT DELETE the request yourself. If you can't read the set, POST /api/projects/${req.project}/revision-requests/${req.id}/fail with { error }.`;
5895
5895
  // App-aware: the target contract shape differs per workspace app. A vectorize project holds a
5896
5896
  // drawing.vector/v1 (clean editable 2D linework), NOT a steel takeoff — instructing the AI to
5897
5897
  // read steel members would produce the wrong contract for the vector editor (spec §3.3g).
@@ -5906,9 +5906,9 @@
5906
5906
  return `In floless project "${req.project}" (app "${req.appId}"), a REVISED drawing was attached — re-read (vectorize) it into the SAME project as a new version (do NOT create a new project). Vectorize the drawing per the floless-app-vectorize skill into a drawing.vector/v1 contract: emit clean, editable 2D vector geometry (sheets → elements: lines / polylines / curves / text, each on its layer), NOT steel members or a takeoff. A vector PDF is read deterministically (exact geometry, no guessing); a photo, scan or hand sketch is traced by a fenced vision extraction that flags every uncertain stroke (low confidence) for the user's review. ${post}${snaps}${note}`;
5907
5907
  }
5908
5908
  if (isInitialRead) {
5909
- return `In floless project "${req.project}" (app "${req.appId}"), an initial drawing set was attached — read it into this project as its first steel model version (do NOT create a new project). Follow the floless-app-steel-takeoff skill's mandatory two-phase gate. FIRST, GET /api/contract/${req.appId}?project=${req.project} and KEEP its ETag response header. A 404 "no contract for this app yet" here is NORMAL and not an error — a project created by dropping a drawing starts empty; it simply means this is the create case, so you will send If-None-Match: * instead of an ETag. (A project seeded from an existing model does return a contract and an ETag.) Then do the deterministic PyMuPDF steel-filter pass only: identify the framing-plan sheets, enumerate the drawing elements by layer/thickness/color into contract.filter.sheets/facets, PUT that project contract back to /api/contract/${req.appId}?project=${req.project} (a contract PUT MUST carry a precondition: If-Match with the ETag from that GET, or If-None-Match: * ONLY if the GET returned no ETag at all — one with neither is refused with 428; on 412 re-GET, re-apply your changes to the new document, and retry rather than repeating the same body), then STOP and tell me to open Drawings → Steel Filter, review/narrow the steel facets, and Save. Do NOT read members, build the model, open 3D, or POST /revision-read until I explicitly come back after saving the filter. AFTER that saved-filter checkpoint, read members from the saved filter selection and compose the steel.takeoff/v1 contract. ${post}${snaps}${note}`;
5909
+ return `In floless project "${req.project}" (app "${req.appId}"), an initial drawing set was attached — read it into this project as its first steel model version (do NOT create a new project). Follow the floless-app-steel-takeoff skill's mandatory two-phase gate. FIRST, GET /api/contract/${req.appId}?project=${req.project} and KEEP its ETag response header. A 404 "no contract for this app yet" here is NORMAL and not an error — a project created by dropping a drawing starts empty; it simply means this is the create case, so you will send If-None-Match: * instead of an ETag. (A project seeded from an existing model does return a contract and an ETag.) Then do the deterministic PyMuPDF steel-filter pass only: identify the framing-plan sheets, enumerate the drawing elements by layer/thickness/color into contract.filter.sheets/facets, write it back — if that GET returned NO contract this is the create case, so PUT the whole document to /api/contract/${req.appId}?project=${req.project} with If-None-Match: * ; if it DID return one, send only the pre-read blocks to PUT /api/projects/${req.project}/steel-prepass with { filter } and If-Match: <that ETag>. The prepass verb takes filter, datum and per-sheet { grid, datum_at, datum_ref, control2_at, control2_ref, elevation_in } and REFUSES members, connections and joints by name, so it cannot replace the model you are about to read. Either write is refused with 428 if it carries no precondition, and If-Match must be the exact ETag — If-Match: * is refused, because this verb patches the document you read. On 412 re-GET, re-apply your changes to the new document, and retry rather than repeating the same body. Then STOP and tell me to open Drawings → Steel Filter, review/narrow the steel facets, and Save. Do NOT read members, build the model, open 3D, or POST /revision-read until I explicitly come back after saving the filter. AFTER that saved-filter checkpoint, read members from the saved filter selection and compose the steel.takeoff/v1 contract. ${post}${snaps}${note}`;
5910
5910
  }
5911
- return `In floless project "${req.project}" (app "${req.appId}"), a REVISED drawing set was attached — re-read it into the SAME project as a new version (do NOT create a new project). Follow the floless-app-steel-takeoff skill's mandatory two-phase gate. FIRST, GET /api/contract/${req.appId}?project=${req.project} to read the CURRENT contract, then do the deterministic PyMuPDF steel-filter pass only for the revised drawing set: identify the framing-plan sheets, enumerate drawing elements by layer/thickness/color into contract.filter.sheets/facets, preserve any compatible existing filter selections, PUT that project contract back to /api/contract/${req.appId}?project=${req.project} (a contract PUT MUST carry a precondition: If-Match with the ETag from the GET you just did, or If-None-Match: * if that GET returned no ETag — one without either is refused with 428; on 412 re-GET, re-apply, and retry rather than repeating the same body), then STOP and tell me to open Drawings → Steel Filter, review/narrow the steel facets, and Save. Do NOT read members, build the model, open 3D, or POST /revision-read until I explicitly come back after saving the filter. AFTER that saved-filter checkpoint, read members from the saved filter selection, compose the updated steel.takeoff/v1 contract, and PRESERVE each still-present member's id AND its sheet label (mint a NEW id only for a genuinely new member; drop the id of a member the revision deleted) so the version comparison matches members — do NOT renumber the whole model. ${post}${snaps}${note}`;
5911
+ return `In floless project "${req.project}" (app "${req.appId}"), a REVISED drawing set was attached — re-read it into the SAME project as a new version (do NOT create a new project). Follow the floless-app-steel-takeoff skill's mandatory two-phase gate. FIRST, GET /api/contract/${req.appId}?project=${req.project} to read the CURRENT contract, then do the deterministic PyMuPDF steel-filter pass only for the revised drawing set: identify the framing-plan sheets, enumerate drawing elements by layer/thickness/color into contract.filter.sheets/facets, preserve any compatible existing filter selections, send ONLY the pre-read blocks to PUT /api/projects/${req.project}/steel-prepass with { filter } and If-Match: <the ETag from the GET you just did> — never the whole contract, because this project already holds a model and a full PUT would replace its members without review. The verb takes filter, datum and per-sheet { grid, datum_at, datum_ref, control2_at, control2_ref, elevation_in } and refuses everything else by name. A write with no precondition is refused with 428, and If-Match must be the exact ETag — If-Match: * is refused, because this verb patches the document you read. On 412 re-GET, re-apply, and retry rather than repeating the same body. Then STOP and tell me to open Drawings → Steel Filter, review/narrow the steel facets, and Save. Do NOT read members, build the model, open 3D, or POST /revision-read until I explicitly come back after saving the filter. AFTER that saved-filter checkpoint, read members from the saved filter selection, compose the updated steel.takeoff/v1 contract, and PRESERVE each still-present member's id AND its sheet label (mint a NEW id only for a genuinely new member; drop the id of a member the revision deleted) so the version comparison matches members — do NOT renumber the whole model. ${post}${snaps}${note}`;
5912
5912
  }
5913
5913
  // The Knowledge step's Organize verb. The lifecycle is SERVER-owned: start claims the organize
5914
5914
  // lock and mints the generation dir; finish publishes it and clears this request; fail releases
@@ -5969,7 +5969,7 @@
5969
5969
  // applied-then-DELETEd by the terminal AI.
5970
5970
  const clears = req.type === 'revision-read'
5971
5971
  ? ((req.appTemplateId || req.appId) === 'steel-model'
5972
- ? `apply it in two phases: first write the Steel Filter checkpoint to the project contract and stop for user Save; only after that checkpoint use the route in the line below (that POST clears this request — do NOT DELETE it separately).`
5972
+ ? `apply it in two phases: first write the Steel Filter checkpoint through the steel-prepass verb and stop for user Save; only after that checkpoint use the route in the line below (that POST clears this request, or stages it for the user's review — either way do NOT DELETE it separately).`
5973
5973
  : `apply it via the route in the line below (that POST clears this request — do NOT DELETE it separately).`)
5974
5974
  : req.type === 'knowledge-organize'
5975
5975
  ? `drive it through the start → finish/fail lifecycle routes in the line below (finish or fail clears this request — do NOT DELETE it separately, that would strand the organize lock).`
@@ -557,6 +557,25 @@
557
557
  </div>
558
558
  </div>
559
559
 
560
+ <!-- Revision review (unit 5, P6e) — the human decides what a re-read may change.
561
+ Bespoke rather than #form-modal: that modal renders a flat field list and has no
562
+ notion of grouped rows, per-bucket bulk actions, or re-rendering in place when the
563
+ model moves underneath the review. Same backdrop, same .modal chrome — no new look.
564
+ The counts line sits OUTSIDE .revreview-body so it stays pinned while the list scrolls. -->
565
+ <div class="modal-backdrop" id="revreview-modal" role="dialog" aria-modal="true" aria-labelledby="revreview-title">
566
+ <div class="modal revreview">
567
+ <div class="modal-title" id="revreview-title">Review this read</div>
568
+ <div class="modal-sub" id="revreview-sub"></div>
569
+ <div class="rev-changed" id="revreview-changed" role="status" aria-live="polite" hidden></div>
570
+ <div class="rev-counts" id="revreview-counts"></div>
571
+ <div class="revreview-body" id="revreview-body"></div>
572
+ <div class="modal-actions">
573
+ <button id="revreview-cancel">Cancel</button>
574
+ <button id="revreview-confirm" class="primary">Apply selected</button>
575
+ </div>
576
+ </div>
577
+ </div>
578
+
560
579
  <!-- Save-on-switch confirmation — shown when switching workflows with unsaved
561
580
  input changes. Reuses the shared modal styling; no new backdrop look. -->
562
581
  <div class="modal-backdrop" id="confirm-modal">
@@ -329,22 +329,35 @@ function shapeOf(el) {
329
329
  if (/^(HSS|PIPE|TS|SHS|RHS|CHS|TUBE|HSQ)/.test(p)) return 'TUBE'; // hollow tube
330
330
  return 'BOX';
331
331
  }
332
- function profileShape(kind, w, d) {
332
+ // A real thickness off the element's `xsection` (AISC table / designation) when there is one and it fits
333
+ // inside the section, else null so the caller keeps its estimate. The fit check matters: a metric
334
+ // designation's thickness token is parsed as inches, which would draw a leg thicker than the whole angle.
335
+ function realThk(xs, key, half) {
336
+ const t = xs && typeof xs[key] === 'number' ? xs[key] : null;
337
+ return t != null && t > 0 && t < 2 * half ? t : null;
338
+ }
339
+ // `xs` is the scene element's `xsection`. Without it every thickness here is a GUESS off the envelope —
340
+ // an L4X4 leg came out 18.3mm against a real 9.5, so a connection bearing on the real face rendered buried
341
+ // in a member that was drawn nearly twice too thick. The estimates remain as the fallback for sections we
342
+ // have no data for; they are the reason a member can still be drawn at all.
343
+ function profileShape(kind, w, d, xs) {
333
344
  const s = new THREE.Shape(), hw = w / 2, hd = d / 2;
334
345
  if (kind === 'I') {
335
- const tf = Math.min(d * 0.5, Math.max(d * 0.10, 6)), tw = Math.min(w * 0.5, Math.max(w * 0.10, 5));
346
+ const tf = realThk(xs, 'tf', hd) ?? Math.min(d * 0.5, Math.max(d * 0.10, 6));
347
+ const tw = realThk(xs, 'tw', hw) ?? Math.min(w * 0.5, Math.max(w * 0.10, 5));
336
348
  s.moveTo(-hw, -hd); s.lineTo(hw, -hd); s.lineTo(hw, -hd + tf); s.lineTo(tw / 2, -hd + tf);
337
349
  s.lineTo(tw / 2, hd - tf); s.lineTo(hw, hd - tf); s.lineTo(hw, hd); s.lineTo(-hw, hd);
338
350
  s.lineTo(-hw, hd - tf); s.lineTo(-tw / 2, hd - tf); s.lineTo(-tw / 2, -hd + tf); s.lineTo(-hw, -hd + tf); s.closePath();
339
351
  } else if (kind === 'C') {
340
- const tf = Math.max(d * 0.10, 5), tw = Math.max(w * 0.12, 5);
352
+ const tf = realThk(xs, 'tf', hd) ?? Math.max(d * 0.10, 5);
353
+ const tw = realThk(xs, 'tw', hw) ?? Math.max(w * 0.12, 5);
341
354
  s.moveTo(-hw, -hd); s.lineTo(hw, -hd); s.lineTo(hw, -hd + tf); s.lineTo(-hw + tw, -hd + tf);
342
355
  s.lineTo(-hw + tw, hd - tf); s.lineTo(hw, hd - tf); s.lineTo(hw, hd); s.lineTo(-hw, hd); s.closePath();
343
356
  } else if (kind === 'L') {
344
- const t = Math.max(Math.min(w, d) * 0.18, 5);
357
+ const t = realThk(xs, 't', Math.min(hw, hd)) ?? Math.max(Math.min(w, d) * 0.18, 5);
345
358
  s.moveTo(-hw, -hd); s.lineTo(hw, -hd); s.lineTo(hw, -hd + t); s.lineTo(-hw + t, -hd + t); s.lineTo(-hw + t, hd); s.lineTo(-hw, hd); s.closePath();
346
359
  } else if (kind === 'TUBE') {
347
- const t = Math.max(Math.min(w, d) * 0.12, 4);
360
+ const t = realThk(xs, 't', Math.min(hw, hd)) ?? Math.max(Math.min(w, d) * 0.12, 4);
348
361
  s.moveTo(-hw, -hd); s.lineTo(hw, -hd); s.lineTo(hw, hd); s.lineTo(-hw, hd); s.closePath();
349
362
  const h = new THREE.Path(); h.moveTo(-hw + t, -hd + t); h.lineTo(hw - t, -hd + t); h.lineTo(hw - t, hd - t); h.lineTo(-hw + t, hd - t); h.closePath(); s.holes.push(h);
350
363
  } else { s.moveTo(-hw, -hd); s.lineTo(hw, -hd); s.lineTo(hw, hd); s.lineTo(-hw, hd); s.closePath(); }
@@ -353,7 +366,7 @@ function profileShape(kind, w, d) {
353
366
  function memberGeom(el, w, d, len) {
354
367
  const kind = shapeOf(el);
355
368
  if (kind === 'BOX') return new THREE.BoxGeometry(w, len, d); // length on local Y
356
- const g = new THREE.ExtrudeGeometry(profileShape(kind, w, d), { depth: len, bevelEnabled: false });
369
+ const g = new THREE.ExtrudeGeometry(profileShape(kind, w, d, el && el.xsection), { depth: len, bevelEnabled: false });
357
370
  g.translate(0, 0, -len / 2); return g; // extruded +Z, centred
358
371
  }
359
372
  const _ZA = new THREE.Vector3(0, 0, 1), _YA = new THREE.Vector3(0, 1, 0);