@floless/app 0.120.1 → 0.121.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/floless-server.cjs +4019 -1534
- package/dist/skills/floless-app-approval/SKILL.md +117 -0
- package/dist/skills/floless-app-bridge/SKILL.md +8 -2
- package/dist/skills/floless-app-steel-model/SKILL.md +8 -3
- package/dist/skills/floless-app-tweak-contract/SKILL.md +7 -5
- package/dist/skills/floless-app-vectorize/SKILL.md +5 -4
- package/dist/web/app.css +76 -0
- package/dist/web/index.html +19 -1
- package/dist/web/steel-editor.html +59 -14
- package/dist/web/workspaces.js +549 -44
- package/package.json +1 -1
|
@@ -0,0 +1,117 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: floless-app-approval
|
|
3
|
+
description: Review and act on FloLess Workspace approval state through the local server API. Use when the user asks what changed or is pending, wants to approve selected changes, leave changes pending, discard a change, inspect approved history or saved checkpoints, start from an older approved version, resume or move saved work forward, or export the latest approved version, an older version, the working DRAFT, or a checkpoint DRAFT.
|
|
4
|
+
metadata:
|
|
5
|
+
version: 0.1.0
|
|
6
|
+
---
|
|
7
|
+
|
|
8
|
+
# FloLess Workspace approval
|
|
9
|
+
|
|
10
|
+
Use the server as the authority. Present its review prose and stable IDs; never invent a diff,
|
|
11
|
+
patch, merge, lineage, conflict, export source, or approval result.
|
|
12
|
+
|
|
13
|
+
## Resolve the server and project
|
|
14
|
+
|
|
15
|
+
1. Resolve the running FloLess base URL. Prefer the port supplied by the request/context; otherwise
|
|
16
|
+
read `~/.floless/port`, then try the installed default `http://127.0.0.1:4317`. Confirm with
|
|
17
|
+
`GET /api/health`.
|
|
18
|
+
2. Resolve the project with `GET /api/projects`. If the name is ambiguous, ask the user to choose.
|
|
19
|
+
Keep the returned project `id` and `app`; never construct an ID from its display name.
|
|
20
|
+
|
|
21
|
+
Approval, discard, and conflict-resolution mutation bodies must use `claimedChannel: "terminal"`.
|
|
22
|
+
This is informational telemetry, not proof of identity.
|
|
23
|
+
|
|
24
|
+
## Review and approve
|
|
25
|
+
|
|
26
|
+
1. Fetch `GET /api/projects/:id/approval-review`.
|
|
27
|
+
2. Present the server's baseline/head, summary, cautions, and every change ID with its headline and
|
|
28
|
+
detail. If `moveForward` is present, state its old base, current approved head, and every reported
|
|
29
|
+
overlap. Do this before any mutation, even when this AI authored the changes.
|
|
30
|
+
3. Ask for decisions unless the user's request already names exact server IDs and dispositions.
|
|
31
|
+
Never treat omission, silence, or an unchecked item as Leave pending.
|
|
32
|
+
4. Submit the exact frozen `reviewId` and an exhaustive decision map to
|
|
33
|
+
`POST /api/contract/:appId/approve?project=:id`:
|
|
34
|
+
|
|
35
|
+
```json
|
|
36
|
+
{
|
|
37
|
+
"mode": "head",
|
|
38
|
+
"reviewId": "...",
|
|
39
|
+
"decisions": { "change-id": "approve", "other-id": "leave-pending" },
|
|
40
|
+
"conflicts": { "conflict-id": "use-draft", "other-conflict": "keep-latest-pending" },
|
|
41
|
+
"claimedChannel": "terminal"
|
|
42
|
+
}
|
|
43
|
+
```
|
|
44
|
+
|
|
45
|
+
Every returned group and move-forward conflict must appear exactly once. Respect dependency grouping
|
|
46
|
+
and whole-version restrictions. At least one group must be approved. A conflict whose linked change
|
|
47
|
+
is approved requires `use-draft`; one left pending requires `keep-latest-pending`. Never send internal
|
|
48
|
+
technical facts as patches. An old-base review is replayed only onto the current approved head; never
|
|
49
|
+
emulate a merge locally.
|
|
50
|
+
|
|
51
|
+
On success, report the new approved version, approved count, remaining pending count, and publication
|
|
52
|
+
or recovery state returned by the server. On 409, fetch and present a fresh review; never replay stale
|
|
53
|
+
prose or silently change the user's choices. On 428/400/422, report the refusal and remediation without
|
|
54
|
+
falling back to the old blind-approval request.
|
|
55
|
+
|
|
56
|
+
## Leave pending and discard
|
|
57
|
+
|
|
58
|
+
Leave pending is an explicit approval-review decision, not rejection. It keeps the authored intent.
|
|
59
|
+
|
|
60
|
+
Discard is separate and destructive. Confirm the exact server change IDs with the user, then POST
|
|
61
|
+
`/api/projects/:id/approval-review/discard`:
|
|
62
|
+
|
|
63
|
+
```json
|
|
64
|
+
{
|
|
65
|
+
"reviewId": "...",
|
|
66
|
+
"changes": ["change-id"],
|
|
67
|
+
"claimedChannel": "terminal"
|
|
68
|
+
}
|
|
69
|
+
```
|
|
70
|
+
|
|
71
|
+
The set must be dependency-closed. Never translate Leave pending into discard, and never discard a
|
|
72
|
+
three-way conflict by guessing; use only a server-offered destructive action and its frozen review.
|
|
73
|
+
|
|
74
|
+
## History and saved work
|
|
75
|
+
|
|
76
|
+
- List approved history with `GET /api/projects/:id/versions`.
|
|
77
|
+
- List immutable saved work with `GET /api/projects/:id/checkpoints`; present server lineage,
|
|
78
|
+
summaries, status, base version/hash, and allowed actions.
|
|
79
|
+
- Start a historical working revision with `POST /api/projects/:id/revisions/start` using
|
|
80
|
+
`{version, expectedEtag, expectedEpoch}`. This checkpoints acknowledged dirty work first.
|
|
81
|
+
- Resume exact saved work with `POST /api/projects/:id/checkpoints/:checkpointId/resume`, supplying
|
|
82
|
+
only the current destination ETag/epoch CAS fields returned by the server.
|
|
83
|
+
- To move saved intent forward, resume that checkpoint exactly, fetch its approval review, and use
|
|
84
|
+
the review's server-computed `moveForward` result. Present and submit its explicit overlap choices;
|
|
85
|
+
the server keeps a durable author-source checkpoint before publishing the resolved head.
|
|
86
|
+
|
|
87
|
+
Never offer or attempt “apply checkpoint to v7” or any caller-selected backward target. Move-forward
|
|
88
|
+
always resolves the current head server-side. If the server refuses ancestry, acceptance, stale epoch,
|
|
89
|
+
or backward application, preserve that refusal; do not reconstruct the operation from raw contracts.
|
|
90
|
+
|
|
91
|
+
## Export an explicit source
|
|
92
|
+
|
|
93
|
+
1. Fetch `GET /api/projects/:id/export-sources` and present the server's allowed selectors and format
|
|
94
|
+
eligibility.
|
|
95
|
+
2. Default to `{ "kind": "latest-approved" }`. Require an explicit user choice for an older approved
|
|
96
|
+
version or either DRAFT source:
|
|
97
|
+
- `{ "kind": "approved", "version": 12, "expectedHash": "..." }`
|
|
98
|
+
- `{ "kind": "working", "expectedEtag": "...", "expectedEpoch": 4 }`
|
|
99
|
+
- `{ "kind": "checkpoint", "checkpointId": "...", "expectedHash": "..." }`
|
|
100
|
+
3. POST the chosen selector to `/api/projects/:id/export-captures`. For a working DRAFT, first ensure
|
|
101
|
+
the visible editor has saved and use the returned ETag/epoch. Use the resolved leased handle and
|
|
102
|
+
route/format eligibility returned by the server for the export; do not re-read the mutable draft.
|
|
103
|
+
4. Report the resolved source kind/reference/hash, capture time, DRAFT label, filename and receipt.
|
|
104
|
+
Do not describe the selector alone as proof of what exported.
|
|
105
|
+
|
|
106
|
+
When active resume or derived export is blocked by an obsolete or schema-rejected source,
|
|
107
|
+
offer `POST /api/projects/:id/export-raw` with `{ "sourceHandle": "..." }` as the universal fallback. Label it
|
|
108
|
+
**DRAFT** where applicable. Do not use raw file reads to bypass the API or turn the package into an
|
|
109
|
+
accepted active project.
|
|
110
|
+
|
|
111
|
+
## Hard boundaries
|
|
112
|
+
|
|
113
|
+
- Never auto-approve because this AI created or edited the contract.
|
|
114
|
+
- Never call raw `aware` commands for project approval, history, checkpoints, merges, or exports.
|
|
115
|
+
- Never edit contract JSON to synthesize a selective approval, discard, rebase, or checkpoint action.
|
|
116
|
+
- Never use the legacy body-less project approval as a fallback. A 428 is a required review gate.
|
|
117
|
+
- Never claim `claimedChannel` authenticates the caller.
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: floless-app-bridge
|
|
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
|
|
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.
|
|
5
|
+
version: 0.2.0
|
|
6
6
|
---
|
|
7
7
|
|
|
8
8
|
# floless.app ↔ terminal bridge
|
|
@@ -13,6 +13,12 @@ and you **pull** them here, do the real work (edit the `.flo`, recompile), and c
|
|
|
13
13
|
skill is that pull side. Pair it with the **`floless-app-workflows`** skill, which owns
|
|
14
14
|
the actual `.flo` authoring / install → compile → run loop.
|
|
15
15
|
|
|
16
|
+
Workspace approval is not a queued-request or raw workflow operation. When the user asks what changed
|
|
17
|
+
or is pending, wants to approve/leave pending/discard, navigate approved history or checkpoints, or
|
|
18
|
+
export an approved/DRAFT source, invoke **`floless-app-approval`**. Never auto-approve a change merely
|
|
19
|
+
because this bridge or another AI produced it; the shared skill presents the server review and relays
|
|
20
|
+
explicit human decisions without calling raw `aware` commands.
|
|
21
|
+
|
|
16
22
|
## Receiving a *pasted* request (the `[floless-request]` marker)
|
|
17
23
|
|
|
18
24
|
The user can either ask you to **pull** pending requests (below) **or paste one straight into
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
name: floless-app-steel-model
|
|
3
3
|
description: The front-door guide for turning a structural steel drawing SET into an editable steel.model/v2 model in floless.app — the "Steel Model" flow. This skill orchestrates the whole pipeline — set up a project folder, learn the set into plain-English knowledge files, provision the right AWARE agents (region-specific steel detailer plus any bake targets), confirm which sheets are plans / elevations / details, then hand off to the Steel Takeoff reader. The reader composes steel.takeoff/v1 only as internal first-read staging; floless.app converts it transactionally so a new project is born steel.model/v2. Use it when a user wants to model steel from a drawing SET or asks things like "model this steel job from the drawings", "take off this whole set", "start a steel takeoff project", "turn these structural drawings into a model", "I have a PDF set of framing plans", or "/floless-app-steel-model". It is re-runnable — resume at any stage. For a single already-isolated framing plan the Steel Takeoff reader (floless-app-steel-takeoff) can be used directly; this guide is for driving a real job end to end.
|
|
4
4
|
metadata:
|
|
5
|
-
version: 0.
|
|
5
|
+
version: 0.6.0
|
|
6
6
|
---
|
|
7
7
|
|
|
8
8
|
# Steel Model — guide a steel drawing set into an editable model
|
|
@@ -177,11 +177,16 @@ the user at the editor:
|
|
|
177
177
|
leader clearly lands on a member end, set that end's `detail` to the callout text so the end is buildable
|
|
178
178
|
without the user re-picking it by hand. Where it is ambiguous, leave it unset — the editor's ⌖ pick is
|
|
179
179
|
the fallback, and a wrong binding is worse than none.
|
|
180
|
-
- **Point at the rest of the canvas:** the **filter** view (refine the kept linework), **
|
|
181
|
-
(
|
|
180
|
+
- **Point at the rest of the canvas:** the **filter** view (refine the kept linework), **Review changes**
|
|
181
|
+
(the human approval gate), **3D** model, **IFC** / **Tekla** export, the **BOM**
|
|
182
182
|
(exportable to **CSV / Excel**), the **confidence report**, and the **callout bubbles** (click a
|
|
183
183
|
section/elevation/detail mark on a plan to jump to the referenced sheet).
|
|
184
184
|
|
|
185
|
+
For any request to inspect pending changes, approve or leave selected changes pending, discard a
|
|
186
|
+
change, navigate approved history/checkpoints, or choose an approved/DRAFT export source, invoke
|
|
187
|
+
**`floless-app-approval`**. That shared skill presents the server review and performs the explicit
|
|
188
|
+
decision protocol. Never auto-approve work produced by this reading pipeline.
|
|
189
|
+
|
|
185
190
|
**Done** when each framing plan has an approved, editor-reviewed contract and the user knows which
|
|
186
191
|
on-canvas tool does what. The 3D/IFC/Tekla exports are on-demand from the editor; the **BOM is
|
|
187
192
|
exported two ways** — on-demand via the editor's *Export BOM (CSV)/(Excel)* buttons, **and written
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
name: floless-app-tweak-contract
|
|
3
3
|
description: This skill should be used when there is a pending floless `tweak-contract` request — the user typed an instruction in the Steel Model contract editor and clicked Send (Ask AI). Also triggers on asks like "edit the steel takeoff contract via AI", "adjust the steel takeoff in the contract editor", "the user asked me to change the steel contract", "pick up my tweak-contract request", "update the member profile in the contract". It teaches the host AI to read the request, fetch the current steel.takeoff/v1 contract, apply the instruction (and any pasted screenshots), PUT the updated contract back, and resolve the request.
|
|
4
4
|
metadata:
|
|
5
|
-
version: 0.
|
|
5
|
+
version: 0.3.0
|
|
6
6
|
---
|
|
7
7
|
|
|
8
8
|
# Handle a `tweak-contract` request (Slice 2 AI round-trip)
|
|
@@ -16,8 +16,8 @@ a `tweak-contract` request in the reverse channel. You pick it up here, edit the
|
|
|
16
16
|
document, write it back, and the editor reloads it.
|
|
17
17
|
|
|
18
18
|
The contract is `~/.floless/contracts/<appId>.json`, a `steel.takeoff/v1` document. It is the
|
|
19
|
-
single source of truth — the editor is its view, the exporters (IFC/Tekla/viewer-3d) consume
|
|
20
|
-
|
|
19
|
+
single source of truth — the editor is its view, and the exporters (IFC/Tekla/viewer-3d) consume
|
|
20
|
+
server-resolved export sources. A PUT writeback is schema-validated on the server; a 400
|
|
21
21
|
means invalid — fix and retry.
|
|
22
22
|
|
|
23
23
|
> **Pasted a request?** If the user pastes a message with a `[floless-request type=tweak-contract id=…]`
|
|
@@ -119,8 +119,10 @@ means invalid — fix and retry.
|
|
|
119
119
|
`tos` / `bos` / `elev_in` fields are always decimal inches (`16.5` = 16½ inches).
|
|
120
120
|
- **Screenshots don't lie; instructions generalize.** If the screenshot shows a specific member
|
|
121
121
|
and the instruction says "this beam", resolve "this" from the visual, not a guess.
|
|
122
|
-
- **Never auto-approve.** Writing the contract back is the AI act
|
|
123
|
-
|
|
122
|
+
- **Never auto-approve.** Writing the contract back is the AI act. If the user asks what changed,
|
|
123
|
+
wants to approve/leave pending/discard, navigate history/checkpoints, or export an approved/DRAFT
|
|
124
|
+
source, invoke **`floless-app-approval`**. It presents the server review and relays explicit human
|
|
125
|
+
decisions; writing a tweak never implies approval.
|
|
124
126
|
- **Thin-UI contract holds.** The browser recorded intent + screenshots; the brain is you, in
|
|
125
127
|
the terminal. The editor never edits the contract directly (it's read-only from its side
|
|
126
128
|
until the user clicks Save after a manual edit — and that is a different path). This skill
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
name: floless-app-vectorize
|
|
3
3
|
description: Vectorize a drawing into an editable drawing.vector/v1 contract in floless.app — the "Vectorize" reader. Triggers on a pending floless `rebake` request for the `vectorize` app (queued from its "Re-read & re-bake ▸" button), or asks like "vectorize this PDF", "turn my sketch into clean CAD linework", "read this detail into vectors", "trace this photo", "make this drawing 3D". Teaches the host AI to read a drawing at COMPOSE time — a vector PDF via ONE deterministic PyMuPDF pass (no LLM), a scan/photo/hand sketch by MEASURING its ink with a deterministic OpenCV centerline tracer for geometry plus AWARE's fenced vision.extract for the text (schema-bound, cached) — emit the drawing.vector/v1 contract, PUT it to the contract store, and hand the 2D vector editor to the user; and, for a multi-view set (plan + elevation), to classify views, read datums, and declare entities so the server reconstructs a viewable 3D model.
|
|
4
4
|
metadata:
|
|
5
|
-
version: 0.
|
|
5
|
+
version: 0.7.0
|
|
6
6
|
---
|
|
7
7
|
|
|
8
8
|
# Vectorize — read a drawing into a drawing.vector/v1 contract
|
|
@@ -272,9 +272,10 @@ Tell the user:
|
|
|
272
272
|
the user at the **Confidence** panel — each trace the model was unsure about (confidence
|
|
273
273
|
< 0.5) is listed there with **Accept** (mark correct) and **Delete** (remove, with Undo), and
|
|
274
274
|
a "Reviewed N/M" counter tracks progress. Edits auto-save to the contract store.
|
|
275
|
-
- **
|
|
276
|
-
|
|
277
|
-
the
|
|
275
|
+
- **Review changes**: when satisfied, route approval, pending/discard decisions, approved history,
|
|
276
|
+
checkpoints, and explicit approved/DRAFT export-source requests through
|
|
277
|
+
**`floless-app-approval`**. It presents the server's canonical comparison and performs only the
|
|
278
|
+
user's explicit decisions. Never auto-approve on their behalf.
|
|
278
279
|
- **View 3D ▸** (after a multi-view pass, step 3c): the node action opens the read-only
|
|
279
280
|
reconstruction viewer — orbit/pan/zoom, solid/wire/x-ray, per-group toggles, and the
|
|
280
281
|
"Not shown in 3D" panel listing every entity that couldn't be placed, with the reason.
|
package/dist/web/app.css
CHANGED
|
@@ -4040,6 +4040,33 @@ body.mode-workspaces #menu .menu-item[data-action="bake"] { display:none; }
|
|
|
4040
4040
|
/* ── Workspaces ▸ Exports step (shell-rendered pane; export cards over the project's OWN
|
|
4041
4041
|
contract). Ports the mockup's .ecard grid into app tokens; all states baseline-faithful. */
|
|
4042
4042
|
.ws-exports { flex:1; min-height:0; display:flex; flex-direction:column; }
|
|
4043
|
+
.export-source { flex:none; position:relative; margin:12px 20px 0; display:grid; grid-template-columns:126px minmax(240px, 360px) auto 1fr; align-items:center; gap:10px; }
|
|
4044
|
+
.export-source > label { color:var(--text-muted); font-size:11px; font-weight:600; text-transform:uppercase; letter-spacing:.04em; }
|
|
4045
|
+
.export-source-combo { position:relative; }
|
|
4046
|
+
.export-source-trigger { width:100%; min-height:34px; justify-content:space-between; }
|
|
4047
|
+
.export-source-popover { left:0; right:auto; top:calc(100% + 5px); width:360px; max-width:min(88vw, 360px); max-height:300px; overflow-y:auto;
|
|
4048
|
+
scrollbar-width:thin; scrollbar-color:var(--border-strong) transparent; }
|
|
4049
|
+
.export-source-popover::-webkit-scrollbar { width:8px; }
|
|
4050
|
+
.export-source-popover::-webkit-scrollbar-thumb { background:var(--border-strong); border-radius:5px; }
|
|
4051
|
+
.export-source-popover::-webkit-scrollbar-track { background:transparent; }
|
|
4052
|
+
.export-source-group + .export-source-group { border-top:1px solid var(--border); margin-top:5px; padding-top:5px; }
|
|
4053
|
+
.export-source-group-label { padding:5px 10px 3px; color:var(--text-dim); font-size:9px; font-weight:700; text-transform:uppercase; letter-spacing:.06em; }
|
|
4054
|
+
.export-source-option { width:100%; padding:7px 10px; display:flex; flex-direction:column; align-items:flex-start; gap:2px; border:0; border-radius:5px; background:none; color:var(--text-muted); text-align:left; cursor:pointer; }
|
|
4055
|
+
.export-source-option:hover, .export-source-option:focus-visible { background:var(--surface-3); color:var(--text); outline:none; }
|
|
4056
|
+
.export-source-option.selected { color:var(--text); background:var(--accent-dim); }
|
|
4057
|
+
.export-source-option small { color:var(--text-dim); font-size:10px; }
|
|
4058
|
+
.export-source-raw { min-height:34px; padding:0 11px; border:1px solid var(--border); border-radius:6px; background:var(--surface-2); color:var(--text-muted); font:inherit; font-size:11px; cursor:pointer; white-space:nowrap; }
|
|
4059
|
+
.export-source-raw:hover { border-color:var(--border-strong); color:var(--text); background:var(--surface-3); }
|
|
4060
|
+
.export-source-raw:focus-visible { outline:2px solid var(--accent); outline-offset:2px; }
|
|
4061
|
+
.export-source-banner { min-width:0; padding:7px 10px; border-left:2px solid var(--accent); background:var(--accent-dim); color:var(--text-muted); font-size:11px; line-height:1.4; }
|
|
4062
|
+
.export-source-banner b { color:var(--text); }
|
|
4063
|
+
.export-source-banner.draft { border-left-color:var(--warn); background:color-mix(in srgb, var(--warn) 8%, var(--surface-2)); }
|
|
4064
|
+
.export-source-banner.historical { border-left-color:var(--border-strong); background:var(--surface-2); }
|
|
4065
|
+
.export-source-banner button { padding:0; border:0; background:none; color:var(--accent); font:inherit; cursor:pointer; }
|
|
4066
|
+
.export-source-banner button:hover { text-decoration:underline; }
|
|
4067
|
+
.export-source-status { flex:none; margin:12px 20px 0; padding:8px 11px; border:1px solid var(--border); border-radius:7px; color:var(--text-muted); font-size:11px; }
|
|
4068
|
+
.export-source-status.unavailable { color:var(--warn); }
|
|
4069
|
+
@media (max-width:840px) { .export-source { grid-template-columns:1fr; } }
|
|
4043
4070
|
/* The Approve gate — a project's Model must be signed off before its exports go out. Not an
|
|
4044
4071
|
error (accent-dim rail, never a danger color); the inline "Approve" deep-links the sign-off. */
|
|
4045
4072
|
.ws-exports-gate { flex:none; margin:12px 20px 0; padding:9px 13px; display:flex; align-items:center; gap:6px;
|
|
@@ -4176,6 +4203,19 @@ body.mode-workspaces #menu .menu-item[data-action="bake"] { display:none; }
|
|
|
4176
4203
|
.hist-empty b { color:var(--text); }
|
|
4177
4204
|
.hist-empty button { background:none; border:none; padding:0; font:inherit; color:var(--accent); cursor:pointer; }
|
|
4178
4205
|
.hist-empty button:hover { color:var(--accent-bright); text-decoration:underline; }
|
|
4206
|
+
.saved-work { margin-top:20px; padding-top:16px; border-top:1px solid var(--border); }
|
|
4207
|
+
.saved-work-head { display:flex; align-items:baseline; justify-content:space-between; gap:12px; margin-bottom:9px; }
|
|
4208
|
+
.saved-work-head h3 { margin:0; color:var(--text); font-size:13px; font-weight:600; }
|
|
4209
|
+
.saved-work-head span { color:var(--text-dim); font-size:10px; text-transform:uppercase; letter-spacing:.05em; }
|
|
4210
|
+
.saved-work-state { padding:11px 13px; border:1px solid var(--border); border-radius:7px; background:var(--surface-2); color:var(--text-muted); font-size:11.5px; }
|
|
4211
|
+
.saved-work-state.warn { color:var(--warn); }
|
|
4212
|
+
.saved-work-list { display:grid; gap:8px; }
|
|
4213
|
+
.saved-work-card { display:flex; justify-content:space-between; align-items:flex-start; gap:14px; padding:10px 12px; border:1px solid var(--border); border-radius:7px; background:var(--surface-2); }
|
|
4214
|
+
.saved-work-card > div { display:flex; flex-direction:column; gap:3px; }
|
|
4215
|
+
.saved-work-card b { color:var(--text); font-size:12px; }
|
|
4216
|
+
.saved-work-card span, .saved-work-card p { color:var(--text-dim); font-size:10.5px; }
|
|
4217
|
+
.saved-work-card p { margin:0; max-width:320px; text-align:right; line-height:1.4; }
|
|
4218
|
+
@media (max-width:620px) { .saved-work-card { flex-direction:column; } .saved-work-card p { text-align:left; } }
|
|
4179
4219
|
|
|
4180
4220
|
table.hist { width:100%; border-collapse:collapse; font-size:12.5px; }
|
|
4181
4221
|
table.hist th { text-align:left; font-size:10px; text-transform:uppercase; letter-spacing:.1em; color:var(--text-dim);
|
|
@@ -4221,6 +4261,42 @@ table.hist tr.current td { background:var(--accent-soft); }
|
|
|
4221
4261
|
.revreview-body::-webkit-scrollbar-thumb { background:var(--border-strong); border-radius:5px; }
|
|
4222
4262
|
.revreview-body::-webkit-scrollbar-track { background:transparent; }
|
|
4223
4263
|
|
|
4264
|
+
/* Approval review — the existing revision-review shell with explicit, mutually-exclusive outcomes. */
|
|
4265
|
+
.modal.approval-review { width:760px; }
|
|
4266
|
+
.approval-impact { margin:8px 0 10px; padding:9px 12px; border-left:2px solid var(--accent);
|
|
4267
|
+
background:var(--accent-dim); color:var(--text-muted); font-size:12px; line-height:1.45; }
|
|
4268
|
+
.approval-impact:empty { display:none; }
|
|
4269
|
+
.approval-review-body { padding-bottom:12px; scrollbar-width:thin; scrollbar-color:var(--border-strong) transparent; }
|
|
4270
|
+
.approval-group { padding:13px 14px; margin:0 0 9px; border:1px solid var(--border); border-radius:8px; background:var(--surface-2); }
|
|
4271
|
+
.approval-group-head { display:flex; align-items:flex-start; justify-content:space-between; gap:12px; color:var(--text); font-size:12.5px; }
|
|
4272
|
+
.approval-group-head > div { display:flex; align-items:center; gap:8px; min-width:0; }
|
|
4273
|
+
.approval-group-head > span { color:var(--text-dim); font-size:11px; text-align:right; }
|
|
4274
|
+
.approval-group p { margin:7px 0 10px; color:var(--text-muted); font-size:12px; line-height:1.45; }
|
|
4275
|
+
.approval-risk { padding:2px 6px; border:1px solid var(--border-strong); border-radius:999px; color:var(--text-dim); font-size:9px; font-weight:700; text-transform:uppercase; letter-spacing:.04em; }
|
|
4276
|
+
.approval-risk.medium { color:var(--warn); border-color:color-mix(in srgb, var(--warn) 45%, var(--border)); }
|
|
4277
|
+
.approval-risk.high { color:var(--err); border-color:color-mix(in srgb, var(--err) 45%, var(--border)); }
|
|
4278
|
+
.approval-decisions { display:grid; grid-template-columns:1fr 1fr; gap:7px; }
|
|
4279
|
+
.approval-decisions button { min-height:34px; border:1px solid var(--border-strong); border-radius:6px; background:var(--surface-3); color:var(--text-muted); font:inherit; cursor:pointer; }
|
|
4280
|
+
.approval-decisions button:hover { color:var(--text); border-color:var(--accent); }
|
|
4281
|
+
.approval-decisions button.selected { color:var(--text); border-color:var(--accent); background:var(--accent-dim); box-shadow:inset 0 0 0 1px var(--accent); }
|
|
4282
|
+
.approval-decisions button:focus-visible, .approval-discard:focus-visible { outline:2px solid var(--accent); outline-offset:2px; }
|
|
4283
|
+
.approval-tech { margin-top:9px; color:var(--text-dim); font-size:11px; }
|
|
4284
|
+
.approval-tech summary { width:max-content; max-width:100%; cursor:pointer; color:var(--text-muted); }
|
|
4285
|
+
.approval-tech div { display:flex; gap:8px; padding:5px 0 0 12px; overflow-wrap:anywhere; }
|
|
4286
|
+
.approval-tech b { color:var(--text-muted); }
|
|
4287
|
+
.approval-discard { margin-top:10px; padding:0; border:0; background:none; color:var(--err); font:inherit; font-size:11px; cursor:pointer; }
|
|
4288
|
+
.approval-discard:hover { text-decoration:underline; }
|
|
4289
|
+
.approval-review-footer { flex:none; position:sticky; bottom:0; padding-top:10px; background:var(--surface-2); border-top:1px solid var(--border); }
|
|
4290
|
+
.approval-review-footer .rev-counts { margin:0 0 8px; }
|
|
4291
|
+
.approval-review-footer .modal-actions { margin-top:0; }
|
|
4292
|
+
.approval-empty, .approval-loading { padding:16px; border:1px solid var(--border); border-radius:8px; color:var(--text-muted); text-align:center; }
|
|
4293
|
+
#ws-approve.approval-clean { background:transparent; color:var(--text-muted); border-color:var(--border-strong); box-shadow:none; }
|
|
4294
|
+
@media (max-width:620px) {
|
|
4295
|
+
.approval-decisions { grid-template-columns:1fr; }
|
|
4296
|
+
.approval-group-head { flex-direction:column; gap:5px; }
|
|
4297
|
+
.approval-group-head > span { text-align:left; }
|
|
4298
|
+
}
|
|
4299
|
+
|
|
4224
4300
|
/* Counts: informational, and the ABSENCE of chrome is what says so — no border, no card,
|
|
4225
4301
|
no icon, no hover. Everything actionable below has at least one. */
|
|
4226
4302
|
.rev-counts { font-size:11px; color:var(--text-dim); margin:0 0 10px; }
|
package/dist/web/index.html
CHANGED
|
@@ -93,7 +93,7 @@
|
|
|
93
93
|
</div>
|
|
94
94
|
<span class="ctl-sep" aria-hidden="true"></span>
|
|
95
95
|
<button id="ws-approve" type="button" class="primary"
|
|
96
|
-
data-tip="
|
|
96
|
+
data-tip="Review every pending change before signing off.">Review & approve</button>
|
|
97
97
|
</div>
|
|
98
98
|
<!-- Per-workflow onboarding beacon. Pulses "✨ Start here" while this workflow is
|
|
99
99
|
new to the user (no first Run completed, not dismissed); calms to a quiet
|
|
@@ -614,6 +614,24 @@
|
|
|
614
614
|
</div>
|
|
615
615
|
</div>
|
|
616
616
|
|
|
617
|
+
<!-- Approval is a mandatory review, never a one-click mutation. The server supplies every group
|
|
618
|
+
and all plain-English copy; this surface only records an explicit decision for each group. -->
|
|
619
|
+
<div class="modal-backdrop" id="approval-review-modal" role="dialog" aria-modal="true" aria-labelledby="approval-review-title" aria-describedby="approval-review-sub">
|
|
620
|
+
<div class="modal revreview approval-review" tabindex="-1">
|
|
621
|
+
<div class="modal-title" id="approval-review-title">Review and approve</div>
|
|
622
|
+
<div class="modal-sub" id="approval-review-sub"></div>
|
|
623
|
+
<div class="approval-impact" id="approval-review-impact" role="status" aria-live="polite"></div>
|
|
624
|
+
<div class="revreview-body approval-review-body" id="approval-review-body"></div>
|
|
625
|
+
<div class="approval-review-footer">
|
|
626
|
+
<div class="rev-counts" id="approval-review-counts" role="status" aria-live="polite"></div>
|
|
627
|
+
<div class="modal-actions">
|
|
628
|
+
<button id="approval-review-cancel" type="button">Cancel</button>
|
|
629
|
+
<button id="approval-review-confirm" type="button" class="primary" disabled>Approve selected changes</button>
|
|
630
|
+
</div>
|
|
631
|
+
</div>
|
|
632
|
+
</div>
|
|
633
|
+
</div>
|
|
634
|
+
|
|
617
635
|
<!-- Convert to the model (steel.takeoff/v1 → steel.model/v2, unit 5, P7e).
|
|
618
636
|
A SEPARATE element from #revreview-modal rather than a reuse of it: the two have different
|
|
619
637
|
titles, different sub-copy and materially different Confirm semantics — that one applies a
|
|
@@ -95,8 +95,28 @@
|
|
|
95
95
|
each true work point so the end handles never look detached. Same language as the dimension witness. */
|
|
96
96
|
line.bracewit{stroke:#94a3b8;stroke-width:1;opacity:.55;stroke-dasharray:3 3;vector-effect:non-scaling-stroke;pointer-events:none}
|
|
97
97
|
/* Columns render as their profile-section footprint (a filled polygon), not a line: a solid fill so
|
|
98
|
-
they read as a section on the plan; fill-opacity keeps any grid/linework beneath faintly visible.
|
|
99
|
-
|
|
98
|
+
they read as a section on the plan; fill-opacity keeps any grid/linework beneath faintly visible.
|
|
99
|
+
non-scaling-stroke because zoom here scales the <svg> width/height against a fixed viewBox, so a
|
|
100
|
+
content-unit stroke — and, crucially, a content-unit DASH — scales with the shape. That pinned the
|
|
101
|
+
RFI dash-cycle-to-outline ratio at EVERY zoom: a true-size footprint (#502/#518) is only ~6.6 units
|
|
102
|
+
across, so the "6 4" cycle fits ~2.6 times around a 26.4-unit square outline and each 6.6-unit run
|
|
103
|
+
is a whole dash with a nick at the corner. (An I-section outline is worse in places — its 1.65-unit
|
|
104
|
+
flange runs are shorter than one dash.) The legend promises "short even dashes = RFI"; it could not
|
|
105
|
+
be delivered, and unlike the rest of #519 no amount of zooming helped, because the ratio was
|
|
106
|
+
invariant. In screen space the ratio tracks zoom, so leaning in resolves the dash: measured in a
|
|
107
|
+
real browser, a 26.4px side at the 400% ceiling shows ~2.6 cycles and reads as evenly dashed.
|
|
108
|
+
Applied to the base rule, not to .rfi, because vector-effect governs stroke WIDTH too — de-scoped to
|
|
109
|
+
.rfi it would draw an RFI outline at 1.5px against a resolved neighbour's 6px at 400%, making the
|
|
110
|
+
member that needs attention the thinnest outline on the canvas on top of its already-faintest fill.
|
|
111
|
+
It also brings the footprint in line with this canvas's OVERLAY strokes — gridln, dim + witness,
|
|
112
|
+
marquee, cobub, pdfvec, plchip, snapmk are all already non-scaling (the MEMBER strokes, line.member
|
|
113
|
+
and line.bracebody, deliberately still scale; see BRACE_STROKE) — and with CAD practice, where
|
|
114
|
+
lineweight is a screen/plot property rather than a model-space one. Two knock-ons, both measured
|
|
115
|
+
rather than argued: the .sel weight bump is now a constant 0.5px rather than 2 content units (the
|
|
116
|
+
selection glow carries that affordance), and at 30% zoom the full-opacity outline is a larger share
|
|
117
|
+
of a sub-2px footprint, so an RFI column paints ~3x the ink it used to — MORE visible than before,
|
|
118
|
+
and still well short of a resolved one (mean ink 63 vs 106 on the same sample). #519 item 1. */
|
|
119
|
+
polygon.member{cursor:pointer;stroke-width:1.5;fill-opacity:.7;stroke-linejoin:round;vector-effect:non-scaling-stroke}
|
|
100
120
|
body.dragmove polygon.member{cursor:move}
|
|
101
121
|
polygon.member.sel{stroke-width:2} polygon.member.rfi{fill-opacity:.15;stroke-dasharray:6 4}
|
|
102
122
|
circle.handle{fill:var(--bg);stroke:#f8fafc;stroke-width:3;cursor:grab}
|
|
@@ -972,9 +992,10 @@ text.mlentx{fill:#e2e8f0;text-anchor:middle;dominant-baseline:central;font-famil
|
|
|
972
992
|
<div class=plan-list id=planList role=none></div>
|
|
973
993
|
</div>
|
|
974
994
|
</div>
|
|
975
|
-
<!-- These four are per-SHEET counts (see stats()).
|
|
976
|
-
|
|
977
|
-
that is absent, and "Members 0" beside a populated 3D scene is wrong (unit 5, P7d
|
|
995
|
+
<!-- These four are per-SHEET counts (see stats()). When no plan view is active there is no per-sheet
|
|
996
|
+
member list to count, so for that state they are HIDDEN rather than dimmed — a readout that is wrong
|
|
997
|
+
is worse than one that is absent, and "Members 0" beside a populated 3D scene is wrong (unit 5, P7d
|
|
998
|
+
§8.5). A canonical-format model WITH a plan view keeps them: its projection is a real member list. -->
|
|
978
999
|
<span class=stat id=mcStat>Members <b id=mc>0</b></span><span class=stat id=wtStat>Weight <b id=wt>0</b> tons · <b id=wtlb>0</b> lb</span>
|
|
979
1000
|
<span class=stat id=rfiStat data-tip="Click to list members with an unresolved size (RFI — Request for Information)">RFI <b id=rc>0</b></span>
|
|
980
1001
|
<span class=stat id=dupStat data-tip="Overlapping/duplicate members (same geometry)">Dup <b id=dpc>0</b></span>
|
|
@@ -2395,13 +2416,16 @@ const isDimAnchorableMember=m=>!!m&&!isBrace(m)&&Array.isArray(m.wp)&&m.wp.lengt
|
|
|
2395
2416
|
// Heads are sized in CONTENT units, i.e. RELATIVE TO THE VISIBLE BRACE STROKE (line.bracebody stroke-width:6,
|
|
2396
2417
|
// itself a content unit that scales with zoom) — not in screen px. A screen-constant head is swallowed by its
|
|
2397
2418
|
// own line once you zoom in (at 170% the stroke is already ~10px) and floats free of it when you zoom out.
|
|
2398
|
-
//
|
|
2419
|
+
// The MEMBER strokes on this canvas (line.member, line.bracebody, line.seg, line.draw) scale with zoom; the
|
|
2420
|
+
// head matches those. Overlay/annotation strokes do not — gridln, dim + its witness, marquee, snapmk, cobub,
|
|
2421
|
+
// pdfvec, plchip are non-scaling, and since #519 so is polygon.member (see its rule for why).
|
|
2399
2422
|
const BRACE_STROKE=6; // must track line.bracebody's stroke-width in the CSS above
|
|
2400
2423
|
const BRACE_ARR=BRACE_STROKE*3; // head length — 3× the stroke reads as an arrow at every zoom
|
|
2401
2424
|
// A below-floor brace is DASHED — but `dashed` already means RFI on this canvas (line.member.rfi is
|
|
2402
2425
|
// "10 6", a uniform short dash, and the legend says "Dashed = RFI"). So the brace uses a PHANTOM line
|
|
2403
|
-
// (long–short–long–short) that can't be mistaken for RFI's even ticks at a glance. Content units,
|
|
2404
|
-
//
|
|
2426
|
+
// (long–short–long–short) that can't be mistaken for RFI's even ticks at a glance. Content units, like the
|
|
2427
|
+
// other member-stroke dashes (a brace is long geometry, so the cycle never collapses the way a 6.6-unit
|
|
2428
|
+
// column footprint's did — #519). Colour stays the member's profile colour — braces remain
|
|
2405
2429
|
// recolourable from the legend, so the dash (not a reserved hue) is what identifies them.
|
|
2406
2430
|
// long 30 / short 6 — an authored 5:1. stroke-linecap:round visually ADDS ~one stroke (6) to every dash, so
|
|
2407
2431
|
// on screen it reads ~36:12, i.e. the 3:1 we actually want. Authoring 3:1 would collapse toward uniform.
|
|
@@ -4469,7 +4493,7 @@ function render(){
|
|
|
4469
4493
|
// force-closes, so they are unreachable; updConf yields an empty report that leaves #confStat at the
|
|
4470
4494
|
// display:none its markup already carries; and updCS is already called from every path that can change
|
|
4471
4495
|
// the axes on a v2 document (csArm3dB, onFrame3dChange, the view switch), so it would add nothing.
|
|
4472
|
-
if(MODEL_RO){svg.replaceChildren();stats();panel();updUR();syncDisplayRows();refreshSelLen3d();return;} // stats() here only RETIRES the per-sheet readouts — see its
|
|
4496
|
+
if(MODEL_RO){svg.replaceChildren();stats();panel();updUR();syncDisplayRows();refreshSelLen3d();return;} // stats() here only RETIRES the per-sheet readouts — see its NO_PLAN_VIEW branch; selected length is a 3D overlay and must follow every v2 selection repaint
|
|
4473
4497
|
document.body.classList.remove('snapping'); // a wholesale svg rebuild drops any #snapMark → clear the cursor-hide flag too (the next pointermove re-adds it if still snapping)
|
|
4474
4498
|
buildColorRank(); // refresh the model-global colour rank before any colorFor() call below (B2 — keeps 2D hues stable across plans + matched to 3D)
|
|
4475
4499
|
reanchorAllPlans(); // F9: glue magnetic dims to their members BEFORE anything reads P.dims — covers every mutation path that ends in a render()
|
|
@@ -4569,14 +4593,35 @@ function updateLine(m){
|
|
|
4569
4593
|
if(pg){const pts=columnSectionPoly(m);if(pts)pg.setAttribute('points',_polyStr(pts));}return;}
|
|
4570
4594
|
const ln=svg.querySelector(`line.member[data-id="${m.id}"]`);
|
|
4571
4595
|
if(ln){ln.setAttribute('x1',m.wp[0][0]);ln.setAttribute('y1',m.wp[0][1]);ln.setAttribute('x2',m.wp[1][0]);ln.setAttribute('y2',m.wp[1][1]);}}
|
|
4596
|
+
/** The four header readouts computed from the ACTIVE PLAN's member list. Named once — see stats(). */
|
|
4597
|
+
const PLAN_STATS=['mcStat','wtStat','rfiStat','dupStat'];
|
|
4572
4598
|
/** Take a header stat out of the flow entirely — not dimmed, not zeroed. See stats() for when and why. */
|
|
4573
4599
|
function hideStat(id){const el=document.getElementById(id);if(el)el.style.display='none';}
|
|
4600
|
+
/** …and put it back. The state stats() hides for is REVERSIBLE, so the hiding has to be too — see there. */
|
|
4601
|
+
function showStat(id){const el=document.getElementById(id);if(el)el.style.display='';}
|
|
4574
4602
|
function stats(){
|
|
4575
|
-
//
|
|
4576
|
-
//
|
|
4577
|
-
//
|
|
4578
|
-
//
|
|
4579
|
-
|
|
4603
|
+
// EVERY NUMBER BELOW IS PER-SHEET: each walks `P.members`, the members of the ACTIVE PLAN VIEW. When
|
|
4604
|
+
// there is no plan view to be active, `P.members` is the empty placeholder setPlan() installs, not a
|
|
4605
|
+
// measurement — so there is no honest value to print and the readouts are REMOVED from the header rather
|
|
4606
|
+
// than showing "Members 0 · Weight 0.0 tons · RFI 0" beside a populated 3D scene. This is the one place
|
|
4607
|
+
// `hidden` beats `disabled` in this editor — that rule is about ACTION controls, where vanishing reads as
|
|
4608
|
+
// "broken"; a stat that cannot be computed has nothing to act on. (RFI is the sharpest case: it is
|
|
4609
|
+
// CLICKABLE, and a live-looking control that opens a list about a member set which is not loaded is worse
|
|
4610
|
+
// than an absent one.) The canvas already explains the state in full — see panel()'s NO_PLAN_VIEW badge —
|
|
4611
|
+
// so saying it again in four header tooltips would only repeat the reason.
|
|
4612
|
+
//
|
|
4613
|
+
// THE PREDICATE IS `NO_PLAN_VIEW`, AND IT USED TO BE `MODEL_RO` (#515). That was written when v2 was
|
|
4614
|
+
// read-only and had no plan projection at all, so "a v2 document" and "no per-sheet members" were the
|
|
4615
|
+
// same statement. They stopped being the same when v2 went live, and the guard did not follow:
|
|
4616
|
+
// `MODEL_RO = MODEL_V2 && !MODEL_V2_LIVE` with `MODEL_V2_LIVE` the constant `true` makes it permanently
|
|
4617
|
+
// FALSE, so this branch was dead and a v2 model with no plan view printed exactly the zeros it exists to
|
|
4618
|
+
// prevent. A v2 model that DOES have a plan view is NOT the case being excluded: its `P.members` is the
|
|
4619
|
+
// real projection for that sheet, so its numbers are as honest as v1's and it keeps every one of them.
|
|
4620
|
+
if(NO_PLAN_VIEW){for(const id of PLAN_STATS)hideStat(id);return;}
|
|
4621
|
+
// REVERSIBLE, and this line is the whole of it: hideStat writes an INLINE display:none that nothing else
|
|
4622
|
+
// clears, so without this the first no-plan-view sheet would hide these four permanently — including
|
|
4623
|
+
// after the user activates a plan sheet again, which setPlan() allows and which is the ordinary way back.
|
|
4624
|
+
for(const id of PLAN_STATS)showStat(id);
|
|
4580
4625
|
document.getElementById('mc').textContent=P.members.length;
|
|
4581
4626
|
let w=0,rfi=0; for(const m of P.members){const wpf=_wt(m.profile); if(wpf==null)rfi++; else w+=_lenFt(ensureMeta(m))*wpf;}
|
|
4582
4627
|
document.getElementById('wt').textContent=(w/2000).toFixed(1);document.getElementById('wtlb').textContent=Math.round(w).toLocaleString();document.getElementById('rc').textContent=rfi;
|