@floless/app 0.124.1 → 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.
@@ -2,7 +2,7 @@
2
2
  name: floless-app-bridge
3
3
  description: This skill should be used when the user is driving the floless.app web UI (the local prompt-native front door at http://127.0.0.1:4317) and wants the terminal AI to act on what they did there — picking up queued Tweak requests, "use this template" requests, or the context of a node they selected/edited on the canvas. Use it when the user says things like "apply the tweak I just queued", "I clicked Tweak on the bom node — make that change", "pick up my floless request", "what queued requests are pending", or after they double-click/Tweak a node in the UI. ALSO use it the moment the user pastes a message that begins with a `[floless-request type=… id=…]` marker — that is a request copied from the FloLess Dashboard, NOT a literal instruction to run; resolve it via the API. It reads the floless.app local API, applies the change to the app's .flo, recompiles, and clears the request. Workspace approval, pending model changes, history/checkpoints, and export-source choices belong to floless-app-approval instead.
4
4
  metadata:
5
- version: 0.2.0
5
+ version: 0.3.0
6
6
  ---
7
7
 
8
8
  # floless.app ↔ terminal bridge
@@ -35,10 +35,13 @@ a literal instruction**:
35
35
 
36
36
  1. **Resolve it from the API, not the pasted text.** `GET /api/requests` and find the entry whose
37
37
  `id` matches the marker — that JSON is authoritative; the pasted line is only a summary.
38
- 2. **Apply it with the skill the marker names** (`ui-customize` → `floless-app-ui`;
39
- `tweak` / `use-template` → `floless-app-workflows`; `rebake` → `floless-app-rebake`). Use the
40
- **port from the marker** if it isn't 4317.
41
- 3. **`DELETE /api/requests/<id>`** when done.
38
+ 2. **Apply it with the skill the marker names.** The marker carries the routing, so you never have to
39
+ guess it — but the full type→skill table (all of them, with a plain-English line each) is in
40
+ **`floless-app-queue`** §2 if the marker is truncated or absent. Use the **port from the marker**
41
+ if it isn't 4317.
42
+ 3. **Finish it the way its type is finished** — for most types that is `DELETE /api/requests/<id>`,
43
+ but **two are lifecycle-owned and must NOT be deleted**. See "Clearing a request" below; the marker's
44
+ own wording tells you which kind you have.
42
45
 
43
46
  Do **not** run the pasted line as a shell command, and do **not** report a "missing file/path" as
44
47
  a bug — a path like `~/.floless/ui/extensions.json` is *created by the skill's own flow*, so its
@@ -53,8 +56,8 @@ running, the user starts it from the repo: `cd server && npm run dev` (or `npm r
53
56
 
54
57
  | Call | Purpose |
55
58
  |---|---|
56
- | `GET /api/requests` | List pending UI requests → `{ ok, requests: [...] }` |
57
- | `DELETE /api/requests/:id` | **Clear** a request once you've handled it |
59
+ | `GET /api/requests` | List the queued UI requests → `{ ok, requests: [...] }`. No status filter — a `failed` or `staged` row comes back with the `pending` ones |
60
+ | `DELETE /api/requests/:id` | **Clear** a request once you've handled it — for every type except the lifecycle-owned ones below |
58
61
  | `GET /api/app/:id` | The app's normalized topology + source + lock (selected-node context) |
59
62
  | `POST /api/tweak` | (UI uses this to enqueue; you usually only read/clear) |
60
63
 
@@ -72,6 +75,12 @@ running, the user starts it from the repo: `cd server && npm run dev` (or `npm r
72
75
  "template": { "name": "…", "node": { "agent": "tekla", "command": "…", "config": {…} } } }
73
76
  ```
74
77
 
78
+ Those are the two this skill authors directly. **The Dashboard queues several more**, each handled by
79
+ its own skill — deliberately not listed here, because a second copy of that list is how the first one
80
+ went stale. For the full set with a plain-English line and an owning skill each, read
81
+ **`floless-app-queue`** §2; for the field shapes, the `FlolessRequest` interface in
82
+ `server/floless-store.ts`, which is where the type union is actually declared.
83
+
75
84
  The **selected-node context** you need is carried *in the request* (`appId` + `nodeId`), so you do
76
85
  not need the UI's live selection — read that node's current source from the `.flo` to understand
77
86
  what to change.
@@ -80,14 +89,15 @@ what to change.
80
89
 
81
90
  ```dot
82
91
  digraph { "GET /api/requests" -> "for each pending" -> "read app .flo + node" ->
83
- "apply change (edit .flo)" -> "recompile + reinstall" -> "DELETE /api/requests/:id" }
92
+ "apply change (edit .flo)" -> "recompile + reinstall" -> "resolve it (DELETE, or its lifecycle POST)" }
84
93
  ```
85
94
 
86
95
  1. **Pull**: `curl -s http://127.0.0.1:4317/api/requests` → take the `pending` ones (oldest first).
