@floless/app 0.141.1 → 0.142.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/floless-server.cjs +2478 -1798
- package/dist/web/app.css +1 -0
- package/dist/web/aware.js +10 -5
- package/dist/web/chat.css +21 -0
- package/dist/web/chat.js +512 -38
- package/dist/web/commands-revit.js +1 -1
- package/dist/web/commands-shell.js +22 -4
- package/dist/web/commands-steel.js +4 -0
- package/dist/web/left-pane.js +43 -0
- package/dist/web/model-clip-session.js +2 -3
- package/dist/web/model-navigation-controls.js +17 -3
- package/dist/web/model-orientation-overlay.js +2 -3
- package/dist/web/model-panel-bridge.js +15 -3
- package/dist/web/model-viewport-revit-adapter.js +1 -0
- package/dist/web/model-viewport-toolbar.js +0 -2
- package/dist/web/revit-editor.js +4 -6
- package/dist/web/steel-3d-view.js +79 -45
- package/dist/web/steel-editor.html +167 -15
- package/dist/web/steel-filter.html +13 -4
- package/dist/web/steel-model-commands.js +0 -1
- package/dist/web/workspaces.js +28 -8
- package/package.json +1 -1
package/dist/web/workspaces.js
CHANGED
|
@@ -2419,7 +2419,6 @@
|
|
|
2419
2419
|
const assertProjectSourceReadable = (file) => file.slice(0, Math.min(file.size, 1)).arrayBuffer();
|
|
2420
2420
|
|
|
2421
2421
|
const $projectSetup = document.getElementById('project-setup-modal');
|
|
2422
|
-
const $projectSetupDialog = $projectSetup && $projectSetup.querySelector('.project-setup-dialog');
|
|
2423
2422
|
const $projectSetupTitle = document.getElementById('project-setup-title');
|
|
2424
2423
|
const $projectSetupSourceName = document.getElementById('project-setup-source-name');
|
|
2425
2424
|
const $projectSetupSourceCount = document.getElementById('project-setup-source-count');
|
|
@@ -2579,7 +2578,6 @@
|
|
|
2579
2578
|
const accountLabel = window.flolessChat?.providerAccountLabel;
|
|
2580
2579
|
for (const button of $projectSetupProvider.querySelectorAll('[data-chat-provider]')) {
|
|
2581
2580
|
const id = button.dataset.chatProvider;
|
|
2582
|
-
const name = PROJECT_CHAT_PROVIDER_NAMES[id] || id;
|
|
2583
2581
|
const runtime = runtimes.find((row) => row.id === id);
|
|
2584
2582
|
const readiness = projectSetupProviderReadiness(runtime);
|
|
2585
2583
|
button.setAttribute('aria-pressed', String(id === provider));
|
|
@@ -3895,6 +3893,22 @@
|
|
|
3895
3893
|
return true;
|
|
3896
3894
|
}
|
|
3897
3895
|
|
|
3896
|
+
/**
|
|
3897
|
+
* A step the PERSON picked (a tab or a "go to" link), as opposed to one the shell restores. While a
|
|
3898
|
+
* project opens, `pendingPresenceStep` holds the step to restore once the lifecycle probe answers;
|
|
3899
|
+
* any pick replaces that intent, so the probe can never move the person off the tab they chose
|
|
3900
|
+
* (#1669 — a Drawing Filter click was not deferred, so nothing cleared the held Model and the probe
|
|
3901
|
+
* yanked them there). A pick of Model/Exports/History re-queues itself in `deferStageUntilLifecycle`.
|
|
3902
|
+
* Its checking toast promised a destination that is no longer wanted, so it goes too — dismissing
|
|
3903
|
+
* it also tells the older probe waiter it no longer owns the feedback, so no retry warning follows.
|
|
3904
|
+
*/
|
|
3905
|
+
function chooseStep(s) {
|
|
3906
|
+
pendingPresenceStep = null;
|
|
3907
|
+
if (pendingPresenceToast) pendingPresenceToast();
|
|
3908
|
+
pendingPresenceToast = null;
|
|
3909
|
+
setStep(s);
|
|
3910
|
+
}
|
|
3911
|
+
|
|
3898
3912
|
function setStep(s) {
|
|
3899
3913
|
// Keep the tab visually available while the routine open-project check runs, but do not cross
|
|
3900
3914
|
// the model boundary speculatively. The existing request is reused and this destination opens
|
|
@@ -3924,6 +3938,13 @@
|
|
|
3924
3938
|
if (window.flolessLeftPane) {
|
|
3925
3939
|
window.flolessLeftPane.setWorkspaceModelVisible(s === 'model');
|
|
3926
3940
|
}
|
|
3941
|
+
// The visible step IS the surface AI Chat reads, and what may be attached depends on it (a
|
|
3942
|
+
// Drawing Filter message takes pictures only). Nothing else told the chat pane, so its paperclip
|
|
3943
|
+
// kept the previous step's wording until some unrelated repaint happened to run — caught by the
|
|
3944
|
+
// independent QA switching Drawing Filter → Model. `try` because this function is also evaluated
|
|
3945
|
+
// on its own by workspace-instructor-handoff.test.ts, where no event constructor exists.
|
|
3946
|
+
try { window.dispatchEvent(new CustomEvent('floless:workspace-step-changed', { detail: { step: s } })); }
|
|
3947
|
+
catch { /* a harness without CustomEvent; the real shell always has one */ }
|
|
3927
3948
|
if ($sourcePlaceholder) $sourcePlaceholder.hidden = !(s === 'drawings' && !drawingsHasFrame);
|
|
3928
3949
|
// Queried here rather than through the module const, the way master's own call sites do: setStep is
|
|
3929
3950
|
// extracted and evaluated on its own by workspace-instructor-handoff.test.ts, and a closure
|
|
@@ -3962,7 +3983,7 @@
|
|
|
3962
3983
|
if (reason) showToast(reason, 'warn');
|
|
3963
3984
|
return;
|
|
3964
3985
|
}
|
|
3965
|
-
if (b)
|
|
3986
|
+
if (b) chooseStep(b.dataset.step);
|
|
3966
3987
|
});
|
|
3967
3988
|
|
|
3968
3989
|
// ── Approve (per-project) ───────────────────────────────────────────────────
|
|
@@ -6024,12 +6045,12 @@
|
|
|
6024
6045
|
// under the in-flight POST, so `ta`/`btn` stay valid throughout.
|
|
6025
6046
|
kbAdjustBusy = proj.id;
|
|
6026
6047
|
ta.disabled = true; btn.disabled = true; btn.textContent = '✎ Queuing…';
|
|
6027
|
-
let ok = false
|
|
6048
|
+
let ok = false;
|
|
6028
6049
|
try {
|
|
6029
6050
|
await api(kbUrl(proj.id, '/request'), { method: 'POST', body: JSON.stringify({ prompt }) });
|
|
6030
6051
|
ok = true;
|
|
6031
6052
|
if (bridge.loadRequests) await bridge.loadRequests(); // bump the footer Requests counter (nothing else moves it here)
|
|
6032
|
-
} catch
|
|
6053
|
+
} catch { /* the failure is reported through `ok` below — the message was never shown */ }
|
|
6033
6054
|
kbAdjustBusy = null;
|
|
6034
6055
|
// Re-check by ID after every await: the user may have switched — or renamed — the project mid-flight
|
|
6035
6056
|
// (rename replaces the `current` object, so an identity check would false-mismatch). Bail without
|
|
@@ -8311,7 +8332,6 @@
|
|
|
8311
8332
|
approvedAt = r.approvedAt || undefined;
|
|
8312
8333
|
units = r.units === 'mm' ? 'mm' : 'ft-in';
|
|
8313
8334
|
} else {
|
|
8314
|
-
const err = exportResult.reason;
|
|
8315
8335
|
// Surface the load failure — don't let it read as "nothing exported yet" (a lie).
|
|
8316
8336
|
showToast('We couldn’t load the export status because FloLess could not reach it. Try again.', 'warn');
|
|
8317
8337
|
state = null;
|
|
@@ -8758,7 +8778,7 @@
|
|
|
8758
8778
|
if (e.target.closest('[data-export-raw]')) { exportRawSelectedSource(); return; }
|
|
8759
8779
|
if (e.target.closest('#ws-exports-approve')) { approveProject(); return; }
|
|
8760
8780
|
// The no-model gate's real next step — mirrors History's #hist-go-drawings.
|
|
8761
|
-
if (e.target.closest('#ws-exports-go-drawings')) {
|
|
8781
|
+
if (e.target.closest('#ws-exports-go-drawings')) { chooseStep('drawings'); return; }
|
|
8762
8782
|
if (e.target.closest('[data-open-exports-folder]')) { openExportsFolder(); return; }
|
|
8763
8783
|
const details = e.target.closest('[data-export-details]');
|
|
8764
8784
|
if (details) { showExportReceiptDetails(details.dataset.exportDetails, details); return; }
|
|
@@ -11911,7 +11931,7 @@
|
|
|
11911
11931
|
$wsHistory.addEventListener('click', (e) => {
|
|
11912
11932
|
// The no-model empty state's real next step: go read a drawing. Same handler shape as the
|
|
11913
11933
|
// Approve it replaces, so the pane keeps owning its own inline actions.
|
|
11914
|
-
if (e.target.closest('#hist-go-drawings')) {
|
|
11934
|
+
if (e.target.closest('#hist-go-drawings')) { chooseStep('drawings'); return; }
|
|
11915
11935
|
if (e.target.closest('.hc-cancel')) { closeRollbackConfirm(); return; }
|
|
11916
11936
|
const go = e.target.closest('[data-hc-go]');
|
|
11917
11937
|
if (go) { rollbackTo(Number(go.dataset.hcGo)); return; }
|