@floless/app 0.174.0 → 0.175.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/autostart.mjs +117 -10
- package/dist/floless-server.cjs +2 -2
- package/dist/pdf-engine/floless_pdf/__init__.py +53 -0
- package/dist/pdf-engine/floless_pdf/backend_pdfium.py +823 -0
- package/dist/pdf-engine/floless_pdf/backend_pymupdf.py +245 -0
- package/dist/pdf-engine/floless_pdf/geometry.py +115 -0
- package/dist/pdf-engine/floless_pdf/images.py +75 -0
- package/dist/pdf-engine/floless_pdf/pages.py +136 -0
- package/dist/pdf-engine/floless_pdf/textrules.py +200 -0
- package/dist/schemas/steel.model.v2.schema.json +45 -1
- package/dist/skills/floless-app-approval/SKILL.md +28 -3
- package/dist/skills/floless-app-knowledge/SKILL.md +3 -2
- package/dist/skills/floless-app-sketches/SKILL.md +71 -0
- package/dist/skills/floless-app-sketches/references/steel-plate.md +15 -0
- package/dist/skills/floless-app-steel-model/SKILL.md +14 -1
- package/dist/skills/floless-app-steel-model/references/elements.md +90 -23
- package/dist/skills/floless-app-steel-takeoff/SKILL.md +18 -7
- package/dist/skills/floless-app-tweak-contract/SKILL.md +3 -2
- package/dist/web/agents.js +1 -1
- package/dist/web/app.css +120 -15
- package/dist/web/app.js +89 -38
- package/dist/web/aware-hold.js +10 -0
- package/dist/web/aware.js +405 -51
- package/dist/web/boot-watchdog.js +249 -0
- package/dist/web/card-details.js +88 -0
- package/dist/web/chat.css +29 -0
- package/dist/web/chat.js +430 -128
- package/dist/web/commands-connection-design.js +23 -0
- package/dist/web/commands-revit.js +3 -0
- package/dist/web/commands-shell.js +226 -10
- package/dist/web/commands-steel.js +95 -5
- package/dist/web/commands-tekla-parser.js +21 -1
- package/dist/web/connection-design-editor.html +71 -0
- package/dist/web/connection-design-editor.js +794 -61
- package/dist/web/connection-design-handles.js +9 -3
- package/dist/web/element-approval.js +74 -0
- package/dist/web/element-context.js +76 -6
- package/dist/web/element-geometry.js +8 -2
- package/dist/web/element-holds.js +68 -5
- package/dist/web/element-type-actions.js +22 -3
- package/dist/web/element-types.js +12 -5
- package/dist/web/element-words.js +15 -11
- package/dist/web/grid-place.js +51 -0
- package/dist/web/guide.js +2 -0
- package/dist/web/index.html +13 -16
- package/dist/web/instructor.js +5 -2
- package/dist/web/missed-routines.js +6 -1
- package/dist/web/model-change-findings.js +147 -32
- package/dist/web/model-change-review.js +435 -32
- package/dist/web/model-clash-check.css +100 -0
- package/dist/web/model-clash-check.js +681 -0
- package/dist/web/model-clip-box.js +204 -0
- package/dist/web/model-clip-list.js +153 -3
- package/dist/web/model-clip-session.js +3 -3
- package/dist/web/model-clip-three-overlay.js +135 -25
- package/dist/web/model-editor.css +2 -0
- package/dist/web/model-elements.js +273 -18
- package/dist/web/model-fit-checks.js +354 -0
- package/dist/web/model-spatial-panel.js +9 -3
- package/dist/web/model-spatial-tools.js +12 -3
- package/dist/web/model-tekla-selection.js +74 -0
- package/dist/web/model-view-query.js +70 -14
- package/dist/web/model-viewport-revit-adapter.js +8 -7
- package/dist/web/model-viewport-toolbar.js +8 -4
- package/dist/web/pages.js +78 -1
- package/dist/web/project-history.js +31 -1
- package/dist/web/revit-editor.css +34 -1
- package/dist/web/revit-editor.js +176 -55
- package/dist/web/run-history.js +8 -0
- package/dist/web/sketch-editor.js +141 -2
- package/dist/web/sketches.js +192 -6
- package/dist/web/start-place.js +46 -0
- package/dist/web/steel-3d-core.js +70 -0
- package/dist/web/steel-3d-view.js +288 -47
- package/dist/web/steel-change-review.css +29 -0
- package/dist/web/steel-custom-connection.js +6 -0
- package/dist/web/steel-editor.html +532 -33
- package/dist/web/steel-filter.html +8 -3
- package/dist/web/steel-model-checks.css +76 -0
- package/dist/web/steel-model-commands.js +1 -1
- package/dist/web/steel-model-v2-commands.js +17 -0
- package/dist/web/steel-view-generation.js +6 -2
- package/dist/web/teams.js +259 -19
- package/dist/web/tekla-editor.html +1 -0
- package/dist/web/terminal-requests.js +6 -0
- package/dist/web/vendor/connection-engine.js +890 -89
- package/dist/web/workspaces.js +630 -48
- package/package.json +4 -1
- package/preferences-file.mjs +27 -0
|
@@ -83,13 +83,44 @@ types, below.)
|
|
|
83
83
|
- **A strip under a held wall.** A strip footing under a wall that is held for any other reason is held too
|
|
84
84
|
(`element-under-held-wall`), naming the wall and its reason, and its choices are that wall's ("for wall W-1: …"),
|
|
85
85
|
removing the footing, or keeping its saved values as an assumption.
|
|
86
|
-
- **Densities come from the current catalogue.** Every element a reply
|
|
87
|
-
`densityBasis`: its values were "worked out from the current catalogue
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
86
|
+
- **Densities come from the current catalogue, compared with the approved version.** Every element a reply
|
|
87
|
+
describes with materials carries `densityBasis`: its values were "worked out from the current catalogue;
|
|
88
|
+
compared with the approved version where one exists" (or from the person's own density, which says so). Each
|
|
89
|
+
element reply also carries `densityChangedSinceApproval`, which says one of: "Densities unchanged since approval
|
|
90
|
+
on <date>", "Density changed since approval v<n> on <date>: <row> was …, now …", "New since approval v<n>",
|
|
91
|
+
"Not compared" (the approved version has no saved values for it), or "Could not compare densities with the
|
|
92
|
+
approved version: <reason>". Repeat its label as it is. Never say a density is unchanged or approved unless the
|
|
93
|
+
label says so, and when the comparison could not be made, say why and never read that as "unchanged". A stored
|
|
94
|
+
result worked out on another density than the row gives now is ordinary drift (`drifted`, "its density changed
|
|
95
|
+
since it was worked out"), answered like any other.
|
|
96
|
+
- **A density that changed since approval holds the element** (`element-density-changed-since-approval`, "its
|
|
97
|
+
density changed since approval v2 on 2026-11-20: material row … was …, now …"). It is counted nowhere until the
|
|
98
|
+
person settles it, and a save reply says it on its own line. The ways on, in the order the reply gives them:
|
|
99
|
+
- **Re-approve to accept the new catalogue value.** This is the person's, on the approval screen. Offer to open
|
|
100
|
+
the screen (`projects.approve`); never approve, and never say the element is settled until they have.
|
|
101
|
+
- **Work its values out again on today's catalogue first** (`resolve-save`, answer `corrected`). This is offered
|
|
102
|
+
only while the element's saved values are still on the old density. It never clears the hold: the element stays
|
|
103
|
+
held and still needs a person to re-approve. Say exactly that.
|
|
104
|
+
- **Keep the saved values as an unverified assumption** (`keep-held-as-assumption`), a card the person confirms.
|
|
105
|
+
- **What the approval screen shows.** For every wall, slab and footing in what is being approved whose density
|
|
106
|
+
changed since the approved version, or that the approved version does not hold yet, the screen's **density
|
|
107
|
+
comparison** says what approving does to it:
|
|
108
|
+
- its values are on today's density, so approving records that density and clears the flag;
|
|
109
|
+
- its saved values are still on the old density, so it stays flagged until they are worked out again;
|
|
110
|
+
- it has no saved values, so it is recorded without a density result.
|
|
111
|
+
|
|
112
|
+
When the approved version could not be proven, the screen says why, once, and gives no list. Approving works
|
|
113
|
+
nothing out. The person reads this and decides; the AI only explains it.
|
|
114
|
+
- **Where else the comparison shows.** The bill of materials adds a note for each element kept as an assumption
|
|
115
|
+
over a changed density, or one line when the comparison could not be made. The IFC export receipt carries
|
|
116
|
+
`densityComparison` when it could not be made. Pass both on as they read.
|
|
117
|
+
- **A result worked out on the person's density is kept, with its evidence.** When the person supplied a density
|
|
118
|
+
(`accept-density`), the element's saved values are the evidence of it, and only the person replaces them. A save
|
|
119
|
+
that leaves those values off, or sends other values, keeps the stored ones exactly. The reply says so with an
|
|
120
|
+
`element-result-kept` warning that names each element, the density and its basis ("The saved values of W-1 were
|
|
121
|
+
kept: they were worked out on the person's own density (1900 kg/m³, from …)"). Pass it on. Never resend the
|
|
122
|
+
values to force them through. To change them, the person supplies another density on a new card, or the element
|
|
123
|
+
is edited so that what it is worked out from changes.
|
|
93
124
|
- **A type nothing uses stays.** FloLess never drops one on its own; `model.evaluate-element` lists it as `unused`.
|
|
94
125
|
- **A whole-model save is held to the same rule.** A catalogue type the model already holds keeps what is stored,
|
|
95
126
|
whatever the save sent under its id (the reply says so and points to `set-type`). A new catalogue entry is
|
|
@@ -193,22 +224,58 @@ from `steel.read-model`). Millimetres throughout.
|
|
|
193
224
|
|
|
194
225
|
## Clash and exact placement (`fit`)
|
|
195
226
|
|
|
196
|
-
`model.evaluate-element` also reports how the elements fit, from the same solids every sink draws, in `fit`.
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
**
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
227
|
+
`model.evaluate-element` also reports how the elements fit, from the same solids every sink draws, in `fit`. FloLess
|
|
228
|
+
measures every pair of elements for a clash (only a measured overlap volume is one; faces that touch, such as a wall
|
|
229
|
+
on its strip or a mitre, are contact) and each wall's faces against its path and location line, plus four fit checks:
|
|
230
|
+
|
|
231
|
+
- **Bearing on its wall** (a strip footing carries its wall): how much of the wall's underside is off its own strip,
|
|
232
|
+
carried by another drawn support or on nothing, the separation between the faces, and the strip's eccentricity.
|
|
233
|
+
- **Level**: each slab's and footing's top and underside against the level its placement states and its type's depth,
|
|
234
|
+
piece by piece, with the nearest grid level named the way the person named it (never "storey").
|
|
235
|
+
- **Standing on its support**: what carries each wall's underside (a slab, a footing or another drawn support), how
|
|
236
|
+
much of it is carried, and any gap below it in mm. A wall with nothing modelled under it at all is a **note**,
|
|
237
|
+
measured and listed, never a warning and never a fit.
|
|
238
|
+
- **Mitres**: each joined pair of wall ends, at the base and at the top: a gap, an overlap, a height step, and a fold
|
|
239
|
+
sharper than the fold limit (below).
|
|
240
|
+
|
|
241
|
+
`findings` are warnings (or notes) with their sentence, their measured numbers, where they are (grid and level) and
|
|
242
|
+
their choices, the first one the default. `measured` holds every measurement, the passing ones too.
|
|
243
|
+
|
|
244
|
+
**Say the summary, never "fits".** `fit.summary` is the one sentence every surface shows, for example "Fit of walls,
|
|
245
|
+
slabs and footings: 29 checks measured, 5 findings open, 2 notes. Mitres are reported when sharper than 45°
|
|
246
|
+
(FloLess's default; no standard sets this). Not checked yet: how steel meets concrete." `fit.coverage` holds its
|
|
247
|
+
counts. Pass it on word for word. Every check of every element ends in exactly one of: a measurement,
|
|
248
|
+
`fit.notMeasured` (it could not be measured, with why: a kept placement FloLess cannot read, an element it cannot
|
|
249
|
+
draw), `fit.notApplicable` (with why: a footing under no wall, a wall end joined to nothing) or `fit.notChecked` (how
|
|
250
|
+
steel meets concrete, not checked yet). A check that could not be measured is **not measured**, never passed. An empty
|
|
251
|
+
`findings` means nothing was found among what was measured; it never means the model "fits" or is "all checked". A
|
|
252
|
+
finding is never a block, and it changes no count: report it with its numbers and its choices, and leave the choice
|
|
253
|
+
to the person.
|
|
254
|
+
|
|
255
|
+
**Proceeding on an assumption is the person's choice.** The person may go on with one finding on an assumption in
|
|
256
|
+
their own words. In the editor that is ⋯ → Model checks → Fit of walls, slabs and footings…, then Proceed on an
|
|
257
|
+
assumption…: their words, then a confirm that quotes the finding word for word. From the chat it is a
|
|
258
|
+
`model.fit-assumption` card that they confirm. **You never proceed for them**: propose the card with their words,
|
|
259
|
+
never yours, and never confirm it. The finding stays open in its warning style, marked "Open, on an assumption" with
|
|
260
|
+
their words, and approval records it. If what it rests on changes (its binding), the assumption lapses and the
|
|
261
|
+
finding asks again. The person can withdraw it. `model.fit-assumptions` lists the assumptions, in force or lapsed
|
|
262
|
+
with why; pass their words on exactly.
|
|
263
|
+
|
|
264
|
+
**The fold limit is a setting, with its source.** A mitre is reported when it is sharper than the fold limit. That
|
|
265
|
+
is FloLess's default (45°; no standard sets this) unless the person sets one. It is stored in the model's fit
|
|
266
|
+
settings with where it came from: typed by the person, a company standard read from a published Knowledge page, or
|
|
267
|
+
imported with the project. Every summary and mitre finding says that source. The person changes it in the Model
|
|
268
|
+
checks drawer, or on a `model.set-fit-limit` card they confirm (a value they typed, a Knowledge page's value with its
|
|
269
|
+
slug and digest, or null for FloLess's default). `model.edit-elements` cannot change it, and **you never set it
|
|
270
|
+
without the person's card**. A save says which findings the new limit adds or removes. An approval that changes it
|
|
271
|
+
shows a Fit setting card, and an approved fit keeps the limit it used even if FloLess's default changes later.
|
|
272
|
+
|
|
273
|
+
**Copy question, no RFI yet.** Each finding's Copy question copies the question FloLess words for it, for the person
|
|
274
|
+
to send or paste. Nothing is raised from the drawer, and the row says "No RFI raised yet". To raise one, use the RFI
|
|
275
|
+
flow (`floless-app-rfi`) with that question.
|
|
276
|
+
|
|
277
|
+
The approval screen and an approved IFC export's receipt carry the same fit line: the summary as approved, with the
|
|
278
|
+
open findings and the assumptions in force. Say what it says; never call an export or an approval "checked".
|
|
212
279
|
## When FloLess cannot verify a result
|
|
213
280
|
|
|
214
281
|
`model.evaluate-element` says, for each element, whether its stored result holds: `verified`, `accepted` (the
|
|
@@ -7,7 +7,7 @@ description: >-
|
|
|
7
7
|
two-phase Drawing Filter process: first prepare and save the deterministic Filter, then read only the
|
|
8
8
|
selected evidence into model-global members, registered plan views, observations, and revision history.
|
|
9
9
|
metadata:
|
|
10
|
-
version: 0.
|
|
10
|
+
version: 0.110.0
|
|
11
11
|
---
|
|
12
12
|
|
|
13
13
|
## Shared height study: server-owned reader claims
|
|
@@ -783,9 +783,13 @@ In a Quick read:
|
|
|
783
783
|
with `readScopeRecovery.owner: "reader"`, you may leave whole attached files, or pages of a file, for a
|
|
784
784
|
later read. A set that arrives as one PDF is chosen from by its pages. Choose from
|
|
785
785
|
`readScopeRecovery.files`: each file's sheets, whether it holds a plan, what the scan measured, and
|
|
786
|
-
`pages` (each page's `id`, `page`, `sheet`, `plan`, `count` and `bytes`, where `null` means not
|
|
787
|
-
measured, never zero
|
|
788
|
-
|
|
786
|
+
`pages` (each page's `id`, `page`, `sheet`, `plan`, `view`, `count` and `bytes`, where `null` means not
|
|
787
|
+
measured, never zero; `view: true` marks a plan, elevation or section a member can be placed from). Keep the
|
|
788
|
+
framing plans and the sheets the plans need to be read correctly; leave the heaviest evidence first (sections,
|
|
789
|
+
details, schedules a later read can add). **Against a model that already has framing plans**
|
|
790
|
+
(`readScopeRecovery.action` says so: this read is read against them), the read need not keep a framing plan of
|
|
791
|
+
its own: a plan sheet that alone is too large may be left for later, as long as an elevation or section (a page
|
|
792
|
+
with `view: true`) is kept. Never leave a file or
|
|
789
793
|
page out to avoid a question it would raise. Then POST `…/read-scope` with
|
|
790
794
|
`{ epoch: readScopeRecovery.epoch, leaveOut: [sha256 of each whole file], leavePages: [id of each page], why, confidence }`
|
|
791
795
|
(either list may be empty, not both) and POST `steel-manifest` again with the same bindings. A page carrying `strips` is
|
|
@@ -796,8 +800,9 @@ In a Quick read:
|
|
|
796
800
|
refused again, the files and pages marked `leftOut: true` are already out and stay out: name only what to
|
|
797
801
|
add. FloLess stores the pages you leave out as one PDF of their own, so the published model names them as
|
|
798
802
|
not read until a later read covers them. Your choice is recorded as the AI's. A read gets three choices.
|
|
799
|
-
Any other owner (`"user"`: one sheet left, the only framing plan too large on its own
|
|
800
|
-
|
|
803
|
+
Any other owner (`"user"`: one sheet left, the only framing plan too large on its own (against a model with
|
|
804
|
+
framing plans: the only plan, elevation or section too large on its own), an unmeasured overflow, choices spent,
|
|
805
|
+
a run nobody is watching) stops the read: relay `recovery`. A page left for later
|
|
801
806
|
is not read: its picture answers `steel-page-left-for-later`. A set over 10 000 members or joints is not
|
|
802
807
|
this: it parks, as in a guided read.
|
|
803
808
|
- **What answers 409 in a Quick read:** `height-questions` and `setup-questions` (`quick-read-decides`),
|
|
@@ -2128,7 +2133,13 @@ document has this shape:
|
|
|
2128
2133
|
```
|
|
2129
2134
|
|
|
2130
2135
|
Follow `schemas/steel.model.v2.schema.json`; closed objects reject unsupported keys. Never include a
|
|
2131
|
-
conversion provenance block or a second contract shape.
|
|
2136
|
+
conversion provenance block or a second contract shape.
|
|
2137
|
+
|
|
2138
|
+
**`lineage` is FloLess's record of which model this is.** Copy it unchanged from the current model, or
|
|
2139
|
+
leave it out; never write, invent or change one. FloLess keeps it through every read, re-read and save,
|
|
2140
|
+
and gives a model that has none one on its next save. A re-read of the same drawings is the same model.
|
|
2141
|
+
If the person wants a different model instead, start a new one rather than rewriting this one, so the
|
|
2142
|
+
change review can say the two are not the same model. Preserve confidential rasters only in the
|
|
2132
2143
|
working project contract; approval and bake strip them from published artifacts.
|
|
2133
2144
|
|
|
2134
2145
|
## Submit through revision-read
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
name: floless-app-tweak-contract
|
|
3
3
|
description: Handle a pending floless tweak-contract request from the Steel Model editor. Use when a user asks the terminal AI a question about selected model items or asks it to change a member, grid, plan view, connection, or other field in the current steel.model/v2 project contract. Resolve typed selections from the current native model, answer queries without writing, or apply only the requested edit with optimistic concurrency and without approving it.
|
|
4
4
|
metadata:
|
|
5
|
-
version: 0.
|
|
5
|
+
version: 0.13.0
|
|
6
6
|
---
|
|
7
7
|
|
|
8
8
|
# Handle a `tweak-contract` request
|
|
@@ -48,7 +48,8 @@ only the operation-shaped tools the host offers, and it never writes. Nothing in
|
|
|
48
48
|
no mode), apply only what the instruction asks.
|
|
49
49
|
Preserve all other data byte-for-byte where practical,
|
|
50
50
|
especially the saved Filter, plan registration, source hashes, observations, views, details, and
|
|
51
|
-
confidential draft state.
|
|
51
|
+
confidential draft state. Never write or change `lineage`: it is FloLess's record of which model
|
|
52
|
+
this is, so copy it unchanged (or leave it out) and FloLess keeps it.
|
|
52
53
|
5. For `modify` only, PUT the complete contract back to the same project-scoped route with `If-Match: <ETag>` and the
|
|
53
54
|
request header required by the server (`steel.save-model` with `etag` and `model` does exactly this). If the
|
|
54
55
|
ETag is stale, refetch and reapply the edit; never overwrite concurrent work.
|
package/dist/web/agents.js
CHANGED
|
@@ -468,7 +468,7 @@
|
|
|
468
468
|
}
|
|
469
469
|
}
|
|
470
470
|
|
|
471
|
-
const SOURCE_KIND = { 'teams-chat': 'Teams chat', 'outlook-folder': 'Outlook folder', 'gmail-mail': 'Gmail source', 'trimble-project': 'Trimble Connect project' };
|
|
471
|
+
const SOURCE_KIND = { 'teams-chat': 'Teams chat', 'teams-channel': 'Teams channel', 'outlook-folder': 'Outlook folder', 'gmail-mail': 'Gmail source', 'trimble-project': 'Trimble Connect project' };
|
|
472
472
|
|
|
473
473
|
function renderSourceSync(archived) {
|
|
474
474
|
const draft = state.draft;
|
package/dist/web/app.css
CHANGED
|
@@ -2533,6 +2533,44 @@
|
|
|
2533
2533
|
/* A waiting action must not light up under the pointer like a live one. Mirrors the chat
|
|
2534
2534
|
Provider row's `.ai-chat-provider-switch:disabled` so the two sign-in surfaces read alike. */
|
|
2535
2535
|
.int-action:disabled { cursor: default; color: var(--text-dim); border-color: var(--border); background: var(--surface); }
|
|
2536
|
+
/* The one choice a question recommends: the accent, from the baseline's own tokens, in both themes. */
|
|
2537
|
+
.int-action.primary { color: var(--accent-bright); border-color: var(--accent-dim); background: var(--accent-soft); }
|
|
2538
|
+
.int-action.primary:not(:disabled):hover { color: var(--text); border-color: var(--accent); background: var(--accent-soft); }
|
|
2539
|
+
.int-action:focus-visible, .int-link:focus-visible { outline: 2px solid var(--accent); outline-offset: 1px; }
|
|
2540
|
+
/* A small text action inside a line (Open to restart, Dismiss): a link look, a button underneath. */
|
|
2541
|
+
.int-link {
|
|
2542
|
+
font: inherit; font-size: 9px; padding: 0; border: 0; background: none; cursor: pointer;
|
|
2543
|
+
color: var(--accent-bright); text-decoration: underline; text-underline-offset: 2px; border-radius: 2px;
|
|
2544
|
+
}
|
|
2545
|
+
.int-link:hover { color: var(--accent); }
|
|
2546
|
+
/* #2470 R6.8 slice 4: a Microsoft 365 account's "Read Teams channel messages" switch (the shared .kb-toggle), the line
|
|
2547
|
+
under it, and what the last click did. Spans in the account grid's full width, so long names wrap, never overflow. */
|
|
2548
|
+
.int-chread { grid-column: 1 / -1; display: grid; gap: 3px; padding-top: 5px; border-top: 1px dashed var(--border); min-width: 0; }
|
|
2549
|
+
.int-chread-switch { display: inline-flex; align-items: center; gap: 7px; }
|
|
2550
|
+
.int-chread-switch .kb-toggle { flex-shrink: 0; }
|
|
2551
|
+
.int-chread-label { font-size: 10px; color: var(--text); }
|
|
2552
|
+
.int-chread-line { font-size: 9px; line-height: 1.4; color: var(--text-muted); overflow-wrap: anywhere; }
|
|
2553
|
+
.int-chread-line:empty, .int-chread-note:empty { display: none; }
|
|
2554
|
+
.int-chread-act { justify-self: start; }
|
|
2555
|
+
.int-chread-note { display: grid; gap: 4px; font-size: 9px; line-height: 1.4; color: var(--text-muted); overflow-wrap: anywhere; }
|
|
2556
|
+
.int-chread-saved { color: var(--ok); }
|
|
2557
|
+
.int-chread-error { color: var(--warn); }
|
|
2558
|
+
.int-chread-explain { padding: 5px 7px; border-left: 3px solid var(--accent-dim); border-radius: 0 4px 4px 0;
|
|
2559
|
+
background: color-mix(in srgb, var(--accent) 6%, var(--surface)); }
|
|
2560
|
+
.int-chread-choices { display: inline-flex; flex-wrap: wrap; gap: 6px; margin-top: 2px; }
|
|
2561
|
+
.int-chread-stopped-head { color: var(--text); }
|
|
2562
|
+
.int-chread-stopped { list-style: none; margin: 0; padding: 0; display: grid; gap: 2px; max-height: 120px; overflow: auto;
|
|
2563
|
+
scrollbar-width: thin; scrollbar-color: var(--border-strong) transparent; }
|
|
2564
|
+
.int-chread-stopped::-webkit-scrollbar { width: 8px; }
|
|
2565
|
+
.int-chread-stopped::-webkit-scrollbar-thumb { background: var(--border-strong); border-radius: 4px; }
|
|
2566
|
+
.int-chread-stopped::-webkit-scrollbar-track { background: transparent; }
|
|
2567
|
+
.int-chread-stopped li { display: flex; align-items: baseline; gap: 8px; min-width: 0; }
|
|
2568
|
+
.int-chread-watcher { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--text); }
|
|
2569
|
+
.int-chread-dismiss { justify-self: start; }
|
|
2570
|
+
/* The Connect question and the sign-in choices, in the card's sign-in line. */
|
|
2571
|
+
.int-devicecode .int-chread-question { display: block; color: var(--text); }
|
|
2572
|
+
.int-devicecode .int-chread-choices { display: flex; margin-top: 6px; }
|
|
2573
|
+
.int-devicecode .int-chread-hint { display: block; font-size: 9px; color: var(--text-dim); margin-top: 4px; }
|
|
2536
2574
|
|
|
2537
2575
|
/* ========== FOOTER ========== */
|
|
2538
2576
|
footer {
|
|
@@ -3945,6 +3983,10 @@
|
|
|
3945
3983
|
z-index: 50;
|
|
3946
3984
|
display: none;
|
|
3947
3985
|
animation: menu-in 0.16s ease-out;
|
|
3986
|
+
/* Short window or browser tab: the menu scrolls inside itself (themed by the global scrollbar rule) (#4091). */
|
|
3987
|
+
max-height: calc(100vh - var(--header-h) - 8px);
|
|
3988
|
+
overflow-y: auto;
|
|
3989
|
+
overscroll-behavior: contain;
|
|
3948
3990
|
}
|
|
3949
3991
|
.menu.show { display: block; }
|
|
3950
3992
|
@keyframes menu-in {
|
|
@@ -4353,10 +4395,14 @@
|
|
|
4353
4395
|
font-size: 12px;
|
|
4354
4396
|
color: var(--text);
|
|
4355
4397
|
}
|
|
4356
|
-
/* The
|
|
4357
|
-
|
|
4358
|
-
|
|
4359
|
-
.menu-startup[hidden] {
|
|
4398
|
+
/* The menu row and controls set display explicitly, so enforce their hidden states. */
|
|
4399
|
+
.menu-startup[hidden], .menu-startup .rtn-toggle[hidden] { display: none; }
|
|
4400
|
+
.menu-startup { display: grid; grid-template-columns: 1fr auto; row-gap: 4px; }
|
|
4401
|
+
.menu-startup:has(#startup-status:not([hidden])) .menu-label { cursor: default; }
|
|
4402
|
+
.startup-choices { grid-column: 1 / -1; justify-self: end; }
|
|
4403
|
+
.startup-choices[hidden] { display: none; }
|
|
4404
|
+
#startup-status { color: var(--text-muted); }
|
|
4405
|
+
#startup-status:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
|
|
4360
4406
|
/* #2448: the AI note switch for every workflow's reports, with its plain hint under it (a hover tip is easy to miss). */
|
|
4361
4407
|
.menu-ai-note[hidden], .menu-run-notify[hidden] { display: none; }
|
|
4362
4408
|
.menu-ai-note-hint { margin: -4px 9px 6px; font-size: 11px; line-height: 1.4; color: var(--text-dim); }
|
|
@@ -4389,7 +4435,7 @@
|
|
|
4389
4435
|
}
|
|
4390
4436
|
/* #2399: "Suggestions" On / Quiet / Off in the ≡ menu: the Theme segmented look with text labels. Its own class, so
|
|
4391
4437
|
the theme buttons' click handler never sees these. */
|
|
4392
|
-
.suggest-btn, .client-btn {
|
|
4438
|
+
.suggest-btn, .client-btn, .startup-btn {
|
|
4393
4439
|
background: transparent;
|
|
4394
4440
|
border: none;
|
|
4395
4441
|
min-width: 38px;
|
|
@@ -4401,12 +4447,13 @@
|
|
|
4401
4447
|
border-radius: 3px;
|
|
4402
4448
|
cursor: pointer;
|
|
4403
4449
|
}
|
|
4404
|
-
.suggest-btn:hover, .client-btn:hover { color: var(--text); }
|
|
4450
|
+
.suggest-btn:hover, .client-btn:hover, .startup-btn:hover:enabled { color: var(--text); }
|
|
4451
|
+
.startup-btn:disabled { opacity: .6; cursor: default; }
|
|
4405
4452
|
.suggest-btn.active, .client-btn.active {
|
|
4406
4453
|
background: var(--accent);
|
|
4407
4454
|
color: white;
|
|
4408
4455
|
}
|
|
4409
|
-
.suggest-btn:focus-visible, .client-btn:focus-visible { outline: 2px solid var(--accent); outline-offset: 1px; }
|
|
4456
|
+
.suggest-btn:focus-visible, .client-btn:focus-visible, .startup-btn:focus-visible { outline: 2px solid var(--accent); outline-offset: 1px; }
|
|
4410
4457
|
/* "Open FloLess in" / "Keep FloLess in the tray" reuse .menu-theme (display:flex), which overrides `hidden`. */
|
|
4411
4458
|
.menu-client[hidden], .menu-tray[hidden] { display: none; }
|
|
4412
4459
|
/* #3420: Hold AWARE updates. The "Keep vX held" choice appears under the hint only when AWARE changed while held. */
|
|
@@ -6462,6 +6509,27 @@ body.mode-workspaces #menu .menu-item[data-action="bake"] { display:none; }
|
|
|
6462
6509
|
.sketches .sketches-input { flex:1; min-width:160px; color:var(--text); background:var(--surface-2); border:1px solid var(--border-strong); border-radius:5px; padding:6px 8px; font:inherit; font-size:12px; }
|
|
6463
6510
|
.sketches .sketches-input:focus-visible { outline:2px solid var(--accent); outline-offset:1px; border-color:var(--accent-dim); }
|
|
6464
6511
|
@media (prefers-reduced-motion: reduce) { .sketches button.sketches-switch .sketches-knob { transition:none; } }
|
|
6512
|
+
/* Sketches S1c (#3643): Show converted, the stale-reference choices, each shape's conversion state, the Conversions history. */
|
|
6513
|
+
.sketches .sketches-converted { display:flex; align-items:center; justify-content:space-between; gap:8px; padding:8px 4px 2px; margin-top:6px; border-top:1px solid var(--border); font-size:11px; color:var(--text-muted); }
|
|
6514
|
+
.sketches .sketches-converted[hidden] { display:none; }
|
|
6515
|
+
.sketches .sketches-converted button.sketches-switch { margin-top:0; }
|
|
6516
|
+
.sketches .sketches-choices { flex-basis:100%; display:flex; flex-wrap:wrap; gap:6px; }
|
|
6517
|
+
.sketches .sketches-reference[data-verdict="unknown"] { border-left-color:var(--border-strong); background:var(--surface-2); }
|
|
6518
|
+
.sketches .sketches-convert-note { border-left:3px solid var(--warn); background:color-mix(in srgb, var(--warn) 7%, transparent); padding:9px 12px; border-radius:0 4px 4px 0; font-size:12px; display:flex; flex-wrap:wrap; gap:8px; align-items:center; }
|
|
6519
|
+
.sketches .sketches-convert-note[hidden] { display:none; }
|
|
6520
|
+
.sketches .sketches-shapes li.sketches-shape { display:flex; flex-wrap:wrap; align-items:baseline; gap:4px 8px; }
|
|
6521
|
+
.sketches .sketches-shape-line { min-width:0; }
|
|
6522
|
+
.sketches .sketches-shape-state { flex-basis:100%; font-size:11px; }
|
|
6523
|
+
.sketches details.sketches-conversions > summary { cursor:pointer; font-size:12px; font-weight:600; color:var(--text); list-style:none; display:flex; align-items:center; gap:6px; padding:2px 0; border-radius:4px; }
|
|
6524
|
+
.sketches details.sketches-conversions > summary::-webkit-details-marker { display:none; }
|
|
6525
|
+
.sketches details.sketches-conversions > summary::before { content:''; width:0; height:0; border-left:5px solid var(--text-muted); border-top:4px solid transparent; border-bottom:4px solid transparent; transition:transform .15s ease; }
|
|
6526
|
+
.sketches details.sketches-conversions[open] > summary::before { transform:rotate(90deg); }
|
|
6527
|
+
.sketches details.sketches-conversions > summary:focus-visible { outline:2px solid var(--accent); outline-offset:2px; }
|
|
6528
|
+
.sketches .sketches-conversion-list { max-height:40vh; overflow-y:auto; scrollbar-width:thin; scrollbar-color:var(--text-dim) transparent; }
|
|
6529
|
+
.sketches .sketches-conversion-list::-webkit-scrollbar { width:7px; }
|
|
6530
|
+
.sketches .sketches-conversion-list::-webkit-scrollbar-thumb { background:var(--text-dim); border-radius:7px; }
|
|
6531
|
+
.sketches .sketches-conversion-list::-webkit-scrollbar-track { background:transparent; }
|
|
6532
|
+
@media (prefers-reduced-motion: reduce) { .sketches details.sketches-conversions > summary::before { transition:none; } }
|
|
6465
6533
|
.add-ons-empty-state { display:flex; flex-direction:column; align-items:flex-start; gap:10px; padding:18px 4px; max-width:520px; }
|
|
6466
6534
|
.add-ons-empty-state h3 { font-size:15px; color:var(--text); }
|
|
6467
6535
|
.add-ons-empty-state p { color:var(--text-muted); font-size:12px; line-height:1.5; }
|
|
@@ -7098,7 +7166,7 @@ body.mode-workspaces #menu .menu-item[data-action="bake"] { display:none; }
|
|
|
7098
7166
|
.ws-source-inner { max-width:440px; text-align:center; }
|
|
7099
7167
|
.ws-source-ico { font-size:34px; color:var(--accent); display:block; margin-bottom:12px; line-height:1; }
|
|
7100
7168
|
.ws-source-title { font-size:14px; font-weight:600; color:var(--text); margin-bottom:6px; }
|
|
7101
|
-
.ws-source-sub { font-size:12px; color:var(--text-dim); line-height:1.55; white-space:pre-line; }
|
|
7169
|
+
.ws-source-sub { font-size:12px; color:var(--text-dim); line-height:1.55; white-space:pre-line; overflow-wrap:anywhere; }
|
|
7102
7170
|
/* A refusal can explain several findings and next steps. Keep the existing Source surface, but
|
|
7103
7171
|
present its copy as readable prose in both themes instead of a narrow, centered caption. */
|
|
7104
7172
|
/* The missing-catalogue question (#1836, data-asking) reads as the same left-aligned prose, but it
|
|
@@ -7652,6 +7720,41 @@ table.hist td.gate > .pill-group { min-width:78px; }
|
|
|
7652
7720
|
border-radius:8px; background:var(--surface-2); font-size:12px; line-height:1.45; }
|
|
7653
7721
|
.approval-version-card b { color:var(--text); font-weight:600; }
|
|
7654
7722
|
.approval-version-card p { margin:3px 0 0; color:var(--text-muted); }
|
|
7723
|
+
/* #3680 part C: what approving does to each density the approval compares. A plain bordered panel like the version
|
|
7724
|
+
card above it (no accent rail: it reports, it does not lead); its list scrolls inside its own themed region. */
|
|
7725
|
+
.approval-density { margin:0 0 10px; padding:10px 12px; border:1px solid var(--border); border-radius:8px; background:var(--surface-2); font-size:12px; line-height:1.45; }
|
|
7726
|
+
.approval-density:focus, .approval-density [data-approval-density-refreshed]:focus { outline:none; }
|
|
7727
|
+
.approval-density:focus-visible, .approval-density [data-approval-density-refreshed]:focus-visible { outline:2px solid var(--accent); outline-offset:2px; }
|
|
7728
|
+
.approval-density-title { margin:0; color:var(--text); font-size:12.5px; font-weight:600; }
|
|
7729
|
+
.approval-density-lead { margin:3px 0 8px; color:var(--text-muted); }
|
|
7730
|
+
.approval-density-quiet { display:flex; align-items:center; gap:8px; margin:0; color:var(--text-muted); }
|
|
7731
|
+
.approval-density-quiet .rtn-spinner { width:11px; height:11px; border-width:2px; }
|
|
7732
|
+
.approval-density .approval-notice { margin:0 0 8px; }
|
|
7733
|
+
.approval-density > .approval-notice:last-child { margin-bottom:0; }
|
|
7734
|
+
/* The panel is --surface-2, which in the dark theme is the same colour as --border-strong, so this region's thumb uses
|
|
7735
|
+
--text-dim to stay visible in both themes. */
|
|
7736
|
+
.approval-density-scroll { max-height:min(40vh, 240px); overflow-y:auto; margin:0 -4px; padding:0 4px; border-radius:6px;
|
|
7737
|
+
scrollbar-width:thin; scrollbar-color:var(--text-dim) transparent; }
|
|
7738
|
+
.approval-density-scroll::-webkit-scrollbar { width:8px; }
|
|
7739
|
+
.approval-density-scroll::-webkit-scrollbar-thumb { background:var(--text-dim); border-radius:5px; }
|
|
7740
|
+
.approval-density-scroll::-webkit-scrollbar-track { background:transparent; }
|
|
7741
|
+
.approval-density-scroll:focus-visible { outline:2px solid var(--accent); outline-offset:2px; }
|
|
7742
|
+
.approval-density-list, .approval-density-dropped { margin:0; padding:0; list-style:none; }
|
|
7743
|
+
.approval-density-row { padding:7px 0; border-top:1px solid var(--border); }
|
|
7744
|
+
.approval-density-list > .approval-density-row:first-child { border-top:0; padding-top:2px; }
|
|
7745
|
+
.approval-density-head { display:flex; align-items:center; justify-content:space-between; gap:12px; }
|
|
7746
|
+
.approval-density-head b { color:var(--text); font-weight:600; }
|
|
7747
|
+
.approval-density-layers { display:flex; flex-wrap:wrap; gap:2px 14px; margin-top:2px; color:var(--text); font-family:var(--mono); font-size:11px; font-variant-numeric:tabular-nums; }
|
|
7748
|
+
.approval-density-row-id { color:var(--text-dim); }
|
|
7749
|
+
.approval-density-row p { margin:3px 0 0; color:var(--text-muted); }
|
|
7750
|
+
.approval-density-new { margin-top:6px; }
|
|
7751
|
+
.approval-density-new .approval-density-list { padding-left:12px; }
|
|
7752
|
+
.approval-density-sub { margin:10px 0 4px; color:var(--text-muted); font-size:11px; font-weight:600; }
|
|
7753
|
+
.approval-density-dropped li { padding:3px 0 0 12px; color:var(--text-muted); }
|
|
7754
|
+
.approval-risk.ok { color:var(--ok); border-color:color-mix(in srgb, var(--ok) 45%, var(--border)); }
|
|
7755
|
+
/* On the --surface-2 panel the plain pill's --border-strong edge disappears in the dark theme. */
|
|
7756
|
+
.approval-density .approval-risk.low { border-color:var(--text-dim); }
|
|
7757
|
+
.approval-empty-note { display:block; margin-top:6px; color:var(--text-dim); }
|
|
7655
7758
|
/* Progress while saving, comparing, approving or checking: a short step list, the active step named,
|
|
7656
7759
|
with elapsed time so slow work reads as progress and never as a hang. State is carried by the mark's
|
|
7657
7760
|
SHAPE (tick, spinner, hollow ring) as well as its colour, and spoken by a hidden suffix. */
|
|
@@ -9421,6 +9524,8 @@ body:has(.ai-chat-viewer-backdrop.show) #instructor .ix-parts { display:block; f
|
|
|
9421
9524
|
.pv-banner[hidden] { display:none; }
|
|
9422
9525
|
.pv-banner-text { flex:1 1 360px; margin:0; font-size:12.5px; color:var(--text-muted); line-height:1.45; }
|
|
9423
9526
|
.pv-banner-text strong { color:var(--text); font-weight:600; }
|
|
9527
|
+
/* #3927 §13.11.2: the note a changed Teams question carries, above the question it replaced. */
|
|
9528
|
+
.pv-banner-text .pv-banner-note { display:block; margin-bottom:4px; color:var(--text); }
|
|
9424
9529
|
.pv-banner-path { color:var(--text-dim); }
|
|
9425
9530
|
.pv-banner-actions { display:flex; gap:8px; flex-shrink:0; }
|
|
9426
9531
|
.pv-banner-actions button { padding:5px 12px; }
|
|
@@ -10202,6 +10307,13 @@ input[type=number]::-webkit-inner-spin-button, input[type=number]::-webkit-outer
|
|
|
10202
10307
|
.teams-facts dt { color:var(--text-muted); }
|
|
10203
10308
|
.teams-facts dd { margin:0; color:var(--text); overflow-wrap:anywhere; }
|
|
10204
10309
|
.teams-callout { border-left:3px solid var(--warn); background:color-mix(in srgb, var(--warn) 7%, transparent); padding:9px 12px; border-radius:0 4px 4px 0; font-size:12px; color:var(--text); display:flex; flex-direction:column; gap:8px; }
|
|
10310
|
+
/* #3778: the one-time "this window answers Teams now" notice: the callout, in the success colour. */
|
|
10311
|
+
.teams-callout.ok { border-left-color:var(--ok); background:color-mix(in srgb, var(--ok) 7%, transparent); margin:0; }
|
|
10312
|
+
/* #3927: the Teams record warning: a change file named in full on hover (data-tip), never widening the dialog. */
|
|
10313
|
+
.teams-events-marker { display:flex; flex-direction:column; gap:6px; min-width:0; }
|
|
10314
|
+
.teams-events-file { font:12px/1.4 var(--mono); color:var(--text); min-width:0; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
|
|
10315
|
+
.teams-events .teams-callout:focus-visible { outline:2px solid var(--accent); outline-offset:2px; }
|
|
10316
|
+
.teams-answer-here-said { margin:6px 0 0; }
|
|
10205
10317
|
.teams-choice { border:1px solid var(--border); border-radius:6px; padding:8px 12px 10px; margin:0; display:flex; flex-direction:column; gap:6px; }
|
|
10206
10318
|
.teams-choice legend { padding:0 4px; color:var(--text-dim); font:10px var(--mono); letter-spacing:.08em; text-transform:uppercase; }
|
|
10207
10319
|
.teams-check { display:flex; align-items:flex-start; gap:8px; font-size:12px; color:var(--text); cursor:pointer; line-height:1.45; }
|
|
@@ -10326,13 +10438,6 @@ html.desktop .app > header {
|
|
|
10326
10438
|
html.desktop .app > header :is(button, a, input, select, textarea, .mode-switch, .wf-combo, .wf-popover, .wf-forked-pill,
|
|
10327
10439
|
.wf-update-pill, .ws-quick-chips, #run-state) { -webkit-app-region: no-drag; }
|
|
10328
10440
|
|
|
10329
|
-
/* The ≡ menu runs off the bottom of a short window: it scrolls instead (themed by the global scrollbar rule above). */
|
|
10330
|
-
html.desktop .menu {
|
|
10331
|
-
max-height: calc(100vh - var(--header-h) - 8px);
|
|
10332
|
-
overflow-y: auto;
|
|
10333
|
-
overscroll-behavior: contain;
|
|
10334
|
-
}
|
|
10335
|
-
|
|
10336
10441
|
/* The one-time "Go fullscreen" nudge is for a browser tab; the window has its own maximise. ≡ → Enter full screen stays. */
|
|
10337
10442
|
html.desktop .fullscreen-nudge { display: none; }
|
|
10338
10443
|
|
package/dist/web/app.js
CHANGED
|
@@ -234,7 +234,7 @@ function wireAskGuide(btn) {
|
|
|
234
234
|
if (!btn) return;
|
|
235
235
|
btn.onclick = () => {
|
|
236
236
|
if (window.flolessGuide?.open) { void window.flolessGuide.open({ returnFocus: btn }); return; }
|
|
237
|
-
showToast('The Guide
|
|
237
|
+
showToast('The Guide is still loading. If it doesn’t open in a few seconds, reload FloLess (Ctrl+R).', 'warn');
|
|
238
238
|
};
|
|
239
239
|
}
|
|
240
240
|
function wireOnboardingCopy() {
|
|
@@ -1661,17 +1661,48 @@ document.querySelectorAll('.theme-btn').forEach(b => {
|
|
|
1661
1661
|
const $startupRow = document.getElementById('menu-startup');
|
|
1662
1662
|
const $startupToggle = document.getElementById('startup-toggle');
|
|
1663
1663
|
|
|
1664
|
-
|
|
1664
|
+
const $startupStatus = document.getElementById('startup-status');
|
|
1665
|
+
const $startupChoices = document.getElementById('startup-choices');
|
|
1666
|
+
const $startupOn = document.getElementById('startup-on');
|
|
1667
|
+
const $startupOff = document.getElementById('startup-off');
|
|
1668
|
+
let startupRequest = 0;
|
|
1669
|
+
let startupChanging = false;
|
|
1670
|
+
|
|
1671
|
+
function paintStartupState(enabled, state) {
|
|
1672
|
+
if (!$startupToggle || !$startupStatus) return;
|
|
1673
|
+
const known = state !== 'unknown' && typeof enabled === 'boolean';
|
|
1674
|
+
$startupToggle.closest('label').hidden = !known;
|
|
1675
|
+
$startupToggle.disabled = startupChanging || !known;
|
|
1676
|
+
$startupStatus.hidden = known;
|
|
1677
|
+
$startupChoices.hidden = known;
|
|
1678
|
+
if (known) $startupToggle.checked = enabled;
|
|
1679
|
+
}
|
|
1680
|
+
|
|
1681
|
+
async function refreshStartup(retry = true) {
|
|
1682
|
+
if (startupChanging) return;
|
|
1683
|
+
const preserveUnknown = $startupRow?.hidden === false && $startupStatus?.hidden === false;
|
|
1684
|
+
const request = ++startupRequest;
|
|
1665
1685
|
try {
|
|
1666
1686
|
await globalThis.flolessStartupAdmission?.admit('/api/autostart');
|
|
1667
1687
|
const r = await fetch('/api/autostart');
|
|
1668
|
-
if (!r.ok)
|
|
1688
|
+
if (!r.ok) throw new Error('autostart-status-unavailable');
|
|
1669
1689
|
const d = await r.json();
|
|
1670
|
-
|
|
1690
|
+
if (request !== startupRequest) return;
|
|
1691
|
+
if (preserveUnknown && typeof d?.supported !== 'boolean') return;
|
|
1692
|
+
const supported = d.supported === true;
|
|
1671
1693
|
if ($startupRow) $startupRow.hidden = !supported;
|
|
1672
|
-
if (supported
|
|
1694
|
+
if (supported) paintStartupState(d.enabled, d.state);
|
|
1673
1695
|
showStartOnLoginLinks(supported);
|
|
1674
|
-
|
|
1696
|
+
if (retry && supported && d.enabled === null && $menu.classList.contains('show')) {
|
|
1697
|
+
setTimeout(() => {
|
|
1698
|
+
if (request === startupRequest && $menu.classList.contains('show')) void refreshStartup(false);
|
|
1699
|
+
}, 2700);
|
|
1700
|
+
}
|
|
1701
|
+
} catch {
|
|
1702
|
+
if (request !== startupRequest || preserveUnknown) return;
|
|
1703
|
+
if ($startupRow) $startupRow.hidden = true;
|
|
1704
|
+
showStartOnLoginLinks(false);
|
|
1705
|
+
}
|
|
1675
1706
|
}
|
|
1676
1707
|
|
|
1677
1708
|
// #2062: Routines run only while FloLess is running, so their dialogs point to this setting. The links follow the
|
|
@@ -1680,7 +1711,7 @@ function showStartOnLoginLinks(supported) {
|
|
|
1680
1711
|
document.querySelectorAll('[data-start-on-login-link], [data-start-on-login-hint]').forEach((node) => { node.hidden = !supported; });
|
|
1681
1712
|
}
|
|
1682
1713
|
|
|
1683
|
-
/** #2062: close whatever dialog asked, open the ≡ menu and put focus on the start-on-login
|
|
1714
|
+
/** #2062: close whatever dialog asked, open the ≡ menu and put focus on the start-on-login setting. */
|
|
1684
1715
|
async function revealStartOnLogin() {
|
|
1685
1716
|
// Read the setting first: if it has gone (or can't be read), say so and leave Routines open.
|
|
1686
1717
|
await refreshStartup();
|
|
@@ -1694,7 +1725,7 @@ async function revealStartOnLogin() {
|
|
|
1694
1725
|
$startupRow.classList.remove('is-pointed');
|
|
1695
1726
|
void $startupRow.offsetWidth; // re-arm the highlight on a repeat
|
|
1696
1727
|
$startupRow.classList.add('is-pointed');
|
|
1697
|
-
$startupToggle.focus({ preventScroll: false });
|
|
1728
|
+
($startupStatus && !$startupStatus.hidden ? $startupStatus : $startupToggle).focus({ preventScroll: false });
|
|
1698
1729
|
}
|
|
1699
1730
|
document.addEventListener('click', (event) => {
|
|
1700
1731
|
const link = event.target.closest?.('[data-start-on-login-link]');
|
|
@@ -1704,38 +1735,49 @@ document.addEventListener('click', (event) => {
|
|
|
1704
1735
|
void revealStartOnLogin();
|
|
1705
1736
|
}, true);
|
|
1706
1737
|
|
|
1707
|
-
|
|
1708
|
-
|
|
1709
|
-
|
|
1710
|
-
|
|
1711
|
-
|
|
1712
|
-
|
|
1713
|
-
|
|
1714
|
-
|
|
1715
|
-
|
|
1716
|
-
}
|
|
1717
|
-
|
|
1718
|
-
|
|
1719
|
-
|
|
1720
|
-
|
|
1721
|
-
|
|
1722
|
-
|
|
1723
|
-
|
|
1724
|
-
|
|
1725
|
-
|
|
1726
|
-
|
|
1727
|
-
|
|
1728
|
-
// UX review 2026-05-31: a preference write doesn't rise to a toast.
|
|
1729
|
-
} catch (e) {
|
|
1730
|
-
$startupToggle.checked = typeof e?.enabled === 'boolean' ? e.enabled : !want; // what Windows really has, else revert the optimistic flip
|
|
1731
|
-
showToast(e?.userMessage
|
|
1732
|
-
|| 'We couldn’t save that startup setting. Try again. If it keeps happening, reopen FloLess.', 'err');
|
|
1733
|
-
} finally {
|
|
1734
|
-
$startupToggle.disabled = false;
|
|
1738
|
+
async function changeStartup(want) {
|
|
1739
|
+
if (startupChanging) return;
|
|
1740
|
+
startupChanging = true;
|
|
1741
|
+
startupRequest++;
|
|
1742
|
+
$startupToggle.disabled = $startupOn.disabled = $startupOff.disabled = true;
|
|
1743
|
+
let reread = false;
|
|
1744
|
+
try {
|
|
1745
|
+
const r = await fetch('/api/autostart', {
|
|
1746
|
+
method: 'PUT',
|
|
1747
|
+
headers: { 'Content-Type': 'application/json' },
|
|
1748
|
+
body: JSON.stringify({ enabled: want }),
|
|
1749
|
+
});
|
|
1750
|
+
const d = await r.json().catch(() => ({}));
|
|
1751
|
+
if (!r.ok || !d.ok) {
|
|
1752
|
+
const failure = new Error('autostart-change-refused');
|
|
1753
|
+
// Plain words written by this route; `saved` marks them (any other failing body is not ours to show).
|
|
1754
|
+
failure.userMessage = typeof d.saved === 'boolean' && typeof d.error === 'string' && d.error ? d.error : null;
|
|
1755
|
+
// A refusal this route wrote carries what Windows really has: show that (#3070), never a guess.
|
|
1756
|
+
failure.observed = typeof d.saved === 'boolean' && typeof d.enabled === 'boolean' ? d.enabled : null;
|
|
1757
|
+
failure.answered = true;
|
|
1758
|
+
throw failure;
|
|
1735
1759
|
}
|
|
1736
|
-
|
|
1760
|
+
paintStartupState(d.enabled, d.state);
|
|
1761
|
+
// Success is silent — the switch position IS the confirmation (matches Theme).
|
|
1762
|
+
// UX review 2026-05-31: a preference write doesn't rise to a toast.
|
|
1763
|
+
} catch (e) {
|
|
1764
|
+
if (typeof e?.observed === 'boolean') paintStartupState(e.observed, e.observed ? 'present' : 'absent');
|
|
1765
|
+
else { paintStartupState(null, 'unknown'); reread = true; } // no observed state in the answer: ask again, never repaint the old one
|
|
1766
|
+
showToast(e?.userMessage || (e?.answered
|
|
1767
|
+
? 'We couldn’t save that startup setting. Try again. If it keeps happening, reopen FloLess.'
|
|
1768
|
+
: 'We couldn’t confirm the startup setting. Try again if the status stays unknown.'), 'err');
|
|
1769
|
+
} finally {
|
|
1770
|
+
startupChanging = false;
|
|
1771
|
+
$startupToggle.disabled = !$startupStatus.hidden;
|
|
1772
|
+
$startupOn.disabled = $startupOff.disabled = false;
|
|
1773
|
+
if (reread) void refreshStartup();
|
|
1774
|
+
}
|
|
1737
1775
|
}
|
|
1738
1776
|
|
|
1777
|
+
$startupToggle?.addEventListener('change', () => changeStartup($startupToggle.checked));
|
|
1778
|
+
$startupOn?.addEventListener('click', () => changeStartup(true));
|
|
1779
|
+
$startupOff?.addEventListener('click', () => changeStartup(false));
|
|
1780
|
+
|
|
1739
1781
|
// Initial read + a refresh each time the menu opens (state can change out-of-band,
|
|
1740
1782
|
// e.g. the user disabling the task in Windows Settings).
|
|
1741
1783
|
refreshStartup();
|
|
@@ -1871,6 +1913,15 @@ function authoredToastCopy(text) {
|
|
|
1871
1913
|
return { [Symbol.for('floless.authored-toast-copy')]: String(text ?? '') };
|
|
1872
1914
|
}
|
|
1873
1915
|
|
|
1916
|
+
function showStartPlaceToast(missing) {
|
|
1917
|
+
const message = missing === 'project'
|
|
1918
|
+
? 'The project you had open is no longer here, so FloLess opened Workspaces.'
|
|
1919
|
+
: missing === 'workflow'
|
|
1920
|
+
? 'The workflow you had open is no longer here, so FloLess opened Workspaces.'
|
|
1921
|
+
: 'Reopened where you left off.';
|
|
1922
|
+
showToast(message, 'info', { durationMs: 6000 });
|
|
1923
|
+
}
|
|
1924
|
+
|
|
1874
1925
|
function showToast(msg, type, options) {
|
|
1875
1926
|
const c = document.getElementById('toast-container');
|
|
1876
1927
|
const t = document.createElement('div');
|
|
@@ -1898,7 +1949,7 @@ function showToast(msg, type, options) {
|
|
|
1898
1949
|
// A toast carrying the only record of what happened may opt into persistence while
|
|
1899
1950
|
// keeping its styling. warn/err and every persistent toast get an × so they can
|
|
1900
1951
|
// always be closed.
|
|
1901
|
-
const ms = options?.persistent ? 0 : ({ ok: 2500, info: 2500, warn: 5000, err: 0, progress: 0 }[type] ?? 2500);
|
|
1952
|
+
const ms = options?.persistent ? 0 : options?.durationMs ?? ({ ok: 2500, info: 2500, warn: 5000, err: 0, progress: 0 }[type] ?? 2500);
|
|
1902
1953
|
if (type === 'warn' || type === 'err' || options?.persistent) {
|
|
1903
1954
|
const x = document.createElement('button');
|
|
1904
1955
|
x.className = 'toast-close';
|