@floless/app 0.166.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 +20570 -14555
- package/dist/schemas/drawing-check.profile.v1.schema.json +1 -1
- package/dist/schemas/steel.model.v2.schema.json +4 -2
- 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 +34 -3
- package/dist/skills/floless-app-ui/SKILL.md +2 -2
- package/dist/skills/floless-app-workflows/SKILL.md +2 -2
- package/dist/templates/college-phase-exporter.flo +11 -45
- package/dist/web/agents.js +1 -1
- package/dist/web/app.css +223 -8
- package/dist/web/app.js +53 -13
- package/dist/web/aware-update-client.js +13 -5
- package/dist/web/aware.js +559 -118
- package/dist/web/chat.css +23 -0
- package/dist/web/chat.js +1003 -83
- package/dist/web/commands-filter.js +28 -5
- package/dist/web/commands-shell.js +304 -18
- 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 +72 -12
- 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 +133 -11
- 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-ai-marks.js +45 -1
- package/dist/web/steel-editor.html +265 -58
- package/dist/web/steel-filter-flo.js +243 -23
- package/dist/web/steel-filter.html +58 -16
- package/dist/web/tab-signal.js +36 -1
- package/dist/web/tekla-editor.html +1 -0
- package/dist/web/terminal-requests.js +5 -0
- package/dist/web/tool-updates.js +220 -54
- 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 +527 -64
- 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
package/dist/web/tab-signal.js
CHANGED
|
@@ -8,6 +8,9 @@
|
|
|
8
8
|
//
|
|
9
9
|
// It never decides anything: aware.js tells it when a run begins, how it progresses and how it ended,
|
|
10
10
|
// and it owns no title of its own — aware.js stays the one writer of document.title and asks prefix().
|
|
11
|
+
// Inside the FloLess window (the shell's bridge, apiVersion 2 or newer) the same signal goes where a window shows it: the run's
|
|
12
|
+
// fraction drives the taskbar progress, an ending that happened while the person was away puts a dot on the taskbar icon until
|
|
13
|
+
// they are back, and the favicon is not painted (a window has no tab strip). The title prefix and the notice logic are the same.
|
|
11
14
|
// A plain script (no import/export); its one global is `flolessTabSignal`.
|
|
12
15
|
|
|
13
16
|
(function () {
|
|
@@ -41,6 +44,34 @@
|
|
|
41
44
|
let offerPending = false; // a run ended while away and permission is undecided: offer when they are back
|
|
42
45
|
let prefMemory = null; // the ≡ menu choice when the browser will not store it: it still holds for this page
|
|
43
46
|
|
|
47
|
+
/** The FloLess window's bridge, or null in a browser tab (no bridge, or one older than apiVersion 2). */
|
|
48
|
+
const shell = () => {
|
|
49
|
+
const b = window.flolessDesktop;
|
|
50
|
+
return b && typeof b.apiVersion === 'number' && b.apiVersion >= 2 ? b : null;
|
|
51
|
+
};
|
|
52
|
+
let shownProgress; // what the taskbar was last told: a fraction, or null; undefined until the first tell
|
|
53
|
+
let shownBadge; // 0 or 1, likewise
|
|
54
|
+
|
|
55
|
+
/** Tell the shell where the run stands. Only changes are sent; an indeterminate run leaves the bar cleared. */
|
|
56
|
+
function syncShell() {
|
|
57
|
+
const b = shell();
|
|
58
|
+
if (!b) return;
|
|
59
|
+
const fraction = run && run.fraction != null ? run.fraction : null;
|
|
60
|
+
const badge = ended && ended.whileAway && away() ? 1 : 0;
|
|
61
|
+
try {
|
|
62
|
+
if (typeof b.setProgress === 'function' && fraction !== shownProgress) {
|
|
63
|
+
shownProgress = fraction;
|
|
64
|
+
const r = b.setProgress(fraction);
|
|
65
|
+
if (r && typeof r.catch === 'function') r.catch(() => {});
|
|
66
|
+
}
|
|
67
|
+
if (typeof b.setBadge === 'function' && badge !== shownBadge) {
|
|
68
|
+
shownBadge = badge;
|
|
69
|
+
const r = b.setBadge(badge);
|
|
70
|
+
if (r && typeof r.catch === 'function') r.catch(() => {});
|
|
71
|
+
}
|
|
72
|
+
} catch { /* the taskbar is a courtesy; it must never break a run */ }
|
|
73
|
+
}
|
|
74
|
+
|
|
44
75
|
const reducedMotion = () => !!(window.matchMedia && window.matchMedia('(prefers-reduced-motion: reduce)').matches);
|
|
45
76
|
const hidden = () => document.visibilityState === 'hidden';
|
|
46
77
|
// Visible but not focused (FloLess on a second monitor beside Tekla) counts as away too.
|
|
@@ -74,7 +105,7 @@
|
|
|
74
105
|
}
|
|
75
106
|
|
|
76
107
|
function loadBaseIcon() {
|
|
77
|
-
if (baseIcon || typeof Image !== 'function') return;
|
|
108
|
+
if (baseIcon || typeof Image !== 'function' || shell()) return;
|
|
78
109
|
const svg = links().find(({ href }) => /\.svg(\?|$)/.test(href || '')) || links()[0];
|
|
79
110
|
if (!svg) return;
|
|
80
111
|
const img = new Image();
|
|
@@ -88,6 +119,7 @@
|
|
|
88
119
|
}
|
|
89
120
|
|
|
90
121
|
function paint() {
|
|
122
|
+
if (shell()) return; // a window has no tab strip: the taskbar carries the signal instead (syncShell)
|
|
91
123
|
if (!run && !ended) { restoreIcon(); return; }
|
|
92
124
|
const canvas = document.createElement('canvas');
|
|
93
125
|
const g = canvas.getContext && canvas.getContext('2d');
|
|
@@ -134,6 +166,7 @@
|
|
|
134
166
|
// ── lifecycle ────────────────────────────────────────────────────────────────────────────────────
|
|
135
167
|
function changed() {
|
|
136
168
|
paint();
|
|
169
|
+
syncShell();
|
|
137
170
|
const next = prefix();
|
|
138
171
|
if (next === shownPrefix) return; // the spinner repaints the icon; the title moves only when its words do
|
|
139
172
|
shownPrefix = next;
|
|
@@ -295,6 +328,7 @@
|
|
|
295
328
|
function back() {
|
|
296
329
|
if (run) startTicking();
|
|
297
330
|
if (away()) return;
|
|
331
|
+
syncShell(); // they are back: the taskbar dot goes
|
|
298
332
|
syncMenu(); // they may have changed the browser's permission in the meantime
|
|
299
333
|
if (ended && ended.whileAway && !ended.clearTimer) ended.clearTimer = setTimeout(clearEnd, CLEAR_BACK_MS);
|
|
300
334
|
if (offerPending) offer();
|
|
@@ -302,6 +336,7 @@
|
|
|
302
336
|
function acted() { if (ended && !ended.whileAway && !ended.clearTimer && !away()) clearEnd(); }
|
|
303
337
|
// Gone again before it cleared: the ending is held until they are back for good.
|
|
304
338
|
function left() {
|
|
339
|
+
syncShell();
|
|
305
340
|
if (!ended || !away() || !ended.clearTimer) return;
|
|
306
341
|
clearTimeout(ended.clearTimer);
|
|
307
342
|
ended.clearTimer = null;
|
|
@@ -61,6 +61,7 @@
|
|
|
61
61
|
<button id="inspectorToggle" class="model-inspector-toggle" type="button" data-command-id="tekla-parser.inspector-toggle" data-tip="Collapse Properties" aria-label="Collapse Properties" aria-controls="inspectorPanel" aria-expanded="true"><svg viewBox="0 0 16 16" aria-hidden="true"><path d="m6 3 5 5-5 5"/></svg></button>
|
|
62
62
|
</main>
|
|
63
63
|
<div id="toast" role="status" aria-live="polite"></div>
|
|
64
|
+
<script src="failure-copy.js"></script>
|
|
64
65
|
<script src="commands.js"></script>
|
|
65
66
|
<script src="commands-tekla-parser.js"></script>
|
|
66
67
|
<script src="instructor-reporter.js"></script>
|
|
@@ -403,6 +403,11 @@
|
|
|
403
403
|
await window.flolessWorkspaces.setMode(screen.view); opened = true;
|
|
404
404
|
} else if (screen?.view === 'tool-update-policy' && typeof window.openToolUpdatePolicy === 'function') {
|
|
405
405
|
window.openToolUpdatePolicy(); opened = true;
|
|
406
|
+
} else if (screen?.view === 'new-project' && typeof window.flolessWorkspaces?.openNewProjectFromDrawings === 'function') {
|
|
407
|
+
// #2811: the file picker, then New project (Quick pressed when asked); the Drawing Filter choice stays the person's.
|
|
408
|
+
const outcome = await window.flolessWorkspaces.openNewProjectFromDrawings({ quick: screen.buildMode === 'quick' });
|
|
409
|
+
opened = outcome?.ok === true;
|
|
410
|
+
if (!opened) why = typeof outcome?.said === 'string' ? outcome.said : '';
|
|
406
411
|
}
|
|
407
412
|
} catch (error) {
|
|
408
413
|
// The bridge throws sentences written for the person (e.g. "This window no longer holds that run's report…").
|
package/dist/web/tool-updates.js
CHANGED
|
@@ -31,6 +31,8 @@
|
|
|
31
31
|
if (!$pill || !$modal) return;
|
|
32
32
|
var $dialog = $modal.querySelector('.tool-updates-dialog');
|
|
33
33
|
var $title = document.getElementById('tool-updates-title');
|
|
34
|
+
var $sub = document.getElementById('tool-updates-sub');
|
|
35
|
+
var TOOLS_SUB = $sub ? $sub.textContent : '';
|
|
34
36
|
var $body = document.getElementById('tool-updates-body');
|
|
35
37
|
var $live = document.getElementById('tool-updates-live');
|
|
36
38
|
var $progress = document.getElementById('tool-updates-progress');
|
|
@@ -44,6 +46,7 @@
|
|
|
44
46
|
var view = null;
|
|
45
47
|
var templateUpdates = [];
|
|
46
48
|
var templateTicket = 0;
|
|
49
|
+
var toolsOpen = false; // the collapsed Tools section under workflow updates, as the person last left it
|
|
47
50
|
var results = null;
|
|
48
51
|
var compileSelection = null; // immutable review shown before the person's separate confirmation
|
|
49
52
|
var compileExcluded = [];
|
|
@@ -91,7 +94,12 @@
|
|
|
91
94
|
var CLOCK_AFTER_SECONDS = 10; // quick steps stay quiet; a slow one starts showing how long it has taken
|
|
92
95
|
var MARKS = { done: '✓', problem: '!' };
|
|
93
96
|
var progress = null; // the server's progress record ({steps, since}) for the check running now (null before its first answer)
|
|
94
|
-
|
|
97
|
+
// #3081: how the last ask for them went. 'slow': an ask has had no answer for a while, which is FloLess being busy with
|
|
98
|
+
// other work (measured: its server can be held for seconds by work elsewhere), not proof it is gone. 'lost': the ask
|
|
99
|
+
// could not reach FloLess at all, or what came back was not the answer. Either way the clock says nothing it cannot back.
|
|
100
|
+
var contact = 'ok';
|
|
101
|
+
var waitingSince = 0; // when the first ask of a slow spell was sent
|
|
102
|
+
var lostBy = null; // the outcome that last made contact lost
|
|
95
103
|
var paintedSteps = null;
|
|
96
104
|
var announced = null;
|
|
97
105
|
var announcedProblems = {};
|
|
@@ -101,7 +109,9 @@
|
|
|
101
109
|
var pollSentAt = 0;
|
|
102
110
|
var pollController = null;
|
|
103
111
|
var watchGeneration = 0; // bumped whenever watching stops: an answer to an older ask belongs to nothing now
|
|
104
|
-
var POLL_PATIENCE_MS = 6000;
|
|
112
|
+
var POLL_PATIENCE_MS = 6000; // an ask unanswered this long is called slow
|
|
113
|
+
var POLL_GIVE_UP_MS = 30000; // and is given up after this long and asked again, still slow
|
|
114
|
+
var SLOW_CEILING_MS = 90000; // a slow spell with no answer at all for this long is taken as lost contact: a hung FloLess is not "busy"
|
|
105
115
|
|
|
106
116
|
function checkInFlight() { return checking || !!(view && view.checking); }
|
|
107
117
|
function isOpen() { return $modal.classList.contains('show'); }
|
|
@@ -121,11 +131,17 @@
|
|
|
121
131
|
var clock = $progress.querySelector('.tool-updates-step-clock');
|
|
122
132
|
if (!clock) return;
|
|
123
133
|
// Hidden without a start time from the server, and while the server is not answering.
|
|
124
|
-
var seconds = progress && typeof progress.since === 'number' &&
|
|
134
|
+
var seconds = progress && typeof progress.since === 'number' && contact === 'ok' ? Math.max(0, Math.floor((Date.now() - progress.since) / 1000)) : -1;
|
|
125
135
|
clock.hidden = seconds < CLOCK_AFTER_SECONDS;
|
|
126
136
|
if (!clock.hidden) clock.textContent = elapsedText(seconds);
|
|
127
137
|
}
|
|
128
138
|
|
|
139
|
+
/** The slow line's own count of how long FloLess has not answered, ticked in place like the clock. */
|
|
140
|
+
function paintWaited() {
|
|
141
|
+
var waited = $progress.querySelector('.tool-updates-progress-waited');
|
|
142
|
+
if (waited) waited.textContent = elapsedText(Math.max(0, Math.floor((Date.now() - waitingSince) / 1000)));
|
|
143
|
+
}
|
|
144
|
+
|
|
129
145
|
// What a screen reader hears: a step that did not do all it set out to, once; and the active step, when it or the item
|
|
130
146
|
// it is on changes. Never the clock, never a repeat.
|
|
131
147
|
function announce(steps) {
|
|
@@ -148,12 +164,17 @@
|
|
|
148
164
|
|
|
149
165
|
function paintProgress() {
|
|
150
166
|
var steps = progress && Array.isArray(progress.steps) ? progress.steps : [];
|
|
151
|
-
var signature = JSON.stringify(steps) + '|' +
|
|
167
|
+
var signature = JSON.stringify(steps) + '|' + contact;
|
|
152
168
|
// Rebuilt only when what it shows changes; the clock beside the active step ticks in place.
|
|
153
169
|
if (signature !== paintedSteps || !$progress.firstChild) {
|
|
154
170
|
$progress.textContent = '';
|
|
155
171
|
$progress.appendChild(el('div', 'tool-updates-progress-head', 'Checking for updates…'));
|
|
156
|
-
if (
|
|
172
|
+
if (contact === 'lost') $progress.appendChild(el('div', 'tool-updates-progress-lost', 'Lost contact with FloLess. Still trying…'));
|
|
173
|
+
if (contact === 'slow') {
|
|
174
|
+
var slow = el('div', 'tool-updates-progress-slow');
|
|
175
|
+
slow.append('FloLess hasn’t answered for ', el('span', 'tool-updates-progress-waited'), '. It is probably busy with other work, so this check is waiting. You can keep watching or close this dialog. What the check finds shows at the bottom of the screen.');
|
|
176
|
+
$progress.appendChild(slow);
|
|
177
|
+
}
|
|
157
178
|
if (steps.length) {
|
|
158
179
|
var list = el('ol', 'tool-updates-steps');
|
|
159
180
|
list.setAttribute('role', 'list');
|
|
@@ -177,12 +198,13 @@
|
|
|
177
198
|
});
|
|
178
199
|
$progress.appendChild(list);
|
|
179
200
|
}
|
|
180
|
-
//
|
|
181
|
-
if (
|
|
201
|
+
// Only while FloLess answers: the page cannot say otherwise that the check keeps going (the slow line says it its own way).
|
|
202
|
+
if (contact === 'ok') $progress.appendChild(el('div', 'tool-updates-progress-hint', 'You can close this dialog. The check keeps going, and what it finds shows at the bottom of the screen.'));
|
|
182
203
|
paintedSteps = signature;
|
|
183
204
|
}
|
|
184
205
|
announce(steps);
|
|
185
206
|
paintClock();
|
|
207
|
+
paintWaited();
|
|
186
208
|
}
|
|
187
209
|
|
|
188
210
|
/** One ask at a time: an older answer can never arrive after, and undo, a newer one. */
|
|
@@ -193,18 +215,30 @@
|
|
|
193
215
|
var generation = watchGeneration;
|
|
194
216
|
var controller = new AbortController();
|
|
195
217
|
pollController = controller;
|
|
218
|
+
var sentAt = pollSentAt;
|
|
196
219
|
var body = null;
|
|
197
|
-
var
|
|
198
|
-
try { body = await call('/api/tool-updates/progress', 'GET', undefined, controller.signal); }
|
|
220
|
+
var outcome = 'answered';
|
|
221
|
+
try { body = await call('/api/tool-updates/progress', 'GET', undefined, controller.signal); }
|
|
222
|
+
catch (error) {
|
|
223
|
+
// Given up by the page after waiting (below) is still a slow FloLess. Anything else is no contact: the request could
|
|
224
|
+
// not reach it (refused, or the connection dropped), or it answered with an error instead of the progress.
|
|
225
|
+
outcome = controller.signal.aborted ? 'given-up' : error && error.body ? 'error-answer' : 'unreachable';
|
|
226
|
+
}
|
|
199
227
|
// A 200 that is not the answer (a truncated or foreign body) is no contact either.
|
|
200
|
-
if (
|
|
228
|
+
if (outcome === 'answered' && (!body || body.ok !== true || typeof body.checking !== 'boolean')) outcome = 'not-the-answer';
|
|
201
229
|
if (pollController === controller) { pollController = null; polling = false; }
|
|
202
230
|
// An answer to an ask from before the dialog was closed (or the check ended) belongs to nothing now.
|
|
203
231
|
if (generation !== watchGeneration || !checkRunning()) return;
|
|
204
|
-
if (
|
|
205
|
-
markLost();
|
|
232
|
+
if (outcome === 'given-up') {
|
|
233
|
+
if (contact === 'slow' && Date.now() - waitingSince > SLOW_CEILING_MS) markLost('no-answer', Date.now() - waitingSince);
|
|
234
|
+
paintProgress();
|
|
235
|
+
return;
|
|
236
|
+
}
|
|
237
|
+
if (outcome !== 'answered') {
|
|
238
|
+
markLost(outcome, Date.now() - sentAt);
|
|
206
239
|
} else {
|
|
207
|
-
|
|
240
|
+
if (contact === 'slow') console.info('tool update progress answered again', { waitedMs: Date.now() - waitingSince, lastAskMs: Date.now() - sentAt });
|
|
241
|
+
contact = 'ok';
|
|
208
242
|
// Shown, never applied: this is not the view (the view's ticket order belongs to the requests above). A pass that
|
|
209
243
|
// is queued behind another has no steps yet: the old ones go with it rather than freeze with a running clock.
|
|
210
244
|
if (body.checking) {
|
|
@@ -225,10 +259,31 @@
|
|
|
225
259
|
paintProgress();
|
|
226
260
|
}
|
|
227
261
|
|
|
228
|
-
/** The
|
|
229
|
-
function markLost() {
|
|
230
|
-
if (
|
|
231
|
-
|
|
262
|
+
/** The ask could not reach FloLess, or what came back was not the answer: warn once per episode, with what happened. */
|
|
263
|
+
function markLost(outcome, elapsedMs) {
|
|
264
|
+
if (contact !== 'lost') {
|
|
265
|
+
console.warn('tool update progress unavailable', { outcome: outcome, elapsedMs: elapsedMs, step: activeStep() });
|
|
266
|
+
$announce.textContent = 'Lost contact with FloLess. Still trying.';
|
|
267
|
+
}
|
|
268
|
+
contact = 'lost';
|
|
269
|
+
lostBy = outcome;
|
|
270
|
+
}
|
|
271
|
+
|
|
272
|
+
/**
|
|
273
|
+
* An ask has had no answer for POLL_PATIENCE_MS: FloLess is slow, which is not proof it is gone. Said once per spell, with
|
|
274
|
+
* how long and on which step, so a report can be matched to the server's own log of what held it.
|
|
275
|
+
*/
|
|
276
|
+
function markSlow() {
|
|
277
|
+
waitingSince = pollSentAt;
|
|
278
|
+
console.warn('tool update progress delayed', { waitedMs: Date.now() - pollSentAt, step: activeStep() });
|
|
279
|
+
contact = 'slow';
|
|
280
|
+
$announce.textContent = 'FloLess is slow to answer. The check is waiting for it.'; // once per spell; the count ticks silently
|
|
281
|
+
}
|
|
282
|
+
|
|
283
|
+
function activeStep() {
|
|
284
|
+
var steps = progress && Array.isArray(progress.steps) ? progress.steps : [];
|
|
285
|
+
var active = steps.filter(function (step) { return step.state === 'active'; })[0];
|
|
286
|
+
return active ? active.label : null;
|
|
232
287
|
}
|
|
233
288
|
|
|
234
289
|
function stopWatching() {
|
|
@@ -237,7 +292,7 @@
|
|
|
237
292
|
if (pollController) { pollController.abort(); pollController = null; }
|
|
238
293
|
polling = false;
|
|
239
294
|
progress = null;
|
|
240
|
-
|
|
295
|
+
contact = 'ok';
|
|
241
296
|
paintedSteps = null;
|
|
242
297
|
announcedProblems = {};
|
|
243
298
|
$progress.textContent = '';
|
|
@@ -253,13 +308,14 @@
|
|
|
253
308
|
paintProgress();
|
|
254
309
|
if (watchTimer) return;
|
|
255
310
|
watchTimer = setInterval(function () {
|
|
256
|
-
// An ask that has not come back for a while is
|
|
257
|
-
// up (it would otherwise hold every later one back for ever) and
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
311
|
+
// An ask that has not come back for a while is FloLess being slow: say so and keep waiting for that answer. Only
|
|
312
|
+
// much later is the ask given up (it would otherwise hold every later one back for ever) and asked again, still slow.
|
|
313
|
+
// A refused or wrong answer earlier does not make an ask that is merely unanswered "lost": FloLess took this one, so
|
|
314
|
+
// it is slow. Only lost contact that came from waiting too long (the ceiling below) stays lost while asks go unanswered.
|
|
315
|
+
if (polling && Date.now() - pollSentAt > POLL_PATIENCE_MS && (contact === 'ok' || (contact === 'lost' && lostBy !== 'no-answer'))) { markSlow(); paintProgress(); }
|
|
316
|
+
if (polling && Date.now() - pollSentAt > POLL_GIVE_UP_MS && pollController) pollController.abort();
|
|
262
317
|
paintClock();
|
|
318
|
+
paintWaited();
|
|
263
319
|
void pollProgress();
|
|
264
320
|
}, 1000);
|
|
265
321
|
void pollProgress();
|
|
@@ -277,18 +333,31 @@
|
|
|
277
333
|
async function call(path, method, payload, signal) {
|
|
278
334
|
await globalThis.flolessStartupAdmission?.admit(path, { method, signal });
|
|
279
335
|
var res = await fetch(path, { method: method || 'GET', headers: { 'content-type': 'application/json' }, body: payload, signal: signal });
|
|
336
|
+
var readOnly = !method || /^(GET|HEAD)$/i.test(method);
|
|
280
337
|
var body = await res.json().catch(function (error) {
|
|
281
338
|
if (error && error.name === 'AbortError') throw error; // the page gave this request up: not "an unreadable answer"
|
|
282
|
-
|
|
339
|
+
// #3097: no status number in anything a person may read; the code says what happened to the code that reads it.
|
|
340
|
+
return { ok: false, code: 'response-unreadable', error: readOnly
|
|
341
|
+
? 'FloLess sent an answer this window couldn’t read. Reload this window, then try again.'
|
|
342
|
+
: 'FloLess sent an answer this window couldn’t read, so it can’t tell whether that went through. Reload this window and check before trying again.' };
|
|
283
343
|
});
|
|
284
344
|
if (!res.ok && body.ok !== true && !body.results) {
|
|
285
|
-
|
|
345
|
+
// The server's own words when it gave some; otherwise the shared failure sentence, never "HTTP 500".
|
|
346
|
+
var error = new Error(body.error || callFailureText({ status: res.status, body: body }, readOnly));
|
|
286
347
|
error.body = body;
|
|
348
|
+
error.status = res.status;
|
|
349
|
+
error.serverText = Boolean(body.error) && body.code !== 'response-unreadable';
|
|
287
350
|
throw error;
|
|
288
351
|
}
|
|
289
352
|
return body;
|
|
290
353
|
}
|
|
291
354
|
|
|
355
|
+
// The person's sentence for a failed request the server explained no further (web/failure-copy.js, loaded first).
|
|
356
|
+
function callFailureText(error, retrySafe) {
|
|
357
|
+
if (typeof failureCopy === 'function') return failureCopy(error, { retrySafe: retrySafe }).text;
|
|
358
|
+
return 'Couldn’t finish that, and FloLess couldn’t tell why. If it keeps happening, use Report an issue at the bottom of the window.';
|
|
359
|
+
}
|
|
360
|
+
|
|
292
361
|
// #2013: AWARE's cleanup of unused tool versions, as the server words it (agent-store-cleanup.ts).
|
|
293
362
|
function cleanupNeeds() {
|
|
294
363
|
var c = view && view.cleanup;
|
|
@@ -316,9 +385,17 @@
|
|
|
316
385
|
}
|
|
317
386
|
var text;
|
|
318
387
|
var state = 'offer';
|
|
388
|
+
var more = '';
|
|
389
|
+
var reviewed = 0;
|
|
319
390
|
if (templateUpdates.length) {
|
|
320
|
-
|
|
321
|
-
|
|
391
|
+
// One-click update (owner ruling 2026-11-02): the pill counts workflows with an update the person can apply, and only
|
|
392
|
+
// those. Tool approvals and cleanup are a dot here and a section in the dialog.
|
|
393
|
+
// #3081: an update reviewed in AI Chat (a Steel Model) is counted, and the pill says it is a review, not a click.
|
|
394
|
+
reviewed = templateUpdates.filter(function (u) { return !!u.sourceUpdate; }).length;
|
|
395
|
+
text = plural(templateUpdates.length, 'workflow update', 'workflow updates');
|
|
396
|
+
if (reviewed === templateUpdates.length) text += ' to review';
|
|
397
|
+
else if (reviewed) text += ' (' + reviewed + ' to review)';
|
|
398
|
+
if (offers.length || needCount || cleanup.length) more = 'Tool updates also wait for you in this list.';
|
|
322
399
|
} else if (offers.length) {
|
|
323
400
|
text = plural(offers.length, 'workflow update', 'workflow updates');
|
|
324
401
|
if (urgent) {
|
|
@@ -348,8 +425,13 @@
|
|
|
348
425
|
else if (checking && state !== 'checking') text += ' · checking…';
|
|
349
426
|
$pill.textContent = text;
|
|
350
427
|
$pill.setAttribute('data-state', state);
|
|
351
|
-
$pill.setAttribute('data-
|
|
352
|
-
|
|
428
|
+
if (more) $pill.setAttribute('data-more', ''); else $pill.removeAttribute('data-more');
|
|
429
|
+
var tip = !templateUpdates.length ? PILL_TIP : !reviewed ? 'Newer versions of your workflows from FloLess. Open to update them in one click.'
|
|
430
|
+
: reviewed === templateUpdates.length ? 'Newer versions of your workflows from FloLess. Open to review them in AI Chat: nothing changes until you send the request.'
|
|
431
|
+
: 'Newer versions of your workflows from FloLess. Open to update them; the ones marked to review are reviewed in AI Chat first.';
|
|
432
|
+
if (more) tip += ' ' + more;
|
|
433
|
+
$pill.setAttribute('data-tip', firstCheck ? 'The first workflow check is still running. The total is not known yet.' : !checking ? tip : state === 'checking'
|
|
434
|
+
? 'Still checking for tool updates. Open to watch it.' : tip + (/\.$/.test(tip) ? ' ' : '. ') + 'A check is also running.');
|
|
353
435
|
$pill.hidden = false;
|
|
354
436
|
if (isOpen() && !approving && !results) paint();
|
|
355
437
|
}
|
|
@@ -502,7 +584,14 @@
|
|
|
502
584
|
$live.textContent = body.sentence || (ok ? 'Removed from the list.' : 'Nothing was removed from the list. Try again.');
|
|
503
585
|
} catch (error) {
|
|
504
586
|
if (error.body) applyCleanup(ticket, error.body.cleanup);
|
|
505
|
-
|
|
587
|
+
// #3097: "Nothing was removed" is the server's claim, so it follows only the server's own reason. A lost or
|
|
588
|
+
// unexplained answer may follow a removal that went through, so it asks the person to check the list instead.
|
|
589
|
+
console.warn('forget folder failed', error);
|
|
590
|
+
$live.textContent = error.serverText
|
|
591
|
+
? error.message + ' Nothing was removed from the list.'
|
|
592
|
+
: (typeof failureCopy === 'function'
|
|
593
|
+
? failureCopy(error, { action: 'remove it from the list', unsure: 'Check whether it is still listed before trying again.' }).text
|
|
594
|
+
: 'Couldn’t remove it from the list. Check whether it is still listed before trying again.');
|
|
506
595
|
} finally {
|
|
507
596
|
forgetting = null;
|
|
508
597
|
paint();
|
|
@@ -615,7 +704,8 @@
|
|
|
615
704
|
}
|
|
616
705
|
|
|
617
706
|
/** The workflows' rows, laid out by group. An older server's view has no groups: its flat rows are listed as they come. */
|
|
618
|
-
function paintNeeds(needs, cleanup) {
|
|
707
|
+
function paintNeeds(needs, cleanup, host) {
|
|
708
|
+
host = host || $body;
|
|
619
709
|
var groups = view && Array.isArray(view.needsGroups) ? view.needsGroups : null;
|
|
620
710
|
var rowsOf = function (id) { return needs.filter(function (n) { return n.group === id; }); };
|
|
621
711
|
var loose = groups ? needs.filter(function (n) { return !groups.some(function (g) { return g.id === n.group; }); }) : needs;
|
|
@@ -627,13 +717,13 @@
|
|
|
627
717
|
acting.forEach(function (g) { needsSection.appendChild(actionGroup(g, rowsOf(g.id))); });
|
|
628
718
|
loose.forEach(function (n) { needsSection.appendChild(needsRow(n, false)); });
|
|
629
719
|
cleanup.forEach(function (n) { needsSection.appendChild(cleanupRow(n)); });
|
|
630
|
-
|
|
720
|
+
host.appendChild(needsSection);
|
|
631
721
|
}
|
|
632
722
|
if (quiet.length) {
|
|
633
723
|
var total = quiet.reduce(function (n, g) { return n + rowsOf(g.id).length; }, 0);
|
|
634
724
|
var quietSection = section('Nothing to do', total);
|
|
635
725
|
quiet.forEach(function (g) { quietSection.appendChild(quietGroup(g, rowsOf(g.id))); });
|
|
636
|
-
|
|
726
|
+
host.appendChild(quietSection);
|
|
637
727
|
}
|
|
638
728
|
return count;
|
|
639
729
|
}
|
|
@@ -736,6 +826,7 @@
|
|
|
736
826
|
function paintNow() {
|
|
737
827
|
$body.textContent = '';
|
|
738
828
|
$foot.textContent = '';
|
|
829
|
+
if ($sub) $sub.textContent = TOOLS_SUB;
|
|
739
830
|
$cancel.setAttribute('data-command-id', compileSelection ? 'shell.tool-updates-back' : CANCEL_COMMAND);
|
|
740
831
|
$title.textContent = compileSelection ? 'Compile and approve workflows' : 'Approve updated workflows';
|
|
741
832
|
if (compileSelection) {
|
|
@@ -775,22 +866,58 @@
|
|
|
775
866
|
}
|
|
776
867
|
var offers = (view && view.offers) || [];
|
|
777
868
|
var needs = (view && view.needsYou) || [];
|
|
778
|
-
|
|
779
|
-
|
|
780
|
-
|
|
869
|
+
var bridge = window.flolessBridge;
|
|
870
|
+
var rows = typeof bridge?.workflowUpdateRows === 'function' ? bridge.workflowUpdateRows() : templateUpdates;
|
|
871
|
+
var toolsHost = $body;
|
|
872
|
+
if (rows.length) {
|
|
873
|
+
$title.textContent = 'Workflow updates';
|
|
874
|
+
// #3081: a Steel Model is reviewed in AI Chat, never applied by its click here; the intro says so when one is listed.
|
|
875
|
+
var reviewRows = rows.filter(function (u) { return !!u.sourceUpdate; }).length;
|
|
876
|
+
if ($sub) $sub.textContent = !reviewRows ? 'Newer versions of your workflows from FloLess. Each one updates when you click it.'
|
|
877
|
+
: reviewRows === rows.length ? 'Newer versions of your workflows from FloLess. Each one is reviewed in AI Chat, and nothing changes until you send the request there.'
|
|
878
|
+
: 'Newer versions of your workflows from FloLess. Some update when you click them. The ones marked Review in AI Chat change only after you send the request there.';
|
|
879
|
+
var bundled = el('div', 'tool-updates-section wf-upd-section');
|
|
880
|
+
var head = el('div', 'wf-upd-head');
|
|
881
|
+
head.appendChild(el('div', 'tool-updates-section-head', reviewRows === rows.length
|
|
882
|
+
? 'Each review keeps your data. Nothing changes until you send the request.' : 'Each update keeps your data and saves a backup first'));
|
|
883
|
+
// The count is exactly what the click updates (an offer being worked on, or one the person changed, is not counted).
|
|
884
|
+
var plain = typeof bridge?.updateAllCount === 'function' ? bridge.updateAllCount() : templateUpdates.filter(function (u) { return !u.hasChanges; }).length;
|
|
885
|
+
if (plain >= 2 && typeof bridge?.updateAllWorkflows === 'function') {
|
|
886
|
+
var all = el('button', 'tool-updates-open wf-upd-primary', 'Update all (' + plain + ')');
|
|
887
|
+
all.type = 'button';
|
|
888
|
+
all.setAttribute('data-command-id', 'shell.workflow-update-all');
|
|
889
|
+
all.setAttribute('data-tip', 'Updates every workflow you have not changed. Ones you changed wait for your choice below.');
|
|
890
|
+
all.addEventListener('click', function () { void bridge.updateAllWorkflows(); });
|
|
891
|
+
head.appendChild(all);
|
|
892
|
+
}
|
|
893
|
+
bundled.appendChild(head);
|
|
894
|
+
rows.forEach(function (item) {
|
|
895
|
+
bundled.appendChild(typeof bridge?.workflowUpdateRow === 'function' ? bridge.workflowUpdateRow(item) : templateUpdateRow(item));
|
|
896
|
+
});
|
|
781
897
|
$body.appendChild(bundled);
|
|
898
|
+
if (offers.length || needs.length || cleanupNeeds().length || results) {
|
|
899
|
+
var tools = el('details', 'tool-updates-section wf-upd-tools');
|
|
900
|
+
var waiting = offers.length + ((view && typeof view.needsCount === 'number') ? view.needsCount : needs.length) + cleanupNeeds().length;
|
|
901
|
+
var toolsHead = el('summary', 'tool-updates-section-head', 'Tools' + (waiting ? ' · ' + plural(waiting, 'item needs you', 'items need you') : ''));
|
|
902
|
+
toolsHead.setAttribute('data-command-id', 'shell.tool-updates-tools');
|
|
903
|
+
tools.appendChild(toolsHead);
|
|
904
|
+
if (results || toolsOpen) tools.open = true;
|
|
905
|
+
tools.addEventListener('toggle', function () { toolsOpen = tools.open; });
|
|
906
|
+
$body.appendChild(tools);
|
|
907
|
+
toolsHost = tools;
|
|
908
|
+
}
|
|
782
909
|
}
|
|
783
910
|
if (view && !view.supported) {
|
|
784
|
-
|
|
911
|
+
toolsHost.appendChild(el('div', 'tool-updates-summary', view.sentence || 'Tool updates are not available on this computer.'));
|
|
785
912
|
} else if (view && view.sentence) {
|
|
786
|
-
|
|
913
|
+
toolsHost.appendChild(el('div', 'tool-updates-summary', view.sentence));
|
|
787
914
|
}
|
|
788
915
|
if (results) {
|
|
789
|
-
var done = section('
|
|
916
|
+
var done = section('Tool approvals', results.length);
|
|
790
917
|
done.querySelector('.tool-updates-section-head').id = 'tool-updates-results-head';
|
|
791
918
|
done.querySelector('.tool-updates-section-head').tabIndex = -1;
|
|
792
919
|
results.forEach(function (r) { done.appendChild(resultRow(r)); });
|
|
793
|
-
|
|
920
|
+
toolsHost.appendChild(done);
|
|
794
921
|
} else {
|
|
795
922
|
var urgent = offers.filter(function (o) { return !!o.advisory; });
|
|
796
923
|
if (urgent.length) {
|
|
@@ -799,25 +926,26 @@
|
|
|
799
926
|
banner.appendChild(el('div', 'tool-updates-urgent-head', 'AWARE marked ' + (urgent.length === 1 ? 'this update' : 'these updates') + ' urgent'));
|
|
800
927
|
urgent.forEach(function (o) { banner.appendChild(el('div', 'tool-updates-urgent-text', o.workflowName + ': ' + o.advisory)); });
|
|
801
928
|
banner.appendChild(el('div', 'tool-updates-urgent-note', 'Approving is still your decision.'));
|
|
802
|
-
|
|
929
|
+
toolsHost.appendChild(banner);
|
|
803
930
|
}
|
|
804
931
|
if (offers.length) {
|
|
805
932
|
var ready = section('Ready to approve', offers.length);
|
|
806
933
|
offers.forEach(function (o) { ready.appendChild(offerCard(o)); });
|
|
807
|
-
|
|
934
|
+
toolsHost.appendChild(ready);
|
|
808
935
|
}
|
|
809
936
|
}
|
|
810
937
|
var cleanup = cleanupNeeds();
|
|
811
|
-
var needsYou = paintNeeds(needs, cleanup);
|
|
938
|
+
var needsYou = paintNeeds(needs, cleanup, toolsHost);
|
|
812
939
|
// Nothing to approve and nothing the person can act on: say so first, above any quiet "Nothing to do" rows, and do
|
|
813
940
|
// not title the dialog as if something were waiting for approval.
|
|
814
|
-
var allClear = !results && !offers.length && !
|
|
941
|
+
var allClear = !results && !offers.length && !rows.length && !needsYou && view && view.supported && !view.sentence;
|
|
815
942
|
if (allClear) {
|
|
816
943
|
$body.insertBefore(el('div', 'tool-updates-summary', view.checking
|
|
817
944
|
? 'Checking which workflows a tool update affects…'
|
|
818
945
|
: 'Nothing to do. All your workflows are on the tool versions you approved.'), $body.firstChild);
|
|
819
946
|
}
|
|
820
|
-
if (!offers.length && !results) $title.textContent = 'Tool updates';
|
|
947
|
+
if (!offers.length && !results && !rows.length) $title.textContent = 'Tool updates';
|
|
948
|
+
else if (!rows.length && !results) $title.textContent = 'Approve tool updates';
|
|
821
949
|
var dl = downloadsLine();
|
|
822
950
|
if (dl) $foot.appendChild(el('div', 'tool-updates-downloads' + (view.downloads && view.downloads.error ? ' tool-updates-downloads-problem' : ''), dl));
|
|
823
951
|
// Tools AWARE left as they are because they are the person's own copy: said apart from a failure.
|
|
@@ -833,7 +961,14 @@
|
|
|
833
961
|
if (canApprove) $approve.textContent = 'Approve ' + plural(offers.length, 'workflow', 'workflows');
|
|
834
962
|
$check.hidden = !!results || !(view && view.supported);
|
|
835
963
|
// "Not now" would read as cancelling the check, which closing the dialog does not do.
|
|
836
|
-
|
|
964
|
+
var anyDone = rows.some(function (u) { var r = document.querySelector('[data-template-update="' + u.id + '"]'); return r && r.getAttribute('data-state') !== 'idle'; });
|
|
965
|
+
// #3081: Done would say everything listed is finished. While anything still waits (a workflow update, a tool approval,
|
|
966
|
+
// something that needs the person, or an approval that did not go through) it is Close.
|
|
967
|
+
var stillWaiting = workflowUpdatesWaiting();
|
|
968
|
+
var unfinished = (results || []).some(function (r) { return r.outcome !== 'moved' && r.outcome !== 'compiled'; });
|
|
969
|
+
var nothingWaits = !(stillWaiting.apply + stillWaiting.review) && !(!results && offers.length) && !needsYou && !unfinished;
|
|
970
|
+
$cancel.textContent = (results || anyDone) && nothingWaits ? 'Done'
|
|
971
|
+
: checkInFlight() || results || anyDone ? 'Close' : 'Not now';
|
|
837
972
|
}
|
|
838
973
|
|
|
839
974
|
/** A control that cannot be used right now says why (Instructor reads data-blocked-reason only while it is disabled). */
|
|
@@ -878,17 +1013,36 @@
|
|
|
878
1013
|
|
|
879
1014
|
async function refreshTemplates() {
|
|
880
1015
|
var ticket = ++templateTicket;
|
|
1016
|
+
var bridge = window.flolessBridge;
|
|
881
1017
|
try {
|
|
882
|
-
|
|
883
|
-
|
|
884
|
-
|
|
1018
|
+
// #3081: one read feeds this pill and both update dialogs, so a count never disagrees with the rows under it. The
|
|
1019
|
+
// page's own read is only for a page without the workflow screen (it has no rows to keep in step).
|
|
1020
|
+
var list;
|
|
1021
|
+
if (typeof bridge?.refreshWorkflowUpdates === 'function') {
|
|
1022
|
+
list = await bridge.refreshWorkflowUpdates();
|
|
1023
|
+
if (!list) throw new Error('the workflow update offers could not be read');
|
|
1024
|
+
} else {
|
|
1025
|
+
var templates = await call('/api/workflows/updates');
|
|
1026
|
+
list = templates?.ok === true && Array.isArray(templates.updates) ? templates.updates : null;
|
|
1027
|
+
}
|
|
1028
|
+
if (list && ticket === templateTicket) {
|
|
1029
|
+
templateUpdates = list;
|
|
885
1030
|
paintPill();
|
|
886
1031
|
}
|
|
887
1032
|
} catch (error) {
|
|
1033
|
+
console.warn('workflow update offers unavailable', error);
|
|
888
1034
|
if (isOpen()) $live.textContent = 'FloLess could not check bundled workflow files just now. Reopen this review to try again.';
|
|
889
1035
|
}
|
|
890
1036
|
}
|
|
891
1037
|
|
|
1038
|
+
/** #3081: the workflow updates still waiting in the list, split into what a click applies and what is reviewed in AI Chat. */
|
|
1039
|
+
function workflowUpdatesWaiting() {
|
|
1040
|
+
var bridge = window.flolessBridge;
|
|
1041
|
+
if (typeof bridge?.workflowUpdatesWaiting === 'function') return bridge.workflowUpdatesWaiting();
|
|
1042
|
+
var review = templateUpdates.filter(function (u) { return !!u.sourceUpdate; }).length;
|
|
1043
|
+
return { apply: templateUpdates.length - review, review: review };
|
|
1044
|
+
}
|
|
1045
|
+
|
|
892
1046
|
async function compileReviewed() {
|
|
893
1047
|
if (!compileSelection || approving) return;
|
|
894
1048
|
var selected = compileSelection;
|
|
@@ -1087,9 +1241,11 @@
|
|
|
1087
1241
|
if (body.ok) {
|
|
1088
1242
|
results = body.results || [];
|
|
1089
1243
|
var moved = results.filter(function (r) { return r.outcome === 'moved'; }).length;
|
|
1090
|
-
|
|
1091
|
-
|
|
1092
|
-
|
|
1244
|
+
// #3081: tool approvals and workflow updates are different work on (often) different workflows: say each apart,
|
|
1245
|
+
// so "3 done" is never read as the 3 workflow updates still in the list.
|
|
1246
|
+
$live.textContent = (moved === results.length
|
|
1247
|
+
? plural(moved, 'tool approval', 'tool approvals') + ' done. ' + (moved === 1 ? 'That workflow now runs' : 'Those workflows now run') + ' on the new tool versions.'
|
|
1248
|
+
: moved + ' of ' + plural(results.length, 'tool approval', 'tool approvals') + ' done. The others say why below.') + waitingSentence();
|
|
1093
1249
|
} else {
|
|
1094
1250
|
$live.textContent = body.sentence || body.error || 'Nothing was moved. Review it again.';
|
|
1095
1251
|
}
|
|
@@ -1108,6 +1264,15 @@
|
|
|
1108
1264
|
}
|
|
1109
1265
|
});
|
|
1110
1266
|
|
|
1267
|
+
/** After tool approvals: the workflow updates that still wait in the list, or nothing when none do. */
|
|
1268
|
+
function waitingSentence() {
|
|
1269
|
+
var w = workflowUpdatesWaiting();
|
|
1270
|
+
if (w.apply && w.review) return ' ' + plural(w.apply + w.review, 'workflow update still waits', 'workflow updates still wait') + ' in the list: ' + w.apply + ' to update, ' + w.review + ' to review in AI Chat.';
|
|
1271
|
+
if (w.review) return ' ' + plural(w.review, 'workflow update still needs', 'workflow updates still need') + ' review in AI Chat.';
|
|
1272
|
+
if (w.apply) return ' ' + plural(w.apply, 'workflow update still waits', 'workflow updates still wait') + ' in the list.';
|
|
1273
|
+
return '';
|
|
1274
|
+
}
|
|
1275
|
+
|
|
1111
1276
|
// The ≡ menu's "Tool updates…" — the way in when the pill has nothing to show (to check for new versions now).
|
|
1112
1277
|
if (typeof window.handleMenuAction === 'function') {
|
|
1113
1278
|
var previousMenuAction = window.handleMenuAction;
|
|
@@ -1119,8 +1284,9 @@
|
|
|
1119
1284
|
|
|
1120
1285
|
window.addEventListener('floless:tool-updates-changed', function () { void refresh(); });
|
|
1121
1286
|
window.addEventListener('floless:workflow-updates-changed', function () { void refresh(); });
|
|
1287
|
+
window.addEventListener('floless:workflow-update-rows', function () { if (isOpen() && !approving) paint(); });
|
|
1122
1288
|
window.addEventListener('floless:apps-changed', function () { void refresh(); });
|
|
1123
1289
|
window.addEventListener('floless:workflows-listed', giveAwaitingOpenButtons);
|
|
1124
|
-
window.flolessToolUpdates = { refresh: refresh, open: open };
|
|
1290
|
+
window.flolessToolUpdates = { refresh: refresh, open: open, close: close };
|
|
1125
1291
|
void refresh();
|
|
1126
1292
|
})();
|