@floless/app 0.134.1 → 0.134.3

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.
@@ -28,8 +28,9 @@
28
28
  Note what is NOT here: modifier legends (Shift=straight, Alt=no snap), live
29
29
  counts, and axis-lock state. Those are affordance detail about the surface,
30
30
  not narration of the command's step, and they stay beside the surface that
31
- owns them. The producer appends the cancel route, so "Esc to cancel" is not
32
- repeated on 28 entries.
31
+ owns them. The producer appends the escape route, so "Esc to cancel" is not
32
+ repeated on 28 entries — a command whose Esc does something else names it once
33
+ with `escLabel`.
33
34
  ────────────────────────────────────────────────────────────────────────── */
34
35
  (function () {
35
36
  'use strict';
@@ -288,13 +289,23 @@
288
289
 
289
290
  def('steel.pick-profile', {
290
291
  label: 'Pick a profile',
291
- actsOn: 'Takes the profile from the member you click',
292
+ actsOn: 'Takes the designation from a profile label on the active drawing',
292
293
  group: 'In the Inspect panel',
293
294
  persistence: 'working',
294
295
  interaction: 'mode',
295
296
  risk: [],
296
297
  guidance: 'active-command',
297
- steps: ['Click the member to take the profile from'],
298
+ steps: ['Choose a highlighted profile label by click, Enter, or Space'],
299
+ });
300
+
301
+ def('steel.apply-profile-label', {
302
+ label: 'Apply profile {instance}',
303
+ actsOn: 'Replaces the selected member’s profile with {instance}',
304
+ group: 'On the drawing canvas',
305
+ persistence: 'working',
306
+ interaction: 'instant',
307
+ risk: [],
308
+ guidance: 'on-demand',
298
309
  });
299
310
 
300
311
  def('steel.pick-detail', {
@@ -319,6 +330,23 @@
319
330
  steps: ['Click the framing level to trim the base to'],
320
331
  });
321
332
 
333
+ def('steel.connection-members', {
334
+ label: 'Name the members this connection joins',
335
+ actsOn: 'Records which steel an imported connection sits on, so you are told when that steel moves',
336
+ group: 'On the steel canvas',
337
+ persistence: 'working',
338
+ interaction: 'mode',
339
+ risk: [],
340
+ guidance: 'active-command',
341
+ // Esc SKIPS: the geometry is already placed by the time this pick is armed, so it commits the
342
+ // connection with no members named rather than undoing anything.
343
+ escLabel: 'Esc to skip',
344
+ steps: [
345
+ 'Click each member this connection joins, then press Enter',
346
+ 'Press Enter to confirm, or keep clicking to add and remove members',
347
+ ],
348
+ });
349
+
322
350
  def('steel.insert-detail', {
323
351
  label: 'Place a detail',
324
352
  actsOn: 'Places the chosen detail where you click',
@@ -879,13 +907,13 @@
879
907
 
880
908
  def('steel.position-gizmo', {
881
909
  label: 'Position handle',
882
- actsOn: 'Shows a drag handle on the selected member for setting its Profile Position — and for moving its work points — in 3D',
910
+ actsOn: 'Shows a drag handle on the selected member for moving it and rolling its section in 3D',
883
911
  group: 'In the ⋯ menu — Display',
884
912
  persistence: 'local',
885
913
  interaction: 'instant',
886
914
  risk: [], // the toggle only SHOWS the handle; the consequence of dragging one is narrated in `why`, where a reader can act on it. `risk` is a closed vocabulary describing this command's own act.
887
915
  guidance: 'on-demand',
888
- why: 'Turns on a Tekla-style handle at the selected member’s start point, with two families of grip. The INNER three set the Profile Position — the profile’s place on a reference line that does not move: drag the blue arrow for the depth offset, the green arrow for the width offset, the red arc for the rotation, all read in the Edit frame shown above Profile Position and identical to what the Inspect panel sets. The OUTER three move the reference line itself, which moves the steel: the red arrow along the member slides BOTH work points at once (the length never changes), the blue arc swings the member in plan about its start point, and the green arc tilts it up or down — in both swings only the far end moves. Because those three move the member, the connections framing into it are re-checked when you let go: one whose supporting member has moved away is removed, one that now frames into a different valid member is re-seated, and you are told in plain English which. A column offers only the slide, because a column stays plumb; a member that is already plumb offers no swing, because there is no direction to swing it from. Double-click any handle to type an exact value instead (it bypasses the snap, but not the geometry — a typed angle that would swing the member through plumb is refused rather than quietly rewritten). The handle works whatever coordinate system is active, and it hides the coordinate-system gizmo while it is up (and vice-versa) so their blue/green axes never clash. ¼" and 5° snaps apply unless you hold Shift, and Esc cancels a drag.',
916
+ why: 'Turns on a Tekla-style handle at the selected member’s start point. Five of its six grips MOVE THE MEMBER, and one turns its section. The three arrows translate the whole reference line — both work points together, so the length and the direction never change: blue along the section’s depth axis, green along its width axis, red along the member’s own axis. The two arcs re-aim it: the blue arc swings it in plan about its start point and the green arc tilts it up or down, and in both only the far end moves. The red arc rolls the section about the reference line, which is the Rotation the Inspect panel shows, read in the Edit frame named above Profile Position. Because every grip but the roll moves the member, the connections framing into it are re-checked when you let go: one whose supporting member has moved away is removed, one that now frames into a different valid member is re-seated, and you are told in plain English which. A column offers no swing, because a column stays plumb, and neither does a member that is already plumb — there is no direction to swing it from. The two Profile Position offsets — how far the profile sits off its own reference line — are set in the Inspect panel, not dragged; when one is set, a faint line from the amber start point to the section shows it. Double-click any grip to type an exact value instead (it bypasses the snap, but not the geometry — a typed angle that would swing the member through plumb is refused rather than quietly rewritten). The handle works whatever coordinate system is active, and it hides the coordinate-system gizmo while it is up (and vice-versa) so their blue/green axes never clash. ¼" and 5° snaps apply unless you hold Shift, and Esc cancels a drag.',
889
917
  });
890
918
 
891
919
  def('steel.show-property-labels', {
@@ -1049,7 +1077,7 @@
1049
1077
 
1050
1078
  def('steel.member-end-select-all', {
1051
1079
  label: 'Select all reviewed ends',
1052
- actsOn: 'Includes every actionable endpoint in the pending centerline extension',
1080
+ actsOn: 'Includes every endpoint whose support centerline is already chosen in the pending extension',
1053
1081
  group: 'In the Inspect panel',
1054
1082
  persistence: 'none',
1055
1083
  interaction: 'instant',
@@ -1568,7 +1596,7 @@
1568
1596
 
1569
1597
  def('steel.view-create', {
1570
1598
  label: 'Create views',
1571
- actsOn: 'Saves a view for every ticked grid line or level',
1599
+ actsOn: 'Saves a view for each ticked grid line or level whose cut intersects the model',
1572
1600
  group: 'In the Generate views dialog',
1573
1601
  persistence: 'working',
1574
1602
  interaction: 'instant',
@@ -1743,6 +1771,7 @@
1743
1771
  guidance: 'on-demand',
1744
1772
  why: 'How sure the automatic read of the drawing has to be before an element stops being flagged for review.',
1745
1773
  });
1774
+ def('steel.confidence-report', { label: 'Open confidence report', actsOn: 'Opens the recorded drawing-confidence review', group: 'In the steel editor header', persistence: 'none', interaction: 'instant', risk: [], guidance: 'on-demand', why: 'Shows current field-level read evidence without changing the model.' });
1746
1775
 
1747
1776
  /* Ask AI */
1748
1777
 
@@ -1855,7 +1884,17 @@
1855
1884
  def('steel.connection-delete', { label: 'Delete connection', actsOn: 'Removes the selected connection from the model', group: 'In the Inspect panel', persistence: 'working', interaction: 'instant', risk: [], guidance: 'on-demand', why: 'The member stays in place, and Undo restores the connection.' });
1856
1885
  def('steel.connection-favourite', { label: 'Save to Favourites', actsOn: 'Saves or edits the selected connection as a reusable favourite', group: 'In the Inspect panel', persistence: 'working', interaction: 'instant', risk: [], guidance: 'on-demand' });
1857
1886
  def('steel.connection-edit-member', { label: 'Edit connection parameters', actsOn: 'Selects the parent member where the connection parameters live', group: 'In the Inspect panel', persistence: 'none', interaction: 'instant', risk: [], guidance: 'on-demand' });
1887
+ def('steel.connection-sign-off', { label: 'Mark connection reviewed', actsOn: 'Records that this imported connection was checked against the steel it sits on now', group: 'In the Inspect panel', persistence: 'working', interaction: 'instant', risk: [], guidance: 'on-demand', why: 'This is a sign-off record rather than a model edit, so Ctrl+Z will not undo it — use Reopen review instead. It is refused if the model changed while it was being saved.' });
1888
+ def('steel.connection-reopen', { label: 'Reopen connection review', actsOn: 'Clears the sign-off so this connection asks to be checked again', group: 'In the Inspect panel', persistence: 'working', interaction: 'instant', risk: [], guidance: 'on-demand', why: 'It is offered only on a connection someone actually signed off, and like the sign-off it is a record rather than a model edit, so Ctrl+Z will not undo it.' });
1889
+ // ONE step, and an Esc that is true of it. This narrates the CROSSHAIR only: once the point is
1890
+ // accepted, `steel.connection-members` takes over and already owns "click each member … Esc to skip".
1891
+ // The first cut claimed both stages, so it promised two steps it never reached and an escLabel that
1892
+ // was false where it was shown — at the crosshair, Esc cancels and nothing has moved. (Found by review.)
1893
+ def('steel.connection-replace', { label: 'Place connection again', actsOn: 'Re-places this imported connection so what it joins can be recorded afresh', group: 'In the Inspect panel', persistence: 'working', interaction: 'mode', risk: [], guidance: 'active-command', steps: ['Click where the connection should sit'], escLabel: 'Esc cancels — nothing moves', why: 'This is the only way to start watching a connection that is not being watched. It stops being watched the moment it moves and starts again only once the members are named, so a re-placement that goes wrong leaves it unwatched rather than wrongly reported as checked.' });
1858
1894
  def('steel.connections-delete', { label: 'Delete connections', actsOn: 'Removes every selected connection from the model', group: 'In the Inspect panel', persistence: 'working', interaction: 'instant', risk: [], guidance: 'on-demand', why: 'Their parent members remain. Undo restores the whole selection.' });
1895
+ def('steel.review-list', { label: 'Connections needing review', actsOn: 'Lists the imported connections whose steel has moved since they were placed', group: 'In the steel editor header', persistence: 'none', interaction: 'instant', risk: [], guidance: 'on-demand', why: 'Listing them changes nothing in the model; picking one selects the steel it is watching.' });
1896
+ def('steel.untracked-list', { label: 'Connections not being watched', actsOn: 'Lists the imported connections that are not being watched for moved steel', group: 'In the steel editor header', persistence: 'none', interaction: 'instant', risk: [], guidance: 'on-demand', why: 'Every connection placed before this feature existed is untracked. It is not a fault.' });
1897
+ def('steel.review-select', { label: 'Select this connection', actsOn: 'Selects {instance} from the review list', group: 'In the review list', persistence: 'none', interaction: 'instant', risk: [], guidance: 'on-demand', why: 'A watched connection selects the members it watches; an unwatched one opens the 3D view and selects the connection itself.' });
1859
1898
  def('steel.connection-part-back', { label: 'Back to connection', actsOn: 'Selects the whole connection that owns this part', group: 'In the Inspect panel', persistence: 'none', interaction: 'instant', risk: [], guidance: 'on-demand' });
1860
1899
  def('steel.connection-part-edit', { label: 'Edit on parent member', actsOn: 'Selects the member that owns this connection part', group: 'In the Inspect panel', persistence: 'none', interaction: 'instant', risk: [], guidance: 'on-demand' });
1861
1900
  def('steel.quick-dimension-place', { label: 'Place spacing dimensions', actsOn: 'Arms a running dimension row for the current selection', group: 'In the Inspect panel', persistence: 'working', interaction: 'mode', risk: [], guidance: 'active-command', steps: ['Click where the spacing dimension row should sit'], why: 'The dimensions stay attached to the selected members or grid lines.' });
@@ -1865,7 +1904,7 @@
1865
1904
  def('steel.default-tos', { label: 'Default TOS', actsOn: 'Sets the project top-of-steel elevation for this sheet', group: 'In the Inspect panel', persistence: 'working', interaction: 'instant', risk: [], guidance: 'on-demand', why: 'Ends following the default move with it; explicit end elevations stay where they are.' });
1866
1905
  def('steel.ends-reset-default', { label: 'Reset all ends to default', actsOn: 'Makes every member end on this sheet follow the default TOS', group: 'In the Inspect panel', persistence: 'working', interaction: 'instant', risk: [], guidance: 'on-demand', why: 'This replaces explicit end elevations too. Undo restores them.' });
1867
1906
  def('steel.end-tos-default', { label: 'Use default TOS', actsOn: 'Turns default-following on or off for {instance}', group: 'In the Inspect panel', persistence: 'working', interaction: 'instant', risk: [], guidance: 'on-demand' });
1868
- def('steel.end-tos', { label: 'Top of steel', actsOn: 'Sets the top-of-steel elevation for {instance}', group: 'In the Inspect panel', persistence: 'working', interaction: 'instant', risk: [], guidance: 'on-demand', why: 'The field is locked while that end follows the project default.' });
1907
+ def('steel.end-tos', { label: 'Endpoint elevation', actsOn: 'Sets the explicit elevation for {instance}', group: 'In the Inspect panel', persistence: 'working', interaction: 'instant', risk: [], guidance: 'on-demand' });
1869
1908
  def('steel.end-elevation', { label: 'End elevation', actsOn: 'Sets the elevation for {instance}', group: 'In the Inspect panel', persistence: 'working', interaction: 'instant', risk: [], guidance: 'on-demand' });
1870
1909
  def('steel.end-note', { label: 'Connection note', actsOn: 'Sets the connection note for {instance}', group: 'In the Inspect panel', persistence: 'working', interaction: 'instant', risk: [], guidance: 'on-demand' });
1871
1910
  def('steel.end-detail', { label: 'Connection detail', actsOn: 'Sets the detail callout for {instance}', group: 'In the Inspect panel', persistence: 'working', interaction: 'instant', risk: [], guidance: 'on-demand' });
@@ -1922,6 +1961,7 @@
1922
1961
  def('steel.rfi-profile', { label: 'Resolve profile', actsOn: 'Sets the profile for unresolved member {instance}', group: 'In the RFI dialog', persistence: 'working', interaction: 'instant', risk: [], guidance: 'on-demand' });
1923
1962
  def('steel.locate-member', { label: 'Locate member', actsOn: 'Closes the report and selects {instance}', group: 'In the steel editor dialogs', persistence: 'none', interaction: 'instant', risk: [], guidance: 'on-demand' });
1924
1963
  def('steel.confidence-filter', { label: 'Confidence filter', actsOn: 'Filters the confidence report by {instance}', group: 'In the confidence report', persistence: 'none', interaction: 'instant', risk: [], guidance: 'on-demand' });
1964
+ def('steel.confidence-fields', { label: 'Review confidence fields', actsOn: 'Shows or hides every recorded drawing field for {instance}', group: 'In the confidence report', persistence: 'none', interaction: 'instant', risk: [], guidance: 'on-demand', why: 'Keeps the original value, percentage, and source visible without changing the model.' });
1925
1965
 
1926
1966
  /* ── Profile Position, in the Inspect panel ─────────────────────────── */
1927
1967
 
@@ -178,6 +178,10 @@
178
178
  risk: meta.risk || [],
179
179
  guidance: meta.guidance,
180
180
  steps: meta.steps || null,
181
+ // How you LEAVE this command. Defaulted by the narrators to 'Esc to cancel', which is right for
182
+ // every command that can be abandoned — but wrong, and misleading, for one whose Esc still
183
+ // commits something. A command that escapes differently says so once, here.
184
+ escLabel: meta.escLabel || null,
181
185
  why: meta.why || null,
182
186
  surface: currentSurface,
183
187
  tier: tierOf(meta),
@@ -0,0 +1,120 @@
1
+ /*
2
+ * connection-review-client.js — the client's review watermark: how one observation of the review state
3
+ * is ordered against the one already on screen, and when a refresh cycle is allowed to stop.
4
+ *
5
+ * WHY THIS IS A MODULE AND NOT INLINE IN steel-editor.html
6
+ * Because it is the part that was got wrong repeatedly, and inline code in that file cannot be unit
7
+ * tested. Five successive drafts of this rule shipped a hole during plan review, every one of them the
8
+ * same shape: someone enumerated the cases they could picture and a real one fell through. Pulling the
9
+ * decision out as a pure function makes the totality of it assertable, which is the only thing that
10
+ * actually stops the sixth hole.
11
+ *
12
+ * THE STATE BEING ORDERED IS A PAIR, NOT A COUNTER
13
+ * `reviewRevision` alone cannot order a summary. It moves only when the sidecar rows change
14
+ * (server/connection-review-transition.ts), while the summary is derived from live geometry — so an
15
+ * ordinary member move changes what the summary SAYS without moving the revision at all. Two different
16
+ * summaries can both be revision R. The identity of an observation is therefore the pair
17
+ * (storeRevision, reviewRevision), and ordering is a partial order over that pair, not a comparison.
18
+ */
19
+
20
+ /**
21
+ * One observation's identity. Both axes, always — see the header for why the revision alone cannot order.
22
+ * @typedef {{ storeRevision: number, reviewRevision: number }} ReviewAt
23
+ * @typedef {'equal' | 'advancing' | 'dominated' | 'incomparable'} ReviewShape
24
+ * @typedef {{ state: 'pending' | 'normal' | 'unavailable', retry: boolean, nextCycleBounds: ReviewAt | null }} CycleOutcome
25
+ */
26
+
27
+ /** The server's "could not derive this at all" sentinel. Never an ordinary generation. */
28
+ export const REVIEW_UNAVAILABLE_REVISION = -1;
29
+
30
+ /**
31
+ * How many fetches one dirty cycle may spend before it must conclude something.
32
+ *
33
+ * TWO, and the exact number matters less than the fact that there IS one. An earlier design said "keep
34
+ * trailing until the bounds are satisfied", which is only as terminal as the last enumeration of ways
35
+ * bounds can fail to be satisfied — and three review rounds each found a new one (a retained watermark
36
+ * under the -1 sentinel, a dominated pair after a lost sidecar, an equal pair below a raised bound).
37
+ * A counter is terminal by construction and does not care which of those it is looking at.
38
+ */
39
+ export const REVIEW_MAX_ATTEMPTS = 2;
40
+
41
+ /**
42
+ * True only for the derivation-failure sentinel. Revision 0 is a REAL generation — an empty sidecar.
43
+ * @param {number} reviewRevision
44
+ * @returns {boolean}
45
+ */
46
+ export function isUnavailableRevision(reviewRevision) {
47
+ return reviewRevision === REVIEW_UNAVAILABLE_REVISION;
48
+ }
49
+
50
+ const sign = (n) => (n < 0 ? -1 : n > 0 ? 1 : 0);
51
+
52
+ /**
53
+ * Classify an incoming pair against the one currently held. TOTAL over both axes.
54
+ *
55
+ * The nine (ds, dr) sign combinations partition completely into four shapes, so there is no fifth to
56
+ * discover later:
57
+ *
58
+ * equal (0,0) the same observation — common, because a quiet reconnect returns it
59
+ * advancing neither negative, at least one positive
60
+ * dominated neither positive, at least one negative (ONE OR BOTH axes lower)
61
+ * incomparable (+,-) and (-,+) one axis forward, the other back
62
+ *
63
+ * `dominated` is not hypothetical and is not announced by the -1 sentinel: readReviewFile answers an
64
+ * absent, unreadable or invalid sidecar with a VALID empty generation at revision 0 rather than throwing,
65
+ * so a client holding (S,R5) that loses its sidecar simply starts seeing (S,R0).
66
+ *
67
+ * @param {ReviewAt} incoming
68
+ * @param {ReviewAt} held
69
+ * @returns {ReviewShape}
70
+ */
71
+ export function classifyReviewPair(incoming, held) {
72
+ const ds = sign(incoming.storeRevision - held.storeRevision);
73
+ const dr = sign(incoming.reviewRevision - held.reviewRevision);
74
+ if (ds === 0 && dr === 0) return 'equal';
75
+ if (ds >= 0 && dr >= 0) return 'advancing';
76
+ if (ds <= 0 && dr <= 0) return 'dominated';
77
+ return 'incomparable';
78
+ }
79
+
80
+ /**
81
+ * Does `pair` reach the lower bounds a cycle captured? Both axes, or it has not caught up.
82
+ * @param {ReviewAt} pair
83
+ * @param {ReviewAt} bounds
84
+ * @returns {boolean}
85
+ */
86
+ export function satisfiesBounds(pair, bounds) {
87
+ return pair.storeRevision >= bounds.storeRevision && pair.reviewRevision >= bounds.reviewRevision;
88
+ }
89
+
90
+ /**
91
+ * Decide what a refresh cycle does next: retry, or conclude — and if it concludes, whether the surface
92
+ * it leaves behind is trustworthy.
93
+ *
94
+ * TWO PROPERTIES, TWO MECHANISMS, DELIBERATELY SEPARATE. Termination comes from `attempts` reaching
95
+ * REVIEW_MAX_ATTEMPTS. Not-losing-an-update comes from `arrivedAfterFinalAttempt` being handed to a
96
+ * fresh cycle instead of being cleared with this one. Every earlier draft loaded both properties onto a
97
+ * single rule and failed at one of them: first the satisfaction check (terminated only if the failure
98
+ * enumeration happened to be complete), then a bare counter (always terminated, but could silently drop
99
+ * a sign-off committed in another tab).
100
+ *
101
+ * The bounds check on settlement is what stops the second failure being invisible. A cycle that advanced
102
+ * a little but never reached its bounds has NOT caught up, and rendering its number as if it had is worse
103
+ * than admitting ignorance: nothing on screen would mark it stale, and no further trigger is guaranteed.
104
+ *
105
+ * @param {{ installed: ReviewAt, bounds: ReviewAt, attempts: number, arrivedAfterFinalAttempt?: ReviewAt | null }} input
106
+ * @returns {CycleOutcome}
107
+ */
108
+ export function settleCycle({ installed, bounds, attempts, arrivedAfterFinalAttempt = null }) {
109
+ if (attempts < REVIEW_MAX_ATTEMPTS && !satisfiesBounds(installed, bounds)) {
110
+ return { state: 'pending', retry: true, nextCycleBounds: null };
111
+ }
112
+ // A trigger that landed after the last attempt was already reading belongs to nobody yet. It must
113
+ // start its own cycle: this one cannot go back and look again, and clearing it would lose the event.
114
+ const nextCycleBounds = arrivedAfterFinalAttempt || null;
115
+ return {
116
+ state: satisfiesBounds(installed, bounds) ? 'normal' : 'unavailable',
117
+ retry: false,
118
+ nextCycleBounds,
119
+ };
120
+ }
@@ -217,7 +217,7 @@
217
217
  <button data-command-id="shell.attach-revision" type="button" id="ws-attach-revision" class="btn-mini" data-tip="Attach a revised drawing set (PDF or image) — your terminal AI reads it into a new version">⤒ Attach revised drawings…</button>
218
218
  <input data-command-id="shell.attach-revision" type="file" id="ws-revision-file" accept=".pdf,image/*" multiple hidden>
219
219
  </div>
220
- <div class="ws-revision-card" id="ws-revision-card" hidden></div>
220
+ <div class="ws-revision-card" id="ws-revision-card" role="status" aria-live="polite" aria-atomic="true" hidden></div>
221
221
  <!-- Two lazily-srced iframes so switching steps never reloads the editor's 3D state.
222
222
  Same-origin like #contract-editor-frame (they call /api/contract directly). -->
223
223
  <iframe id="ws-frame-model" class="ws-frame" title="Project model editor" hidden></iframe>
@@ -574,7 +574,12 @@
574
574
  <span class="menu-label" data-tip="Starts the FloLess server automatically when you sign in, so your browser reconnects on its own">Start on startup</span>
575
575
  <!-- The id sits on the label, not the checkbox it wraps: accessibleNameOf() reads the element
576
576
  the id is on, and the label is what carries the name here. Same shape as the 3D view
577
- toggles in the steel editor and the Drawing Filter's match-on rows (#779). -->
577
+ toggles in the steel editor (#779).
578
+ NOT the Drawing Filter's match-on rows any more: #805 Phase D moved those onto their
579
+ inputs, because Instructor's activate() focuses the carrier it finds and a <label> cannot
580
+ take focus, so pressing Enter from the ? sheet could never reach the control. This one is
581
+ unchanged only because that slice had no business editing this surface; the same move is
582
+ available here whenever someone owns it. -->
578
583
  <label class="rtn-toggle" data-command-id="shell.open-at-startup" aria-label="Start FloLess on startup">
579
584
  <input type="checkbox" id="startup-toggle" role="switch">
580
585
  <span class="rtn-toggle-track"></span>
@@ -721,7 +726,7 @@
721
726
  notion of grouped rows, per-bucket bulk actions, or re-rendering in place when the
722
727
  model moves underneath the review. Same backdrop, same .modal chrome — no new look.
723
728
  The counts line sits OUTSIDE .revreview-body so it stays pinned while the list scrolls. -->
724
- <div class="modal-backdrop" id="revreview-modal" role="dialog" aria-modal="true" aria-labelledby="revreview-title">
729
+ <div class="modal-backdrop" id="revreview-modal" role="dialog" aria-modal="true" aria-labelledby="revreview-title" aria-describedby="revreview-sub revreview-changed">
725
730
  <div class="modal revreview">
726
731
  <div class="modal-title" id="revreview-title">Review this read</div>
727
732
  <div class="modal-sub" id="revreview-sub"></div>
@@ -729,12 +734,28 @@
729
734
  <div class="rev-counts" id="revreview-counts"></div>
730
735
  <div class="revreview-body" id="revreview-body"></div>
731
736
  <div class="modal-actions">
732
- <button data-command-id="shell.dialog-cancel#the revision review" id="revreview-cancel">Cancel</button>
737
+ <button id="revreview-discard" data-command-id="shell.revision-discard-review-open" class="danger revreview-discard" hidden>Discard this read…</button>
738
+ <button data-command-id="shell.dialog-cancel#the revision review" id="revreview-cancel">Close</button>
733
739
  <button data-command-id="shell.revision-confirm" id="revreview-confirm" class="primary">Apply selected</button>
734
740
  </div>
735
741
  </div>
736
742
  </div>
737
743
 
744
+ <!-- Explicit staged-read discard confirmation. This is separate from the review's generic Close:
745
+ closing is always reversible; only the named danger action below deletes the staged generation. -->
746
+ <div class="modal-backdrop" id="revdiscard-modal" role="dialog" aria-modal="true"
747
+ aria-labelledby="revdiscard-title" aria-describedby="revdiscard-sub revdiscard-error">
748
+ <div class="modal revision-discard">
749
+ <div class="modal-title" id="revdiscard-title">Discard this drawing read?</div>
750
+ <div class="modal-sub" id="revdiscard-sub"></div>
751
+ <div class="revision-discard-error" id="revdiscard-error" role="alert" aria-live="assertive" hidden></div>
752
+ <div class="modal-actions">
753
+ <button id="revdiscard-cancel" data-command-id="shell.dialog-cancel#discarding the drawing read">Keep review</button>
754
+ <button id="revdiscard-confirm" data-command-id="shell.revision-discard-confirm" class="danger">Discard read</button>
755
+ </div>
756
+ </div>
757
+ </div>
758
+
738
759
  <!-- Approval is a mandatory review, never a one-click mutation. The server supplies every group
739
760
  and all plain-English copy; this surface only records an explicit decision for each group. -->
740
761
  <div class="modal-backdrop" id="approval-review-modal" role="dialog" aria-modal="true" aria-labelledby="approval-review-title" aria-describedby="approval-review-sub">
@@ -91,8 +91,11 @@
91
91
  }
92
92
 
93
93
  // Appended once here rather than repeated on every registration: how you get
94
- // out of an armed command is the producer's business, not each command's.
95
- parts.push('Esc to cancel');
94
+ // out of an armed command is the producer's business. A command whose Esc does
95
+ // something OTHER than cancel (it commits, say) overrides the wording with
96
+ // `escLabel` — the route is still appended here, only its name comes from the
97
+ // registry.
98
+ parts.push(meta.escLabel || 'Esc to cancel');
96
99
 
97
100
  return { tone: 'armed', chip: chip, parts: parts, ask: meta.label, commandId: id, surface: child.surface || 'shell' };
98
101
  }
@@ -251,7 +254,9 @@
251
254
  // provide a separate plain-English subject so `?` never reads implementation ids aloud.
252
255
  var narratedInstance = target.getAttribute('data-command-instance-label') || cmd.instance;
253
256
  return {
254
- label: cmd.meta.label || accessibleName(target),
257
+ label: cmd.meta.label
258
+ ? cmd.meta.label.replace(/\{instance\}/g, narratedInstance || 'the one you pick')
259
+ : accessibleName(target),
255
260
  acts: narratedInstance && cmd.meta.actsOn
256
261
  ? cmd.meta.actsOn.replace('{instance}', narratedInstance)
257
262
  : cmd.meta.actsOn || null,
@@ -504,10 +509,12 @@
504
509
  var parts = window.Commands.split ? window.Commands.split(raw) : null;
505
510
  if (!parts || parts.template !== cmd.id || !parts.instance || seen[raw]) return;
506
511
  seen[raw] = true;
512
+ var instanceLabel = el.getAttribute('data-command-instance-label') || accessibleName(el);
507
513
  found.push(Object.assign({}, cmd, {
508
514
  commandId: raw,
509
515
  instance: parts.instance,
510
- instanceLabel: el.getAttribute('data-command-instance-label') || accessibleName(el),
516
+ instanceLabel: instanceLabel,
517
+ label: cmd.label ? cmd.label.replace(/\{instance\}/g, parts.instance) : instanceLabel,
511
518
  originSurface: origin,
512
519
  }));
513
520
  });
@@ -575,17 +582,18 @@
575
582
  'In the Narrative panel', 'In the AI answers tab', 'In the node Inspect panel', 'In the Instructor strip',
576
583
  'In the ≡ menu', 'In the footer',
577
584
  'In the contract editor', 'In the report viewer', 'In the guide',
578
- 'In the agent library', 'In the requests list', 'In the run request dialog', 'In the Routines dialog',
585
+ 'In the agent library', 'In the requests list', 'In the revision review', 'In the run request dialog', 'In the Routines dialog',
579
586
  'In the Report an issue dialog', 'In the Build an agent dialog', 'In the Bake dialog',
580
587
  'In the FloLess dialogs',
581
588
  /* the steel editor — read top-left down, then the menus, then the dialogs.
582
589
  The ⋯ menu is six groups rather than one because it is six accordion
583
590
  sections on screen: a single 'In the ⋯ menu' would have been about thirty
584
591
  rows under one heading, which is a scroll rather than a list. */
585
- 'In the steel editor header', 'On the steel canvas', 'In the Copy panel', 'In the Copy array panel', 'On the 2D zoom bar',
592
+ 'In the steel editor header', 'On the steel canvas', 'On the drawing canvas', 'In the Copy panel', 'In the Copy array panel', 'On the 2D zoom bar',
586
593
  'In the 3D toolbar', 'In the 3D side panel', 'On the snap bar',
587
594
  'In the grid panel', 'In the Inspect panel',
588
595
  'In the Properties popup', 'In the snap override menu', 'In the dimension value popup', 'In the selection filter',
596
+ 'In the review list', // the connection-review popover — a sibling of the selection filter, and it hangs off the header stats above
589
597
  'In the ⋯ menu',
590
598
  'In the ⋯ menu — Snapping', 'In the ⋯ menu — Display', 'In the ⋯ menu — Detailing',
591
599
  'In the ⋯ menu — Model checks', 'In the ⋯ menu — Coordinate system', 'In the ⋯ menu — Session',
@@ -595,7 +603,7 @@
595
603
  // the drawing filter
596
604
  'In the Drawing Filter header', 'In a Drawing Filter message',
597
605
  'In the Drawing Filter panel', 'On the Drawing Filter canvas',
598
- 'In the Drawing Filter layer approval',
606
+ 'In the Drawing Filter exclusion approval',
599
607
  // the vector editor, and its 3D viewer
600
608
  'In the Trace header', 'In the Trace panel', 'On the Trace canvas',
601
609
  'In the Trace — 3D header', 'On the Trace — 3D view',
@@ -804,10 +812,20 @@
804
812
  /* FALLS THROUGH when the control cannot be described, rather than returning.
805
813
  focusFor() resolves upward through
806
814
  `closest('button, [role="button"], [role="treeitem"], a[href], input, select, textarea')`, and
807
- three registered commands carry their id on a <label> whose <input> is a
808
- DESCENDANT — filter.match-on and vector.show-kind — so the walk finds
809
- nothing and it returns null. (That shape is deliberate: the id sits on the
810
- label because that is what a screen reader names the control from.)
815
+ a registered command can carry its id on a <label> whose <input> is a
816
+ DESCENDANT, and SEVEN carriers across four templates still do:
817
+ shell.open-at-startup and shell.routine-enabled (index.html),
818
+ steel.show-labels and steel.work-plane-show (steel-editor.html),
819
+ vector.show-kind and vector.isolate-weak (vector-editor.html). For every one
820
+ of them `live.focus()` above quietly does nothing — a <label> is not
821
+ focusable — so this fall-through is the ONLY outcome those commands can
822
+ reach, and `?` describes them instead of going to them.
823
+ #805 Phase D moved the two steel-filter ones (filter.match-on,
824
+ filter.facet-toggle) off that shape and left the rest alone: they are other
825
+ surfaces, and moving them is not that slice's to do. Putting the id on the
826
+ input costs no accessible name — `accessibleNameOf` names a form control
827
+ from its wrapping label — and it is what makes Enter here actually go to the
828
+ control. The remaining seven are a known, recorded gap, not a design.
811
829
 
812
830
  Returning here on a null entry would have left the PREVIOUS entry standing,
813
831
  since setFocusEntry declines rather than assigning — reintroducing exactly
@@ -1812,29 +1812,123 @@ export function requiredDepthPin(member, before, after) {
1812
1812
  }
1813
1813
 
1814
1814
  /**
1815
- * A rigid slide of BOTH work points along the member's own axis: the reference line keeps its direction
1816
- * and its length, and simply moves along itself.
1815
+ * A rigid translation of BOTH work points along a unit `axis` by `deltaMm`: the reference line keeps its
1816
+ * direction and its length and simply moves. This is the shared primitive behind all three translate
1817
+ * handles — the member-axis slide (`axis = xAxis`) and, since the gizmo redesign, the depth and width
1818
+ * arrows, which move the LINE sideways rather than sliding the profile off it.
1817
1819
  *
1818
1820
  * It is NOT frame-preserving to the bit — the caller quantises each endpoint independently, which perturbs
1819
1821
  * the direction by ~1e-9 — so a commit must assert that `partFrame`'s BRANCH is stable, never that the
1820
1822
  * frame is unchanged. Near the degeneracy cone that perturbation can move a member OUT of the seeded
1821
1823
  * branch as easily as into it, and leaving the cone rebuilds a different section frame than the rigid
1822
- * preview showed.
1824
+ * preview showed. That is why `commitMemberEndpoints` gives every translate gesture the same
1825
+ * branch-stability policy, not just the axial one.
1823
1826
  *
1824
1827
  * @returns {{from:number[], to:number[]}|null} null on a non-finite input or a zero-length axis.
1825
1828
  */
1826
- export function slideEndpoints(from0, to0, xAxis, deltaMm) {
1827
- if (!finiteVec3(from0) || !finiteVec3(to0) || !finiteVec3(xAxis)) return null;
1829
+ export function translateEndpoints(from0, to0, axis, deltaMm) {
1830
+ if (!finiteVec3(from0) || !finiteVec3(to0) || !finiteVec3(axis)) return null;
1828
1831
  if (typeof deltaMm !== 'number' || !isFinite(deltaMm)) return null;
1829
- const l = len3(xAxis);
1832
+ const l = len3(axis);
1830
1833
  if (!(l > 0)) return null;
1831
- const d = [(xAxis[0] / l) * deltaMm, (xAxis[1] / l) * deltaMm, (xAxis[2] / l) * deltaMm];
1834
+ const d = [(axis[0] / l) * deltaMm, (axis[1] / l) * deltaMm, (axis[2] / l) * deltaMm];
1832
1835
  return {
1833
1836
  from: [from0[0] + d[0], from0[1] + d[1], from0[2] + d[2]],
1834
1837
  to: [to0[0] + d[0], to0[1] + d[1], to0[2] + d[2]],
1835
1838
  };
1836
1839
  }
1837
1840
 
1841
+ /**
1842
+ * The member-axis special case of `translateEndpoints`, kept as its own name because "slide" is the
1843
+ * gesture the tooltip, the readout and the commit's `gesture` field all say.
1844
+ */
1845
+ export function slideEndpoints(from0, to0, xAxis, deltaMm) {
1846
+ return translateEndpoints(from0, to0, xAxis, deltaMm);
1847
+ }
1848
+
1849
+ /**
1850
+ * A gesture that moves the reference line rigidly, so `partFrame`'s BRANCH must merely be KEPT rather
1851
+ * than required to be non-degenerate. Both translate gestures qualify — a translation changes neither the
1852
+ * member's direction nor its length, so a plumb column stays exactly as plumb as it started — while a
1853
+ * swing re-aims the member and must land on the ordinary branch. One predicate, so the editor's commit
1854
+ * policy and the tests can never spell the set two different ways.
1855
+ */
1856
+ export function directionPreservingGesture(gesture) {
1857
+ return gesture === 'slide' || gesture === 'translate';
1858
+ }
1859
+
1860
+ /**
1861
+ * The three handles that move the reference line WITHOUT re-aiming it: the member-axis slide and, since
1862
+ * the redesign, the depth and width arrows. `directionPreservingGesture` names the same property for the
1863
+ * COMMIT (`spec.gesture` is what reaches `commitMemberEndpoints`, and there a lateral move is spelled
1864
+ * 'translate'); this one names it for the DRAG, where the handle is still called by its own axis.
1865
+ */
1866
+ export function isTranslateGesture(gesture) {
1867
+ return gesture === 'depth' || gesture === 'width' || directionPreservingGesture(gesture);
1868
+ }
1869
+
1870
+ /**
1871
+ * The member's PROFILE axes: the part frame's width/depth turned by the authored roll about the member
1872
+ * axis. `rot` is measured +y toward +z (the same sense `positionSwingDelta` and the mesh preview use), so
1873
+ *
1874
+ * yRolled = y·cos r + z·sin r zRolled = −y·sin r + z·cos r
1875
+ *
1876
+ * The gizmo draws depth/width/roll on THESE, and the member-axis arrow plus both swing arcs on the
1877
+ * UNROLLED frame — because an elevation swing about a rolled y is not a tilt. Two frames, each carrying
1878
+ * the handles that are actually defined in it.
1879
+ */
1880
+ export function rolledProfileAxes(frame, rotDeg) {
1881
+ if (!frame || !finiteVec3(frame.y) || !finiteVec3(frame.z)) return null;
1882
+ const th = ((typeof rotDeg === 'number' && isFinite(rotDeg) ? rotDeg : 0) * Math.PI) / 180;
1883
+ const c = Math.cos(th), s = Math.sin(th);
1884
+ return {
1885
+ y: [frame.y[0] * c + frame.z[0] * s, frame.y[1] * c + frame.z[1] * s, frame.y[2] * c + frame.z[2] * s],
1886
+ z: [-frame.y[0] * s + frame.z[0] * c, -frame.y[1] * s + frame.z[1] * c, -frame.y[2] * s + frame.z[2] * c],
1887
+ };
1888
+ }
1889
+
1890
+ /**
1891
+ * The gizmo state as it stands PART-WAY THROUGH a gesture — the whole of "the gizmo tracks the member
1892
+ * while you drag it", in one pure function so it can be pinned in node rather than only in a browser.
1893
+ *
1894
+ * Before this existed neither drag handler touched the gizmo group at all: the handles re-anchored only
1895
+ * after the commit rebuilt the scene, so every gesture visibly left its own manipulator behind.
1896
+ *
1897
+ * translate (`depth` / `width` / `slide`) both work points move by `axis·value`; the axes are unchanged.
1898
+ * `rot` only the authored roll changes; the reference line does not move.
1899
+ * swings the far point and the whole part frame turn by `R(axis, value)`
1900
+ * about the anchor. `up` does NOT turn: it belongs to the
1901
+ * authoring basis, not to the member, so a tilt must not swing
1902
+ * the plan-swing arc's plane with it.
1903
+ *
1904
+ * @param {object} st the DRAG-START gizmo state (`memberPositionGizmoState`)
1905
+ * @param {string} gesture 'depth' | 'width' | 'slide' | 'rot' | 'swingPlan' | 'swingElev'
1906
+ * @param {number} value mm for a translate, degrees for `rot`, radians for a swing
1907
+ * @param {number[]} [axis] the translate axis / swing axis, when it is not derivable from `st` alone
1908
+ * @returns {object|null} a new state (never a mutation of `st`), or null when the input cannot be used
1909
+ */
1910
+ export function livePositionState(st, gesture, value, axis) {
1911
+ if (!st || !finiteVec3(st.anchor) || !finiteVec3(st.end)) return null;
1912
+ if (typeof value !== 'number' || !isFinite(value)) return null;
1913
+ // A roll turns the PROFILE frame and nothing else: the reference line is exactly where it was, which is
1914
+ // the whole point of rolling about it. `profile` is recomputed from the UNROLLED part axes, never
1915
+ // composed onto the previous profile, so a drag that sweeps back to zero lands back on the part frame.
1916
+ if (gesture === 'rot') return { ...st, rot: value, profile: rolledProfileAxes({ y: st.yAxis, z: st.zAxis }, value) };
1917
+ if (isTranslateGesture(gesture)) {
1918
+ const t = translateEndpoints(st.anchor, st.end, axis, value);
1919
+ return t ? { ...st, anchor: t.from, end: t.to } : null;
1920
+ }
1921
+ if (gesture !== 'swingPlan' && gesture !== 'swingElev') return null;
1922
+ const end = swingEndpoint(st.anchor, st.end, axis, value);
1923
+ if (!end) return null;
1924
+ const turn = (v) => (finiteVec3(v) ? swingEndpoint([0, 0, 0], v, axis, value) : v);
1925
+ const profile = st.profile && finiteVec3(st.profile.y) && finiteVec3(st.profile.z)
1926
+ ? { y: turn(st.profile.y), z: turn(st.profile.z) } : st.profile;
1927
+ // `up` is deliberately NOT turned — see the doc comment.
1928
+ return { ...st, end, xAxis: turn(st.xAxis), yAxis: turn(st.yAxis), zAxis: turn(st.zAxis), profile };
1929
+ }
1930
+
1931
+
1838
1932
  /**
1839
1933
  * The right-handed in-plane basis a swing measures its angle in: `e1` is the drag-start radius with the
1840
1934
  * rotation axis projected out, `e2 = axis x e1`, so `e1 x e2 = axis`. Measuring `atan2(d.e2, d.e1)` in THIS