@floless/app 0.110.0 → 0.111.1

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.
@@ -153,7 +153,11 @@ the user at the editor:
153
153
  Put that on the `connections[]` row it belongs to, with `source:"drawing"`:
154
154
  - `detail` — the callout as drawn, in whatever form this set writes it; that string is what a member
155
155
  end's callout is matched against, so keep it verbatim rather than normalising it to a house style;
156
- - `recipe.kind` — what it builds (`shear-plate`, `base-plate`);
156
+ - `recipe.kind` — what it builds (`shear-plate`, `base-plate`, `brace-gusset`). Pick the one the detail
157
+ actually draws rather than the nearest one that builds: a brace detail is a `brace-gusset`, not a
158
+ `shear-plate` with different numbers — the two weld to different places, and only the gusset sets the
159
+ brace back off the member it frames into. A detail aimed at a brace also needs that member's
160
+ `memberType` to say `brace`, or the connection is refused;
157
161
  - `recipe.params` — the numbers on the typical figure itself (plate thickness, weld leg, bolt Ø);
158
162
  - `recipe.schedule[]` — the table that varies those numbers by member size, **which often lives on the
159
163
  sheet the detail points AT rather than the detail's own sheet**, so it only exists if the chain was
@@ -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
@@ -842,6 +869,72 @@ Key field rules:
842
869
  Worked example (a 3/8"×4"×8" tab, 3×3/4" bolts @ 3", far end of beam b3): `{ id:"sp-b3-e1",
843
870
  kind:"shear-plate", main:"b3", at:"end1", source:"auto", params:{ plateThickness:9.5, plateWidth:101.6,
844
871
  plateHeight:203.2, boltCols:1, boltRows:3, boltDia:19.05, boltPitch:76.2, weldLeg:6.35, clearance:12.7 } }`.
872
+ - **Brace-gusset connections (`joints[]`) — the braced-end recipe.** Where a **brace** end reads as a
873
+ gusset / brace connection (a plate the brace bolts to, typically drawn `PL … EA SIDE`), emit a
874
+ `joints[]` entry **per braced end** so FloLess renders the gusset plate(s) + the bolt group + the
875
+ plate-to-support welds, and sets the brace back off the member it frames into:
876
+ `{ id, kind:"brace-gusset", main:"<BRACE member id>", at:"end0"|"end1", secondaries:["<support id>"], params:{…} }`.
877
+
878
+ ⚠️ **Three things this kind requires that the fin plate does not:**
879
+ 1. **`main` must be a member whose `memberType` is `"brace"`.** This is the one connection kind whose
880
+ host IS a brace, and it is skipped on anything else. If the plan reads a diagonal as bracing, say so
881
+ in `memberType` — the connection builds *because* the member is called a brace.
882
+ 2. **Name the support in `secondaries`, and name the right one.** It must be the member the brace
883
+ actually frames INTO — never the other brace of a chevron. A named support that is a brace, or that
884
+ the braced end does not physically reach, is **discarded and the support is inferred from the
885
+ geometry instead** — so a wrong id does not announce itself, it quietly builds against whatever the
886
+ engine picks. Get it right rather than relying on the fallback; only when nothing can be inferred
887
+ either is the joint skipped.
888
+ 3. **There is no erection-gap param.** The brace is cut back to where it really meets the support,
889
+ derived from the two members' geometry. Do not author a `clearance` — it is not read.
890
+
891
+ | Schedule / detail callout | `params` key(s) |
892
+ |---|---|
893
+ | plate THK · width (along the brace) · height | `plateThickness` · `plateWidth` · `plateHeight` |
894
+ | one plate, or one **each side** of the brace | `plateCount` (1 or **2** — 2 is the default) |
895
+ | bolt Ø · rows×cols · pitch/gauge | `boltDia` · `boltRows`×`boltCols` · `boltPitch` / `boltColPitch` |
896
+ | edge distance to the plate edge | `edgeDist` |
897
+ | weld size | `weldLeg` |
898
+ | which face of the brace's leg the plates sandwich | `webSide` (+1 / -1) |
899
+ | bolt grade (AISC) — A325 or A490 | `boltGrade` ("A325" / "A490") |
900
+
901
+ ⚠️ **UNITS: the *dimensional* `params` are MILLIMETRES** (×25.4 from inches); `boltCols`/`boltRows`/
902
+ `plateCount` are integer counts. `plateCount:2` is the default because a gusset is usually drawn as a
903
+ pair — and the pair is what makes the bolts **double shear**, which the bolt length auto-sizes from
904
+ (grip = plate + leg + plate). Worked example (a 3/8" plate each side, 7" long, (2) 3/4" bolts at 3"
905
+ with 1 1/2" edge distance, 1/4" fillet, on the start end of brace `br7` framing into beam `b2`):
906
+ `{ id:"bg-br7-e0", kind:"brace-gusset", main:"br7", at:"end0", secondaries:["b2"], source:"auto",
907
+ params:{ plateThickness:9.5, plateWidth:177.8, boltCols:2, boltRows:1, boltDia:19.05,
908
+ boltColPitch:76.2, edgeDist:38.1, weldLeg:6.35, plateCount:2 } }`.
909
+
910
+ **What it will refuse, and why a refusal is the right answer.** This kind declines rather than drawing
911
+ something it cannot prove, so an end that does not build is telling you something. Today it refuses:
912
+
913
+ - a brace that is **not level** — the plate is built vertical, which suits horizontal bracing; a sloped
914
+ brace wants its plate in the brace's own plane, and that is not built yet;
915
+ - a brace with **no horizontal run** in plan (a purely vertical one) — there is no plan clash to solve;
916
+ - a section with **no face the plates can bear on**. The plates lap a real face, so which sections work
917
+ depends on the shape *and* on the member's roll (`rot`):
918
+
919
+ | brace section | builds |
920
+ |---|---|
921
+ | **angle** (`L…`) | at any roll — either leg can take the plates |
922
+ | **wide flange / channel** (`W…`, `C…`) | only at `rot` 0 or 180, where the **web** faces the plates; at 90/270 the plates would meet a flange, which is a different detail |
923
+ | **HSS / tube / pipe** | never — you cannot lap a plate onto a closed section, and inventing a face would put the plate inside the steel |
924
+
925
+ So if a `W` or `C` brace refuses, check its `rot` before anything else. A tube brace will not build at
926
+ all yet — say so rather than substituting a kind that would;
927
+ - a support with **no plan spine** — so a brace framing into a **column** is refused today; this kind
928
+ solves the set-back against a support that runs in plan, which a column does not;
929
+ - a support the braced end **does not reach**, when nothing else can be inferred either;
930
+ - a set-back that would consume **more than half the brace**;
931
+ - any plate **too short to hold the bolt group** with proper edge distance on *both* plates AND end
932
+ distance on the cut-back brace.
933
+
934
+ If an end you expected refuses, check in this order: the brace's `memberType`, its section (is it a
935
+ tube?), what it frames into (a column?), and whether the plate width you authored is long enough — a
936
+ skew makes the two plates sit slightly apart along the brace, which eats into the usable length.
937
+
845
938
  - **Company-rules pre-fill (§5.5).** If a firm-standard knowledge file is present (e.g.
846
939
  `company-rules.md`: "moment → 50S504 → Tekla 146"), read it and emit those rows in `connections[]`
847
940
  with `source: "company-rules"`, then PUT. The user reviews/edits them in the editor's
@@ -900,7 +993,26 @@ Key field rules:
900
993
 
901
994
  ### 5. Write to the contract store
902
995
 
903
- **Read first, then write.** `GET` the contract before you PUT and keep its `ETag` response header —
996
+ **Two routes, and which one you use is decided by WHAT you are writing, not by preference.**
997
+
998
+ | you are writing | route |
999
+ |---|---|
1000
+ | the pre-read blocks — §1b `filter`, §1c `grid`, §1d `datum` + the per-sheet registration keys | **`PUT /api/projects/<projectId>/steel-prepass`** |
1001
+ | the finished takeoff (§4's whole document: `members`, profiles, elevations) | `PUT /api/contract/steel-model` |
1002
+ | a project's FIRST document, when the `GET` returned nothing at all | `PUT /api/contract/steel-model` with `If-None-Match: *` |
1003
+
1004
+ The prepass verb exists because the pre-read pass used to GET the contract and PUT the **whole document**
1005
+ back. That is a full-document replacement: it can overwrite members, joints and connections that the
1006
+ user has already reviewed, and an ETag does not stop it — an ETag makes a write not *stale*, not not
1007
+ *canonical*. The verb accepts `filter`, `datum` and per-sheet `{ grid, datum_at, datum_ref, control2_at,
1008
+ control2_ref, elevation_in }`, and refuses everything else **by name** with a `400`. It cannot create a
1009
+ document and it cannot add a sheet (an unknown sheet is a `400`, never a new plan), so the create case
1010
+ above genuinely does belong to the contract route.
1011
+
1012
+ Both routes take the same preconditions, the same `412`/`428` answers, and the same lock — they share one
1013
+ implementation, so the rules below apply to whichever you use.
1014
+
1015
+ **Read first, then write.** `GET` the contract before you write and keep its `ETag` response header —
904
1016
  that tag is what makes the write safe, and you need it even when you are replacing the document
905
1017
  wholesale.
906
1018
 
@@ -120,6 +120,7 @@ does not include its own abbreviations/legend sheet (or only ships partial sheet
120
120
  | `GLB` | GLUE-LAMINATED BEAM |
121
121
  | `GR` | GRADE |
122
122
  | `GRTG` | GRATING |
123
+ | `GUSS` (or `GUSS PL`) | GUSSET PLATE |
123
124
  | `HDR` | HEADER |
124
125
  | `HGR` | HANGER |
125
126
  | `HGT` / `HT` | HEIGHT |
@@ -279,6 +280,11 @@ When reading the General Notes and plan notes, these drive member geometry/metad
279
280
  - **Connection-type words in notes** — `MOMENT`, `DRAG`, `SHEAR`, `BRACED`, `PINNED`, `FIXED` name the
280
281
  connection type at member ends; feed them into the member-end connection note + the connection
281
282
  library (type → design detail# → platform component).
283
+ - **`EA SIDE` / `EA FACE` / `BOTH SIDES` on a plate callout** — this is a **part-count** modifier, not a
284
+ note: one callout, **two plates**. It most often appears on a gusset or a splice, where the member is
285
+ sandwiched between them, and it changes the bolting as well as the count — a member held between two
286
+ plates is bolted in **double shear**, so the bolts are longer than the same callout on a single plate.
287
+ Read it onto the connection recipe (a plate count), never as a repeat of one plate.
282
288
 
283
289
  ---
284
290
 
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">