@floless/app 0.167.0 → 0.168.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 +169 -63
- package/desktop-shell.mjs +335 -0
- package/dist/floless-server.cjs +14518 -11361
- package/dist/schemas/steel.model.v2.schema.json +2 -1
- package/dist/skills/floless-app-onboarding/SKILL.md +13 -4
- package/dist/skills/floless-app-onboarding/references/floless-surfaces.md +3 -0
- package/dist/skills/floless-app-steel-takeoff/SKILL.md +21 -2
- package/dist/skills/floless-app-ui/SKILL.md +2 -2
- package/dist/skills/floless-app-workflows/SKILL.md +2 -2
- package/dist/web/agents.js +1 -1
- package/dist/web/app.css +165 -8
- package/dist/web/app.js +53 -13
- package/dist/web/aware-update-client.js +13 -5
- package/dist/web/aware.js +183 -39
- package/dist/web/chat.css +2 -1
- package/dist/web/chat.js +410 -80
- package/dist/web/commands-filter.js +5 -5
- package/dist/web/commands-shell.js +172 -10
- package/dist/web/commands-steel.js +1 -1
- package/dist/web/desktop-window.js +435 -0
- package/dist/web/drawing-check-editor.js +18 -10
- package/dist/web/failure-copy.js +14 -1
- package/dist/web/guide.js +75 -9
- package/dist/web/index.html +64 -6
- package/dist/web/instructor.js +1 -1
- package/dist/web/leave-guard.js +347 -14
- package/dist/web/pages.js +5 -1
- package/dist/web/panels.js +5 -2
- package/dist/web/pdf-view.js +421 -0
- package/dist/web/project-history.js +2 -1
- package/dist/web/project-modules.js +3 -1
- package/dist/web/project-rfis.js +3 -1
- package/dist/web/project-workflows.js +4 -2
- package/dist/web/reference-geometry-worker.js +11 -2
- package/dist/web/revit-editor.html +1 -0
- package/dist/web/revit-editor.js +37 -8
- package/dist/web/shared-prefs.js +364 -0
- package/dist/web/steel-editor.html +204 -43
- package/dist/web/steel-filter-flo.js +74 -18
- package/dist/web/steel-filter.html +22 -6
- package/dist/web/tab-signal.js +36 -1
- package/dist/web/tekla-editor.html +1 -0
- package/dist/web/tool-updates.js +159 -38
- package/dist/web/vector-3d.html +14 -3
- package/dist/web/vector-editor.html +10 -2
- package/dist/web/vendor/README.md +23 -0
- package/dist/web/vendor/pdfjs/LICENSE +177 -0
- package/dist/web/vendor/pdfjs/cmaps/78-EUC-H.bcmap +0 -0
- package/dist/web/vendor/pdfjs/cmaps/78-EUC-V.bcmap +0 -0
- package/dist/web/vendor/pdfjs/cmaps/78-H.bcmap +0 -0
- package/dist/web/vendor/pdfjs/cmaps/78-RKSJ-H.bcmap +0 -0
- package/dist/web/vendor/pdfjs/cmaps/78-RKSJ-V.bcmap +0 -0
- package/dist/web/vendor/pdfjs/cmaps/78-V.bcmap +0 -0
- package/dist/web/vendor/pdfjs/cmaps/78ms-RKSJ-H.bcmap +0 -0
- package/dist/web/vendor/pdfjs/cmaps/78ms-RKSJ-V.bcmap +0 -0
- package/dist/web/vendor/pdfjs/cmaps/83pv-RKSJ-H.bcmap +0 -0
- package/dist/web/vendor/pdfjs/cmaps/90ms-RKSJ-H.bcmap +0 -0
- package/dist/web/vendor/pdfjs/cmaps/90ms-RKSJ-V.bcmap +0 -0
- package/dist/web/vendor/pdfjs/cmaps/90msp-RKSJ-H.bcmap +0 -0
- package/dist/web/vendor/pdfjs/cmaps/90msp-RKSJ-V.bcmap +0 -0
- package/dist/web/vendor/pdfjs/cmaps/90pv-RKSJ-H.bcmap +0 -0
- package/dist/web/vendor/pdfjs/cmaps/90pv-RKSJ-V.bcmap +0 -0
- package/dist/web/vendor/pdfjs/cmaps/Add-H.bcmap +0 -0
- package/dist/web/vendor/pdfjs/cmaps/Add-RKSJ-H.bcmap +0 -0
- package/dist/web/vendor/pdfjs/cmaps/Add-RKSJ-V.bcmap +0 -0
- package/dist/web/vendor/pdfjs/cmaps/Add-V.bcmap +0 -0
- package/dist/web/vendor/pdfjs/cmaps/Adobe-CNS1-0.bcmap +0 -0
- package/dist/web/vendor/pdfjs/cmaps/Adobe-CNS1-1.bcmap +0 -0
- package/dist/web/vendor/pdfjs/cmaps/Adobe-CNS1-2.bcmap +0 -0
- package/dist/web/vendor/pdfjs/cmaps/Adobe-CNS1-3.bcmap +0 -0
- package/dist/web/vendor/pdfjs/cmaps/Adobe-CNS1-4.bcmap +0 -0
- package/dist/web/vendor/pdfjs/cmaps/Adobe-CNS1-5.bcmap +0 -0
- package/dist/web/vendor/pdfjs/cmaps/Adobe-CNS1-6.bcmap +0 -0
- package/dist/web/vendor/pdfjs/cmaps/Adobe-CNS1-UCS2.bcmap +0 -0
- package/dist/web/vendor/pdfjs/cmaps/Adobe-GB1-0.bcmap +0 -0
- package/dist/web/vendor/pdfjs/cmaps/Adobe-GB1-1.bcmap +0 -0
- package/dist/web/vendor/pdfjs/cmaps/Adobe-GB1-2.bcmap +0 -0
- package/dist/web/vendor/pdfjs/cmaps/Adobe-GB1-3.bcmap +0 -0
- package/dist/web/vendor/pdfjs/cmaps/Adobe-GB1-4.bcmap +0 -0
- package/dist/web/vendor/pdfjs/cmaps/Adobe-GB1-5.bcmap +0 -0
- package/dist/web/vendor/pdfjs/cmaps/Adobe-GB1-UCS2.bcmap +0 -0
- package/dist/web/vendor/pdfjs/cmaps/Adobe-Japan1-0.bcmap +0 -0
- package/dist/web/vendor/pdfjs/cmaps/Adobe-Japan1-1.bcmap +0 -0
- package/dist/web/vendor/pdfjs/cmaps/Adobe-Japan1-2.bcmap +0 -0
- package/dist/web/vendor/pdfjs/cmaps/Adobe-Japan1-3.bcmap +0 -0
- package/dist/web/vendor/pdfjs/cmaps/Adobe-Japan1-4.bcmap +0 -0
- package/dist/web/vendor/pdfjs/cmaps/Adobe-Japan1-5.bcmap +0 -0
- package/dist/web/vendor/pdfjs/cmaps/Adobe-Japan1-6.bcmap +0 -0
- package/dist/web/vendor/pdfjs/cmaps/Adobe-Japan1-UCS2.bcmap +0 -0
- package/dist/web/vendor/pdfjs/cmaps/Adobe-Korea1-0.bcmap +0 -0
- package/dist/web/vendor/pdfjs/cmaps/Adobe-Korea1-1.bcmap +0 -0
- package/dist/web/vendor/pdfjs/cmaps/Adobe-Korea1-2.bcmap +0 -0
- package/dist/web/vendor/pdfjs/cmaps/Adobe-Korea1-UCS2.bcmap +0 -0
- package/dist/web/vendor/pdfjs/cmaps/B5-H.bcmap +0 -0
- package/dist/web/vendor/pdfjs/cmaps/B5-V.bcmap +0 -0
- package/dist/web/vendor/pdfjs/cmaps/B5pc-H.bcmap +0 -0
- package/dist/web/vendor/pdfjs/cmaps/B5pc-V.bcmap +0 -0
- package/dist/web/vendor/pdfjs/cmaps/CNS-EUC-H.bcmap +0 -0
- package/dist/web/vendor/pdfjs/cmaps/CNS-EUC-V.bcmap +0 -0
- package/dist/web/vendor/pdfjs/cmaps/CNS1-H.bcmap +0 -0
- package/dist/web/vendor/pdfjs/cmaps/CNS1-V.bcmap +0 -0
- package/dist/web/vendor/pdfjs/cmaps/CNS2-H.bcmap +0 -0
- package/dist/web/vendor/pdfjs/cmaps/CNS2-V.bcmap +3 -0
- package/dist/web/vendor/pdfjs/cmaps/ETHK-B5-H.bcmap +0 -0
- package/dist/web/vendor/pdfjs/cmaps/ETHK-B5-V.bcmap +0 -0
- package/dist/web/vendor/pdfjs/cmaps/ETen-B5-H.bcmap +0 -0
- package/dist/web/vendor/pdfjs/cmaps/ETen-B5-V.bcmap +0 -0
- package/dist/web/vendor/pdfjs/cmaps/ETenms-B5-H.bcmap +3 -0
- package/dist/web/vendor/pdfjs/cmaps/ETenms-B5-V.bcmap +0 -0
- package/dist/web/vendor/pdfjs/cmaps/EUC-H.bcmap +0 -0
- package/dist/web/vendor/pdfjs/cmaps/EUC-V.bcmap +0 -0
- package/dist/web/vendor/pdfjs/cmaps/Ext-H.bcmap +0 -0
- package/dist/web/vendor/pdfjs/cmaps/Ext-RKSJ-H.bcmap +0 -0
- package/dist/web/vendor/pdfjs/cmaps/Ext-RKSJ-V.bcmap +0 -0
- package/dist/web/vendor/pdfjs/cmaps/Ext-V.bcmap +0 -0
- package/dist/web/vendor/pdfjs/cmaps/GB-EUC-H.bcmap +0 -0
- package/dist/web/vendor/pdfjs/cmaps/GB-EUC-V.bcmap +0 -0
- package/dist/web/vendor/pdfjs/cmaps/GB-H.bcmap +4 -0
- package/dist/web/vendor/pdfjs/cmaps/GB-V.bcmap +0 -0
- package/dist/web/vendor/pdfjs/cmaps/GBK-EUC-H.bcmap +0 -0
- package/dist/web/vendor/pdfjs/cmaps/GBK-EUC-V.bcmap +0 -0
- package/dist/web/vendor/pdfjs/cmaps/GBK2K-H.bcmap +0 -0
- package/dist/web/vendor/pdfjs/cmaps/GBK2K-V.bcmap +0 -0
- package/dist/web/vendor/pdfjs/cmaps/GBKp-EUC-H.bcmap +0 -0
- package/dist/web/vendor/pdfjs/cmaps/GBKp-EUC-V.bcmap +0 -0
- package/dist/web/vendor/pdfjs/cmaps/GBT-EUC-H.bcmap +0 -0
- package/dist/web/vendor/pdfjs/cmaps/GBT-EUC-V.bcmap +0 -0
- package/dist/web/vendor/pdfjs/cmaps/GBT-H.bcmap +0 -0
- package/dist/web/vendor/pdfjs/cmaps/GBT-V.bcmap +0 -0
- package/dist/web/vendor/pdfjs/cmaps/GBTpc-EUC-H.bcmap +0 -0
- package/dist/web/vendor/pdfjs/cmaps/GBTpc-EUC-V.bcmap +0 -0
- package/dist/web/vendor/pdfjs/cmaps/GBpc-EUC-H.bcmap +0 -0
- package/dist/web/vendor/pdfjs/cmaps/GBpc-EUC-V.bcmap +0 -0
- package/dist/web/vendor/pdfjs/cmaps/H.bcmap +0 -0
- package/dist/web/vendor/pdfjs/cmaps/HKdla-B5-H.bcmap +0 -0
- package/dist/web/vendor/pdfjs/cmaps/HKdla-B5-V.bcmap +0 -0
- package/dist/web/vendor/pdfjs/cmaps/HKdlb-B5-H.bcmap +0 -0
- package/dist/web/vendor/pdfjs/cmaps/HKdlb-B5-V.bcmap +0 -0
- package/dist/web/vendor/pdfjs/cmaps/HKgccs-B5-H.bcmap +0 -0
- package/dist/web/vendor/pdfjs/cmaps/HKgccs-B5-V.bcmap +0 -0
- package/dist/web/vendor/pdfjs/cmaps/HKm314-B5-H.bcmap +0 -0
- package/dist/web/vendor/pdfjs/cmaps/HKm314-B5-V.bcmap +0 -0
- package/dist/web/vendor/pdfjs/cmaps/HKm471-B5-H.bcmap +0 -0
- package/dist/web/vendor/pdfjs/cmaps/HKm471-B5-V.bcmap +0 -0
- package/dist/web/vendor/pdfjs/cmaps/HKscs-B5-H.bcmap +0 -0
- package/dist/web/vendor/pdfjs/cmaps/HKscs-B5-V.bcmap +0 -0
- package/dist/web/vendor/pdfjs/cmaps/Hankaku.bcmap +0 -0
- package/dist/web/vendor/pdfjs/cmaps/Hiragana.bcmap +0 -0
- package/dist/web/vendor/pdfjs/cmaps/KSC-EUC-H.bcmap +0 -0
- package/dist/web/vendor/pdfjs/cmaps/KSC-EUC-V.bcmap +0 -0
- package/dist/web/vendor/pdfjs/cmaps/KSC-H.bcmap +0 -0
- package/dist/web/vendor/pdfjs/cmaps/KSC-Johab-H.bcmap +0 -0
- package/dist/web/vendor/pdfjs/cmaps/KSC-Johab-V.bcmap +0 -0
- package/dist/web/vendor/pdfjs/cmaps/KSC-V.bcmap +0 -0
- package/dist/web/vendor/pdfjs/cmaps/KSCms-UHC-H.bcmap +0 -0
- package/dist/web/vendor/pdfjs/cmaps/KSCms-UHC-HW-H.bcmap +0 -0
- package/dist/web/vendor/pdfjs/cmaps/KSCms-UHC-HW-V.bcmap +0 -0
- package/dist/web/vendor/pdfjs/cmaps/KSCms-UHC-V.bcmap +0 -0
- package/dist/web/vendor/pdfjs/cmaps/KSCpc-EUC-H.bcmap +0 -0
- package/dist/web/vendor/pdfjs/cmaps/KSCpc-EUC-V.bcmap +0 -0
- package/dist/web/vendor/pdfjs/cmaps/Katakana.bcmap +0 -0
- package/dist/web/vendor/pdfjs/cmaps/LICENSE +36 -0
- package/dist/web/vendor/pdfjs/cmaps/NWP-H.bcmap +0 -0
- package/dist/web/vendor/pdfjs/cmaps/NWP-V.bcmap +0 -0
- package/dist/web/vendor/pdfjs/cmaps/RKSJ-H.bcmap +0 -0
- package/dist/web/vendor/pdfjs/cmaps/RKSJ-V.bcmap +0 -0
- package/dist/web/vendor/pdfjs/cmaps/Roman.bcmap +0 -0
- package/dist/web/vendor/pdfjs/cmaps/UniCNS-UCS2-H.bcmap +0 -0
- package/dist/web/vendor/pdfjs/cmaps/UniCNS-UCS2-V.bcmap +0 -0
- package/dist/web/vendor/pdfjs/cmaps/UniCNS-UTF16-H.bcmap +0 -0
- package/dist/web/vendor/pdfjs/cmaps/UniCNS-UTF16-V.bcmap +0 -0
- package/dist/web/vendor/pdfjs/cmaps/UniCNS-UTF32-H.bcmap +0 -0
- package/dist/web/vendor/pdfjs/cmaps/UniCNS-UTF32-V.bcmap +0 -0
- package/dist/web/vendor/pdfjs/cmaps/UniCNS-UTF8-H.bcmap +0 -0
- package/dist/web/vendor/pdfjs/cmaps/UniCNS-UTF8-V.bcmap +0 -0
- package/dist/web/vendor/pdfjs/cmaps/UniGB-UCS2-H.bcmap +0 -0
- package/dist/web/vendor/pdfjs/cmaps/UniGB-UCS2-V.bcmap +0 -0
- package/dist/web/vendor/pdfjs/cmaps/UniGB-UTF16-H.bcmap +0 -0
- package/dist/web/vendor/pdfjs/cmaps/UniGB-UTF16-V.bcmap +0 -0
- package/dist/web/vendor/pdfjs/cmaps/UniGB-UTF32-H.bcmap +0 -0
- package/dist/web/vendor/pdfjs/cmaps/UniGB-UTF32-V.bcmap +0 -0
- package/dist/web/vendor/pdfjs/cmaps/UniGB-UTF8-H.bcmap +0 -0
- package/dist/web/vendor/pdfjs/cmaps/UniGB-UTF8-V.bcmap +0 -0
- package/dist/web/vendor/pdfjs/cmaps/UniJIS-UCS2-H.bcmap +0 -0
- package/dist/web/vendor/pdfjs/cmaps/UniJIS-UCS2-HW-H.bcmap +0 -0
- package/dist/web/vendor/pdfjs/cmaps/UniJIS-UCS2-HW-V.bcmap +0 -0
- package/dist/web/vendor/pdfjs/cmaps/UniJIS-UCS2-V.bcmap +0 -0
- package/dist/web/vendor/pdfjs/cmaps/UniJIS-UTF16-H.bcmap +0 -0
- package/dist/web/vendor/pdfjs/cmaps/UniJIS-UTF16-V.bcmap +0 -0
- package/dist/web/vendor/pdfjs/cmaps/UniJIS-UTF32-H.bcmap +0 -0
- package/dist/web/vendor/pdfjs/cmaps/UniJIS-UTF32-V.bcmap +0 -0
- package/dist/web/vendor/pdfjs/cmaps/UniJIS-UTF8-H.bcmap +0 -0
- package/dist/web/vendor/pdfjs/cmaps/UniJIS-UTF8-V.bcmap +0 -0
- package/dist/web/vendor/pdfjs/cmaps/UniJIS2004-UTF16-H.bcmap +0 -0
- package/dist/web/vendor/pdfjs/cmaps/UniJIS2004-UTF16-V.bcmap +0 -0
- package/dist/web/vendor/pdfjs/cmaps/UniJIS2004-UTF32-H.bcmap +0 -0
- package/dist/web/vendor/pdfjs/cmaps/UniJIS2004-UTF32-V.bcmap +0 -0
- package/dist/web/vendor/pdfjs/cmaps/UniJIS2004-UTF8-H.bcmap +0 -0
- package/dist/web/vendor/pdfjs/cmaps/UniJIS2004-UTF8-V.bcmap +0 -0
- package/dist/web/vendor/pdfjs/cmaps/UniJISPro-UCS2-HW-V.bcmap +0 -0
- package/dist/web/vendor/pdfjs/cmaps/UniJISPro-UCS2-V.bcmap +0 -0
- package/dist/web/vendor/pdfjs/cmaps/UniJISPro-UTF8-V.bcmap +0 -0
- package/dist/web/vendor/pdfjs/cmaps/UniJISX0213-UTF32-H.bcmap +0 -0
- package/dist/web/vendor/pdfjs/cmaps/UniJISX0213-UTF32-V.bcmap +0 -0
- package/dist/web/vendor/pdfjs/cmaps/UniJISX02132004-UTF32-H.bcmap +0 -0
- package/dist/web/vendor/pdfjs/cmaps/UniJISX02132004-UTF32-V.bcmap +0 -0
- package/dist/web/vendor/pdfjs/cmaps/UniKS-UCS2-H.bcmap +0 -0
- package/dist/web/vendor/pdfjs/cmaps/UniKS-UCS2-V.bcmap +0 -0
- package/dist/web/vendor/pdfjs/cmaps/UniKS-UTF16-H.bcmap +0 -0
- package/dist/web/vendor/pdfjs/cmaps/UniKS-UTF16-V.bcmap +0 -0
- package/dist/web/vendor/pdfjs/cmaps/UniKS-UTF32-H.bcmap +0 -0
- package/dist/web/vendor/pdfjs/cmaps/UniKS-UTF32-V.bcmap +0 -0
- package/dist/web/vendor/pdfjs/cmaps/UniKS-UTF8-H.bcmap +0 -0
- package/dist/web/vendor/pdfjs/cmaps/UniKS-UTF8-V.bcmap +0 -0
- package/dist/web/vendor/pdfjs/cmaps/V.bcmap +0 -0
- package/dist/web/vendor/pdfjs/cmaps/WP-Symbol.bcmap +0 -0
- package/dist/web/vendor/pdfjs/iccs/CGATS001Compat-v2-micro.icc +0 -0
- package/dist/web/vendor/pdfjs/iccs/LICENSE +116 -0
- package/dist/web/vendor/pdfjs/pdf.min.mjs +28 -0
- package/dist/web/vendor/pdfjs/pdf.worker.mjs +64908 -0
- package/dist/web/vendor/pdfjs/standard_fonts/FoxitDingbats.pfb +0 -0
- package/dist/web/vendor/pdfjs/standard_fonts/FoxitFixed.pfb +0 -0
- package/dist/web/vendor/pdfjs/standard_fonts/FoxitFixedBold.pfb +0 -0
- package/dist/web/vendor/pdfjs/standard_fonts/FoxitFixedBoldItalic.pfb +0 -0
- package/dist/web/vendor/pdfjs/standard_fonts/FoxitFixedItalic.pfb +0 -0
- package/dist/web/vendor/pdfjs/standard_fonts/FoxitSerif.pfb +0 -0
- package/dist/web/vendor/pdfjs/standard_fonts/FoxitSerifBold.pfb +0 -0
- package/dist/web/vendor/pdfjs/standard_fonts/FoxitSerifBoldItalic.pfb +0 -0
- package/dist/web/vendor/pdfjs/standard_fonts/FoxitSerifItalic.pfb +0 -0
- package/dist/web/vendor/pdfjs/standard_fonts/FoxitSymbol.pfb +0 -0
- package/dist/web/vendor/pdfjs/standard_fonts/LICENSE_FOXIT +27 -0
- package/dist/web/vendor/pdfjs/standard_fonts/LICENSE_LIBERATION +363 -0
- package/dist/web/vendor/pdfjs/standard_fonts/LiberationSans-Bold.ttf +0 -0
- package/dist/web/vendor/pdfjs/standard_fonts/LiberationSans-BoldItalic.ttf +0 -0
- package/dist/web/vendor/pdfjs/standard_fonts/LiberationSans-Italic.ttf +0 -0
- package/dist/web/vendor/pdfjs/standard_fonts/LiberationSans-Regular.ttf +0 -0
- package/dist/web/vendor/pdfjs/wasm/LICENSE_JBIG2 +196 -0
- package/dist/web/vendor/pdfjs/wasm/LICENSE_OPENJPEG +39 -0
- package/dist/web/vendor/pdfjs/wasm/LICENSE_PDFJS_JBIG2 +13 -0
- package/dist/web/vendor/pdfjs/wasm/LICENSE_PDFJS_OPENJPEG +22 -0
- package/dist/web/vendor/pdfjs/wasm/LICENSE_PDFJS_QCMS +19 -0
- package/dist/web/vendor/pdfjs/wasm/LICENSE_QCMS +21 -0
- package/dist/web/vendor/pdfjs/wasm/jbig2.wasm +0 -0
- package/dist/web/vendor/pdfjs/wasm/jbig2_nowasm_fallback.js +15 -0
- package/dist/web/vendor/pdfjs/wasm/openjpeg.wasm +0 -0
- package/dist/web/vendor/pdfjs/wasm/openjpeg_nowasm_fallback.js +17 -0
- package/dist/web/vendor/pdfjs/wasm/qcms_bg.wasm +0 -0
- package/dist/web/workspaces.js +167 -26
- package/home-env.mjs +28 -0
- package/install-path.mjs +59 -3
- package/launch-starting-page.mjs +35 -15
- package/launch.mjs +358 -51
- package/package.json +2 -1
- package/pin-home.mjs +6 -0
- package/post-update-marker.mjs +14 -0
- package/preferences-file.mjs +289 -0
- package/supervisor-lock.mjs +195 -0
|
Binary file
|
package/dist/web/workspaces.js
CHANGED
|
@@ -18,13 +18,12 @@
|
|
|
18
18
|
const { timeoutMs, ...requestOptions } = opts;
|
|
19
19
|
if (!requestOptions.signal && Number.isFinite(timeoutMs)) requestOptions.signal = AbortSignal.timeout(timeoutMs);
|
|
20
20
|
const res = await fetch(path, { headers: { 'content-type': 'application/json' }, ...requestOptions });
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
code: 'response-unreadable',
|
|
24
|
-
error: `FloLess received an unreadable response (HTTP ${res.status}).`,
|
|
25
|
-
}));
|
|
21
|
+
// An answer that is not FloLess's JSON keeps its code; the sentence comes from failureCopy below, never the status.
|
|
22
|
+
const body = await res.json().catch(() => ({ ok: false, code: 'response-unreadable' }));
|
|
26
23
|
if (!res.ok || body.ok === false) {
|
|
27
|
-
|
|
24
|
+
// #3097: the server's own sentence when it wrote one, else the shared one; never "HTTP <status>".
|
|
25
|
+
const readOnly = /^(GET|HEAD)$/.test(String(requestOptions.method || 'GET').toUpperCase());
|
|
26
|
+
const e = new Error(body.error || failureCopy({ status: res.status, body }, { retrySafe: readOnly }).text);
|
|
28
27
|
e.body = body;
|
|
29
28
|
e.status = res.status;
|
|
30
29
|
throw e;
|
|
@@ -1749,7 +1748,8 @@
|
|
|
1749
1748
|
// Remember WHY, so renderLanding can say "couldn't load" instead of "none yet" (they look
|
|
1750
1749
|
// identical from `projects` alone). Cleared on the next success, so a recovered load drops
|
|
1751
1750
|
// straight back to the normal empty state.
|
|
1752
|
-
|
|
1751
|
+
// The error itself, not only its text: #3097 took the status out of the text, and the hint still reads it.
|
|
1752
|
+
projectsLoadError = err || new Error('projects could not be loaded');
|
|
1753
1753
|
if (!(opts && opts.quiet)) showToast('Couldn’t load projects. Check the Workspace directory and try again.', 'warn');
|
|
1754
1754
|
}
|
|
1755
1755
|
// Paint the moment the LIST is in hand — before the archived call, not after it. That call is a
|
|
@@ -2430,10 +2430,11 @@
|
|
|
2430
2430
|
// the Knowledge viewer. Returns '' for anything unrecognised — better to show only the raw detail
|
|
2431
2431
|
// than to guess wrong about why. The raw string is shown either way, just demoted.
|
|
2432
2432
|
function projectsErrorHint(reason) {
|
|
2433
|
-
const
|
|
2434
|
-
|
|
2433
|
+
const status = Number(reason && reason.status) || 0;
|
|
2434
|
+
const r = String((reason && reason.message) || reason || '').toLowerCase();
|
|
2435
|
+
if (status === 401 || status === 402 || /subscription|session|sign in|402/.test(r)) return 'Your sign-in needs refreshing — sign in again, then retry.';
|
|
2435
2436
|
if (/failed to fetch|networkerror|load failed|econnrefused|connection/.test(r)) return 'The local server didn’t answer.';
|
|
2436
|
-
if (/http 5\d\d/.test(r)) return 'The server hit an error listing them.';
|
|
2437
|
+
if (status >= 500 || /http 5\d\d/.test(r)) return 'The server hit an error listing them.';
|
|
2437
2438
|
return '';
|
|
2438
2439
|
}
|
|
2439
2440
|
|
|
@@ -5055,7 +5056,13 @@
|
|
|
5055
5056
|
},
|
|
5056
5057
|
});
|
|
5057
5058
|
const uploaded = await upload.json().catch(() => ({}));
|
|
5058
|
-
|
|
5059
|
+
// #3097: the server's own sentence when it wrote one, else the shared one; never "(<status>)".
|
|
5060
|
+
if (!upload.ok || uploaded.ok === false) {
|
|
5061
|
+
console.warn('[rvt] upload refused', upload.status, uploaded);
|
|
5062
|
+
throw Object.assign(new Error(uploaded.message || uploaded.error
|
|
5063
|
+
|| failureCopy({ status: upload.status, body: uploaded }, { action: 'copy the RVT file to FloLess', unsure: 'Choose the RVT file again.' }).text),
|
|
5064
|
+
{ status: upload.status, body: uploaded });
|
|
5065
|
+
}
|
|
5059
5066
|
const receipt = uploaded.receipt;
|
|
5060
5067
|
const started = await api('/api/model-imports', { method: 'POST', body: JSON.stringify({
|
|
5061
5068
|
projectUuid: project.uuid, generation: receipt.generation, sourceSha256: receipt.sourceSha256,
|
|
@@ -5483,7 +5490,7 @@
|
|
|
5483
5490
|
// reset below; until the new document says it is ready, no step message goes to the old one.
|
|
5484
5491
|
editorBridge = null;
|
|
5485
5492
|
// #1890: a new workspace conversation suggests this project's units (the one opened last).
|
|
5486
|
-
try { localStorage.setItem('floless:last-project', p.id); } catch { /* private mode: no suggestion */ }
|
|
5493
|
+
try { if (window.flolessPrefs) window.flolessPrefs.set('lastProject', p.id); else localStorage.setItem('floless:last-project', p.id); } catch { /* private mode: no suggestion */ }
|
|
5487
5494
|
revitSourceState = null;
|
|
5488
5495
|
revitActiveOperation = null;
|
|
5489
5496
|
// Project lifecycle is project-scoped. Reset it before the first setStep so one project's model
|
|
@@ -6016,10 +6023,22 @@
|
|
|
6016
6023
|
return !!l && typeof l === 'object' && typeof l.pageId === 'string' && FLO_HASH.test(l.sourceHash)
|
|
6017
6024
|
&& Number.isSafeInteger(l.pageNumber) && l.pageNumber >= 1 && Number.isSafeInteger(l.part) && l.part >= 0 && l.part <= 9
|
|
6018
6025
|
&& Number.isSafeInteger(l.seq) && Number.isFinite(l.ageMs) && l.ageMs >= 0
|
|
6026
|
+
&& (l.tiles === undefined || (Number.isSafeInteger(l.tiles) && l.tiles >= 0 && l.tiles <= 16))
|
|
6019
6027
|
&& (l.rect === null || (Array.isArray(l.rect) && l.rect.length === 4 && l.rect.every((v) => Number.isFinite(v) && v >= 0 && v <= 1)
|
|
6020
6028
|
&& l.rect[2] > l.rect[0] && l.rect[3] > l.rect[1]));
|
|
6021
6029
|
}
|
|
6022
6030
|
|
|
6031
|
+
/**
|
|
6032
|
+
* #3093: the sheets the read was handed a picture of (`steelSeen`), when it is well formed; else null, and Flo says no
|
|
6033
|
+
* count. `whole` is false when the list may be missing some (the server restarted, or forgot looks to make room).
|
|
6034
|
+
*/
|
|
6035
|
+
function floSeenOk(seen) {
|
|
6036
|
+
if (!seen || typeof seen !== 'object' || !Array.isArray(seen.sheets) || seen.sheets.length > 512) return null;
|
|
6037
|
+
const sheets = seen.sheets.filter((s) => s && FLO_HASH.test(s.sourceHash) && Number.isSafeInteger(s.pageNumber) && s.pageNumber >= 1);
|
|
6038
|
+
if (sheets.length !== seen.sheets.length) return null;
|
|
6039
|
+
return { sheets, whole: seen.sinceStart === true && seen.complete === true };
|
|
6040
|
+
}
|
|
6041
|
+
|
|
6023
6042
|
/**
|
|
6024
6043
|
* #2926: what the Drawing Filter's Flo shows for the read the progress strip speaks for, from that read's own
|
|
6025
6044
|
* signals only. `reading` while it is evidently working (with the sheet pictures it last asked for), `waiting`
|
|
@@ -6062,27 +6081,30 @@
|
|
|
6062
6081
|
return { mode: 'waiting', text, chat: inChat };
|
|
6063
6082
|
}
|
|
6064
6083
|
const looks = (Array.isArray(req.steelLooks) ? req.steelLooks : []).filter(floLookOk);
|
|
6084
|
+
// #3093: the strip shows the AI's own sentence right above the stage, so Flo never repeats it. It says where it is,
|
|
6085
|
+
// from the looks, and how many sheets it has looked at; `note` is only for a sentence the strip does not show.
|
|
6086
|
+
const reading = (extra) => ({ mode: 'reading', looks, seen: floSeenOk(req.steelSeen), ...extra });
|
|
6065
6087
|
const freshPictures = looks.some((l) => l.ageMs < (busy ? FLO_BUSY_LOOK_MS : FLO_FRESH_WORK_MS));
|
|
6066
6088
|
// Seen on a real read in AI Chat (2026-11-01): the AI fetched S-201 tile by tile before it wrote its first
|
|
6067
6089
|
// progress record, and Flo stayed hidden while it read. Its pictures prove the work; the words say what is unknown.
|
|
6068
6090
|
// The same after Save: the record still says "waiting for you to press Save filter" (a wait the conversation has
|
|
6069
6091
|
// moved past, above) until the AI next writes it.
|
|
6070
6092
|
if (!view || raw === 'waiting') {
|
|
6071
|
-
return freshPictures ? {
|
|
6093
|
+
return freshPictures ? reading({ note: 'Its progress list has not caught up yet.' })
|
|
6072
6094
|
: off(view ? 'not-active' : 'no-record');
|
|
6073
6095
|
}
|
|
6074
6096
|
if (raw !== 'active') return off('not-active');
|
|
6075
6097
|
// A record the AI has not rewritten for 8 minutes is stale, but pictures it asked for in the last two, or its
|
|
6076
6098
|
// conversation still running, prove it is still at work (seen on a real read, #2926: tiles seconds old, sentence
|
|
6077
|
-
// 9 minutes old). Flo keeps going then
|
|
6099
|
+
// 9 minutes old). Flo keeps going then; the strip itself says its sentence is the last one reported.
|
|
6078
6100
|
if (view.state !== 'active') {
|
|
6079
|
-
return freshPictures || chatWorking ?
|
|
6101
|
+
return freshPictures || chatWorking ? reading({}) : off('not-active');
|
|
6080
6102
|
}
|
|
6081
6103
|
// Pictures for this very read are proof of work even when the chat calls its turn busy elsewhere, which it
|
|
6082
6104
|
// does whenever the person typed into the read's conversation and the read carried on.
|
|
6083
6105
|
const working = freshPictures || !inChat || chatWorking;
|
|
6084
6106
|
if (!working) return off('idle');
|
|
6085
|
-
return
|
|
6107
|
+
return reading({});
|
|
6086
6108
|
}
|
|
6087
6109
|
|
|
6088
6110
|
// Keeps the last read and view applyStageGating() painted (`syncFilterFlo.last`), so a chat question opening
|
|
@@ -8731,6 +8753,7 @@
|
|
|
8731
8753
|
let viewEpoch = 0; // invalidates in-flight preview loads
|
|
8732
8754
|
let knowledgeRenderEpoch = 0; // invalidates in-flight /status loads (poll ticks race verbs)
|
|
8733
8755
|
let kbTextAbort = null; // AbortController for the in-flight preview fetch
|
|
8756
|
+
let kbPdfView = null; // #3018: FloLess's own PDF viewer on the open preview — its worker is released with it
|
|
8734
8757
|
let lastRefsHtml = null; // exact rendered HTML of the refs host, or null to force a repaint
|
|
8735
8758
|
/* The graph's index page, stashed when the graph loads. The step header carries the ✦ Overview
|
|
8736
8759
|
button, and the header is painted from knowledgeState — which does NOT hold the graph, because
|
|
@@ -8795,6 +8818,13 @@
|
|
|
8795
8818
|
function kbAbortPreview() {
|
|
8796
8819
|
viewEpoch += 1;
|
|
8797
8820
|
if (kbTextAbort) { try { kbTextAbort.abort(); } catch { /* already settled */ } kbTextAbort = null; }
|
|
8821
|
+
kbReleasePdf();
|
|
8822
|
+
}
|
|
8823
|
+
|
|
8824
|
+
/** #3018: close the PDF viewer on the preview, if one is open, before anything replaces it. Its pdf.js worker, page
|
|
8825
|
+
* pictures and download link live outside the DOM, so emptying the host alone would leave them behind. */
|
|
8826
|
+
function kbReleasePdf() {
|
|
8827
|
+
if (kbPdfView) { kbPdfView.destroy(); kbPdfView = null; }
|
|
8798
8828
|
}
|
|
8799
8829
|
|
|
8800
8830
|
/** THE one place `viewer` changes. Detaches native `src` (an already-started iframe/image load
|
|
@@ -10118,6 +10148,7 @@
|
|
|
10118
10148
|
}
|
|
10119
10149
|
|
|
10120
10150
|
const kbPaintView = (row, bodyHtml) => {
|
|
10151
|
+
kbReleasePdf();
|
|
10121
10152
|
const host = kbViewHost();
|
|
10122
10153
|
if (host) host.innerHTML = kbViewShell(row, bodyHtml);
|
|
10123
10154
|
};
|
|
@@ -10191,7 +10222,7 @@
|
|
|
10191
10222
|
return;
|
|
10192
10223
|
}
|
|
10193
10224
|
|
|
10194
|
-
if (row.mime === 'application/pdf') kbPaintPdf(row, url);
|
|
10225
|
+
if (row.mime === 'application/pdf') await kbPaintPdf(proj, row, url, ac, alive);
|
|
10195
10226
|
else if (row.mime === 'image/png' || row.mime === 'image/jpeg' || row.mime === 'image/webp') kbPaintImage(row, url, alive);
|
|
10196
10227
|
else kbPaintText(row, url, ac, alive);
|
|
10197
10228
|
}
|
|
@@ -10551,12 +10582,34 @@
|
|
|
10551
10582
|
kbPaintNoPreview(fresh, fresh.kind === 'file' ? 'missing' : 'nofile');
|
|
10552
10583
|
}
|
|
10553
10584
|
|
|
10554
|
-
|
|
10555
|
-
|
|
10556
|
-
|
|
10557
|
-
|
|
10558
|
-
kbPaintView(row,
|
|
10559
|
-
|
|
10585
|
+
/** #3018: a PDF is drawn by FloLess's own viewer (web/pdf-view.js), never the browser's in an <iframe>, whose light
|
|
10586
|
+
* scrollbar and random-id title FloLess's CSS cannot reach. It reads the file ONCE and draws exactly those bytes; the
|
|
10587
|
+
* HEAD before it proves nothing about this GET, so this answer is checked on its own (a 404 is the missing path). */
|
|
10588
|
+
async function kbPaintPdf(proj, row, url, ac, alive) {
|
|
10589
|
+
kbPaintView(row, kbViewLoading(row));
|
|
10590
|
+
let data;
|
|
10591
|
+
try {
|
|
10592
|
+
const res = await fetch(url, { signal: ac.signal, cache: 'no-store' });
|
|
10593
|
+
if (!alive()) { await res.body?.cancel().catch(() => {}); return; }
|
|
10594
|
+
if (res.status === 404) { await kbHandleMissing(proj, row, alive); return; }
|
|
10595
|
+
if (!res.ok) {
|
|
10596
|
+
kbPaintError(row, res.status === 402
|
|
10597
|
+
? 'Your session needs refreshing — sign in again and retry.'
|
|
10598
|
+
: 'The server hit an error trying to read it.');
|
|
10599
|
+
return;
|
|
10600
|
+
}
|
|
10601
|
+
data = new Uint8Array(await res.arrayBuffer());
|
|
10602
|
+
} catch (err) {
|
|
10603
|
+
if (err && err.name === 'AbortError') return; // superseded — never paint
|
|
10604
|
+
if (alive()) kbPaintError(row, 'Lost the connection while loading it.');
|
|
10605
|
+
return;
|
|
10606
|
+
}
|
|
10607
|
+
if (!alive()) return;
|
|
10608
|
+
kbPaintView(row, '');
|
|
10609
|
+
const body = kbViewHost()?.querySelector('.kb-view-body');
|
|
10610
|
+
if (!body) return;
|
|
10611
|
+
// The header above already names the file, so the viewer's toolbar does not say it twice.
|
|
10612
|
+
kbPdfView = window.flolessPdfView.mount(body, { bytes: data, name: row.filename || 'untitled.pdf', showName: false });
|
|
10560
10613
|
}
|
|
10561
10614
|
|
|
10562
10615
|
/** A 200 does NOT imply a decodable image: sniffMime matches a 3-byte JPEG (FF D8 FF) and the upload
|
|
@@ -10891,6 +10944,7 @@
|
|
|
10891
10944
|
if ($wsKnowledge.querySelector('.kb-split')) return;
|
|
10892
10945
|
// The rail and the stub are SIBLINGS of .kb-refs-host, never children of it: the host's innerHTML
|
|
10893
10946
|
// is replaced wholesale on every poll repaint, so anything inside it is destroyed 3 s later.
|
|
10947
|
+
kbReleasePdf();
|
|
10894
10948
|
$wsKnowledge.innerHTML = kbStepHeadHtml(knowledgeState) +
|
|
10895
10949
|
'<div class="kb-split">' +
|
|
10896
10950
|
'<div class="kb-refs-host" id="kb-refs-host"></div>' +
|
|
@@ -11145,8 +11199,10 @@
|
|
|
11145
11199
|
catch (err) {
|
|
11146
11200
|
if (stale()) return;
|
|
11147
11201
|
stopKnowledgePoll();
|
|
11202
|
+
// #3097: what could not be done, why and what to do, from the shared copy; the error itself is for the console.
|
|
11203
|
+
console.warn('[workspaces] the knowledge base could not be loaded', err);
|
|
11148
11204
|
kbPaintRefsMessage(
|
|
11149
|
-
`<div class="kb-empty"
|
|
11205
|
+
`<div class="kb-empty">${escapeHtml(failureCopy(err, { action: 'load the knowledge base', retrySafe: true }).text)}</div>`);
|
|
11150
11206
|
return;
|
|
11151
11207
|
}
|
|
11152
11208
|
if (stale()) return; // switched project/step — or opened a confirm — during the fetch
|
|
@@ -17916,9 +17972,11 @@
|
|
|
17916
17972
|
: code === 'revision-request-retired'
|
|
17917
17973
|
? 'This review was applied elsewhere and is no longer available. Close this message to see the current project.'
|
|
17918
17974
|
: 'This drawing read has already been discarded. Close this message to attach the set again.';
|
|
17975
|
+
if (!terminal) console.warn('[revision] discard failed', error);
|
|
17919
17976
|
$revDiscardError.textContent = terminal
|
|
17920
17977
|
? conflictMessage
|
|
17921
|
-
:
|
|
17978
|
+
// #3097: the shared sentence, never the request's own text: a lost answer may have discarded it anyway.
|
|
17979
|
+
: failureCopy(error, { action: 'discard this read', unsure: 'Reopen the review to check whether it was discarded before trying again.' }).text;
|
|
17922
17980
|
$revDiscardError.hidden = false;
|
|
17923
17981
|
$revDiscardDialog.removeAttribute('aria-busy');
|
|
17924
17982
|
$revDiscardCancel.disabled = false;
|
|
@@ -20271,7 +20329,8 @@
|
|
|
20271
20329
|
await setMode('workspaces');
|
|
20272
20330
|
if (current) await leaveProjectToList(returnFocus);
|
|
20273
20331
|
if (current) return false;
|
|
20274
|
-
|
|
20332
|
+
// #3082: coming from another page, the list draws a moment after the switch; wait for it (bounded) before opening it.
|
|
20333
|
+
const archived = await landingPart('.ws-archived');
|
|
20275
20334
|
if (archived) { archived.open = true; archived.scrollIntoView?.({ block: 'nearest' }); archived.querySelector('summary')?.focus?.(); }
|
|
20276
20335
|
return true;
|
|
20277
20336
|
}
|
|
@@ -20284,6 +20343,86 @@
|
|
|
20284
20343
|
if (current?.id !== projectId) throw new Error('That project could not be opened. Open it from Workspaces.');
|
|
20285
20344
|
}
|
|
20286
20345
|
|
|
20346
|
+
/**
|
|
20347
|
+
* #3082: open the one project a suggestion card named — by its id, and only while it is still that incarnation — at the
|
|
20348
|
+
* step it named (`model` or `history`) when that kind of project has it. Opening is all it does: nothing is approved,
|
|
20349
|
+
* compiled, run or exported. Resolves `{ ok: true, said? }`, `said` being a sentence when the project opened at another
|
|
20350
|
+
* step than asked; throws a sentence written for the person (`plain`) when it did not open.
|
|
20351
|
+
*/
|
|
20352
|
+
let suggestedOpenSeq = 0;
|
|
20353
|
+
/** A card's press claims its place in line when pressed, before any check, so a later press always wins. */
|
|
20354
|
+
function claimSuggestedOpen() { return ++suggestedOpenSeq; }
|
|
20355
|
+
async function openSuggestedProject(target, ticket) {
|
|
20356
|
+
// The latest navigation wins: a press whose check is still waiting gives way to a later card or any other open.
|
|
20357
|
+
const mine = Number.isInteger(ticket) ? ticket : claimSuggestedOpen();
|
|
20358
|
+
let navAtStart = openNavSeq;
|
|
20359
|
+
const overtaken = () => mine !== suggestedOpenSeq || openNavSeq !== navAtStart;
|
|
20360
|
+
const fail = (sentence) => Object.assign(new Error(sentence), { plain: true });
|
|
20361
|
+
const projectId = target?.id;
|
|
20362
|
+
const name = typeof target?.name === 'string' && target.name ? target.name : 'That project';
|
|
20363
|
+
if (typeof projectId !== 'string' || !projectId) throw fail('That project could not be opened. Open it from Workspaces.');
|
|
20364
|
+
await setMode('workspaces');
|
|
20365
|
+
if (mode !== 'workspaces') throw fail(`You stayed where you were, so ${name} was not opened.`);
|
|
20366
|
+
if (mine !== suggestedOpenSeq) return { superseded: true };
|
|
20367
|
+
navAtStart = openNavSeq; // switching to Workspaces may itself navigate; count only what happens from here
|
|
20368
|
+
// The list as the server has it now, so a project made again under the same id is never opened in its place.
|
|
20369
|
+
// A list that cannot be read proves nothing, so nothing is opened on it.
|
|
20370
|
+
let row = null;
|
|
20371
|
+
try { row = (await api('/api/projects')).projects.find((p) => p.id === projectId) || null; }
|
|
20372
|
+
catch (error) {
|
|
20373
|
+
if (overtaken()) return { superseded: true };
|
|
20374
|
+
console.warn('[workspaces] could not read the projects to open a suggested one:', error);
|
|
20375
|
+
throw fail(`FloLess couldn’t check ${name} just now, so it was not opened. Try again in a moment.`);
|
|
20376
|
+
}
|
|
20377
|
+
if (overtaken()) return { superseded: true };
|
|
20378
|
+
const sameIncarnation = (p) => !target.uuid || p?.uuid === target.uuid;
|
|
20379
|
+
if (!row || !sameIncarnation(row)) throw fail(`${name} is no longer in this workspace, so it was not opened. Choose a project on Workspaces.`);
|
|
20380
|
+
const want = target.step === 'history' ? 'history' : target.step === 'model' ? 'model' : null;
|
|
20381
|
+
const hasStep = (key) => Boolean(wsDescOf(row)?.steps?.some((st) => st.key === key));
|
|
20382
|
+
// This window still holds an older project under the same id (open, or in its list): opening by id would open that
|
|
20383
|
+
// one, and would skip the unsaved-work question for it. Open nothing; Workspaces reads the list again.
|
|
20384
|
+
const older = (current?.id === projectId && !sameIncarnation(current)) || projects.some((p) => p.id === projectId && !sameIncarnation(p));
|
|
20385
|
+
if (older) throw fail(`This window still shows an older project in ${name}’s place, so it was not opened. Go back to all projects, then open ${name} from Workspaces.`);
|
|
20386
|
+
if (current?.id === projectId) {
|
|
20387
|
+
// Already open: only its step changes, so nothing loaded in the editor is reset.
|
|
20388
|
+
if (want && hasStep(want) && currentStep !== want) setStep(want);
|
|
20389
|
+
} else {
|
|
20390
|
+
const opened = await openProject(projectId, want && hasStep(want) ? want : 'model');
|
|
20391
|
+
if (opened === STAYED_IN_PROJECT) throw fail(`You stayed in this project, so ${name} was not opened.`);
|
|
20392
|
+
if (current?.id !== projectId) throw fail(`${name} could not be opened. Open it from Workspaces to see why.`);
|
|
20393
|
+
if (!sameIncarnation(current)) throw fail(`The project open now is not the ${name} the suggestion named. Choose a project on Workspaces.`);
|
|
20394
|
+
}
|
|
20395
|
+
if (!want) return { ok: true };
|
|
20396
|
+
const label = want === 'history' ? 'History' : 'Model';
|
|
20397
|
+
if (!hasStep(want)) return { ok: true, said: `${name} has no ${label} step, so it opened at ${stepLabel(currentStep)}.` };
|
|
20398
|
+
// A step the project's stages keep locked: say where it opened and the stage's own reason. A step still being checked
|
|
20399
|
+
// opens by itself once it can.
|
|
20400
|
+
if (currentStep !== want && pendingPresenceStep?.step !== want) {
|
|
20401
|
+
const reason = stageGateFor(want);
|
|
20402
|
+
return { ok: true, said: `${name} opened at ${stepLabel(currentStep)}, because its ${label} step isn’t available yet.${reason ? ` ${reason}` : ''}` };
|
|
20403
|
+
}
|
|
20404
|
+
return { ok: true };
|
|
20405
|
+
}
|
|
20406
|
+
|
|
20407
|
+
/** #3082: the Workspaces list itself, for choosing a project when the one a suggestion named is gone. */
|
|
20408
|
+
async function showProjectList(returnFocus) {
|
|
20409
|
+
await setMode('workspaces');
|
|
20410
|
+
if (current) await leaveProjectToList(returnFocus);
|
|
20411
|
+
if (current) return false;
|
|
20412
|
+
(await landingPart('[data-open]'))?.focus?.();
|
|
20413
|
+
return true;
|
|
20414
|
+
}
|
|
20415
|
+
|
|
20416
|
+
/** One part of the Workspaces list, once it is drawn: up to five seconds after a page switch, else null. */
|
|
20417
|
+
async function landingPart(selector) {
|
|
20418
|
+
for (let i = 0; i < 25; i++) {
|
|
20419
|
+
const found = $landing.querySelector(selector);
|
|
20420
|
+
if (found) return found;
|
|
20421
|
+
await new Promise((resolve) => setTimeout(resolve, 200));
|
|
20422
|
+
}
|
|
20423
|
+
return null;
|
|
20424
|
+
}
|
|
20425
|
+
|
|
20287
20426
|
// The Drawing Filter step of a project, where a drawing read's exclusions are saved and signed off.
|
|
20288
20427
|
async function openDrawingsStep(projectId) {
|
|
20289
20428
|
if (typeof projectId !== 'string' || !projectId) throw new Error('That project could not be opened. Open it from Workspaces.');
|
|
@@ -20803,6 +20942,8 @@
|
|
|
20803
20942
|
openHistory: wsOpenHistory, openKnowledgePage, openKnowledgeStep, openDrawingsStep, openWorkflowsStep, openConnection, openDrawingAt, drawingFilterCheckpointSaved,
|
|
20804
20943
|
// #2470 R6.7: the Modules step of a General project (project-modules.js).
|
|
20805
20944
|
moduleCreateCardsHtml, activateCreateCard, openNewProjectFromDrawings, openLinkedProject, openModulesStep, showArchivedProjects,
|
|
20945
|
+
// #3082: a Guide or assistant card that names one project, and where to choose another when it is gone.
|
|
20946
|
+
openSuggestedProject, claimSuggestedOpen, showProjectList,
|
|
20806
20947
|
syncWorkspaceReporter, openChatOwner, openPagesHome, folderDecisionCompleted,
|
|
20807
20948
|
// Project access (project-access.js loads after this file): the project open now, or null.
|
|
20808
20949
|
currentProject: () => ($app.classList.contains('mode-workspaces') && current ? current : null),
|
package/home-env.mjs
ADDED
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
// One absolute FloLess home for every process (#3080, epic #2960).
|
|
2
|
+
//
|
|
3
|
+
// FLOLESS_HOME may be given as a relative path. Each process resolves a relative path against ITS OWN working directory,
|
|
4
|
+
// and the launcher starts the server with another working directory than its own, so the launcher, the server, the
|
|
5
|
+
// Velopack hooks and the desktop shell could each address a different folder. The fix is made once at each process
|
|
6
|
+
// entry: a relative value is replaced in the environment by its absolute form, and every child then inherits that.
|
|
7
|
+
// Unset stays unset (the default, ~/.floless, is already absolute). Dependency-free (Node built-ins only), like
|
|
8
|
+
// preferences-file.mjs and desktop-shell.mjs, so the launcher can use it before anything else loads.
|
|
9
|
+
import { isAbsolute, resolve } from 'node:path';
|
|
10
|
+
|
|
11
|
+
/** The absolute form of FLOLESS_HOME (or the empty string when it is not set). Pure: does not touch the environment. */
|
|
12
|
+
export function absoluteFlolessHome(env = process.env, cwd = process.cwd()) {
|
|
13
|
+
const value = typeof env.FLOLESS_HOME === 'string' ? env.FLOLESS_HOME.trim() : '';
|
|
14
|
+
if (!value) return '';
|
|
15
|
+
return isAbsolute(value) ? env.FLOLESS_HOME : resolve(cwd, value);
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
/**
|
|
19
|
+
* Make FLOLESS_HOME absolute in `env`, once. Returns what it is now ('' when unset). Never throws; a value it cannot
|
|
20
|
+
* resolve is left exactly as given.
|
|
21
|
+
*/
|
|
22
|
+
export function pinFlolessHome(env = process.env, cwd = process.cwd()) {
|
|
23
|
+
try {
|
|
24
|
+
const absolute = absoluteFlolessHome(env, cwd);
|
|
25
|
+
if (absolute && absolute !== env.FLOLESS_HOME) env.FLOLESS_HOME = absolute;
|
|
26
|
+
return absolute;
|
|
27
|
+
} catch { return typeof env.FLOLESS_HOME === 'string' ? env.FLOLESS_HOME : ''; }
|
|
28
|
+
}
|
package/install-path.mjs
CHANGED
|
@@ -19,7 +19,7 @@
|
|
|
19
19
|
// without touching the real filesystem. Thin wrappers bind the real fs at the
|
|
20
20
|
// edge.
|
|
21
21
|
|
|
22
|
-
import { existsSync, readdirSync, realpathSync } from 'node:fs';
|
|
22
|
+
import { existsSync, readdirSync, realpathSync, statSync } from 'node:fs';
|
|
23
23
|
|
|
24
24
|
/**
|
|
25
25
|
* @param {string} execPath the path to (possibly) resolve.
|
|
@@ -27,9 +27,10 @@ import { existsSync, readdirSync, realpathSync } from 'node:fs';
|
|
|
27
27
|
* @param {(p: string) => boolean} exists `fs.existsSync` injection.
|
|
28
28
|
* @param {(p: string) => string[]} readdir `fs.readdirSync` injection (Packages enumeration).
|
|
29
29
|
* @param {(p: string) => string} realpath `fs.realpathSync` injection (may throw on failure).
|
|
30
|
+
* @param {(candidate: string) => boolean} [accept] a package copy is taken only when this says yes (default: the first that exists).
|
|
30
31
|
* @returns {string} the resolved real path, or `execPath` unchanged when no remap applies.
|
|
31
32
|
*/
|
|
32
|
-
export function resolveRealInstallExePure(execPath, localAppData, exists, readdir, realpath) {
|
|
33
|
+
export function resolveRealInstallExePure(execPath, localAppData, exists, readdir, realpath, accept = () => true) {
|
|
33
34
|
if (!execPath) return execPath;
|
|
34
35
|
// 1. realpath handles real symlinks/junctions cleanly (forward-compatible with
|
|
35
36
|
// a future non-container install). Defensive: if realpath throws (e.g. on
|
|
@@ -64,7 +65,7 @@ export function resolveRealInstallExePure(execPath, localAppData, exists, readdi
|
|
|
64
65
|
if (!Array.isArray(packages)) return execPath;
|
|
65
66
|
for (const pkg of packages) {
|
|
66
67
|
const candidate = `${packagesDir}\\${pkg}\\LocalCache\\Local${tail}`;
|
|
67
|
-
if (exists(candidate)) return candidate;
|
|
68
|
+
if (exists(candidate) && accept(candidate)) return candidate;
|
|
68
69
|
}
|
|
69
70
|
return execPath;
|
|
70
71
|
}
|
|
@@ -86,6 +87,43 @@ export function sandboxLicenseDirPure(execPath) {
|
|
|
86
87
|
return m ? `${m[1]}\\FlolessApp-data` : null;
|
|
87
88
|
}
|
|
88
89
|
|
|
90
|
+
/**
|
|
91
|
+
* Pure: the install path to use when the answer picks a PROCESS to act on (match, kill, spawn)
|
|
92
|
+
* rather than a path to register with Windows. `resolveRealInstallExePure` finds the remap by
|
|
93
|
+
* enumerating every package's `LocalCache\Local` and taking the first match, so on a machine where
|
|
94
|
+
* two packages each hold a FlolessApp copy it can name the OTHER package's binary (#3088). Acting on
|
|
95
|
+
* that would end another install's supervisor. The remap is accepted here only when it is the very
|
|
96
|
+
* same file as the running binary (same volume and file index, which is what the MSIX bind-link
|
|
97
|
+
* gives); in any doubt the running binary's own path is returned.
|
|
98
|
+
*
|
|
99
|
+
* @param {string} execPath
|
|
100
|
+
* @param {string | undefined} localAppData
|
|
101
|
+
* @param {(p: string) => boolean} exists
|
|
102
|
+
* @param {(p: string) => string[]} readdir
|
|
103
|
+
* @param {(p: string) => string} realpath
|
|
104
|
+
* @param {(p: string) => string | null} fileId `<dev>:<ino>` of the file, or null when it cannot be read or is not trustworthy.
|
|
105
|
+
* @returns {string}
|
|
106
|
+
*/
|
|
107
|
+
export function resolveOwnInstallExePure(execPath, localAppData, exists, readdir, realpath, fileId) {
|
|
108
|
+
let own = null;
|
|
109
|
+
const same = (candidate) => {
|
|
110
|
+
try {
|
|
111
|
+
own ??= fileId(execPath);
|
|
112
|
+
const other = fileId(candidate);
|
|
113
|
+
return !!own && !!other && own === other;
|
|
114
|
+
} catch { return false; }
|
|
115
|
+
};
|
|
116
|
+
// Every package copy is tried, not only the first that exists: the right one may come after another package's.
|
|
117
|
+
const remapped = resolveRealInstallExePure(execPath, localAppData, exists, readdir, realpath, same);
|
|
118
|
+
return remapped && remapped !== execPath && same(remapped) ? remapped : execPath;
|
|
119
|
+
}
|
|
120
|
+
|
|
121
|
+
/** @param {string} p @returns {string | null} */
|
|
122
|
+
function fileIdOf(p) {
|
|
123
|
+
const st = statSync(p, { bigint: true });
|
|
124
|
+
return st.ino === 0n ? null : `${st.dev}:${st.ino}`;
|
|
125
|
+
}
|
|
126
|
+
|
|
89
127
|
// ── Real-fs wrappers ────────────────────────────────────────────────────────
|
|
90
128
|
|
|
91
129
|
/**
|
|
@@ -102,6 +140,24 @@ export function resolveRealInstallExe(execPath = process.execPath) {
|
|
|
102
140
|
);
|
|
103
141
|
}
|
|
104
142
|
|
|
143
|
+
/**
|
|
144
|
+
* For choosing a process to match, kill or spawn: the remap is used only when it is the same file
|
|
145
|
+
* as the running binary (see `resolveOwnInstallExePure`). Registrations with Windows keep using
|
|
146
|
+
* `resolveRealInstallExe`.
|
|
147
|
+
* @param {string} [execPath] defaults to `process.execPath`
|
|
148
|
+
* @returns {string}
|
|
149
|
+
*/
|
|
150
|
+
export function resolveOwnInstallExe(execPath = process.execPath) {
|
|
151
|
+
return resolveOwnInstallExePure(
|
|
152
|
+
execPath,
|
|
153
|
+
process.env.LOCALAPPDATA,
|
|
154
|
+
existsSync,
|
|
155
|
+
readdirSync,
|
|
156
|
+
realpathSync,
|
|
157
|
+
fileIdOf,
|
|
158
|
+
);
|
|
159
|
+
}
|
|
160
|
+
|
|
105
161
|
/**
|
|
106
162
|
* Side-effect: when `process.execPath` reveals we were launched from the
|
|
107
163
|
* sandbox-real path (i.e. by a logon Scheduled Task / Run key sitting outside
|
package/launch-starting-page.mjs
CHANGED
|
@@ -45,16 +45,29 @@ export function startingPageHtml(appUrl) {
|
|
|
45
45
|
<meta name="color-scheme" content="dark light">
|
|
46
46
|
<title>${esc(first.title)}</title>
|
|
47
47
|
<style>
|
|
48
|
-
:root{--bg:#020817;--card:#0f141c;--fg:#f8fafc;--muted:#94a3b8;--border:#1c2535;--primary:#4a9eff;--on-primary:#020817}
|
|
49
|
-
@media (prefers-color-scheme: light){:root{--bg:#f8fafc;--card:#ffffff;--fg:#0f172a;--muted:#475569;--border:#e2e8f0;--primary:#2563eb;--on-primary:#ffffff}}
|
|
48
|
+
:root{--bg:#020817;--card:#0f141c;--fg:#f8fafc;--muted:#94a3b8;--border:#1c2535;--primary:#4a9eff;--on-primary:#020817;--logo:#4a9eff;--logo-fill:#0f141c}
|
|
49
|
+
@media (prefers-color-scheme: light){:root{--bg:#f8fafc;--card:#ffffff;--fg:#0f172a;--muted:#475569;--border:#e2e8f0;--primary:#2563eb;--on-primary:#ffffff;--logo:#1e3a5f;--logo-fill:#ffffff}}
|
|
50
50
|
*{margin:0;padding:0;box-sizing:border-box}
|
|
51
51
|
body{font-family:-apple-system,'Segoe UI',Roboto,sans-serif;background:var(--bg);color:var(--fg);
|
|
52
52
|
min-height:100vh;display:flex;align-items:center;justify-content:center;padding:16px}
|
|
53
53
|
.card{text-align:center;max-width:440px;width:100%;padding:2.5rem 2rem;background:var(--card);
|
|
54
54
|
border:1px solid var(--border);border-radius:14px}
|
|
55
|
-
.mark{width:84px;height:
|
|
56
|
-
|
|
57
|
-
.
|
|
55
|
+
.mark{width:84px;height:80px;margin:0 auto 1.25rem;display:flex;align-items:center;justify-content:center}
|
|
56
|
+
.logo{width:84px;height:auto;display:block;overflow:visible}
|
|
57
|
+
.logo .ln path{stroke:var(--logo)}
|
|
58
|
+
.logo .ln .nd{fill:var(--logo-fill)}
|
|
59
|
+
.logo .eyes ellipse{fill:var(--logo);transform-box:fill-box;transform-origin:center}
|
|
60
|
+
/* The flow: a cyan light travels Workspace -> arrow -> S-curve -> Agent (the launch film's mark), then the Agent blinks. Only while the page is waiting. */
|
|
61
|
+
.logo .pulse path{stroke:#22d3ee;stroke-width:11.7;stroke-linecap:round;stroke-dasharray:.13 2;stroke-dashoffset:-1;opacity:0}
|
|
62
|
+
.bar{display:none} /* the animated mark is the waiting indicator; #bar only carries "still waiting" for the script */
|
|
63
|
+
.card:has(#bar:not([hidden])) .logo .pulse path{opacity:1}
|
|
64
|
+
.card:has(#bar:not([hidden])) .logo .pa{animation:flowA 3.4s ease-in-out infinite}
|
|
65
|
+
.card:has(#bar:not([hidden])) .logo .pb{animation:flowB 3.4s ease-in-out infinite}
|
|
66
|
+
.card:has(#bar:not([hidden])) .logo .eyes ellipse{animation:blink 3.4s ease-in-out infinite}
|
|
67
|
+
@keyframes flowA{0%{stroke-dashoffset:.13}15%,100%{stroke-dashoffset:-1}}
|
|
68
|
+
@keyframes flowB{0%,14%{stroke-dashoffset:-1}72%,100%{stroke-dashoffset:.13}}
|
|
69
|
+
@keyframes blink{0%,80%,88%,100%{transform:scaleY(1)}84%{transform:scaleY(.12)}}
|
|
70
|
+
@media (prefers-reduced-motion: reduce){.card:has(#bar) .logo .pulse path,.card:has(#bar) .logo .eyes ellipse{animation:none !important}.logo .pulse path{opacity:0 !important}}
|
|
58
71
|
h1{font-size:1.3rem;font-weight:700;margin-bottom:.5rem}
|
|
59
72
|
p{color:var(--muted);font-size:.92rem;line-height:1.55}
|
|
60
73
|
.bar{position:relative;height:3px;margin:1.6rem auto 0;max-width:260px;border-radius:3px;background:var(--border);overflow:hidden}
|
|
@@ -74,16 +87,23 @@ export function startingPageHtml(appUrl) {
|
|
|
74
87
|
<body>
|
|
75
88
|
<main class="card">
|
|
76
89
|
<div class="mark" aria-hidden="true">
|
|
77
|
-
<svg viewBox="0 0
|
|
78
|
-
<
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
90
|
+
<svg class="logo" viewBox="0 0 186.09097 177.81497" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
91
|
+
<g class="ln">
|
|
92
|
+
<path d="m 90.59682,24.776705 -61.1056,0.0011 c -6.7848,10e-5 -13.0292,5.9857 -17.3491,11.7712 -3.7996001,5.0887 -6.3061701,11.9297 -6.3061701,18.5289 0,8.1722 2.24347,15.3031 6.3061701,21.2537 4.2061,6.1608 11.1613,12.97 17.3491,12.97 h 126.7248 c 6.614,0 12.777,3.1335 17.076,8.056 4.477,5.125905 6.963,13.141905 6.963,19.945905 0,7.551 -1.62,12.785 -5.166,18.312 -3.822,5.958 -18.087,14.161 -18.087,14.161" stroke-width="11.6719" stroke-linecap="round"/>
|
|
93
|
+
<path d="m 87.23132,7.267455 16.5877,18.07555" stroke-width="11.6712" stroke-linecap="round"/>
|
|
94
|
+
<path d="m 87.23132,43.481105 16.5877,-18.0756" stroke-width="11.6712" stroke-linecap="round"/>
|
|
95
|
+
<path d="m 75.64862,135.29251 16.5877,18.076" stroke-width="11.6712" stroke-linecap="round"/>
|
|
96
|
+
<path d="m 75.64862,171.50651 16.5877,-18.075" stroke-width="11.6712" stroke-linecap="round"/>
|
|
97
|
+
<path d="m 58.55282,153.01251 h 20.8079" stroke-width="11.6712" stroke-linecap="square"/>
|
|
98
|
+
<path class="nd" d="m 30.52942,173.45451 c 10.4383,0 18.9002,-8.462 18.9002,-18.9 0,-10.438 -8.4619,-18.9 -18.9002,-18.9 -10.4382,0 -18.9001,8.462 -18.9001,18.9 0,10.438 8.4619,18.9 18.9001,18.9 z" stroke-width="8.72093" stroke-linecap="round" stroke-linejoin="round"/>
|
|
99
|
+
<path class="nd" d="m 135.20702,173.45451 c 10.438,0 18.9,-8.462 18.9,-18.9 0,-10.438 -8.462,-18.9 -18.9,-18.9 -10.438,0 -18.9,8.462 -18.9,18.9 0,10.438 8.462,18.9 18.9,18.9 z" stroke-width="8.72093" stroke-linecap="round" stroke-linejoin="round"/>
|
|
100
|
+
<path class="nd" d="m 146.82902,42.160705 c 10.438,0 18.9,-8.4619 18.9,-18.9001 0,-10.4383 -8.462,-18.90014 -18.9,-18.90014 -10.438,0 -18.9,8.46184 -18.9,18.90014 0,10.4382 8.462,18.9001 18.9,18.9001 z" stroke-width="8.72093" stroke-linecap="round" stroke-linejoin="round"/>
|
|
101
|
+
</g>
|
|
102
|
+
<g class="eyes"><ellipse cx="141.3" cy="22.6" rx="2.5" ry="3.7"/><ellipse cx="152.4" cy="22.6" rx="2.5" ry="3.7"/></g>
|
|
103
|
+
<g class="pulse">
|
|
104
|
+
<path class="pa" pathLength="1" d="m 58.55282,153.01251 h 20.8079"/>
|
|
105
|
+
<path class="pb" pathLength="1" d="m 90.59682,24.776705 -61.1056,0.0011 c -6.7848,10e-5 -13.0292,5.9857 -17.3491,11.7712 -3.7996001,5.0887 -6.3061701,11.9297 -6.3061701,18.5289 0,8.1722 2.24347,15.3031 6.3061701,21.2537 4.2061,6.1608 11.1613,12.97 17.3491,12.97 h 126.7248 c 6.614,0 12.777,3.1335 17.076,8.056 4.477,5.125905 6.963,13.141905 6.963,19.945905 0,7.551 -1.62,12.785 -5.166,18.312 -3.822,5.958 -18.087,14.161 -18.087,14.161"/>
|
|
106
|
+
</g>
|
|
87
107
|
</svg>
|
|
88
108
|
</div>
|
|
89
109
|
<div id="status" role="status" aria-live="polite" aria-atomic="true">
|