@floless/app 0.125.0 → 0.125.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.
@@ -24940,11 +24940,11 @@ var require_clean = __commonJS({
24940
24940
  "node_modules/semver/functions/clean.js"(exports2, module2) {
24941
24941
  "use strict";
24942
24942
  var parse = require_parse2();
24943
- var clean = (version, options) => {
24943
+ var clean2 = (version, options) => {
24944
24944
  const s = parse(version.trim().replace(/^[=v]+/, ""), options);
24945
24945
  return s ? s.version : null;
24946
24946
  };
24947
- module2.exports = clean;
24947
+ module2.exports = clean2;
24948
24948
  }
24949
24949
  });
24950
24950
 
@@ -26333,7 +26333,7 @@ var require_semver2 = __commonJS({
26333
26333
  var identifiers = require_identifiers();
26334
26334
  var parse = require_parse2();
26335
26335
  var valid = require_valid();
26336
- var clean = require_clean();
26336
+ var clean2 = require_clean();
26337
26337
  var inc = require_inc();
26338
26338
  var diff = require_diff();
26339
26339
  var major = require_major();
@@ -26372,7 +26372,7 @@ var require_semver2 = __commonJS({
26372
26372
  module2.exports = {
26373
26373
  parse,
26374
26374
  valid,
26375
- clean,
26375
+ clean: clean2,
26376
26376
  inc,
26377
26377
  diff,
26378
26378
  major,
@@ -54611,7 +54611,7 @@ function appVersion() {
54611
54611
  return resolveVersion({
54612
54612
  isSea: isSea2(),
54613
54613
  sqVersionXml: readSqVersionXml(),
54614
- define: true ? "0.125.0" : void 0,
54614
+ define: true ? "0.125.1" : void 0,
54615
54615
  pkgVersion: readPkgVersion()
54616
54616
  });
54617
54617
  }
@@ -54627,7 +54627,7 @@ function resolveChannel(s) {
54627
54627
  function appChannel() {
54628
54628
  return resolveChannel({
54629
54629
  isSea: isSea2(),
54630
- define: true ? "0.125.0" : void 0,
54630
+ define: true ? "0.125.1" : void 0,
54631
54631
  // argv[1] is the entry the runtime actually loaded (…/dist/floless-server.cjs), which is what
54632
54632
  // carries the npx cache prefix. Absent under the SEA exe, which never reaches the npx branch.
54633
54633
  modulePath: process.argv[1]
@@ -57734,8 +57734,8 @@ function clearProjectThumbnail(id) {
57734
57734
  return removed;
57735
57735
  }
57736
57736
  function exportFilename(name) {
57737
- const clean = name.replace(/[^a-z0-9\-_. ]+/gi, " ").replace(/\s+/g, " ").trim().slice(0, 60);
57738
- return clean || "project";
57737
+ const clean2 = name.replace(/[^a-z0-9\-_. ]+/gi, " ").replace(/\s+/g, " ").trim().slice(0, 60);
57738
+ return clean2 || "project";
57739
57739
  }
57740
57740
  function suggestedProjectArchiveFilename(name) {
57741
57741
  return `${exportFilename(name)}.floless.zip`;
@@ -60178,8 +60178,8 @@ function sanitizeRecipe(raw) {
60178
60178
  }
60179
60179
  }
60180
60180
  if (!gridCountsInteger(params)) return void 0;
60181
- const clean = { ...params, ...neutral };
60182
- return Object.keys(clean).length ? { kind: r.kind, params: clean } : void 0;
60181
+ const clean2 = { ...params, ...neutral };
60182
+ return Object.keys(clean2).length ? { kind: r.kind, params: clean2 } : void 0;
60183
60183
  }
60184
60184
  if (r.kind === "shear-plate") {
60185
60185
  const params = {};
@@ -60199,8 +60199,8 @@ function sanitizeRecipe(raw) {
60199
60199
  const regHi = Math.max(edgeU, w - edgeU), regLo = Math.min(12.7 + edgeU, regHi);
60200
60200
  if (Math.min(params.boltColPitch, (regHi - regLo) / (cols - 1)) < 2 * params.boltDia) return void 0;
60201
60201
  }
60202
- const clean = { ...params, ...neutral };
60203
- return Object.keys(clean).length ? { kind: r.kind, params: clean } : void 0;
60202
+ const clean2 = { ...params, ...neutral };
60203
+ return Object.keys(clean2).length ? { kind: r.kind, params: clean2 } : void 0;
60204
60204
  }
60205
60205
  return Object.keys(num6).length ? { kind: r.kind, params: num6 } : void 0;
60206
60206
  }
@@ -60710,8 +60710,24 @@ var MODEL_V2_TOL = Object.freeze({
60710
60710
  // ...and above this is refused: beyond drafting drift = a different grid
60711
60711
  ROTATION_REFUSE_DEG: 0.05,
60712
60712
  // secondary ceiling (the binding gate is induced displacement)
60713
- SCALE_REFUSE_FRAC: 2e-3
60713
+ SCALE_REFUSE_FRAC: 2e-3,
60714
60714
  // secondary ceiling, 0.2%
60715
+ // How far a HAND-READ registration control may land from the grid intersection it names. These two are
60716
+ // in DISPLAY POINTS, and that unit is the whole point (#590): a sheet's display px are PDF points —
60717
+ // 1/72" of the PRINTED drawing — so a tolerance stated in them means the same thing at every drawing
60718
+ // scale and on every size of building, which a tolerance in mm does not. At 1/4"=1'-0" one point is
60719
+ // 33.87 mm on the ground, so judging a pixel pick by the 6.35 mm de-dup distance demanded 0.19 pt of
60720
+ // reading accuracy and refused every photographed drawing ever read.
60721
+ //
60722
+ // They bound the pick, NOT the registration: the transform is fitted from the grid, so a pick within
60723
+ // tolerance moves nothing. What they bound is the evidence — the picks are the only measurement that
60724
+ // sees the drawing at all, and so the only check on `grid.origin` and `pt_per_ft`. Two picks a
60725
+ // baseline apart therefore bound a scale error to ±(REFUSE_PT / baselinePt), which is why the reader
60726
+ // skill tells the AI to choose the FURTHEST intersection: a longer baseline is a better measurement.
60727
+ CONTROL_CHECK_REPORT_PT: 2,
60728
+ // 1/36" on the printed sheet — past ordinary reading error, worth saying
60729
+ CONTROL_CHECK_REFUSE_PT: 9
60730
+ // 1/8" on the printed sheet — nobody misses a grid bubble by this much
60715
60731
  });
60716
60732
  function isUnknownElev(e) {
60717
60733
  return !!e && e.unknown === true;
@@ -60913,6 +60929,8 @@ function remapPropLabels(v1, ctx) {
60913
60929
  const placement = enumOr(p.placement, ["start", "mid", "end"], "$.prop_labels.placement", issues);
60914
60930
  if (placement) out.placement = placement;
60915
60931
  if (typeof p.selected_only === "boolean") out.selected_only = p.selected_only;
60932
+ if (typeof p.vis2d === "boolean") out.vis2d = p.vis2d;
60933
+ if (typeof p.vis3d === "boolean") out.vis3d = p.vis3d;
60916
60934
  const ids = [];
60917
60935
  for (const raw of arr2(p.ids)) {
60918
60936
  const id = str2(raw);
@@ -61405,6 +61423,18 @@ function sheetPointsLocalMm(plan, f) {
61405
61423
  function rootDatumAuthored(v1) {
61406
61424
  return isObj2(v1) && v1.datum !== void 0 && v1.datum !== null;
61407
61425
  }
61426
+ function toSheetPx(f, p) {
61427
+ return [clean(f.originPx[0] + p[0] / f.k), clean(f.originPx[1] - p[1] / f.k)];
61428
+ }
61429
+ function clean(n) {
61430
+ const q = Math.round(n * 1e9) / 1e9;
61431
+ return Object.is(q, -0) ? 0 : q;
61432
+ }
61433
+ function inverseSimilarity(t, w) {
61434
+ const c = Math.cos(t.rotationRad) / t.scale, s = Math.sin(t.rotationRad) / t.scale;
61435
+ const dx = w[0] - t.translation[0], dy = w[1] - t.translation[1];
61436
+ return [dx * c + dy * s, -dx * s + dy * c];
61437
+ }
61408
61438
  function registerSheets(v1, boot) {
61409
61439
  const issues = [];
61410
61440
  const registrations = [];
@@ -61416,15 +61446,13 @@ function registerSheets(v1, boot) {
61416
61446
  const xs = samples.filter((s) => s.dir === "x").sort((a, b) => a.modelMm - b.modelMm);
61417
61447
  const ys = samples.filter((s) => s.dir === "y").sort((a, b) => a.modelMm - b.modelMm);
61418
61448
  if (!f || xs.length < 2 || ys.length < 2) {
61419
- registrations.push({ sheet, verdict: "refuse", reasons: ["insufficient-axis-labels"], source: "grid-bootstrap", transform: null });
61449
+ registrations.push({ sheet, verdict: "refuse", reasons: ["insufficient-axis-labels"], controlCheck: null, derivedControls: null, transform: null });
61420
61450
  continue;
61421
61451
  }
61422
61452
  const nodes = xs.flatMap((x) => ys.map((y) => ({ local: [x.localMm, y.localMm], world: [x.modelMm, y.modelMm] })));
61423
61453
  const d1 = toLocalMm(f, p.datum_at), d2 = toLocalMm(f, p.control2_at);
61424
61454
  const r1 = intersectionRef(p.datum_ref), r2 = intersectionRef(p.control2_ref);
61425
- let controls = [];
61426
- let extra = [];
61427
- let source = "grid-bootstrap";
61455
+ let authored = [];
61428
61456
  const worldOf = (ref) => {
61429
61457
  const x = xs.find((s) => s.label === ref.x), y = ys.find((s) => s.label === ref.y);
61430
61458
  return x && y ? [x.modelMm, y.modelMm] : null;
@@ -61445,11 +61473,8 @@ function registerSheets(v1, boot) {
61445
61473
  }
61446
61474
  const w1 = r1.state === "valid" ? worldOf(r1) : datumFailed ? null : [0, 0];
61447
61475
  const w2 = worldOf(r2);
61448
- if (w1 && w2) {
61449
- controls = [{ local: d1, world: w1 }, { local: d2, world: w2 }];
61450
- extra = nodes;
61451
- source = "authored";
61452
- } else if (!(r1.state === "absent" && datumFailed)) {
61476
+ if (w1 && w2) authored = [{ local: d1, world: w1, key: "datum_at" }, { local: d2, world: w2, key: "control2_at" }];
61477
+ else if (!(r1.state === "absent" && datumFailed)) {
61453
61478
  const failing = [!w1 ? `datum_ref (${spell(r1, "datum_ref")})` : null, !w2 ? `control2_ref (${spell(r2, "control2_ref")})` : null].filter(Boolean).join(" and ");
61454
61479
  issues.push({ code: "control-ref-unresolved", severity: "decision", sheet, message: `sheet "${sheet}" names a control that does not resolve to model grid axes \u2014 ${failing}; the label bootstrap is proposed instead and must be confirmed` });
61455
61480
  }
@@ -61458,18 +61483,16 @@ function registerSheets(v1, boot) {
61458
61483
  } else if (d1 || d2 || r1.state === "valid" || r2.state === "valid") {
61459
61484
  issues.push({ code: "control-incomplete", severity: "decision", sheet, message: `sheet "${sheet}" carries only part of an authored control pair; the label bootstrap is proposed instead and must be confirmed` });
61460
61485
  }
61461
- if (source === "grid-bootstrap") {
61462
- let fit = [0, 1], span = -1;
61463
- for (let i = 0; i < nodes.length; i++) for (let j = i + 1; j < nodes.length; j++) {
61464
- const d = Math.hypot(nodes[j].world[0] - nodes[i].world[0], nodes[j].world[1] - nodes[i].world[1]);
61465
- if (d > span) {
61466
- span = d;
61467
- fit = [i, j];
61468
- }
61486
+ let fit = [0, 1], span = -1;
61487
+ for (let i = 0; i < nodes.length; i++) for (let j = i + 1; j < nodes.length; j++) {
61488
+ const d = Math.hypot(nodes[j].world[0] - nodes[i].world[0], nodes[j].world[1] - nodes[i].world[1]);
61489
+ if (d > span) {
61490
+ span = d;
61491
+ fit = [i, j];
61469
61492
  }
61470
- controls = [nodes[fit[0]], nodes[fit[1]]];
61471
- extra = nodes.filter((_, i) => i !== fit[0] && i !== fit[1]);
61472
61493
  }
61494
+ const controls = [nodes[fit[0]], nodes[fit[1]]];
61495
+ const extra = nodes.filter((_, i) => i !== fit[0] && i !== fit[1]);
61473
61496
  const xLo = xs[0], xHi = xs[xs.length - 1], yLo = ys[0], yHi = ys[ys.length - 1];
61474
61497
  const axesVec = {
61475
61498
  localX: [xHi.localMm - xLo.localMm, 0],
@@ -61491,9 +61514,40 @@ function registerSheets(v1, boot) {
61491
61514
  max: [Math.max(...allPts.map((q) => q[0])), Math.max(...allPts.map((q) => q[1]))]
61492
61515
  };
61493
61516
  const res = registerSheet({ controls, axes: axesVec, samples: extra, bounds });
61494
- registrations.push({ sheet, verdict: res.verdict, reasons: res.reasons, source, transform: res.transform });
61495
- if (res.verdict === "refuse") issues.push({ code: "sheet-registration-refused", severity: "block", sheet, message: `sheet "${sheet}" cannot be registered onto the model frame: ${res.reasons.join(", ")}` });
61496
- else if (res.verdict === "report") issues.push({ code: "sheet-registration-report", severity: "report", sheet, message: `sheet "${sheet}" registers with reservations: ${res.reasons.join(", ")}` });
61517
+ let verdict = res.verdict, reasons = res.reasons, transform4 = res.transform;
61518
+ let controlCheck = null;
61519
+ let derivedControls = null;
61520
+ if (authored.length === 2 && transform4) {
61521
+ let worstPt = 0;
61522
+ const derived = {};
61523
+ for (const a of authored) {
61524
+ const q = applySimilarity(transform4, a.local);
61525
+ worstPt = Math.max(worstPt, Math.hypot(q[0] - a.world[0], q[1] - a.world[1]) / f.k);
61526
+ derived[a.key] = toSheetPx(f, inverseSimilarity(transform4, a.world));
61527
+ }
61528
+ controlCheck = { offsetPt: worstPt, offsetMm: worstPt * f.k };
61529
+ const say = `${worstPt.toFixed(2)} display pt (${(worstPt * f.k).toFixed(1)} mm on the ground)`;
61530
+ if (worstPt > MODEL_V2_TOL.CONTROL_CHECK_REFUSE_PT) {
61531
+ verdict = "refuse";
61532
+ reasons = [...reasons, "control-pick-off-grid"];
61533
+ transform4 = null;
61534
+ } else if (worstPt > MODEL_V2_TOL.CONTROL_CHECK_REPORT_PT) {
61535
+ issues.push({
61536
+ code: "control-off-grid",
61537
+ severity: "report",
61538
+ sheet,
61539
+ message: `sheet "${sheet}" registers, but its hand-read control points sit ${say} from the grid intersections they name. The sheet is positioned by its grid, so nothing has moved \u2014 this is how far the reading was out`
61540
+ });
61541
+ }
61542
+ if (verdict !== "refuse") derivedControls = derived;
61543
+ }
61544
+ registrations.push({ sheet, verdict, reasons, controlCheck, derivedControls, transform: transform4 });
61545
+ if (verdict === "refuse") {
61546
+ const why = reasons.includes("control-pick-off-grid") && controlCheck ? `cannot be registered onto the model frame: its hand-read control points sit ${controlCheck.offsetPt.toFixed(2)} display pt (${controlCheck.offsetMm.toFixed(1)} mm on the ground) from the grid intersections they name, past the ${MODEL_V2_TOL.CONTROL_CHECK_REFUSE_PT} pt (1/8" on the printed sheet) ceiling. Re-read datum_at/control2_at, or check this sheet's pt_per_ft and grid.origin \u2014 a wrong drawing scale looks exactly like this` : `cannot be registered onto the model frame: ${reasons.join(", ")}`;
61547
+ issues.push({ code: "sheet-registration-refused", severity: "block", sheet, message: `sheet "${sheet}" ${why}` });
61548
+ } else if (verdict === "report") {
61549
+ issues.push({ code: "sheet-registration-report", severity: "report", sheet, message: `sheet "${sheet}" registers with reservations: ${reasons.join(", ")}` });
61550
+ }
61497
61551
  }
61498
61552
  return { registrations, issues };
61499
61553
  }
@@ -61869,9 +61923,11 @@ var DISPOSITIONS = {
61869
61923
  placement: "copied",
61870
61924
  selected_only: "copied",
61871
61925
  ids: "transformed",
61872
- vis2d: "unmapped",
61873
- vis3d: "unmapped"
61874
- // real, and NOT in v2's closed prop_labels
61926
+ // Were `unmapped` while v2's closed prop_labels had no home for them, which meant migrating a
61927
+ // project silently turned its label chips off and reported the loss as a decision. v2 carries both
61928
+ // flags now (#614), so they cross like every other display key.
61929
+ vis2d: "copied",
61930
+ vis3d: "copied"
61875
61931
  },
61876
61932
  // Every one of these is blocked with the placement that carries it — see dims3d/detail_placements above.
61877
61933
  "$.detail_placements[]": { id: "blocked", sheet: "blocked", detailName: "blocked", anchorId: "blocked", pos: "blocked", u: "blocked", n: "blocked", rotZ: "blocked", size: "blocked", opacity: "blocked" }
@@ -62066,6 +62122,7 @@ function previewMigration(v1, ctx) {
62066
62122
  if (legacyProvenance) {
62067
62123
  issues.push({ code: "legacy-provenance-assumed", severity: "decision", message: `${legacyProvenance} record(s) carry no recognised source.kind; their observations are recorded as 'auto-read' because a steel.takeoff/v1 document is by definition reader output, but that assumption must be confirmed before commit` });
62068
62124
  }
62125
+ const derivedFor = (sheet, key) => reg2.registrations.find((r) => r.sheet === sheet)?.derivedControls?.[key];
62069
62126
  const plans = arr2(doc.plans).filter(isObj2).map((p) => {
62070
62127
  const sheet = str2(p.sheet) ?? "";
62071
62128
  const out = { sheet, viewKind: "plan", memberObservations: obsBySheet.get(sheet) ?? [] };
@@ -62101,7 +62158,7 @@ function previewMigration(v1, ctx) {
62101
62158
  }
62102
62159
  return;
62103
62160
  }
62104
- out[atKey] = at;
62161
+ out[atKey] = derivedFor(sheet, atKey) ?? at;
62105
62162
  if (parsed.state === "valid") out[refKey] = canonicalRef(parsed);
62106
62163
  };
62107
62164
  refPair(["datum_at", "datum_ref"]);
@@ -62455,11 +62512,11 @@ function planBlockerSummary(candidate, cap = 8) {
62455
62512
  return `plan-uneditable:${code} on ${sheets.length === 1 ? "sheet" : "sheets"} ${shown}${more}`;
62456
62513
  });
62457
62514
  }
62458
- function blockingIssueDetails(report, cap = 8) {
62515
+ function blockingIssueDetails(report, cap = 8, severity = "block", noun = "blocking issue(s)") {
62459
62516
  const byLine = /* @__PURE__ */ new Map();
62460
62517
  const order = [];
62461
62518
  for (const issue of report.issues) {
62462
- if (issue.severity !== "block") continue;
62519
+ if (issue.severity !== severity) continue;
62463
62520
  const sheet = typeof issue.sheet === "string" && issue.sheet.trim() ? issue.sheet.trim() : null;
62464
62521
  const path = typeof issue.path === "string" && issue.path.trim() ? issue.path.trim() : null;
62465
62522
  const parts = [sheet ? `sheet ${sheet}` : null, path].filter(Boolean);
@@ -62489,7 +62546,7 @@ function blockingIssueDetails(report, cap = 8) {
62489
62546
  const render = (row) => row.count > 1 ? `${row.line} (\xD7${row.count})` : row.line;
62490
62547
  if (ordered.length <= cap) return ordered.map(render);
62491
62548
  const cut = ordered.slice(cap).reduce((n, row) => n + row.count, 0);
62492
- return [...ordered.slice(0, cap).map(render), `and ${cut} more blocking issue(s)`];
62549
+ return [...ordered.slice(0, cap).map(render), `and ${cut} more ${noun}`];
62493
62550
  }
62494
62551
  function migrationBlockingCodes(report, candidate) {
62495
62552
  const projectionCodes = planBlockers(candidate).map((b) => `plan-uneditable:${b.code}`);
@@ -68963,7 +69020,9 @@ function registerRevisionRoutes(app) {
68963
69020
  const version2 = listVersions(project.id).find((row) => row.n === committed.versionN);
68964
69021
  broadcast(contractChangedWithReason(project.app, project.id, "revision-read"));
68965
69022
  deleteRequest(request.id);
68966
- return { ok: true, version: version2, contractType: STEEL_V2 };
69023
+ const notes = blockingIssueDetails(committed.report, 8, "report", "note(s)");
69024
+ if (notes.length) req.log.info({ project: project.id, notes: blockingIssueDetails(committed.report, 1e3, "report", "note(s)") }, "first read committed with notes");
69025
+ return { ok: true, version: version2, contractType: STEEL_V2, ...notes.length ? { notes } : {} };
68967
69026
  } catch (error) {
68968
69027
  if (error instanceof ContractTransactionError) {
68969
69028
  const expectedRace = error.code === "contract-changed" || error.code === "history-already-exists";
@@ -662,11 +662,13 @@
662
662
  "propLabels": {
663
663
  "type": "object",
664
664
  "additionalProperties": false,
665
- "description": "Draft-only display state. CLOSED because `ids` holds member ids that identity migration must remap.",
665
+ "description": "Draft-only display state. CLOSED because `ids` holds member ids that identity migration must remap — closed to keep IDS accountable, never to withhold display state, which is why the two visibility flags below belong here rather than in a browser-local store (#614).",
666
666
  "properties": {
667
667
  "props": { "type": "array", "items": { "type": "string" }, "description": "Checked property registry keys to show as labels." },
668
668
  "placement": { "enum": ["start", "mid", "end"] },
669
669
  "selected_only": { "type": "boolean" },
670
+ "vis2d": { "type": "boolean", "description": "Show the label chips on the 2D plan. ABSENT MEANS ON — the default the MIGRATED case needs: v1 stores these flags, but only once its editor has saved, so a v1 document whose user never touched the toggle carries neither and migration has nothing to hand across. Reading that as 'off' would convert a project into one whose ticked properties draw nothing. (Not a claim about existing v2 documents: those had the feature disabled outright, and this is what turns it on.) The property SELECTION (`props`) stays shared across 2D and 3D — only show/hide is per view." },
671
+ "vis3d": { "type": "boolean", "description": "Show the label chips in the 3D view. Absent means on, for the same reason as vis2d." },
670
672
  "ids": { "type": "array", "items": { "type": "string", "minLength": 1 }, "description": "Member ids the labels pin to, used only when selected_only is true." }
671
673
  }
672
674
  },
@@ -2,7 +2,7 @@
2
2
  name: floless-app-steel-takeoff
3
3
  description: Read a structural steel drawing into an editable steel.takeoff/v1 contract in floless.app — the "Steel Takeoff" reader. Triggers on a pending floless `rebake` request for the `steel-model` app (queued from its "Re-read & re-bake ▸" button), or asks like "read this framing plan into a takeoff", "turn this structural drawing into a takeoff", "bake my drawing into steel-model", "extract members from this PDF". Teaches the host AI to READ a steel drawing (PDF/image) with its own vision at COMPOSE time, build a steel.takeoff/v1 contract (members + profiles + elevations + weights from AISC lookup), write it to the contract store, and hand control to the editor — no model in the run path, no API key.
4
4
  metadata:
5
- version: 0.16.2
5
+ version: 0.17.0
6
6
  ---
7
7
 
8
8
  # Steel Takeoff — read a drawing into a steel.takeoff/v1 contract
@@ -488,12 +488,52 @@ Same flat shape as the datum above — a point plus which intersection it is:
488
488
  - Do NOT ask the user for this one — unlike the datum, it is not a project decision. It is a second
489
489
  reading of something already printed, so read it.
490
490
 
491
- - **Any intersection is a valid datum** — verified: the choice moves registration by under 1 mm. Pick
492
- one for the model and prefer it on every sheet that prints it, because a shared datum makes the set
493
- easiest to reason about. But sheets do NOT have to agree: `planTransform` resolves each sheet's own
494
- `datum_ref` against the model grid, so a sheet that cannot print the chosen intersection may name a
495
- different one and still register correctly. (An earlier version of this line said every sheet must use
496
- the same one, which contradicted the `datum_ref` mechanism three paragraphs above.)
491
+ - **Any intersection is a valid datum.** Pick one for the model and prefer it on every sheet that prints
492
+ it, because a shared datum makes the set easiest to reason about. But sheets do NOT have to agree:
493
+ `planTransform` resolves each sheet's own `datum_ref` against the model grid, so a sheet that cannot
494
+ print the chosen intersection may name a different one and still register correctly. (An earlier
495
+ version of this line said every sheet must use the same one, which contradicted the `datum_ref`
496
+ mechanism three paragraphs above. It also said "the choice moves registration by under 1 mm" — true of
497
+ the translation, and silent about the check below, which is the thing that actually refuses.)
498
+
499
+ ### What the two controls are FOR — and how accurately to read them
500
+
501
+ **The sheet is positioned by its own printed grid, not by your two picks.** Its grid spacings already
502
+ place every labelled intersection, so the server registers the sheet by matching that grid to the model
503
+ grid, and your `datum_at`/`control2_at` are **checked against it**. Two consequences worth knowing:
504
+
505
+ - **Ordinary reading error costs nothing.** A pick a pixel or three off the bubble does not move a single
506
+ member. Read them carefully, but do not agonise, and never invent a "cleaner" number.
507
+ - **They are the only thing that checks the sheet against the drawing.** The grid match compares one
508
+ spacing string with another; nothing in it can see `pt_per_ft` or `grid.origin`. Your two picks are the
509
+ one measurement that looks at the drawing, which is why a bad pair is refused rather than shrugged at.
510
+
511
+ The tolerance is stated in **display points — 1/72" of the printed sheet**, so it means the same thing at
512
+ every drawing scale:
513
+
514
+ | how far a pick lands from the intersection it names | what happens |
515
+ |---|---|
516
+ | under 2 pt (1/36" on paper) | nothing; ordinary reading |
517
+ | 2–9 pt | registers, and a `control-off-grid` note says how far out the reading was |
518
+ | over 9 pt (1/8" on paper) | **`sheet-registration-refused` with reason `control-pick-off-grid`** — the whole read fails |
519
+
520
+ **If a read is refused with `control-pick-off-grid`, do not just re-pick and retry.** Three different
521
+ faults produce it, and only one is the pick:
522
+
523
+ 1. **The pick is wrong** — you named `F/4` and clicked a different crossing. Re-read both points.
524
+ 2. **`pt_per_ft` is wrong for this sheet** — the commonest cause, because the picks and the grid then
525
+ disagree by a percentage rather than a wobble, and it grows with distance from the datum. Re-check the
526
+ sheet's stated drawing scale. Anything above about 0.4 % off will trip this.
527
+ 3. **`grid.origin` is wrong** — the grid you read is drawn in the wrong place on the sheet, so every
528
+ intersection is offset by the same amount. Check where the origin lands against a printed bubble.
529
+
530
+ The offset is printed in the message in both points and mm on the ground, so the size of the number tells
531
+ you which fault it is: a few points is a pick, tens of points over a long baseline is a scale.
532
+
533
+ **Pick `control2_at` as far from the datum as the sheet prints — this is why.** The two controls bound a
534
+ drawing-scale error to roughly ±(9 pt ÷ the baseline in points). A 2000 pt baseline catches a scale wrong
535
+ by 0.45 %; a 200 pt baseline only catches 4.5 %. Diagonally opposite corners are not a style preference,
536
+ they are a measurement.
497
537
  - Never guess a datum, and never substitute an unlabelled crossing. When a sheet prints no labelled
498
538
  intersection at all, see *Registration is mandatory* below — you cannot simply leave `datum_at` unset
499
539
  and continue.
@@ -1689,6 +1729,15 @@ Then post the contract against that id, exactly as step 3 above. Notes that bite
1689
1729
  (It is not rendered in the History table today — send it because it is the record, not for display.)
1690
1730
  - **The queue stamps the ledger head as the read's base.** If a version lands between the queue and the
1691
1731
  post, `revision-read` answers `409` — re-GET and re-read rather than retrying the same body.
1732
+ - **A `200` may carry `notes: string[]` — READ THEM.** A read can succeed and still have something to
1733
+ say. Each line is one thing the migration noticed, locating its sheet as data (`control-off-grid
1734
+ [sheet S-201]: …`), capped at eight with an `and N more note(s)` tail. The one to act on is
1735
+ **`control-off-grid`**: it means your two registration controls were read further off the
1736
+ intersections they name than a good reading allows, and it prints the offset in display points *and*
1737
+ mm on the ground. Nothing moved — the sheet is positioned by its grid — but the size of that number
1738
+ tells you what to fix: a few points is the pick, tens of points over a long baseline is the sheet's
1739
+ `pt_per_ft`. See *"What the two controls are FOR"* above for the whole table. Say it to the user
1740
+ rather than swallowing it; a note here is the only warning you get before the next read refuses.
1692
1741
  - **On an already-migrated `steel.model/v2` project the post does NOT commit.** A v2 document is
1693
1742
  *staged* for human review: the answer is `202` with `ok: true` — so check the STATUS, not `ok` — the
1694
1743
  request stays queued as `staged`, no version is minted, and nothing is written until the user
package/dist/web/app.css CHANGED
@@ -1813,7 +1813,11 @@
1813
1813
  .req-search { margin-bottom: 10px; flex: 0 0 auto; }
1814
1814
  /* Flexes against .modal.requests' 86vh cap rather than declaring its own 52vh — see the note
1815
1815
  there. min-height:0 is what lets a flex child actually shrink and scroll. */
1816
+ /* scroll-behavior lives here, not in revealRequestRow's scrollIntoView call: an omitted `behavior`
1817
+ defers to the scrolling box's computed value, so the CSS property stays the single source of
1818
+ truth and the reduced-motion override below is the only place that has to know about it. */
1816
1819
  .requests-list { display: flex; flex-direction: column; gap: 8px; flex: 1 1 auto; min-height: 0; overflow-y: auto; margin: 4px 0 2px;
1820
+ scroll-behavior: smooth;
1817
1821
  scrollbar-width: thin; scrollbar-color: var(--border-strong) transparent; }
1818
1822
  .requests-list::-webkit-scrollbar { width: 7px; }
1819
1823
  .requests-list::-webkit-scrollbar-thumb { background: var(--border-strong); border-radius: 7px; }
@@ -1821,6 +1825,12 @@
1821
1825
  .req-item {
1822
1826
  display: flex; gap: 10px; align-items: flex-start;
1823
1827
  padding: 10px 12px; border: 1px solid var(--border); border-radius: 6px; background: var(--surface-2);
1828
+ /* revealRequestRow scrolls with block:'nearest', which otherwise lands the row flush against the
1829
+ scrollport edge — reading as clipped rather than as "here it is". Buys air for a MID-list
1830
+ target; for the last row it is clamped away (the list is already at maxScroll and there is
1831
+ nothing below to scroll past), which is fine — the modal's own padding sits under the
1832
+ scrollport there. */
1833
+ scroll-margin-block: 8px;
1824
1834
  }
1825
1835
  .req-info { flex: 1; min-width: 0; }
1826
1836
  .req-head { font-size: 12px; color: var(--text-dim); display: flex; align-items: center; gap: 6px; margin-bottom: 4px; }
@@ -1876,6 +1886,34 @@
1876
1886
  }
1877
1887
  .req-copy:hover { color: var(--text); background: var(--surface); }
1878
1888
  .req-del:hover { color: var(--err); border-color: var(--err); }
1889
+ /* Brief highlight for the SPECIFIC row "Open Requests" hands off to — the request the user just
1890
+ queued, which in an oldest-first list is at the bottom and usually below the fold.
1891
+ Reuses the .rtn-fired-flash TECHNIQUE (a background fade back to the row's resting surface-2),
1892
+ recoloured to --accent: this says "this one is yours", where --ok is reserved for success/fired
1893
+ states (.rtn-status.ok, .node-done). Deliberately NOT the .req-pulse shake — that is a
1894
+ PERIPHERAL cue for the chip the user is not looking at; shaking content they are already
1895
+ staring at reads as alarm, not help. The requests chip entry point gets no flash at all,
1896
+ having no particular row in mind. */
1897
+ @keyframes req-target-flash {
1898
+ 0% { background: color-mix(in srgb, var(--accent) 20%, var(--surface-2)); }
1899
+ 100% { background: var(--surface-2); }
1900
+ }
1901
+ .req-item.req-target-flash { animation: req-target-flash 1.2s ease-out; }
1902
+ @media (prefers-reduced-motion: reduce) {
1903
+ .requests-list { scroll-behavior: auto; }
1904
+ /* A steady outline instead of the fade — NOT `animation: none` alone, which would leave these
1905
+ users with no cue at all: taken to a row they cannot pick out, which is the exact problem this
1906
+ feature exists to fix, and the reveal marks the cue delivered either way. What is suppressed
1907
+ here is a background fade, not motion — nothing reduced-motion guidance targets — so keeping a
1908
+ static form costs those users nothing, and revealFlashTimer already strips the class at 1.2s.
1909
+ Same INTENT as .guide-beacon.is-new / .ws-card.is-new (hold a static form where the animation
1910
+ was) but deliberately NOT their technique: both use an outset ring, and an outset ring does not
1911
+ survive here. .requests-list is `overflow-y: auto`, so overflow-x computes to auto too, and
1912
+ .req-item stretches to the full scrollport with 0px of side slack — outset ink is clipped left
1913
+ and right, rendering as two horizontal rules with no sides or corners (measured, then seen).
1914
+ The row's own border is already inside the clip, so recolouring it gives the whole outline. */
1915
+ .req-item.req-target-flash { animation: none; border-color: var(--accent); }
1916
+ }
1879
1917
  /* Stands in for the ✕ on a lifecycle-owned request (knowledge-organize): it clears itself via its
1880
1918
  own finish/fail POST, so no manual clear is offered. Muted text, never a dead-looking button.
1881
1919
  Wraps rather than truncating — a clipped explanation explains nothing. */