87
96
  Summarize them for the user before acting on anything destructive. **When several are queued and
88
97
  the user wants to choose which to apply (not just the oldest), use the `floless-app-queue` skill** —
89
98
  it lists the queue in plain English and asks which to process, then routes each pick to the owning
90
- authoring skill (`floless-app-workflows` / `-tweak-contract` / `-ui` / `-rebake`).
99
+ authoring skill. Its §2 table is where the whole type→skill routing is written out in prose (the
100
+ authority itself is `REQUEST_SKILL` in `web/aware.js`, which that table restates).
91
101
  2. **Locate the app source.** The editable `.flo` is the repo copy `demos/<appId>/<appId>.flo`
92
102
  (preferred — it's version-controlled); the installed copy is `~/.aware/apps/<appId>/<appId>.flo`.
93
103
  Edit the **repo** copy. `GET /api/app/<appId>` returns the parsed nodes + each node's
@@ -101,15 +111,35 @@ digraph { "GET /api/requests" -> "for each pending" -> "read app .flo + node" ->
101
111
  4. **Recompile** so the UI's Run gate re-arms (it's gated on the lock's source-hash):
102
112
  reinstall from the dir + `aware app compile <appId>` from `~/.aware/apps` (full loop +
103
113
  gotchas live in `floless-app-workflows`).
104
- 5. **Clear the request** so it leaves the UI's queue:
105
- `curl -s -X DELETE http://127.0.0.1:4317/api/requests/<id>`. The UI's "requests" badge updates
106
- live over SSE.
114
+ 5. **Clear the request** so it leaves the UI's queue — see below; the verb depends on the type.
107
115
  6. **Verify** with a real run (the `verify`/Playwright standing rule) before reporting done.
108
116
 
117
+ ## Clearing a request — the verb depends on the type
118
+
119
+ For most types, clearing is the `DELETE`:
120
+
121
+ ```bash
122
+ curl -s -X DELETE http://127.0.0.1:4317/api/requests/<id> # the UI's "requests" badge updates live over SSE
123
+ ```
124
+
125
+ **These types are LIFECYCLE-OWNED, and a `DELETE` breaks them rather than completing them.** They are
126
+ resolved by their own POST, and the marker the Dashboard copies says so in its own wording:
127
+
128
+ | `type` | What resolves it | What a stray `DELETE` costs |
129
+ |---|---|---|
130
+ | `revision-read` | `POST /api/projects/<project>/revision-read` (that POST clears it), or `POST /api/projects/<project>/revision-requests/<id>/fail` when the set can't be read — that one marks the row `failed` rather than removing it, so the count staying up is the error card, not a leak. A `steel.model/v2` project answers **202 and stages** instead, leaving the request open until the user confirms it in the app; nothing shipped sets that state yet, so expect it rather than look for it. | the completion POST is refused **400** and the finished read is thrown away |
131
+ | `knowledge-organize` | `POST /api/projects/<project>/knowledge/requests/<id>/finish` (or `…/fail`) — after claiming the pass with `…/start` | the lock you took at `…/start` is only reclaimable after `LOCK_STALE_MS` (**10 minutes**), and the leftover `organize.json` leaves the Knowledge pane showing "Organizing…" with Organize **disabled indefinitely** |
132
+
133
+ This is the same per-type rule the UI encodes in `markedInstruction()`'s `clears` branch
134
+ (`web/aware.js`) — and the reason `clearAllRequests()` there refuses to include an organize in its
135
+ bulk clear. `floless-app-queue` §4 carries the same table.
136
+
109
137
  ## Guardrails
110
138
 
111
139
  - **You are the brain, the UI is not.** Never ask the UI to compose or mutate the `.flo`; it only
112
140
  queues intent. All authoring happens here, through the `.flo` + `aware` CLI.
113
141
  - Edit the **repo** `demos/<appId>/` source (tracked), then recompile into `~/.aware/apps/`.
114
- - Always **clear** a request after handling it, so the user's "requests" count reflects reality.
142
+ - Always **resolve** a request after handling it, so the user's "requests" count reflects reality —
143
+ by `DELETE` for most types, by the lifecycle POST for `revision-read` and `knowledge-organize`.
144
+ Never `DELETE` a lifecycle-owned one: it does not finish it, it strands it.
115
145
  - Don't invent node/command names — verify against the app's existing nodes (`GET /api/app/:id`).
@@ -2,7 +2,7 @@
2
2
  name: floless-app-queue
3
3
  description: This skill should be used when the user has MULTIPLE floless.app requests queued from the Dashboard and wants to see them and choose which to process, rather than the AI just picking up the oldest one. Use it when the user says things like "what's in my floless queue", "list my queued floless requests", "show me the pending requests and let me pick", "I queued a few tweaks — which should I apply?", "let me choose what to process", or "pick from the floless queue". It lists the pending requests from GET /api/requests in plain language (type, which app/node/project, the instruction), asks the user which one(s) to apply, then hands each chosen request to the owning skill (floless-app-workflows / -tweak-contract / -ui / -rebake / -onboarding / -new-workflow / -steel-takeoff / -vectorize / -knowledge) which applies it and clears it. It is the interactive picker that sits in front of floless-app-bridge (which is the actual pull-apply-clear engine).
4
4
  metadata:
5
- version: 0.2.0
5
+ version: 0.2.1
6
6
  ---
7
7
 
8
8
  # floless.app queue picker
@@ -83,7 +83,7 @@ current `.flo`/contract/panel, apply the change, recompile if needed — **and c
83
83
  curl -s -X DELETE http://127.0.0.1:4317/api/requests/<id> # the UI's "requests" badge updates live over SSE
84
84
  ```
85
85
 
86
- **Two types are LIFECYCLE-OWNED — never `DELETE` them.** They are resolved by their own POST, so a
86
+ **These types are LIFECYCLE-OWNED — never `DELETE` them.** They are resolved by their own POST, so a
87
87
  `DELETE` doesn't complete them, it breaks them:
88
88
 
89
89
  | `type` | What resolves it | What a stray `DELETE` costs |
@@ -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.1
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.
@@ -1171,7 +1211,7 @@ Important optional fields:
1171
1211
  {
1172
1212
  "id": "c1",
1173
1213
  "profile": "HSS6X6X3/8",
1174
- "wp": [[x,y0],[x,y1]],
1214
+ "wp": [[x,y],[x,y]], // BOTH work points are the SAME plan point — a column is a dot in plan
1175
1215
  "angle": "V",
1176
1216
  "role": "column",
1177
1217
  "rot": 0,
@@ -1205,7 +1245,14 @@ Key field rules:
1205
1245
  - **Endpoint direction (canonical order).** `wp[0]`/`ends[0]` is the member's **START** (drawn as a
1206
1246
  **yellow** dot in the editor); `wp[1]`/`ends[1]` is the **END** (drawn **magenta**). Always emit
1207
1247
  endpoints in a consistent direction so start/end read the same across the whole takeoff:
1208
- - **Columns** — bottom → top (start at the lower elevation): `wp`/`col` go `bos` (start) → `tos` (end).
1248
+ - **Columns** — bottom → top (start at the lower elevation): `col` goes `bos` (start) → `tos` (end).
1249
+ **A column's TWO WORK POINTS ARE THE SAME PLAN POINT** — `wp: [[x,y],[x,y]]`. The rise lives in
1250
+ `col.bos`/`col.tos` and nowhere else; `wp` says only *where the column stands*, and a column stands
1251
+ over one point. Emitting two different plan points describes a member that travels sideways as it
1252
+ rises, which no column can do — it is what a beam or a brace read as a column looks like, and the
1253
+ conversion to the model now stops and asks about every one of them (`column-plan-offset`). If the
1254
+ line you are reading really does run across the plan, it is a **beam** (`role: "beam"`, with
1255
+ `memberType: "brace"` if it braces), not a column with two points.
1209
1256
  - **Beams** in plan — **left → right** (start = smaller X); for a vertical-in-plan run, **bottom → up**
1210
1257
  (start = the lower end on the sheet, i.e. the **larger** display-Y since display Y grows downward).
1211
1258
  This is the on-screen reading direction (→ or ↑). It costs nothing to get right at authoring time and
@@ -1682,6 +1729,15 @@ Then post the contract against that id, exactly as step 3 above. Notes that bite
1682
1729
  (It is not rendered in the History table today — send it because it is the record, not for display.)
1683
1730
  - **The queue stamps the ledger head as the read's base.** If a version lands between the queue and the
1684
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.
1685
1741
  - **On an already-migrated `steel.model/v2` project the post does NOT commit.** A v2 document is
1686
1742
  *staged* for human review: the answer is `202` with `ok: true` — so check the STATUS, not `ok` — the
1687
1743
  request stays queued as `staged`, no version is minted, and nothing is written until the user
package/dist/web/app.css CHANGED
@@ -536,13 +536,17 @@
536
536
  .onb-foot { font-size: 12px; color: var(--text-muted); margin-top: 16px; line-height: 1.5; }
537
537
  /* Quiet secondary first-run action — an inline text button, NOT a second filled
538
538
  button, so "Start the guided tour" stays the dominant primary. Existing tokens only. */
539
- .onb-build-btn {
539
+ /* .ws-empty-tour-btn (the Workspaces first-run tour link, #598) rides on this selector rather than
540
+ copying its declarations: it is the same tier — a quiet inline text action that must stay
541
+ subordinate to a nearby primary — and one rule is what stops the two drifting apart. */
542
+ .onb-build-btn, .ws-empty-tour-btn {
540
543
  background: none; border: none; padding: 0; cursor: pointer;
541
544
  font-family: var(--ui); font-size: 12px; font-weight: 600; color: var(--accent);
542
545
  letter-spacing: 0.01em;
543
546
  }
544
- .onb-build-btn:hover { color: var(--accent-bright); text-decoration: underline; }
545
- .onb-build-btn:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 2px; }
547
+ .onb-build-btn:hover, .ws-empty-tour-btn:hover { color: var(--accent-bright); text-decoration: underline; }
548
+ .onb-build-btn:focus-visible, .ws-empty-tour-btn:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 2px; }
549
+ .onb-build-btn:disabled, .ws-empty-tour-btn:disabled { cursor: default; text-decoration: none; }
546
550
  /* "Start the guided tour" — the primary first-run action (copies the onboarding launch prompt).
547
551
  Accent-soft region + filled-accent button mirror the .agent-card.selected / #run-btn primary
548
552
  tier; all tokens existing (locked baseline — no new fonts/colors). */
@@ -550,7 +554,27 @@
550
554
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
551
555
  margin-top: 14px; padding: 11px 14px;
552
556
  background: var(--accent-soft); border: 1px solid var(--accent-dim); border-radius: 6px;
553
- }
557
+ /* Lets .onb-tour-manual take its own row when the clipboard was refused. It also lets the hint and
558
+ button stack once the row is too narrow for both, which the old nowrap squeezed instead. */
559
+ flex-wrap: wrap;
560
+ }
561
+ /* The clipboard-refused fallback: the prompt itself, on screen and selectable, because the message
562
+ tells the user to copy it manually and nothing else on either surface holds it. Themed like the
563
+ app's other read-only technical values (mono on surface-2) — never a native white control, and
564
+ with its own scrollbar themed because a textarea is a scroll container too. */
565
+ .onb-tour-manual {
566
+ display: block; width: 100%; flex-basis: 100%; margin-top: 10px; box-sizing: border-box;
567
+ background: var(--surface-2); border: 1px solid var(--border-strong); border-radius: 4px;
568
+ color: var(--text); font-family: var(--mono); font-size: 11px; line-height: 1.5; padding: 7px 9px;
569
+ /* resize:vertical, not none: two rows fits the prompt with very little margin, and a font
570
+ fallback or a user minimum-font-size pushes it to a third — which would otherwise scroll behind
571
+ a scrollbar with no way to open the box up. */
572
+ resize: vertical; scrollbar-width: thin; scrollbar-color: var(--border-strong) transparent;
573
+ }
574
+ .onb-tour-manual::-webkit-scrollbar { width: 9px; }
575
+ .onb-tour-manual::-webkit-scrollbar-thumb { background: var(--border-strong); border-radius: 9px; }
576
+ .onb-tour-manual::-webkit-scrollbar-track { background: transparent; }
577
+ .onb-tour-manual:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
554
578
  .onb-tour-hint { flex: 1; font-size: 11px; color: var(--text-dim); font-style: italic; line-height: 1.45; }
555
579
  .onb-tour-btn {
556
580
  flex: none; background: var(--accent); color: #ffffff; border: 1px solid var(--accent);
@@ -1760,15 +1784,63 @@
1760
1784
  #tooltip[hidden] { display: none; }
1761
1785
 
1762
1786
  /* ========== REQUESTS WINDOW ========== */
1763
- .modal.requests { width: 580px; max-width: 92vw; }
1764
- .requests-list { display: flex; flex-direction: column; gap: 8px; max-height: 52vh; overflow-y: auto; margin: 4px 0 2px; }
1787
+ /* Column layout with a viewport cap, mirroring #form-modal (#125): .modal declares no
1788
+ max-height and .modal-backdrop centres without overflow, so an over-tall modal is clipped at
1789
+ the TOP and its title becomes unreachable. The scope row + search box added ~90px of FIXED
1790
+ chrome above the list, which moves that threshold up by exactly that much — the list has to
1791
+ flex against the cap instead of carrying its own 52vh. */
1792
+ .modal.requests { width: 580px; max-width: 92vw; max-height: 86vh; display: flex; flex-direction: column; }
1793
+ /* Scope filter — the shared .tabs underline language, minus the uppercasing: this tab is
1794
+ labelled with a REAL name (an app id like `steel-model`, a project like "Cedar Mill
1795
+ Warehouse"), and uppercasing those misreads them. Long names ellipsize; the full name
1796
+ is on the tab's data-tip. */
1797
+ .req-scope { margin: 2px 0 12px; }
1798
+ /* `hidden` is a no-op without this. The UA's [hidden]{display:none} loses to .tabs{display:flex}
1799
+ on specificity, so `$scope.hidden = true` left the row on screen showing its UNRENDERED
1800
+ markup — a blank first tab and the literal "All" placeholder from index.html — whenever there
1801
+ was no scope to name (the Workspaces landing, or no workflow open). */
1802
+ .req-scope[hidden] { display: none; }
1803
+ /* The tab is a flex row, NOT one ellipsizing line, because the count is the trailing child:
1804
+ `text-overflow: ellipsis` clips the END, so a long project name would truncate away the very
1805
+ number that tells you how many requests the filter is hiding. The NAME ellipsizes; the count
1806
+ never shrinks. */
1807
+ .req-scope button { text-transform: none; letter-spacing: 0; font-size: 12px; padding: 8px 10px;
1808
+ min-width: 0; display: flex; align-items: baseline; justify-content: center; gap: 5px; }
1809
+ .req-scope button[data-reqscope="all"] { flex: 0 0 auto; }
1810
+ .req-scope .req-scope-name { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
1811
+ .req-scope .req-scope-n { color: var(--text-muted); font-variant-numeric: tabular-nums; flex: 0 0 auto; }
1812
+ .req-scope button.active .req-scope-n { color: var(--accent-dim); }
1813
+ .req-search { margin-bottom: 10px; flex: 0 0 auto; }
1814
+ /* Flexes against .modal.requests' 86vh cap rather than declaring its own 52vh — see the note
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. */
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;
1821
+ scrollbar-width: thin; scrollbar-color: var(--border-strong) transparent; }
1822
+ .requests-list::-webkit-scrollbar { width: 7px; }
1823
+ .requests-list::-webkit-scrollbar-thumb { background: var(--border-strong); border-radius: 7px; }
1824
+ .requests-list::-webkit-scrollbar-track { background: transparent; }
1765
1825
  .req-item {
1766
1826
  display: flex; gap: 10px; align-items: flex-start;
1767
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;
1768
1834
  }
1769
1835
  .req-info { flex: 1; min-width: 0; }
1770
1836
  .req-head { font-size: 12px; color: var(--text-dim); display: flex; align-items: center; gap: 6px; margin-bottom: 4px; }
1771
1837
  .req-head code { font-family: var(--mono); color: var(--text-muted); }
1838
+ /* WHICH project or workflow this request is about — the row's subject, so it reads as a name
1839
+ rather than the muted mono identifier the app id used to be rendered as. One treatment for
1840
+ both: "Cedar Mill Warehouse" and `steel-model` answer the same question here, and setting
1841
+ names in prose and ids in mono would split one column into two visual languages.
1842
+ Truncates rather than pushing the timestamp off the row. */
1843
+ .req-owner { color: var(--text-muted); min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
1772
1844
  .req-time { font-family: var(--mono); font-size: 9.5px; color: var(--text-muted); letter-spacing: 0; flex-shrink: 0; margin-left: auto; }
1773
1845
  .req-type {
1774
1846
  font-size: 10px; text-transform: uppercase; letter-spacing: 0.08em;
@@ -1778,10 +1850,31 @@
1778
1850
  .req-type-tweak { color: var(--warn); border-color: color-mix(in srgb, var(--warn) 40%, transparent); }
1779
1851
  .req-instruction {
1780
1852
  font-size: 12px; color: var(--text); line-height: 1.45; word-break: break-word;
1781
- /* Clamp long instructions so one verbose request can't dominate the list — the
1782
- full text is always one click away via the copy button. */
1783
- display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden;
1784
- }
1853
+ /* Readable in full, in place. This used to be a 3-line -webkit-line-clamp, which cut every
1854
+ instruction mid-sentence ("…KEEP its ETag — the…") with no way to read the rest without
1855
+ copying it out. A max-height + own scroller caps how much of the list one verbose request
1856
+ can eat while still letting you read all of it here.
1857
+ Nested-scroll note: overscroll-behavior is deliberately left at `auto` so reaching the end
1858
+ of an instruction CHAINS the wheel back to .requests-list — `contain` would trap the wheel
1859
+ inside a row. Rows short enough to fit never become scrollers at all. */
1860
+ max-height: 90px; overflow-y: auto;
1861
+ scrollbar-width: thin; scrollbar-color: var(--border-strong) transparent;
1862
+ }
1863
+ .req-instruction::-webkit-scrollbar { width: 7px; }
1864
+ .req-instruction::-webkit-scrollbar-thumb { background: var(--border-strong); border-radius: 6px; }
1865
+ .req-instruction::-webkit-scrollbar-track { background: transparent; }
1866
+ /* The search hit, highlighted where it sits — in the instruction AND in the name, since a query
1867
+ often matches the project rather than the wording. With several near-identical queued tweaks,
1868
+ "which one matched?" is otherwise guesswork. Tinted text, not a block highlight: a filled
1869
+ swatch would out-shout the accent language of the rest of the modal. */
1870
+ .req-item mark { background: color-mix(in srgb, var(--accent) 22%, transparent);
1871
+ color: var(--text); border-radius: 2px; padding: 0 1px; }
1872
+ /* "Show all" inside the scoped-empty state — a link, not a button: it's an aside inside a
1873
+ sentence, and a second bordered control here would compete with the scope tabs it defers to.
1874
+ Accent (not --err) on hover: switching scope is the opposite of destructive. */
1875
+ .req-showall { background: none; border: none; padding: 0; font: inherit; font-style: inherit;
1876
+ color: var(--text-dim); text-decoration: underline; cursor: pointer; }
1877
+ .req-showall:hover { color: var(--accent); }
1785
1878
  .req-actions { display: flex; gap: 4px; flex-shrink: 0; }
1786
1879
  .req-copy, .req-del {
1787
1880
  /* flex-center the glyph; padding:0 overrides the global button padding (7px 12px)
@@ -1793,6 +1886,34 @@
1793
1886
  }
1794
1887
  .req-copy:hover { color: var(--text); background: var(--surface); }
1795
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
+ }
1796
1917
  /* Stands in for the ✕ on a lifecycle-owned request (knowledge-organize): it clears itself via its
1797
1918
  own finish/fail POST, so no manual clear is offered. Muted text, never a dead-looking button.
1798
1919
  Wraps rather than truncating — a clipped explanation explains nothing. */
@@ -4055,7 +4176,11 @@ body.mode-workspaces #menu .menu-item[data-action="bake"] { display:none; }
4055
4176
  max-width:22ch; overflow:hidden; text-overflow:ellipsis; white-space:nowrap;
4056
4177
  font-family:var(--mono); font-size:10px; color:var(--text-dim);
4057
4178
  }
4058
- .ws-empty-note { color:var(--text-dim); font-size:12px; margin-top:10px; }
4179
+ .ws-empty-note { color:var(--text-dim); font-size:12px; margin-top:10px; line-height:1.55; max-width:640px; }
4180
+ /* First-run tour link (#598) — its own line so the prose above stays prose, but no box, no fill and
4181
+ no accent region: the create cards above are the primary action and this must not compete with
4182
+ them. Styling comes from .onb-build-btn's rule (see the .onb-* block); only the spacing is here. */
4183
+ .ws-empty-tour { margin-top:8px; }
4059
4184
  /* A FAILED load, not an empty workspace. Same inline-banner recipe as .hist-empty / .hd-warn below
4060
4185
  (surface-2 + a left rail) so it reads as a sibling of the app's other status banners, railed in
4061
4186
  --warn: a list that wouldn't load is "needs attention", not the definite operation failure --err
package/dist/web/app.js CHANGED
@@ -135,33 +135,107 @@ function onboardingHtml() {
135
135
  `</div>`
136
136
  );
137
137
  }
138
- function wireOnboardingCopy() {
139
- // The primary first-run action: copy the natural-language onboarding prompt so the user can paste it
140
- // into their terminal AI to launch the guided tour (the floless-app-onboarding skill).
141
- const tour = $topology.querySelector('.onb-tour-btn');
142
- if (tour) {
143
- const live = $topology.querySelector('.onb-tour-live');
144
- const label = tour.querySelector('.onb-tour-label');
145
- const ico = tour.querySelector('.onb-tour-ico');
146
- tour.onclick = async () => {
147
- try {
148
- await navigator.clipboard.writeText(ONB_TOUR_PROMPT);
149
- tour.disabled = true;
150
- if (label) label.textContent = 'Copied';
151
- if (ico) ico.textContent = '✓';
152
- if (live) live.textContent = 'Copied to clipboard';
153
- showToast('Copied — paste it into your terminal AI', 'ok');
154
- setTimeout(() => {
155
- if (label) label.textContent = 'Start the guided tour';
156
- if (ico) ico.textContent = '⎘';
157
- tour.disabled = false;
158
- if (live) live.textContent = '';
159
- }, 1600);
160
- } catch {
161
- showToast('Could not copy — select and paste the prompt manually.', 'warn');
138
+ // Wire a "Start the guided tour" button: copy the natural-language onboarding prompt so the user can
139
+ // paste it into their terminal AI to launch the tour (the floless-app-onboarding skill), and confirm
140
+ // in place. SHARED — the Workflows first-run card below and the Workspaces zero-projects empty state
141
+ // (workspaces.js, #598) are two entry points to the SAME tour, so they must not drift in prompt text,
142
+ // confirmation wording, or reset timing; one function is what guarantees that.
143
+ // Markup contract: a button may be bare text (it is then its own label), or split into
144
+ // `.onb-tour-label` + `.onb-tour-ico` — never an icon span with no label span, which would have the
145
+ // label swap wipe the icon out. Its `[aria-live]` region is found as a sibling rather than passed in,
146
+ // so a call site cannot quietly wire a button with no way to announce the result.
147
+ function wireTourCopy(btn) {
148
+ if (!btn) return;
149
+ const ico = btn.querySelector('.onb-tour-ico');
150
+ const label = btn.querySelector('.onb-tour-label') || btn;
151
+ // Loud, because that mistake is otherwise invisible AND permanent: with no label span the swap below
152
+ // writes over the whole button, destroying the icon element, and the reset restores flat text. The
153
+ // button keeps "working", so nothing else would ever report it.
154
+ if (ico && label === btn) console.error('[onboarding] a tour button with .onb-tour-ico must also have .onb-tour-label — the label swap will destroy the icon', btn);
155
+ const live = btn.parentElement ? btn.parentElement.querySelector('[aria-live]') : null;
156
+ // Equally loud. Finding the region by structure keeps the two call sites from passing mismatched
157
+ // selectors, but it also means an extra wrapper around the button silently costs every screen-reader
158
+ // announcement — and the four `if (live)` guards below would hide that forever. Say so instead.
159
+ if (!live) console.error('[onboarding] no [aria-live] sibling for this tour button — the copy result will not be announced', btn);
160
+ // Read the idle text off the DOM rather than hardcoding it — the two call sites label the action
161
+ // differently ("Start the guided tour" vs "Start the guided tour →") and only the markup knows which.
162
+ const idleLabel = label.textContent;
163
+ const idleIco = ico ? ico.textContent : '';
164
+ btn.onclick = async () => {
165
+ // ONLY the copy goes inside the try. Wrapping the confirmation too meant a throw anywhere in it
166
+ // (showToast dereferences #toast-container unguarded) landed in the catch with the button already
167
+ // disabled and the reset never scheduled — a permanently stuck "Copied ✓" under a toast saying the
168
+ // copy failed. That was the one path where this button could actively misinform.
169
+ try {
170
+ await navigator.clipboard.writeText(ONB_TOUR_PROMPT);
171
+ } catch (err) {
172
+ // Bind and log it: "navigator.clipboard is undefined" (insecure context / blocked by policy —
173
+ // permanent) and "writeText rejected" (denied, or the document wasn't focused — often retryable)
174
+ // reach the user as one message, and with nothing logged a bug report can't separate them either.
175
+ console.error('[onboarding] could not copy the tour prompt', err);
176
+ revealTourPrompt(btn, live);
177
+ return;
178
+ }
179
+ // Disabling a focused control blurs it, and re-enabling does NOT bring focus back — so a keyboard
180
+ // user would be dropped to <body> for the whole confirmation and have to tab in from the top
181
+ // again. Restore it: the same discipline retryProjects() applies on this very surface.
182
+ // MUST be read before disabling, which blurs it — after, this is always false.
183
+ const hadFocus = document.activeElement === btn;
184
+ btn.disabled = true;
185
+ label.textContent = 'Copied';
186
+ if (ico) ico.textContent = '✓';
187
+ if (live) live.textContent = 'Copied to clipboard';
188
+ // A successful copy retires any prompt a previous refusal put on screen — otherwise a stale
189
+ // "copy this manually" field sits under a button reading "Copied ✓", contradicting it.
190
+ const stale = btn.parentElement ? btn.parentElement.querySelector('.onb-tour-manual') : null;
191
+ if (stale) stale.remove();
192
+ setTimeout(() => {
193
+ label.textContent = idleLabel;
194
+ if (ico) ico.textContent = idleIco;
195
+ btn.disabled = false;
196
+ if (live) live.textContent = '';
197
+ // Only take focus back if it is still nowhere. 1600 ms is long enough for the user to click or
198
+ // tab onto something else — and a mouse click focuses the button too, so `hadFocus` alone would
199
+ // yank focus out of whatever they moved to. isConnected because a repaint may have replaced this
200
+ // node, and focusing a detached button drops them to <body>: the very thing this prevents.
201
+ const parked = document.activeElement;
202
+ if (hadFocus && btn.isConnected && (!parked || parked === document.body)) {
203
+ btn.focus({ focusVisible: true, preventScroll: true });
162
204
  }
163
- };
205
+ }, 1600);
206
+ showToast('Copied — paste it into your terminal AI', 'ok');
207
+ };
208
+ }
209
+ // The clipboard is this button's ONLY route into onboarding, and the prompt is rendered nowhere — so
210
+ // "copy it manually" asks for something the user cannot do: there is nothing on screen to copy. Put
211
+ // the prompt on screen, selected, and the message becomes true. Both entry points inherit this.
212
+ function revealTourPrompt(btn, live) {
213
+ const host = btn.parentElement;
214
+ let box = host ? host.querySelector('.onb-tour-manual') : null;
215
+ if (host && !box) {
216
+ // A textarea, not an input: the prompt is wider than the Workflows card, and a single-line input
217
+ // clips it mid-sentence. Selecting still copies the whole thing, but "copy it manually" is only
218
+ // honest if the user can also READ what they are copying.
219
+ box = document.createElement('textarea');
220
+ box.className = 'onb-tour-manual';
221
+ box.rows = 2;
222
+ box.readOnly = true;
223
+ box.value = ONB_TOUR_PROMPT;
224
+ box.setAttribute('aria-label', 'The onboarding prompt — copy this and paste it into your terminal AI');
225
+ host.appendChild(box);
164
226
  }
227
+ // focus+setSelectionRange, not select(): select() scrolls the element into view with no way to
228
+ // opt out, and on the Workflows card that means scrolling inside .canvas (overflow:hidden) whose
229
+ // .topology child is the pan/zoom transformed world — a scrollTop nothing can put back.
230
+ if (box) { box.focus({ preventScroll: true }); box.setSelectionRange(0, box.value.length); }
231
+ if (live) live.textContent = 'Could not copy. The prompt is now shown — copy it manually.';
232
+ showToast(box
233
+ ? 'Couldn’t reach the clipboard — the prompt is shown below; copy it manually.'
234
+ : 'Could not copy — this browser is blocking the clipboard.', 'warn');
235
+ }
236
+ function wireOnboardingCopy() {
237
+ // The primary first-run action on the empty canvas.
238
+ wireTourCopy($topology.querySelector('.onb-tour-btn'));
165
239
  // Secondary first-run action: "Build your first workflow" — the empty canvas is the
166
240
  // highest-intent moment to create one, so surface the same relay the ≡ menu's "New
167
241
  // workflow…" fires (handleMenuAction is reassigned in aware.js → requestNewWorkflow).