@floless/app 0.159.0 → 0.160.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 +29576 -23804
- package/dist/schemas/steel.model.v2.schema.json +1 -0
- package/dist/skills/floless-app-onboarding/SKILL.md +4 -3
- package/dist/skills/floless-app-onboarding/references/floless-surfaces.md +1 -2
- package/dist/skills/floless-app-rfi/SKILL.md +29 -1
- package/dist/skills/floless-app-steel-model/SKILL.md +2 -2
- package/dist/web/app.css +184 -151
- package/dist/web/app.js +17 -51
- package/dist/web/aware.js +504 -542
- package/dist/web/chat-question-card.js +24 -1
- package/dist/web/chat.css +131 -29
- package/dist/web/chat.js +1225 -178
- package/dist/web/commands-shell.js +676 -50
- package/dist/web/commands-steel.js +1 -0
- package/dist/web/guide.js +8 -0
- package/dist/web/index.html +23 -41
- package/dist/web/instructor.js +14 -5
- package/dist/web/pages.js +115 -18
- package/dist/web/panels.js +19 -1
- package/dist/web/project-rfis.js +715 -0
- package/dist/web/project-workflows.js +236 -4
- package/dist/web/run-history.js +198 -0
- package/dist/web/run-page-view.js +12 -2
- package/dist/web/steel-3d-core.js +29 -1
- package/dist/web/steel-editor.html +71 -10
- package/dist/web/steel-model-v2-projection.js +7 -0
- package/dist/web/workspaces.js +136 -48
- package/package.json +2 -1
package/dist/web/workspaces.js
CHANGED
|
@@ -764,7 +764,8 @@
|
|
|
764
764
|
accessCopy: {
|
|
765
765
|
'access-required': {
|
|
766
766
|
status: 'Not in your plan',
|
|
767
|
-
|
|
767
|
+
// No "stay viewable": Steel Model has no recovery view since 2026-10-23 (owner ruling, #1894/#2360).
|
|
768
|
+
body: 'Steel Model is not included in this account’s plan. Add it on floless.io, or sign in with an account that has it.',
|
|
768
769
|
action: 'See plans', aria: 'Steel Model is not in your plan — see plans on floless.io (opens in a new tab)',
|
|
769
770
|
},
|
|
770
771
|
'account-selection-required': {
|
|
@@ -816,7 +817,6 @@
|
|
|
816
817
|
cardIcon: '<path d="M5 16C8 6 16 6 19 16"/><rect x="3.25" y="16" width="3.5" height="3.5" rx=".5"/><rect x="17.25" y="16" width="3.5" height="3.5" rx=".5"/><rect x="10.5" y="7" width="3" height="3" rx=".5"/><path d="M6.5 8.5h4M13.5 8.5h4"/><circle cx="5" cy="8.5" r="1.5"/><circle cx="19" cy="8.5" r="1.5"/>', // a curve with anchors and handles
|
|
817
818
|
displayName: 'Trace',
|
|
818
819
|
projectCapability: 'editable 2D drawing',
|
|
819
|
-
docGuide: true,
|
|
820
820
|
createActions: [
|
|
821
821
|
{
|
|
822
822
|
kind: 'drawing',
|
|
@@ -1014,6 +1014,7 @@
|
|
|
1014
1014
|
{ key: 'knowledge', label: 'Knowledge' },
|
|
1015
1015
|
{ key: 'pages', label: 'Pages' },
|
|
1016
1016
|
{ key: 'workflows', label: 'Workflows' }, // #2470 R6.2: the workflows this project owns
|
|
1017
|
+
{ key: 'rfis', label: 'RFIs' }, // #2470 R6.6: the project's questions for the engineer, client or architect
|
|
1017
1018
|
{ key: 'modules', label: 'Modules' }, // #2470 R6.7: the module projects linked to this one
|
|
1018
1019
|
],
|
|
1019
1020
|
diff: false,
|
|
@@ -1295,6 +1296,7 @@
|
|
|
1295
1296
|
$approveBtn.classList.toggle('approval-clean', s.status === 'ready' && !!s.headVersion && s.pendingCount === 0);
|
|
1296
1297
|
$approveBtn.classList.toggle('approval-findings-accepted', s.status === 'ready' && !!s.headVersion && s.pendingCount === 0
|
|
1297
1298
|
&& !!(s.review && s.review.approvedHeadImportFindings));
|
|
1299
|
+
renderQuickHeader();
|
|
1298
1300
|
}
|
|
1299
1301
|
|
|
1300
1302
|
/**
|
|
@@ -1405,7 +1407,6 @@
|
|
|
1405
1407
|
approvalState = { status: 'unreviewable', reason: review.reason, review: null, pendingCount: 0,
|
|
1406
1408
|
headVersion: null, error: review.message || 'This project cannot be approved.' };
|
|
1407
1409
|
renderApprovalHeader();
|
|
1408
|
-
syncWorkspaceGuide();
|
|
1409
1410
|
if (!$wsExports.hidden) paintExports(current.approvedAt);
|
|
1410
1411
|
// No History re-render here. An earlier cut of this change had one, to repair a History
|
|
1411
1412
|
// that had painted while the status was still `loading` — but `renderHistory` now parks on
|
|
@@ -1420,7 +1421,6 @@
|
|
|
1420
1421
|
approvalState = { status: 'ready', review, pendingCount: groups.length, headVersion, error: '' };
|
|
1421
1422
|
renderApprovalHeader();
|
|
1422
1423
|
settleImportedSourceCard(projectId);
|
|
1423
|
-
syncWorkspaceGuide();
|
|
1424
1424
|
if (!$wsExports.hidden) paintExports(current.approvedAt);
|
|
1425
1425
|
return review;
|
|
1426
1426
|
} catch (error) {
|
|
@@ -1446,21 +1446,6 @@
|
|
|
1446
1446
|
return (st && st.label) || (key.charAt(0).toUpperCase() + key.slice(1));
|
|
1447
1447
|
};
|
|
1448
1448
|
|
|
1449
|
-
// ── Workspaces guide beacon (aware.js owns #guide-beacon; we own project state) ──────
|
|
1450
|
-
// The document-lifecycle guide (drop → review → approve → export) is for the lightweight
|
|
1451
|
-
// Trace document archetype. Steel can now also start from drawings, but its guide/capability
|
|
1452
|
-
// surface is broader and should not inherit Trace-specific SVG guidance.
|
|
1453
|
-
const wsHasDocGuide = () => { const d = wsApp(); return !!(d && d.docGuide); };
|
|
1454
|
-
function syncWorkspaceGuide() {
|
|
1455
|
-
if (!bridge.setWorkspaceGuide) return; // older bridge — no-op (beacon simply stays hidden)
|
|
1456
|
-
if (!current || !wsHasDocGuide()) { bridge.clearWorkspaceGuide && bridge.clearWorkspaceGuide(); return; }
|
|
1457
|
-
// `exported` = an SVG export file exists (from the last export listing); best-known from
|
|
1458
|
-
// exportState, which renderExports() populates. Unknown before Exports is opened → false.
|
|
1459
|
-
const exported = !!(exportState && exportState.svg && exportState.svg.exportedAt);
|
|
1460
|
-
bridge.setWorkspaceGuide({ app: current.app, name: current.name, displayName: projectAppName(current),
|
|
1461
|
-
approved: approvalState.status === 'ready' && !!approvalState.headVersion && approvalState.pendingCount === 0, exported });
|
|
1462
|
-
}
|
|
1463
|
-
|
|
1464
1449
|
// ── mode ────────────────────────────────────────────────────────────────────
|
|
1465
1450
|
// Which subject the browser tab should name. Pure and named so it can be driven over its three
|
|
1466
1451
|
// real states in a test rather than grepped for out of applyMode() — review found four realistic
|
|
@@ -1519,8 +1504,6 @@
|
|
|
1519
1504
|
$app.classList.toggle('mode-workspaces', ws);
|
|
1520
1505
|
document.body.classList.toggle('mode-workspaces', ws);
|
|
1521
1506
|
document.documentElement.classList.remove('mode-workspaces-boot');
|
|
1522
|
-
// #2007: with both mode classes set, the workflow spotlight closes off Workflows and is offered again on it.
|
|
1523
|
-
if (bridge.syncGuideSpotlight) bridge.syncGuideSpotlight();
|
|
1524
1507
|
// The provenance strip is workflow-level data. Workspaces replaces that surface (including its
|
|
1525
1508
|
// landing), so cancel any late workflow-pin paint before the project UI starts loading.
|
|
1526
1509
|
if (ws && bridge.clearKbInformed) bridge.clearKbInformed();
|
|
@@ -1567,11 +1550,6 @@
|
|
|
1567
1550
|
if (!ws) bridge.setRequestScope(null);
|
|
1568
1551
|
else bridge.setRequestScope(current ? { project: current.id, appId: current.app, label: current.name } : {});
|
|
1569
1552
|
}
|
|
1570
|
-
// Keep the shared guide beacon in step with mode: in Workflows mode (or the Workspaces
|
|
1571
|
-
// landing) it must NOT show a workspace guide — clear it so aware.js reverts to the
|
|
1572
|
-
// workflow beacon; in a Workspaces project it points at that project's lifecycle.
|
|
1573
|
-
if (!ws || !current) { if (bridge.clearWorkspaceGuide) bridge.clearWorkspaceGuide(); }
|
|
1574
|
-
else syncWorkspaceGuide();
|
|
1575
1553
|
if (window.flolessLeftPane) {
|
|
1576
1554
|
// Any Model step may offer the left Model section; it appears only once that editor sends a snapshot.
|
|
1577
1555
|
const modelPanelVisible = ws && !!current && currentStep === 'model';
|
|
@@ -2800,6 +2778,8 @@
|
|
|
2800
2778
|
thumbBandHtml(p, displayApp) +
|
|
2801
2779
|
`<span class="ws-body"><span><span class="ws-name">${escapeHtml(p.name)}</span>` +
|
|
2802
2780
|
(projectCapability ? `<span class="ws-meta">${escapeHtml(projectCapability)}</span>` : '') +
|
|
2781
|
+
// #2521 row 5: the card speaks for the WORKING COPY only, and says so in its tip.
|
|
2782
|
+
(p.quick && quickPillHtml(p.quick) ? `<span class="ws-meta ws-quick">${quickPillHtml(p.quick, { scope: 'Working copy', focusable: false })}</span>` : '') +
|
|
2803
2783
|
(p.importedMidSave ? `<span class="ws-meta ws-unverified" data-tip="${escapeAttr(UNVERIFIED_IMPORT_TIP)}">Imported mid-save · not verified. Export again on the source computer.</span>` : '') +
|
|
2804
2784
|
`<span class="ws-meta ws-registration-status"${p.registrationState === 'unavailable' ? '' : ' hidden'}>${escapeHtml(p.registrationReason || 'Project folder unavailable. Locate or restore it.')}</span>` +
|
|
2805
2785
|
`<span class="ws-meta ws-registration-location-note"${p.registrationState !== 'unavailable' && p.registrationLocationWarning ? '' : ' hidden'}>${escapeHtml(p.registrationLocationWarning || '')}</span>` +
|
|
@@ -5312,7 +5292,6 @@
|
|
|
5312
5292
|
// first actionable stage, and restore the destination only after an explicit `model` answer.
|
|
5313
5293
|
setStep(pendingPresenceStep ? 'drawings' : initialStep);
|
|
5314
5294
|
applyMode();
|
|
5315
|
-
syncWorkspaceGuide(); // point the shared beacon at THIS project's document lifecycle
|
|
5316
5295
|
}
|
|
5317
5296
|
|
|
5318
5297
|
/**
|
|
@@ -5513,7 +5492,7 @@
|
|
|
5513
5492
|
projectContractLifecycle = 'unknown'; exportsHasModel = false; modelPresenceGen++; modelPresenceProbe = null; pendingPresenceStep = null;
|
|
5514
5493
|
if (pendingPresenceToast) pendingPresenceToast();
|
|
5515
5494
|
pendingPresenceToast = null;
|
|
5516
|
-
closeProjMenu(); applyMode();
|
|
5495
|
+
closeProjMenu(); applyMode(); // revision state cleared by resetRevisionState() above
|
|
5517
5496
|
}
|
|
5518
5497
|
document.getElementById('ws-back').addEventListener('click', (e) => { void leaveProjectToList(e.currentTarget); });
|
|
5519
5498
|
|
|
@@ -6339,6 +6318,15 @@
|
|
|
6339
6318
|
const project = typeof current !== 'undefined' ? current : null;
|
|
6340
6319
|
if (showWorkflows && project && window.flolessProjectWorkflows) window.flolessProjectWorkflows.render($workflowsPane, project);
|
|
6341
6320
|
}
|
|
6321
|
+
// #2470 R6.6: RFIs is a shell-rendered pane too: the project's correspondence RFIs (project-rfis.js). Its module is
|
|
6322
|
+
// reached through globalThis, so a harness that lifts setStep without it still runs.
|
|
6323
|
+
const $rfisPane = document.getElementById('ws-rfis');
|
|
6324
|
+
if ($rfisPane) {
|
|
6325
|
+
const showRfis = s === 'rfis';
|
|
6326
|
+
$rfisPane.hidden = !showRfis;
|
|
6327
|
+
const project = typeof current !== 'undefined' ? current : null;
|
|
6328
|
+
if (showRfis && project) globalThis.flolessProjectRfis?.render?.($rfisPane, project);
|
|
6329
|
+
}
|
|
6342
6330
|
// #2470 R6.7: Modules is a shell-rendered pane too: the module projects linked to this one (project-modules.js).
|
|
6343
6331
|
// Queried here for the same reason as the Pages pane above.
|
|
6344
6332
|
const $modulesPane = document.getElementById('ws-modules');
|
|
@@ -6782,6 +6770,51 @@
|
|
|
6782
6770
|
return { operationId: state.operationId, operationToken: state.operationToken };
|
|
6783
6771
|
}
|
|
6784
6772
|
|
|
6773
|
+
/**
|
|
6774
|
+
* #2521 row 5: the Quick model label. The server sends the words with each document it describes
|
|
6775
|
+
* (`quick: { state, short, label, tip }`); this only paints them. A precise model, or a payload without
|
|
6776
|
+
* the field, shows nothing. `scope` names WHICH document it describes ("v3", "Working copy") in the tip,
|
|
6777
|
+
* and in the visible text too with `showScope`, so a label never speaks for a document it was not read from.
|
|
6778
|
+
* `focusable: false` inside a control (a project card, a picker option): no second tab stop, and no Instructor id
|
|
6779
|
+
* that would shadow the control the click really drives. Its tooltip and words stay.
|
|
6780
|
+
*/
|
|
6781
|
+
function quickPillHtml(q, opts = {}) {
|
|
6782
|
+
if (!q || (q.state !== 'quick' && q.state !== 'unknown') || typeof q.short !== 'string' || !q.short) return '';
|
|
6783
|
+
const scope = opts.scope ? `${opts.scope}: ` : '';
|
|
6784
|
+
const tip = `${scope}${q.label || q.short}. ${q.tip || ''}`.trim();
|
|
6785
|
+
const nested = opts.focusable === false;
|
|
6786
|
+
const carrier = nested ? '' : ' data-command-id="shell.quick-model-label" tabindex="0"';
|
|
6787
|
+
// Nested in a control: its full words ride along as that control's text, so a keyboard or screen-reader user who
|
|
6788
|
+
// cannot reach the pill's own tooltip still hears the count and what it means (code review of row 5a, round 2).
|
|
6789
|
+
const spoken = nested ? `<span class="sr-only"> (${escapeHtml(tip)})</span>` : '';
|
|
6790
|
+
return `<span class="quick-pill${q.state === 'unknown' ? ' is-unknown' : ''}"${carrier} data-tip="${escapeAttr(tip)}">${escapeHtml((opts.showScope ? scope : '') + q.short)}</span>${spoken}`;
|
|
6791
|
+
}
|
|
6792
|
+
|
|
6793
|
+
/**
|
|
6794
|
+
* The header chip: ONE compact chip for the approved head and, whenever it differs from the head, the working copy.
|
|
6795
|
+
* Its tooltip names each document and says what it rests on, so the header never grows a second chip that pushes
|
|
6796
|
+
* Approve off a laptop-width header (found by the independent QA run: two chips beside "Review changes · 10" ended
|
|
6797
|
+
* Approve at 1418 px in a 1280 px window).
|
|
6798
|
+
*/
|
|
6799
|
+
function renderQuickHeader() {
|
|
6800
|
+
const $quick = document.getElementById('ws-quick');
|
|
6801
|
+
if (!$quick) return;
|
|
6802
|
+
const s = approvalState;
|
|
6803
|
+
const q = s.status === 'ready' && s.review && s.review.quick ? s.review.quick : null;
|
|
6804
|
+
const parts = [];
|
|
6805
|
+
if (q && s.headVersion && quickPillHtml(q.head)) parts.push([`v${s.headVersion}`, q.head]);
|
|
6806
|
+
if (q && (s.pendingCount > 0 || !s.headVersion) && quickPillHtml(q.draft)) parts.push(['Working copy', q.draft]);
|
|
6807
|
+
if (!parts.length) { $quick.innerHTML = ''; $quick.hidden = true; return; }
|
|
6808
|
+
// "Quick model" when any document it speaks for is readably Quick; "Possibly Quick model" when none is; dashed
|
|
6809
|
+
// whenever one of them could not be read.
|
|
6810
|
+
const anyQuick = parts.some(([, label]) => label.state === 'quick');
|
|
6811
|
+
const anyUnknown = parts.some(([, label]) => label.state === 'unknown');
|
|
6812
|
+
const tip = parts.map(([scope, label]) => `${scope}: ${label.label}.`).join(' ')
|
|
6813
|
+
+ ` ${(parts.find(([, label]) => label.state === 'quick') || parts[0])[1].tip || ''}`;
|
|
6814
|
+
$quick.innerHTML = `<span class="quick-pill${anyUnknown ? ' is-unknown' : ''}" data-command-id="shell.quick-model-label" tabindex="0" data-tip="${escapeAttr(tip.trim())}">${escapeHtml(anyQuick ? 'Quick model' : 'Possibly Quick model')}</span>`;
|
|
6815
|
+
$quick.hidden = false;
|
|
6816
|
+
}
|
|
6817
|
+
|
|
6785
6818
|
async function finishApprovalSuccess(res, project) {
|
|
6786
6819
|
const revisionNoteStatus = await finishApprovalRevisionNote(res, project);
|
|
6787
6820
|
if ($approvalRevisionNoteText) $approvalRevisionNoteText.value = '';
|
|
@@ -6800,9 +6833,11 @@
|
|
|
6800
6833
|
// #2449: an approval resting on connection assumptions (or one whose record could not be read) is never announced
|
|
6801
6834
|
// as a plain approval either; the server's own sentence, the same one History shows.
|
|
6802
6835
|
const assumed = res && res.connectionAssumptions && typeof res.connectionAssumptions.note === 'string' ? res.connectionAssumptions.note : '';
|
|
6803
|
-
|
|
6836
|
+
// #2521 row 5: an approved Quick model says so in the same breath, read from the approved version itself.
|
|
6837
|
+
const quick = res && res.quick && (res.quick.state === 'quick' || res.quick.state === 'unknown') && typeof res.quick.label === 'string'
|
|
6838
|
+
? `${res.quick.label}. ` : '';
|
|
6839
|
+
showToast(`${headline} ${quick}${assumed ? `${assumed} ` : ''}${pending ? `${pending} change${pending === 1 ? ' remains' : 's remain'} pending${saved ? ' in Saved work' : ''}; approved exports omit them unless you explicitly choose DRAFT.` : 'No changes remain pending.'}`, 'ok');
|
|
6804
6840
|
track('workspace_project_approved', { app: project.app });
|
|
6805
|
-
if (bridge.markWorkspaceApproved && wsDescOf(project)?.docGuide) bridge.markWorkspaceApproved(project.app);
|
|
6806
6841
|
if (!$wsExports.hidden) safeRenderExports('after approving this version');
|
|
6807
6842
|
if (!$wsHistory.hidden) await renderHistory();
|
|
6808
6843
|
if (!approvalDialogState) return;
|
|
@@ -12732,17 +12767,18 @@
|
|
|
12732
12767
|
const out = [];
|
|
12733
12768
|
// #2449: each approved source carries its own frozen connection-assumptions label from the server, bound to it.
|
|
12734
12769
|
const frozen = (row) => (row && row.connectionAssumptions && typeof row.connectionAssumptions.note === 'string' ? row.connectionAssumptions : null);
|
|
12735
|
-
|
|
12770
|
+
// #2521 row 5: `quick` first, so each option keeps the exact shape the #2449 checks read.
|
|
12771
|
+
if (data.default) out.push({ quick: data.default.quick, selector: { kind: 'latest-approved' }, label: `Latest approved · v${data.default.version}`, group: 'Recommended', version: data.default.version, assumptions: frozen(data.default) });
|
|
12736
12772
|
if (data.working) out.push({
|
|
12737
12773
|
selector: {
|
|
12738
12774
|
kind: 'working', expectedEtag: data.working.etag,
|
|
12739
12775
|
...(data.working.epoch !== null && Number.isInteger(Number(data.working.epoch)) ? { expectedEpoch: Number(data.working.epoch) } : {}),
|
|
12740
12776
|
},
|
|
12741
|
-
label: 'Working copy · DRAFT', group: 'Drafts',
|
|
12777
|
+
label: 'Working copy · DRAFT', group: 'Drafts', quick: data.working.quick,
|
|
12742
12778
|
});
|
|
12743
|
-
for (const saved of data.checkpoints || []) out.push({ selector: { kind: 'checkpoint', checkpointId: saved.checkpointId, expectedHash: saved.hash }, label: `Checkpoint ${String(saved.checkpointId).slice(0, 8)} · DRAFT`, group: 'Drafts', sub: saved.baseVersion ? `Pending work from v${saved.baseVersion}` : 'No approved baseline' });
|
|
12779
|
+
for (const saved of data.checkpoints || []) out.push({ selector: { kind: 'checkpoint', checkpointId: saved.checkpointId, expectedHash: saved.hash }, label: `Checkpoint ${String(saved.checkpointId).slice(0, 8)} · DRAFT`, group: 'Drafts', sub: saved.baseVersion ? `Pending work from v${saved.baseVersion}` : 'No approved baseline', quick: saved.quick });
|
|
12744
12780
|
for (const row of data.defaultUnavailable?.reason === 'refused' ? [] : (data.approved || [])) {
|
|
12745
|
-
if (!data.default || Number(row.version) !== Number(data.default.version)) out.push({ selector: { kind: 'approved', version: row.version }, label: `Older approved · v${row.version}`, group: 'Approved history', version: row.version, assumptions: frozen(row) });
|
|
12781
|
+
if (!data.default || Number(row.version) !== Number(data.default.version)) out.push({ quick: row.quick, selector: { kind: 'approved', version: row.version }, label: `Older approved · v${row.version}`, group: 'Approved history', version: row.version, assumptions: frozen(row) });
|
|
12746
12782
|
}
|
|
12747
12783
|
return out;
|
|
12748
12784
|
}
|
|
@@ -12775,7 +12811,7 @@
|
|
|
12775
12811
|
const rows = options.filter((option) => option.group === group);
|
|
12776
12812
|
if (!rows.length) return '';
|
|
12777
12813
|
return `<div class="export-source-group" role="group" aria-label="${escapeAttr(group)}"><div class="export-source-group-label">${escapeHtml(group)}</div>`
|
|
12778
|
-
+ rows.map((option) => { const key = JSON.stringify(option.selector); return `<button type="button" class="export-source-option${key === selectedKey ? ' selected' : ''}" role="option" aria-selected="${String(key === selectedKey)}" data-export-source="${escapeAttr(key)}"><span>${escapeHtml(option.label)}</span>${option.sub ? `<small>${escapeHtml(option.sub)}</small>` : ''}</button>`; }).join('') + '</div>';
|
|
12814
|
+
+ rows.map((option) => { const key = JSON.stringify(option.selector); const quickTip = quickPillHtml(option.quick) ? ` data-tip="${escapeAttr(`${option.label}: ${option.quick.label}. ${option.quick.tip || ''}`.trim())}"` : ''; return `<button type="button" class="export-source-option${key === selectedKey ? ' selected' : ''}" role="option" aria-selected="${String(key === selectedKey)}" data-export-source="${escapeAttr(key)}"${quickTip}><span>${escapeHtml(option.label)}${quickPillHtml(option.quick, { scope: option.label, focusable: false })}</span>${option.sub ? `<small>${escapeHtml(option.sub)}</small>` : ''}</button>`; }).join('') + '</div>';
|
|
12779
12815
|
}).join('');
|
|
12780
12816
|
let warning = '';
|
|
12781
12817
|
if (data.defaultUnavailable?.reason === 'refused') {
|
|
@@ -12804,6 +12840,22 @@
|
|
|
12804
12840
|
return selectedSourceAssumptionsHtml(source) + exportedFilesAssumptionsHtml(source);
|
|
12805
12841
|
}
|
|
12806
12842
|
|
|
12843
|
+
/**
|
|
12844
|
+
* #2521 row 5: what the SELECTED source rests on, and, separately, what the version the listed files came from rests
|
|
12845
|
+
* on (from the same answer as the files), so neither line speaks for the other's document.
|
|
12846
|
+
*/
|
|
12847
|
+
function exportsQuickHtml() {
|
|
12848
|
+
const source = currentExportSourceOption();
|
|
12849
|
+
if (!source) return '';
|
|
12850
|
+
const line = (q, scope) => (quickPillHtml(q) ? `<div class="export-quick-note" role="note"><b>${escapeHtml(scope)}:</b> ${escapeHtml(q.label)}. ${escapeHtml(q.tip || '')}</div>` : '');
|
|
12851
|
+
const selected = line(source.quick, source.label);
|
|
12852
|
+
const from = exportStateFrom;
|
|
12853
|
+
const files = from && from.quick && exportState && Object.values(exportState).some((e) => e && e.exportedAt)
|
|
12854
|
+
&& !(source.selector.kind === 'latest-approved' && Number(source.version) === Number(from.version))
|
|
12855
|
+
? line(from.quick, `Files below, exported from v${from.version}`) : '';
|
|
12856
|
+
return selected + files;
|
|
12857
|
+
}
|
|
12858
|
+
|
|
12807
12859
|
/**
|
|
12808
12860
|
* The files already listed on the cards were exported from the LATEST approved version (the listing only returns
|
|
12809
12861
|
* receipts for it). While another source is selected the note above describes that source, so the written files
|
|
@@ -12899,6 +12951,7 @@
|
|
|
12899
12951
|
// caption. The note's job — per the comment above — is to justify the exports-FOLDER button
|
|
12900
12952
|
// staying enabled, not to claim the export actions work unapproved. "Polishing is optional" was
|
|
12901
12953
|
// the true and useful half, and it survives; only the opening clause overreached.
|
|
12954
|
+
html += exportsQuickHtml(); // #2521 row 5: what the selected source and the listed files rest on
|
|
12902
12955
|
html += exportsAssumptionsHtml();
|
|
12903
12956
|
html += `<div class="exports-note"><b>Any saved source can be exported</b> — approved is the safe default, while DRAFT and older versions stay explicit. Polishing further ` +
|
|
12904
12957
|
`is optional. Each writes to this project’s <button type="button" class="exports-note-link" data-open-exports-folder ` +
|
|
@@ -13265,7 +13318,6 @@
|
|
|
13265
13318
|
if (answered) current.approvedAt = approvedAt;
|
|
13266
13319
|
exportState = state;
|
|
13267
13320
|
exportStateFrom = answered ? filesFrom : null;
|
|
13268
|
-
syncWorkspaceGuide(); // fresh approve/export state → tick the Export (and re-sync Approve) guide rows
|
|
13269
13321
|
paintExports(approvedAt, restoreKind);
|
|
13270
13322
|
}
|
|
13271
13323
|
|
|
@@ -13273,7 +13325,11 @@
|
|
|
13273
13325
|
})();
|
|
13274
13326
|
|
|
13275
13327
|
async function captureSelectedExportSources(projectId, copies = 1, selectedSelector = null) {
|
|
13276
|
-
|
|
13328
|
+
// A pinned selector (Send to a CAD app) is checked against the label the list shows for that same source.
|
|
13329
|
+
const listedOption = selectedSelector
|
|
13330
|
+
? exportSourceOptions(exportSourcesState.data).find((o) => JSON.stringify(o.selector) === JSON.stringify(selectedSelector))
|
|
13331
|
+
: null;
|
|
13332
|
+
const option = selectedSelector ? { selector: selectedSelector, quick: listedOption ? (listedOption.quick || null) : undefined } : currentExportSourceOption();
|
|
13277
13333
|
if (!option) throw new Error('Choose an export source first.');
|
|
13278
13334
|
let selector = option.selector;
|
|
13279
13335
|
if (option.selector.kind === 'working') {
|
|
@@ -13288,6 +13344,15 @@
|
|
|
13288
13344
|
method: 'POST', body: JSON.stringify({ selector, copies }),
|
|
13289
13345
|
});
|
|
13290
13346
|
if (!captured || !captured.source || !captured.source.handleId) throw new Error('The export source could not be frozen.');
|
|
13347
|
+
// #2521 row 5: the frozen source says what IT rests on. When that differs from the label the list showed (an
|
|
13348
|
+
// approval or a save landed in between), say what is really being exported and repaint the list from the server.
|
|
13349
|
+
const listed = option.quick && option.quick.state !== 'precise' ? option.quick : null;
|
|
13350
|
+
const frozen = captured.source.quick && captured.source.quick.state !== 'precise' ? captured.source.quick : null;
|
|
13351
|
+
// A pinned selector with no listed label to compare (an older caller) is not second-guessed.
|
|
13352
|
+
if ((!selectedSelector || option.quick !== undefined) && (listed && listed.label) !== (frozen && frozen.label)) {
|
|
13353
|
+
showToast(`This source changed since the list was shown. What is being exported: ${frozen ? `${frozen.label}.` : 'a model that rests on no AI decisions.'}`, 'info');
|
|
13354
|
+
if (current && current.id === projectId) safeRenderExports('after the export source changed');
|
|
13355
|
+
}
|
|
13291
13356
|
return Array.isArray(captured.sources) && captured.sources.length === copies ? captured.sources : [captured.source];
|
|
13292
13357
|
}
|
|
13293
13358
|
|
|
@@ -16503,7 +16568,7 @@
|
|
|
16503
16568
|
`<td><span class="ver${v.current ? ' cur' : ''}">v${escapeHtml(String(v.n))}</span></td>` +
|
|
16504
16569
|
`<td class="htime">${escapeHtml(histWhen(v.ts))}</td>` +
|
|
16505
16570
|
`<td><span class="hby">${avatarFor(v.author)}${escapeHtml(v.author)}</span></td>` +
|
|
16506
|
-
`<td>${gateBadge(v.gate, v.kind, v.n, typeof v.acceptedImportFindingsNote === 'string' ? v.acceptedImportFindingsNote : '')}</td>` +
|
|
16571
|
+
`<td>${gateBadge(v.gate, v.kind, v.n, typeof v.acceptedImportFindingsNote === 'string' ? v.acceptedImportFindingsNote : '')}${quickPillHtml(v.quick, { scope: `v${v.n}` })}</td>` +
|
|
16507
16572
|
`<td class="change">${revisionNoteHtml(v)}${changeCellHtml(v, meta)}${diffStatus}</td>` +
|
|
16508
16573
|
`<td>${action}</td></tr>`;
|
|
16509
16574
|
// The disclosure row is always emitted (hidden) so toggling is a pure show/hide + lazy fetch.
|
|
@@ -16536,7 +16601,7 @@
|
|
|
16536
16601
|
const resume = allowed.includes('resume')
|
|
16537
16602
|
? `<button type="button" class="btn-mini" data-resume-checkpoint="${escapeAttr(String(saved.id))}" data-tip="Switch the working copy to this exact saved checkpoint">Resume exact checkpoint</button>`
|
|
16538
16603
|
: '';
|
|
16539
|
-
return `<article class="saved-work-card"><div><b>${escapeHtml(base)}</b
|
|
16604
|
+
return `<article class="saved-work-card"><div><b>${escapeHtml(base)}</b>${quickPillHtml(saved.quick, { scope: 'This checkpoint' })}<span>${escapeHtml(histWhen(saved.capturedAt))} · ${escapeHtml(String(saved.id || '').slice(0, 8))}</span></div>`
|
|
16540
16605
|
+ `<p>This checkpoint stays attached to its original approved base; it is never applied backward into another revision.</p>${resume}</article>`;
|
|
16541
16606
|
}).join('')}</div>`;
|
|
16542
16607
|
}
|
|
@@ -16989,10 +17054,18 @@
|
|
|
16989
17054
|
wrap.appendChild(btn);
|
|
16990
17055
|
return wrap;
|
|
16991
17056
|
}
|
|
16992
|
-
function renderDiffPanel(panel, diff) {
|
|
17057
|
+
function renderDiffPanel(panel, diff, quick) {
|
|
16993
17058
|
panel.textContent = '';
|
|
16994
17059
|
panel.appendChild(diffBasePicker(diff));
|
|
16995
17060
|
for (const c of diffCautions(diff.warnings)) panel.appendChild(c); // above the numbers — context for reading them
|
|
17061
|
+
// #2521 row 5: each side says what IT rests on, above the tonnage, so a Quick side never reads as precise.
|
|
17062
|
+
const sides = quick ? [[quick.from, `v${diff.from}`], [quick.to, `v${diff.to}`]].filter(([q]) => quickPillHtml(q)) : [];
|
|
17063
|
+
if (sides.length) {
|
|
17064
|
+
const note = el('div', 'hd-quick');
|
|
17065
|
+
note.setAttribute('role', 'note');
|
|
17066
|
+
note.innerHTML = sides.map(([q, scope]) => quickPillHtml(q, { scope, showScope: true })).join(' ');
|
|
17067
|
+
panel.appendChild(note);
|
|
17068
|
+
}
|
|
16996
17069
|
panel.appendChild(diffNetHeader(diff.tonnage));
|
|
16997
17070
|
let any = false;
|
|
16998
17071
|
for (const g of DIFF_GROUPS) {
|
|
@@ -17107,7 +17180,8 @@
|
|
|
17107
17180
|
// and server ship together, so that window is a half-finished upgrade, not a supported state.
|
|
17108
17181
|
if (!hasStatus && legacyUnreadableDiff(response.diff)) return { kind: 'unavailable' };
|
|
17109
17182
|
if (!wellFormedDiff(response.diff)) throw new Error('invalid comparison response');
|
|
17110
|
-
return
|
|
17183
|
+
return response.quick && typeof response.quick === 'object'
|
|
17184
|
+
? { kind: 'available', diff: response.diff, quick: response.quick } : { kind: 'available', diff: response.diff };
|
|
17111
17185
|
}
|
|
17112
17186
|
function restoreDiffFocus(panel, n) {
|
|
17113
17187
|
const target = panel.querySelector('.hd-base')
|
|
@@ -17170,7 +17244,7 @@
|
|
|
17170
17244
|
panel.setAttribute('aria-busy', 'false');
|
|
17171
17245
|
if (progress) progress.textContent = '';
|
|
17172
17246
|
if (decoded.kind === 'unavailable') renderDiffUnavailable(panel);
|
|
17173
|
-
else renderDiffPanel(panel, decoded.diff);
|
|
17247
|
+
else renderDiffPanel(panel, decoded.diff, decoded.quick);
|
|
17174
17248
|
if (opts && opts.restoreBaseFocus) restoreDiffFocus(panel, n);
|
|
17175
17249
|
}
|
|
17176
17250
|
function toggleDiff(btn) {
|
|
@@ -17591,11 +17665,11 @@
|
|
|
17591
17665
|
showToast(`Renamed to "${project.name}"`, 'ok');
|
|
17592
17666
|
} else if (action === 'duplicate') {
|
|
17593
17667
|
dismissProgress = showToast(`Duplicating “${proj ? proj.name : 'project'}”…`, 'progress');
|
|
17594
|
-
const { project, rfiTransfer } = await api(`/api/projects/${encodeURIComponent(id)}/duplicate`, { method: 'POST', body: '{}' });
|
|
17668
|
+
const { project, rfiTransfer, workflowTransfer, correspondenceTransfer } = await api(`/api/projects/${encodeURIComponent(id)}/duplicate`, { method: 'POST', body: '{}' });
|
|
17595
17669
|
projects.unshift(project); // newest → front, matching the server's newest-first list order
|
|
17596
17670
|
renderLanding();
|
|
17597
17671
|
flashCard(project.id, { scroll: true });
|
|
17598
|
-
const resultToast = formatRfiTransferToast(rfiTransfer, 'duplicate', project.name, true);
|
|
17672
|
+
const resultToast = withWorkflowTransfer(formatRfiTransferToast(rfiTransfer, 'duplicate', project.name, true), workflowTransfer, 'duplicate', correspondenceTransfer);
|
|
17599
17673
|
finishProgress();
|
|
17600
17674
|
showToast(resultToast.message, resultToast.tone);
|
|
17601
17675
|
} else if (action === 'clear-unverified') {
|
|
@@ -17775,14 +17849,14 @@
|
|
|
17775
17849
|
};
|
|
17776
17850
|
try {
|
|
17777
17851
|
const buf = await file.arrayBuffer();
|
|
17778
|
-
const { project, appInstalled, rfiTransfer, leftOut } = await api('/api/projects/import', {
|
|
17852
|
+
const { project, appInstalled, rfiTransfer, leftOut, workflowTransfer, correspondenceTransfer } = await api('/api/projects/import', {
|
|
17779
17853
|
method: 'POST', headers: { 'content-type': 'application/zip' }, body: buf,
|
|
17780
17854
|
});
|
|
17781
17855
|
projects.unshift(project); // newest → front, matching duplicate/create
|
|
17782
17856
|
renderLanding();
|
|
17783
17857
|
flashCard(project.id, { scroll: true });
|
|
17784
17858
|
track('workspace_project_imported', { app: project.app });
|
|
17785
|
-
const resultToast = formatRfiTransferToast(rfiTransfer, 'import', project.name, appInstalled);
|
|
17859
|
+
const resultToast = withWorkflowTransfer(formatRfiTransferToast(rfiTransfer, 'import', project.name, appInstalled), workflowTransfer, 'import', correspondenceTransfer);
|
|
17786
17860
|
const leftOutNote = importLeftOutNote(leftOut, project.name);
|
|
17787
17861
|
finishProgress();
|
|
17788
17862
|
showToast(leftOutNote.skipped ? `${resultToast.message} ${leftOutNote.skipped}` : resultToast.message, resultToast.tone);
|
|
@@ -17800,6 +17874,18 @@
|
|
|
17800
17874
|
// - zipped mid-save → a persistent warning: the copy may miss that save or hold part of it;
|
|
17801
17875
|
// - saved checkpoints / undo steps → a persistent warning: those stay on the source computer;
|
|
17802
17876
|
// - anything else is set up fresh here → one quiet sentence on the success toast.
|
|
17877
|
+
/**
|
|
17878
|
+
* #2603: a Duplicate or Import toast also says what happened to the project's workflows (project-workflows.js writes
|
|
17879
|
+
* the sentence). Reached through globalThis, so a harness that lifts the callers without that module still runs.
|
|
17880
|
+
*/
|
|
17881
|
+
function withWorkflowTransfer(toast, workflowTransfer, operation = 'duplicate', correspondenceTransfer = undefined) {
|
|
17882
|
+
// #2470 R6.6: and what happened to a General project's RFIs (project-rfis.js writes that sentence).
|
|
17883
|
+
const notes = [globalThis.flolessProjectWorkflows?.transferNote?.(workflowTransfer, operation) ?? null,
|
|
17884
|
+
globalThis.flolessProjectRfis?.transferNote?.(correspondenceTransfer, operation) ?? null].filter(Boolean);
|
|
17885
|
+
if (!notes.length) return toast;
|
|
17886
|
+
return { message: `${toast.message} ${notes.map((n) => n.text).join(' ')}`, tone: notes.some((n) => n.warn) && toast.tone === 'ok' ? 'warn' : toast.tone };
|
|
17887
|
+
}
|
|
17888
|
+
|
|
17803
17889
|
function importLeftOutNote(leftOut, projectName) {
|
|
17804
17890
|
const files = leftOut && Array.isArray(leftOut.files) ? leftOut.files.length : 0;
|
|
17805
17891
|
if (!files) return { skipped: '', warning: '' };
|
|
@@ -18328,9 +18414,11 @@
|
|
|
18328
18414
|
async function folderDecisionCompleted(result, operation) {
|
|
18329
18415
|
const project = result.project;
|
|
18330
18416
|
if (operation === 'import') {
|
|
18331
|
-
const toast = formatRfiTransferToast(result.rfiTransfer, 'import', project.name, result.appInstalled);
|
|
18417
|
+
const toast = withWorkflowTransfer(formatRfiTransferToast(result.rfiTransfer, 'import', project.name, result.appInstalled), result.workflowTransfer, 'import', result.correspondenceTransfer);
|
|
18418
|
+
// importLeftOutNote answers { skipped, warning } (it used to be appended whole, as "[object Object]").
|
|
18332
18419
|
const leftOut = importLeftOutNote(result.leftOut, project.name);
|
|
18333
|
-
showToast(
|
|
18420
|
+
showToast(leftOut.skipped ? `${toast.message} ${leftOut.skipped}` : toast.message, toast.tone);
|
|
18421
|
+
if (leftOut.warning) showToast(leftOut.warning, 'warn', { persistent: true });
|
|
18334
18422
|
} else showToast(`Project folder updated for “${project.name}”.`, 'ok');
|
|
18335
18423
|
await loadProjects({ quiet: true });
|
|
18336
18424
|
flashCard(project.id, { scroll: true });
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@floless/app",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.160.0",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"description": "Thin localhost host for floless.app — serves web/ and shells the aware CLI. No engine, no LLM.",
|
|
6
6
|
"bin": {
|
|
@@ -40,6 +40,7 @@
|
|
|
40
40
|
"verify:skill-parity": "node build/verify-skill-parity.mjs",
|
|
41
41
|
"verify:flo": "node build/verify-flo-descriptions.mjs",
|
|
42
42
|
"verify:aisc": "node build/verify-aisc-table.mjs",
|
|
43
|
+
"verify:uk-catalog": "node build/verify-uk-catalog-weights.mjs",
|
|
43
44
|
"verify:flo-naming": "node build/verify-flo-naming.mjs",
|
|
44
45
|
"verify:forward-merge": "node build/verify-forward-merge.mjs",
|
|
45
46
|
"verify:no-title": "node build/verify-no-title.mjs",
|