@floless/app 0.163.0 → 0.165.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 +37524 -36228
- package/dist/skills/floless-app-rfi/SKILL.md +25 -5
- package/dist/web/app.css +11 -5
- package/dist/web/aware.js +25 -8
- package/dist/web/chat.css +11 -1
- package/dist/web/chat.js +426 -41
- package/dist/web/commands-filter.js +35 -0
- package/dist/web/commands-shell.js +28 -11
- package/dist/web/commands-steel.js +9 -0
- package/dist/web/model-editor-steel-adapter.js +2 -0
- package/dist/web/project-rfis.js +68 -10
- package/dist/web/steel-3d-view.js +154 -0
- package/dist/web/steel-ai-marks.js +233 -0
- package/dist/web/steel-editor.html +509 -24
- package/dist/web/steel-filter-flo.js +225 -0
- package/dist/web/steel-filter.html +118 -4
- package/dist/web/workspaces.js +151 -21
- package/package.json +1 -1
package/dist/web/workspaces.js
CHANGED
|
@@ -843,6 +843,7 @@
|
|
|
843
843
|
{ key: 'knowledge', label: 'Knowledge' }, // KB is project-level — every workspace app gets it
|
|
844
844
|
{ key: 'drawings', label: 'Source' }, // reuse the 'drawings' frame slot; label "Source"
|
|
845
845
|
{ key: 'model', label: 'Traced' }, // reuse the 'model' frame slot; label "Traced"
|
|
846
|
+
{ key: 'rfis', label: 'RFIs' }, // #2470 R6.6d: owner ruling 2026-10-29, right after the model step
|
|
846
847
|
{ key: 'pages', label: 'Pages' }, // #2262: stored, versioned HTML Pages; #2568: just before Exports (both are output)
|
|
847
848
|
{ key: 'exports', label: 'Exports' },
|
|
848
849
|
{ key: 'workflows', label: 'Workflows' }, // #2470 R6.2b: the workflows this project owns; owner ruling 2026-10-29, right after Exports
|
|
@@ -876,6 +877,7 @@
|
|
|
876
877
|
{ key: 'knowledge', label: 'Knowledge' },
|
|
877
878
|
{ key: 'drawings', label: 'Source' },
|
|
878
879
|
{ key: 'model', label: 'Model' },
|
|
880
|
+
{ key: 'rfis', label: 'RFIs' }, // #2470 R6.6d: owner ruling 2026-10-29, right after the model step
|
|
879
881
|
{ key: 'pages', label: 'Pages' }, // #2262: stored, versioned HTML Pages (every app)
|
|
880
882
|
// #2470 R6.2b: the workflows this project owns. Owner ruling 2026-10-29, "After Pages, before History": History closes the row.
|
|
881
883
|
{ key: 'workflows', label: 'Workflows' },
|
|
@@ -906,6 +908,7 @@
|
|
|
906
908
|
{ key: 'knowledge', label: 'Knowledge' },
|
|
907
909
|
{ key: 'drawings', label: 'Source' },
|
|
908
910
|
{ key: 'model', label: 'Model' },
|
|
911
|
+
{ key: 'rfis', label: 'RFIs' }, // #2470 R6.6d: owner ruling 2026-10-29, right after the model step
|
|
909
912
|
{ key: 'pages', label: 'Pages' }, // #2262: stored, versioned HTML Pages (every app)
|
|
910
913
|
// #2470 R6.2b: the workflows this project owns. Owner ruling 2026-10-29, "After Pages, before History": History closes the row.
|
|
911
914
|
{ key: 'workflows', label: 'Workflows' },
|
|
@@ -972,6 +975,7 @@
|
|
|
972
975
|
steps: [
|
|
973
976
|
{ key: 'knowledge', label: 'Knowledge' }, // the client's standards are knowledge, as for every app
|
|
974
977
|
{ key: 'model', label: 'Checker' },
|
|
978
|
+
{ key: 'rfis', label: 'RFIs' }, // #2470 R6.6d: owner ruling 2026-10-29, right after the model step
|
|
975
979
|
{ key: 'pages', label: 'Pages' }, // #2262: stored, versioned HTML Pages (every app)
|
|
976
980
|
// #2470 R6.2b: the workflows this project owns. Owner ruling 2026-10-29, "After Pages, before History": History closes the row.
|
|
977
981
|
{ key: 'workflows', label: 'Workflows' },
|
|
@@ -3512,6 +3516,15 @@
|
|
|
3512
3516
|
// read-only source chrome, the secure editor session and the /api/{revit,tekla}-projects endpoints.
|
|
3513
3517
|
// `serverAuthorizedOnly` is NOT this: Drawing Checker is server-authorized and has no model source.
|
|
3514
3518
|
const isModelSourceProject = (project = current) => isTeklaParserProject(project) || isRevitProject(project);
|
|
3519
|
+
/**
|
|
3520
|
+
* Whether a project opened on `step` waits for its model before the step is shown. #2470 R6.6d: RFIs waits only where
|
|
3521
|
+
* the editor hosts them (Steel); on every other kind the RFIs step is the shell's own and opens before there is a
|
|
3522
|
+
* source or model (owner ruling 2026-10-29, "Always open").
|
|
3523
|
+
*/
|
|
3524
|
+
function waitsForModelOnOpen(d, project, step) {
|
|
3525
|
+
return !!(d.filter || isModelSourceProject(project)) && ['model', 'rfis', 'exports', 'history'].includes(step)
|
|
3526
|
+
&& (step !== 'rfis' || !!d.rfisInEditor);
|
|
3527
|
+
}
|
|
3515
3528
|
$revitReplace?.addEventListener('click', async () => {
|
|
3516
3529
|
const project = current;
|
|
3517
3530
|
if (!project) return;
|
|
@@ -5437,7 +5450,7 @@
|
|
|
5437
5450
|
// A sourceless project (General, #2470) has no Model, Drawings, Exports or History step; a step carried
|
|
5438
5451
|
// over from another project lands on its first step instead of a pane it does not have.
|
|
5439
5452
|
if (d.sourceless && !d.steps.some((step) => step.key === initialStep)) initialStep = d.steps[0].key;
|
|
5440
|
-
if ((d
|
|
5453
|
+
if (waitsForModelOnOpen(d, p, initialStep)) {
|
|
5441
5454
|
pendingPresenceStep = { projectId: p.id, step: initialStep };
|
|
5442
5455
|
}
|
|
5443
5456
|
// The LIVE app id, deliberately: the frames address the server with it (contract reads, saves),
|
|
@@ -5867,6 +5880,90 @@
|
|
|
5867
5880
|
};
|
|
5868
5881
|
}
|
|
5869
5882
|
|
|
5883
|
+
// #2926: no picture asked for in this long, and a conversation that is not running, means a chat-run read is not
|
|
5884
|
+
// reading. A terminal-run read has only its pictures to prove that once its progress record is stale.
|
|
5885
|
+
const FLO_FRESH_WORK_MS = 2 * 60_000;
|
|
5886
|
+
const FLO_HASH = /^[0-9a-f]{64}$/;
|
|
5887
|
+
function floLookOk(l) {
|
|
5888
|
+
return !!l && typeof l === 'object' && typeof l.pageId === 'string' && FLO_HASH.test(l.sourceHash)
|
|
5889
|
+
&& Number.isSafeInteger(l.pageNumber) && l.pageNumber >= 1 && Number.isSafeInteger(l.part) && l.part >= 0 && l.part <= 9
|
|
5890
|
+
&& Number.isSafeInteger(l.seq) && Number.isFinite(l.ageMs) && l.ageMs >= 0
|
|
5891
|
+
&& (l.rect === null || (Array.isArray(l.rect) && l.rect.length === 4 && l.rect.every((v) => Number.isFinite(v) && v >= 0 && v <= 1)
|
|
5892
|
+
&& l.rect[2] > l.rect[0] && l.rect[3] > l.rect[1]));
|
|
5893
|
+
}
|
|
5894
|
+
|
|
5895
|
+
/**
|
|
5896
|
+
* #2926: what the Drawing Filter's Flo shows for the read the progress strip speaks for, from that read's own
|
|
5897
|
+
* signals only. `reading` while it is evidently working (with the sheet pictures it last asked for), `waiting`
|
|
5898
|
+
* only while the AI has really asked the person something, and `off` otherwise, with the reason.
|
|
5899
|
+
*
|
|
5900
|
+
* `view` is drawingProgressView()'s projection of the same request (null when the strip shows no live progress).
|
|
5901
|
+
* ctx: { contactLost, chatAsking (AI Chat shows a question or approval on this read's conversation), pendingSave }.
|
|
5902
|
+
*/
|
|
5903
|
+
function filterFloState(req, view, ctx) {
|
|
5904
|
+
ctx = ctx || {};
|
|
5905
|
+
const off = (why) => ({ mode: 'off', why });
|
|
5906
|
+
if (!req || !view) return off('no-read');
|
|
5907
|
+
// Before Save, and while it holds unsaved edits, the stage is the person's own work: Flo stays off it.
|
|
5908
|
+
if (req.filterCheckpointCurrent !== true || ctx.pendingSave) return off('not-saved');
|
|
5909
|
+
if (ctx.contactLost) return off('contact-lost');
|
|
5910
|
+
const progress = req.steelProgress;
|
|
5911
|
+
const raw = progress && progress.status;
|
|
5912
|
+
if (raw === 'cancelled') return off('cancelled');
|
|
5913
|
+
const chat = req.chatConversation || null;
|
|
5914
|
+
const inChat = chat?.executionOwner === 'chat' && typeof chat.chatId === 'string' && !!chat.chatId;
|
|
5915
|
+
const code = req.attention?.code;
|
|
5916
|
+
// Only an asked question or approval counts: `needs-you` alone also means a read nobody linked to a chat,
|
|
5917
|
+
// a stopped run or an answer to read, and the progress view's own `waiting` also covers a stale record.
|
|
5918
|
+
const approval = code === 'approval' || chat?.chatState === 'awaiting-approval';
|
|
5919
|
+
const asked = code === 'ai-question' || approval || ctx.chatAsking === true;
|
|
5920
|
+
const chatWorking = inChat && (chat.chatState === 'starting' || chat.chatState === 'running');
|
|
5921
|
+
// The AI writes `waiting`, then asks or stops. A conversation still running past it has moved on (the person
|
|
5922
|
+
// pressed Save and FloLess continued the read) and the record is stale until the AI next writes it: not a question.
|
|
5923
|
+
const recordWaits = raw === 'waiting' && !chatWorking;
|
|
5924
|
+
if (recordWaits || asked) {
|
|
5925
|
+
const note = recordWaits ? progressText(progress.items.find((item) => item.state === 'waiting')?.note) : null;
|
|
5926
|
+
const question = code === 'ai-question' ? progressText(req.run?.question) : null;
|
|
5927
|
+
// AI Chat's own flag cannot tell a question from an approval, so alone it says neither.
|
|
5928
|
+
const text = note || question || (approval ? 'The AI is waiting for your approval.'
|
|
5929
|
+
: code === 'ai-question' ? 'The AI has asked you a question.' : 'The AI is waiting for you in AI Chat.');
|
|
5930
|
+
return { mode: 'waiting', text, chat: inChat };
|
|
5931
|
+
}
|
|
5932
|
+
if (raw !== 'active') return off('not-active');
|
|
5933
|
+
const looks = (Array.isArray(req.steelLooks) ? req.steelLooks : []).filter(floLookOk);
|
|
5934
|
+
const freshPictures = looks.some((l) => l.ageMs < FLO_FRESH_WORK_MS);
|
|
5935
|
+
// A record the AI has not rewritten for 8 minutes is stale, but pictures it asked for in the last two, or its
|
|
5936
|
+
// conversation still running, prove it is still at work (seen on a real read, #2926: tiles seconds old, sentence
|
|
5937
|
+
// 9 minutes old). Flo keeps going then, and says the sentence is the last one reported, the strip's own words.
|
|
5938
|
+
if (view.state !== 'active') {
|
|
5939
|
+
return freshPictures || chatWorking ? { mode: 'reading', now: view.now, looks, label: 'Last reported:' } : off('not-active');
|
|
5940
|
+
}
|
|
5941
|
+
// Pictures for this very read are proof of work even when the chat calls its turn busy elsewhere, which it
|
|
5942
|
+
// does whenever the person typed into the read's conversation and the read carried on.
|
|
5943
|
+
const working = freshPictures || !inChat || chatWorking;
|
|
5944
|
+
if (!working) return off('idle');
|
|
5945
|
+
return { mode: 'reading', now: view.now, looks };
|
|
5946
|
+
}
|
|
5947
|
+
|
|
5948
|
+
// Keeps the last read and view applyStageGating() painted (`syncFilterFlo.last`), so a chat question opening
|
|
5949
|
+
// between polls re-syncs at once.
|
|
5950
|
+
function syncFilterFlo(req, view) {
|
|
5951
|
+
syncFilterFlo.last = { req, view };
|
|
5952
|
+
const frame = frames.drawings;
|
|
5953
|
+
if (!frame || !frame.dataset.loaded) return;
|
|
5954
|
+
const chatId = req?.chatConversation?.chatId;
|
|
5955
|
+
const chatAsking = !!chatId && document.getElementById('ai-chat-shell')?.dataset.approvalPending === 'true'
|
|
5956
|
+
&& window.flolessChat?.currentChatId?.() === chatId;
|
|
5957
|
+
// `read` lets the page drop a picture another read asked for.
|
|
5958
|
+
const state = { ...filterFloState(req, view, { contactLost: revRequestsFailed, chatAsking, pendingSave: drawingFilterPendingSave() }), read: req?.id ?? null };
|
|
5959
|
+
try { frame.contentWindow?.flolessFilterFlo?.(state); }
|
|
5960
|
+
catch (err) {
|
|
5961
|
+
// A frame showing a browser error page is another origin; the next poll tells the reloaded page. Anything
|
|
5962
|
+
// else is a defect in Flo's own code: said once, not on every poll.
|
|
5963
|
+
if (err?.name !== 'SecurityError' && !syncFilterFlo.warned) { syncFilterFlo.warned = true; console.warn('Flo could not show the drawing read', err); }
|
|
5964
|
+
}
|
|
5965
|
+
}
|
|
5966
|
+
|
|
5870
5967
|
/** Revised drawing reads keep their own card; the strip owns every initial-read handoff it paints. */
|
|
5871
5968
|
function stageGuidanceOwnsSavedCheckpoint(req) {
|
|
5872
5969
|
return !!(req && isInitialRevisionRead(req) && (
|
|
@@ -6382,6 +6479,7 @@
|
|
|
6382
6479
|
const unavailableInitial = initialRead && lastRevState === 'unavailable';
|
|
6383
6480
|
const ownsProgress = waitingForInitial && stageGuidanceOwnsSavedCheckpoint(revCardReq);
|
|
6384
6481
|
const liveProgress = ownsProgress ? drawingProgressView(revCardReq, Date.now(), revRequestsFailed) : null;
|
|
6482
|
+
syncFilterFlo(liveProgress ? revCardReq : null, liveProgress);
|
|
6385
6483
|
if (ownsProgress && revCardReq?.steelProgress && !liveProgress) {
|
|
6386
6484
|
const revision = Number.isSafeInteger(revCardReq.steelProgress.revision)
|
|
6387
6485
|
? String(revCardReq.steelProgress.revision) : `invalid:${String(revCardReq.steelProgress.revision)}`;
|
|
@@ -16017,6 +16115,20 @@
|
|
|
16017
16115
|
// the Drawing Filter tab and the Model tab's tooltip all read that state, so repaint them now rather
|
|
16018
16116
|
// than at the next three-second poll — or never, on a step that has no poll running.
|
|
16019
16117
|
window.addEventListener('floless:filter-ai-changed', () => { if (current) applyStageGating(); });
|
|
16118
|
+
// #2926: a question or approval opening in AI Chat between polls moves the Drawing Filter's Flo to its waiting corner now.
|
|
16119
|
+
function resyncFilterFlo() {
|
|
16120
|
+
const last = syncFilterFlo.last;
|
|
16121
|
+
// Only the open project's read: between a project switch and its first poll, `last` is the project left.
|
|
16122
|
+
if (current && last?.req?.project === current.id) syncFilterFlo(last.req, last.view);
|
|
16123
|
+
}
|
|
16124
|
+
document.addEventListener('floless:chat-indicator', resyncFilterFlo);
|
|
16125
|
+
// #2926: Flo's "Answer in AI Chat" opens the read's own conversation, where the question is.
|
|
16126
|
+
window.addEventListener('floless:filter-flo-answer', () => {
|
|
16127
|
+
const chatId = syncFilterFlo.last?.req?.chatConversation?.chatId;
|
|
16128
|
+
if (!chatId) return;
|
|
16129
|
+
Promise.resolve().then(() => window.flolessChat.openConversation(chatId))
|
|
16130
|
+
.catch((err) => showFailureToast(err, { action: 'open the question in AI Chat' }));
|
|
16131
|
+
});
|
|
16020
16132
|
frames.drawings.addEventListener('load', () => {
|
|
16021
16133
|
requestAnimationFrame(() => {
|
|
16022
16134
|
reconcileDrawingRevisionRequestAfterLoad();
|
|
@@ -19680,9 +19792,13 @@
|
|
|
19680
19792
|
const validId = (id) => typeof id === 'string' && !!id && id.length <= 200;
|
|
19681
19793
|
// #2471: or one member an AI Chat answer cited, with the project identity it was cited in (checked at handover).
|
|
19682
19794
|
const member = !!target && !validId(target.jointId) && validId(target.memberId);
|
|
19683
|
-
|
|
19684
|
-
const
|
|
19685
|
-
|
|
19795
|
+
// #2874: or one RFI a chat message mentioned, shown on the project's RFIs step (in the editor, or the shell's own pane).
|
|
19796
|
+
const rfi = !!target && !validId(target.jointId) && !member && validId(target.rfiId) && /^RFI-\d{3,16}$/.test(target.rfiId);
|
|
19797
|
+
// Sentences say "the member was not shown", but "RFI-007 was not shown".
|
|
19798
|
+
const thing = member ? 'the member' : rfi ? target.rfiId : 'the connection';
|
|
19799
|
+
const again = member ? 'Show in the model' : rfi ? `${target.rfiId} in the chat` : 'Open in the model';
|
|
19800
|
+
const step = rfi ? 'rfis' : 'model';
|
|
19801
|
+
if (!target || !validId(target.projectId) || !(validId(target.jointId) || member || rfi)) throw connectionError(`That ${member ? 'member' : rfi ? 'RFI' : 'connection'} could not be opened. Open its project from Workspaces.`);
|
|
19686
19802
|
const mine = { id: `connection-${++connectionRequestSeq}`, page: null };
|
|
19687
19803
|
withdrawConnectionRequest(connectionRequest);
|
|
19688
19804
|
connectionRequest = mine;
|
|
@@ -19690,8 +19806,8 @@
|
|
|
19690
19806
|
// Once this call has ended, for any reason, a project change it started gives way before it lands.
|
|
19691
19807
|
let ended = false;
|
|
19692
19808
|
const stillWanted = () => !ended && !superseded();
|
|
19693
|
-
const stayedOutside = () => connectionError(`You stayed where you were, so
|
|
19694
|
-
const leftWorkspaces = () => connectionError(`You left Workspaces, so
|
|
19809
|
+
const stayedOutside = () => connectionError(`You stayed where you were, so ${thing} was not shown. Open the project from Workspaces, then press ${again} again.`);
|
|
19810
|
+
const leftWorkspaces = () => connectionError(`You left Workspaces, so ${thing} was not shown. Open the project from Workspaces, then press ${again} again.`);
|
|
19695
19811
|
const pause = () => new Promise((resolve) => setTimeout(resolve, 100));
|
|
19696
19812
|
/**
|
|
19697
19813
|
* Wait for a step of getting there, watched: a later click ends it at once. `bounded` adds the deadline,
|
|
@@ -19708,12 +19824,12 @@
|
|
|
19708
19824
|
await Promise.race([finished, pause()]);
|
|
19709
19825
|
if (done) { if (done.error) throw done.error; return done.value; }
|
|
19710
19826
|
if (superseded()) return { superseded: true };
|
|
19711
|
-
if (Date.now() >= bound) throw connectionError(`The project did not open in time, so
|
|
19827
|
+
if (Date.now() >= bound) throw connectionError(`The project did not open in time, so ${thing} was not shown. Open it from Workspaces, then press ${again} again.`);
|
|
19712
19828
|
}
|
|
19713
19829
|
};
|
|
19714
19830
|
// A project removed and made again under the same id is not the one the answer cited.
|
|
19715
19831
|
const citedElsewhere = () => validId(target.projectUuid) && String(current?.uuid || '').toLowerCase() !== target.projectUuid.toLowerCase();
|
|
19716
|
-
const citedGone = () => connectionError(`This project is no longer the one the answer cited, so
|
|
19832
|
+
const citedGone = () => connectionError(`This project is no longer the one ${rfi ? 'the message mentioned' : 'the answer cited'}, so ${thing} was not shown.`);
|
|
19717
19833
|
let until = Infinity;
|
|
19718
19834
|
// #2605: the document the model frame held before this call opened the project. Left for the Workspaces list,
|
|
19719
19835
|
// a project's editor page stays in the hidden frame, and openProject's reset of it lands only later: until
|
|
@@ -19723,13 +19839,16 @@
|
|
|
19723
19839
|
const interrupted = () => {
|
|
19724
19840
|
if (superseded()) return { superseded: true };
|
|
19725
19841
|
if (mode !== 'workspaces') throw leftWorkspaces();
|
|
19726
|
-
if (current?.id !== target.projectId) throw connectionError(`You moved to another project, so
|
|
19842
|
+
if (current?.id !== target.projectId) throw connectionError(`You moved to another project, so ${thing} was not shown.`);
|
|
19727
19843
|
// The project's stages kept the Model step locked, or the person went to another step: the step's
|
|
19728
19844
|
// own message says why, and there is nothing to wait for.
|
|
19729
|
-
|
|
19730
|
-
|
|
19845
|
+
// An RFI's step is RFIs, which in a steel project shows this same editor frame (and the editor may switch to it).
|
|
19846
|
+
const steps = rfi ? ['model', 'rfis'] : ['model'];
|
|
19847
|
+
if (!steps.includes(currentStep) && !(pendingPresenceStep && steps.includes(pendingPresenceStep.step))) {
|
|
19848
|
+
throw connectionError(rfi ? `The RFIs step is not open, so ${thing} was not shown. Open the RFIs step, then press ${again} again.`
|
|
19849
|
+
: `The Model step is not open, so ${thing} was not shown. Open the Model step, then press ${again} again.`);
|
|
19731
19850
|
}
|
|
19732
|
-
if (Date.now() >= until) throw connectionError(`The model did not open in time, so
|
|
19851
|
+
if (Date.now() >= until) throw connectionError(`The model did not open in time, so ${thing} was not shown. Open the Model step, then press ${again} again.`);
|
|
19733
19852
|
return null;
|
|
19734
19853
|
};
|
|
19735
19854
|
try {
|
|
@@ -19738,16 +19857,27 @@
|
|
|
19738
19857
|
if (mode !== 'workspaces') throw stayedOutside();
|
|
19739
19858
|
if (current?.id !== target.projectId) {
|
|
19740
19859
|
try { pageLeftBehind = frames.model.contentWindow?.document ?? null; } catch { pageLeftBehind = null; }
|
|
19741
|
-
const opened = await navigating(openProject(target.projectId,
|
|
19860
|
+
const opened = await navigating(openProject(target.projectId, step, { stillWanted }), true);
|
|
19742
19861
|
if (opened?.superseded || superseded()) return { superseded: true };
|
|
19743
19862
|
// openProject answers "stayed" for several causes (the person chose to stay, the project's folder is
|
|
19744
19863
|
// not available and its dialog is open, another navigation took over): say only what is certain.
|
|
19745
|
-
if (opened === STAYED_IN_PROJECT) throw connectionError(`That project did not open, so
|
|
19864
|
+
if (opened === STAYED_IN_PROJECT) throw connectionError(`That project did not open, so ${thing} was not shown. Open it from Workspaces to see why, then press ${again} again.`);
|
|
19746
19865
|
if (current?.id !== target.projectId) throw connectionError('That project could not be opened. Open it from Workspaces.');
|
|
19747
|
-
} else if (currentStep !==
|
|
19748
|
-
setStep(
|
|
19866
|
+
} else if (currentStep !== step) {
|
|
19867
|
+
setStep(step);
|
|
19868
|
+
}
|
|
19869
|
+
// #2874: a General project's RFIs are the shell's own pane (project-rfis.js), which shows the RFI itself.
|
|
19870
|
+
if (rfi && !wsApp()?.rfisInEditor) {
|
|
19871
|
+
if (citedElsewhere()) throw citedGone();
|
|
19872
|
+
if (typeof globalThis.flolessProjectRfis?.focus !== 'function') throw connectionError(`FloLess could not show ${thing} here. Open the RFIs step and find it there.`);
|
|
19873
|
+
const outcome = await navigating(Promise.resolve(globalThis.flolessProjectRfis.focus(target.projectId, target.rfiId)), true);
|
|
19874
|
+
if (outcome?.superseded || superseded()) return { superseded: true };
|
|
19875
|
+
if (mode !== 'workspaces' || current?.id !== target.projectId) throw connectionError(`You moved to another project, so ${thing} was not shown.`);
|
|
19876
|
+
// The list may finish loading after the person has moved on: what it showed is out of sight, so say that.
|
|
19877
|
+
if (currentStep !== 'rfis') throw connectionError(`You moved to another step, so ${thing} was not shown. Press ${again} again to see it.`);
|
|
19878
|
+
return outcome && typeof outcome === 'object' ? { ...outcome } : { ok: false, said: `FloLess could not show ${thing}. Open the RFIs step and find it there.` };
|
|
19749
19879
|
}
|
|
19750
|
-
if (!frames.model.dataset.want) throw connectionError(`This project has no model editor to show
|
|
19880
|
+
if (!frames.model.dataset.want) throw connectionError(`This project has no model editor to show ${thing} in.`);
|
|
19751
19881
|
// The editor's deadline starts once the person is in the project.
|
|
19752
19882
|
until = Date.now() + CONNECTION_FRAME_WAIT_MS;
|
|
19753
19883
|
let answer = null, settled = null, page = null, doc = null;
|
|
@@ -19760,8 +19890,8 @@
|
|
|
19760
19890
|
if (superseded()) return { superseded: true };
|
|
19761
19891
|
// The Model step may have been left after the selection, but not Workspaces: hidden, it shows nothing.
|
|
19762
19892
|
if (mode !== 'workspaces') throw leftWorkspaces();
|
|
19763
|
-
if (current?.id !== target.projectId) throw connectionError(`You moved to another project, so
|
|
19764
|
-
if (frames.model.contentWindow !== page || page.document !== doc) throw connectionError(`The model reloaded, so
|
|
19893
|
+
if (current?.id !== target.projectId) throw connectionError(`You moved to another project, so ${thing} was not shown.`);
|
|
19894
|
+
if (frames.model.contentWindow !== page || page.document !== doc) throw connectionError(`The model reloaded, so ${thing} was not shown. Press ${again} again.`);
|
|
19765
19895
|
const outcome = settled.outcome;
|
|
19766
19896
|
return outcome && typeof outcome === 'object' ? { ...outcome } : { ok: false, said: notTaken };
|
|
19767
19897
|
}
|
|
@@ -19775,7 +19905,7 @@
|
|
|
19775
19905
|
if (citedElsewhere()) throw citedGone();
|
|
19776
19906
|
// The frame's window survives a reload; its DOCUMENT does not. That is what tells a reload apart.
|
|
19777
19907
|
page = child; doc = child.document;
|
|
19778
|
-
answer = child.flolessEditorFocus(member ? { memberId: target.memberId, requestId: mine.id } : { jointId: target.jointId, requestId: mine.id,
|
|
19908
|
+
answer = child.flolessEditorFocus(member ? { memberId: target.memberId, requestId: mine.id } : rfi ? { rfiId: target.rfiId, requestId: mine.id } : { jointId: target.jointId, requestId: mine.id,
|
|
19779
19909
|
// #2450: the readiness card's "Raise an RFI" also opens the editor's review dialog for it.
|
|
19780
19910
|
...(target.raiseRfi === true ? { raiseRfi: true } : {}), ...(validId(target.checkId) ? { checkId: target.checkId } : {}) });
|
|
19781
19911
|
if (!answer || typeof answer.then !== 'function') return { ok: false, said: notTaken };
|
|
@@ -19786,7 +19916,7 @@
|
|
|
19786
19916
|
});
|
|
19787
19917
|
}
|
|
19788
19918
|
} else if (child !== page || child.document !== doc) {
|
|
19789
|
-
throw connectionError(`The model reloaded, so
|
|
19919
|
+
throw connectionError(`The model reloaded, so ${thing} was not shown. Press ${again} again.`);
|
|
19790
19920
|
}
|
|
19791
19921
|
await pause();
|
|
19792
19922
|
}
|