@floless/app 0.174.1 → 0.175.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 +117 -10
- package/dist/floless-server.cjs +2 -2
- package/dist/pdf-engine/floless_pdf/__init__.py +7 -3
- package/dist/pdf-engine/floless_pdf/backend_pdfium.py +292 -13
- package/dist/pdf-engine/floless_pdf/backend_pymupdf.py +25 -3
- package/dist/pdf-engine/floless_pdf/images.py +4 -3
- package/dist/pdf-engine/floless_pdf/pages.py +136 -0
- package/dist/schemas/steel.model.v2.schema.json +44 -1
- package/dist/skills/floless-app-approval/SKILL.md +28 -3
- package/dist/skills/floless-app-knowledge/SKILL.md +3 -2
- package/dist/skills/floless-app-sketches/SKILL.md +71 -0
- package/dist/skills/floless-app-sketches/references/steel-plate.md +15 -0
- package/dist/skills/floless-app-steel-model/SKILL.md +11 -1
- package/dist/skills/floless-app-steel-model/references/elements.md +90 -23
- package/dist/skills/floless-app-steel-takeoff/SKILL.md +11 -6
- package/dist/web/agents.js +1 -1
- package/dist/web/app.css +120 -15
- package/dist/web/app.js +89 -38
- package/dist/web/aware-hold.js +10 -0
- package/dist/web/aware.js +405 -51
- package/dist/web/boot-watchdog.js +249 -0
- package/dist/web/card-details.js +88 -0
- package/dist/web/chat.css +29 -0
- package/dist/web/chat.js +430 -128
- package/dist/web/commands-connection-design.js +23 -0
- package/dist/web/commands-revit.js +3 -0
- package/dist/web/commands-shell.js +226 -10
- package/dist/web/commands-steel.js +93 -4
- package/dist/web/commands-tekla-parser.js +21 -1
- package/dist/web/connection-design-editor.html +71 -0
- package/dist/web/connection-design-editor.js +794 -61
- package/dist/web/connection-design-handles.js +9 -3
- package/dist/web/element-approval.js +74 -0
- package/dist/web/element-context.js +76 -6
- package/dist/web/element-geometry.js +8 -2
- package/dist/web/element-holds.js +68 -5
- package/dist/web/element-type-actions.js +22 -3
- package/dist/web/element-types.js +12 -5
- package/dist/web/element-words.js +15 -11
- package/dist/web/grid-place.js +51 -0
- package/dist/web/guide.js +2 -0
- package/dist/web/index.html +13 -16
- package/dist/web/instructor.js +5 -2
- package/dist/web/missed-routines.js +6 -1
- package/dist/web/model-change-findings.js +100 -30
- package/dist/web/model-change-review.js +411 -27
- package/dist/web/model-clash-check.css +100 -0
- package/dist/web/model-clash-check.js +681 -0
- package/dist/web/model-clip-box.js +204 -0
- package/dist/web/model-clip-list.js +153 -3
- package/dist/web/model-clip-session.js +3 -3
- package/dist/web/model-clip-three-overlay.js +135 -25
- package/dist/web/model-editor.css +2 -0
- package/dist/web/model-elements.js +273 -18
- package/dist/web/model-fit-checks.js +354 -0
- package/dist/web/model-spatial-panel.js +9 -3
- package/dist/web/model-spatial-tools.js +12 -3
- package/dist/web/model-tekla-selection.js +74 -0
- package/dist/web/model-view-query.js +70 -14
- package/dist/web/model-viewport-revit-adapter.js +8 -7
- package/dist/web/model-viewport-toolbar.js +8 -4
- package/dist/web/pages.js +78 -1
- package/dist/web/project-history.js +31 -1
- package/dist/web/revit-editor.css +34 -1
- package/dist/web/revit-editor.js +174 -55
- package/dist/web/run-history.js +8 -0
- package/dist/web/sketch-editor.js +141 -2
- package/dist/web/sketches.js +192 -6
- package/dist/web/start-place.js +46 -0
- package/dist/web/steel-3d-core.js +70 -0
- package/dist/web/steel-3d-view.js +288 -47
- package/dist/web/steel-change-review.css +28 -0
- package/dist/web/steel-custom-connection.js +6 -0
- package/dist/web/steel-editor.html +532 -33
- package/dist/web/steel-filter.html +8 -3
- package/dist/web/steel-model-checks.css +76 -0
- package/dist/web/steel-model-v2-commands.js +17 -0
- package/dist/web/steel-view-generation.js +6 -2
- package/dist/web/teams.js +259 -19
- package/dist/web/tekla-editor.html +1 -0
- package/dist/web/terminal-requests.js +6 -0
- package/dist/web/vendor/connection-engine.js +886 -91
- package/dist/web/workspaces.js +630 -48
- package/package.json +2 -1
- package/preferences-file.mjs +27 -0
package/dist/web/index.html
CHANGED
|
@@ -9,17 +9,8 @@
|
|
|
9
9
|
<link rel="icon" type="image/svg+xml" href="/favicon.svg?v=2" />
|
|
10
10
|
<link rel="icon" type="image/x-icon" href="/favicon.ico?v=2" />
|
|
11
11
|
<link rel="apple-touch-icon" sizes="180x180" href="/apple-touch-icon.png?v=2" />
|
|
12
|
-
<script>
|
|
13
|
-
|
|
14
|
-
// workflow pane cannot flash while the workspace shell and Revit frame are still starting.
|
|
15
|
-
try {
|
|
16
|
-
const savedMode = localStorage.getItem('floless:mode');
|
|
17
|
-
if (savedMode === 'workspaces') document.documentElement.classList.add('mode-workspaces-boot');
|
|
18
|
-
// #2007: Agents has no workflow canvas or Inspector either; same reason, same early class.
|
|
19
|
-
if (savedMode === 'agents') document.documentElement.classList.add('mode-agents-boot');
|
|
20
|
-
}
|
|
21
|
-
catch { /* private or locked-down storage falls back to the normal boot path */ }
|
|
22
|
-
</script>
|
|
12
|
+
<script src="start-place.js"></script>
|
|
13
|
+
<script src="boot-watchdog.js"></script>
|
|
23
14
|
<link rel="stylesheet" href="app.css">
|
|
24
15
|
<link rel="stylesheet" href="chat.css">
|
|
25
16
|
<!-- The FloLess window (Electron shell): puts `desktop` on <html> before first paint when the shell's bridge is present. -->
|
|
@@ -51,9 +42,7 @@
|
|
|
51
42
|
canvas + Run). Segmented control, Ctrl+1/Ctrl+2 — the shortcuts follow POSITION, so
|
|
52
43
|
they swap with the tabs (#623). See docs/superpowers/specs/
|
|
53
44
|
2026-07-03-workspaces-two-mode-shell-design.md.
|
|
54
|
-
|
|
55
|
-
OPENS in is unchanged — that is the remembered `floless:mode`, defaulting to
|
|
56
|
-
Workflows. -->
|
|
45
|
+
A fresh window opens the Workspaces landing. A restarted window can resume from its URL. -->
|
|
57
46
|
<div class="mode-switch" id="mode-switch" role="tablist" aria-label="Mode">
|
|
58
47
|
<!-- Each tab carries its part's icon in its part's colour, the same drawings Flo builds on the chat's
|
|
59
48
|
start screens (web/chat-landing-scene.js): stacked sheets, joined steps, Flo in its hard hat. -->
|
|
@@ -485,7 +474,8 @@
|
|
|
485
474
|
<div class="ws-source-title" tabindex="-1">This project's source drawing</div>
|
|
486
475
|
<div class="ws-source-sub">The lines on the Traced tab were read from the drawing you imported. Use “Attach revised drawings…” above to re-trace a newer one as a new version.</div>
|
|
487
476
|
<!-- #1754: when the import of the Revit model on screen left out an element with no Revit id, or FloLess
|
|
488
|
-
could not check, it says so here (paintRevitLeftOut in workspaces.js)
|
|
477
|
+
could not check, it says so here (paintRevitLeftOut in workspaces.js); #4008: so does a Tekla model read
|
|
478
|
+
with its properties only, because nothing in it can be drawn yet. It sits inside the pane's own
|
|
489
479
|
live region, so it has no role of its own. -->
|
|
490
480
|
<div class="ws-source-note" id="ws-source-note" hidden>
|
|
491
481
|
<p class="ws-source-note-lead"></p>
|
|
@@ -1113,6 +1103,11 @@
|
|
|
1113
1103
|
<input type="checkbox" id="startup-toggle" role="switch">
|
|
1114
1104
|
<span class="rtn-toggle-track"></span>
|
|
1115
1105
|
</label>
|
|
1106
|
+
<span id="startup-status" role="status" tabindex="-1" hidden>Status unknown</span>
|
|
1107
|
+
<div class="theme-toggle startup-choices" id="startup-choices" role="group" aria-label="Start with Windows" aria-describedby="startup-status" hidden>
|
|
1108
|
+
<button type="button" class="startup-btn" id="startup-on" data-command-id="shell.startup-on" data-tip="Start FloLess when you sign in to Windows">Turn on</button>
|
|
1109
|
+
<button type="button" class="startup-btn" id="startup-off" data-command-id="shell.startup-off" data-tip="Keep FloLess from starting when you sign in to Windows">Turn off</button>
|
|
1110
|
+
</div>
|
|
1116
1111
|
</div>
|
|
1117
1112
|
<!-- The FloLess window (web/desktop-window.js): where FloLess opens next time, and whether it stays in the tray. Both are shared
|
|
1118
1113
|
preferences (web/shared-prefs.js). "Open FloLess in" shows once the window is installed (always inside it); the tray switch
|
|
@@ -2107,7 +2102,7 @@
|
|
|
2107
2102
|
<div class="modal-title">Routines</div>
|
|
2108
2103
|
<div class="modal-sub">Run a workflow automatically — on a schedule, or on a live trigger (e.g. whenever your model changes) — exactly like clicking ▶ Run workflow. Or start an agent on a schedule: nobody watches that run, so anything that would ask you is declined and listed for you on the Agents page.</div>
|
|
2109
2104
|
<!-- #2062: never read as always-on. The link shows only where the start-on-login setting exists (app.js). -->
|
|
2110
|
-
<p class="rtn-local-note" id="rtn-local-note">Routines run only while FloLess is running on this computer. A run that falls while it is closed is noted as missed, and FloLess asks you once whether to run it when it starts again. <button type="button" class="rtn-link" id="rtn-startup-link" data-start-on-login-link data-command-id="shell.routines-start-on-login" data-tip="Closes Routines and shows the Start with Windows
|
|
2105
|
+
<p class="rtn-local-note" id="rtn-local-note">Routines run only while FloLess is running on this computer. A run that falls while it is closed is noted as missed, and FloLess asks you once whether to run it when it starts again. <button type="button" class="rtn-link" id="rtn-startup-link" data-start-on-login-link data-command-id="shell.routines-start-on-login" data-tip="Closes Routines and shows the Start with Windows setting in the menu" hidden>Start FloLess when you sign in…</button></p>
|
|
2111
2106
|
<!-- Owner ruling 2026-11-06: what still waits on the missed-runs card (missed-routines.js); Review shows it again. -->
|
|
2112
2107
|
<p class="rtn-missed-note" id="rtn-missed-note" role="status" hidden><span id="rtn-missed-text"></span> <button type="button" class="rtn-link" id="rtn-missed-review" data-command-id="shell.missed-routines-review" data-tip="Closes Routines and shows the card that asks whether to run them now">Review…</button></p>
|
|
2113
2108
|
<div class="rtn-quota" id="rtn-quota"></div>
|
|
@@ -2404,6 +2399,7 @@
|
|
|
2404
2399
|
<div class="add-ons-body">
|
|
2405
2400
|
<div class="add-ons-side">
|
|
2406
2401
|
<div id="sketches-list" class="add-ons-list" aria-label="Sketches"></div>
|
|
2402
|
+
<div id="sketches-converted" class="sketches-converted" hidden></div>
|
|
2407
2403
|
</div>
|
|
2408
2404
|
<div id="sketches-detail" class="add-ons-detail" aria-live="polite"></div>
|
|
2409
2405
|
</div>
|
|
@@ -2488,6 +2484,7 @@
|
|
|
2488
2484
|
<script src="left-pane.js"></script>
|
|
2489
2485
|
<script src="chat-question-card.js"></script>
|
|
2490
2486
|
<script src="card-acknowledgements.js"></script>
|
|
2487
|
+
<script src="card-details.js"></script>
|
|
2491
2488
|
<script src="pdf-reading-note.js"></script>
|
|
2492
2489
|
<script src="pdf-reader-card.js"></script>
|
|
2493
2490
|
<script src="chat.js"></script>
|
package/dist/web/instructor.js
CHANGED
|
@@ -944,8 +944,8 @@
|
|
|
944
944
|
render time from what is actually on screen (see onScreen/sheetEntries) —
|
|
945
945
|
a static array cannot express that, because "active" is runtime state. */
|
|
946
946
|
var GROUP_ORDER = [
|
|
947
|
-
// the shell
|
|
948
|
-
'In the header', 'In the workflow picker', 'In the project picker', 'In the project list',
|
|
947
|
+
// the shell; the startup recovery card covers the whole window when a start stalls, so it comes first
|
|
948
|
+
'On the startup recovery card', 'In the header', 'In the workflow picker', 'In the project picker', 'In the project list',
|
|
949
949
|
// #2732: the warning that Export in the project list opens for a project too big for one archive.
|
|
950
950
|
'In the project export warning',
|
|
951
951
|
// #2866: Sort by sits in the header of the Workspaces, Workflows and Agents pages.
|
|
@@ -991,6 +991,7 @@
|
|
|
991
991
|
rows under one heading, which is a scroll rather than a list. */
|
|
992
992
|
'In the steel editor header', 'On the steel canvas', 'On the drawing canvas', 'In the Copy panel', 'In the Copy array panel', 'In the 2D view toolbar',
|
|
993
993
|
'In the 3D toolbar',
|
|
994
|
+
'In the Clips list', // the steel 3D view's clip list: a clip box's angle fields and Reset rotation
|
|
994
995
|
// #3643: the Sketch mode band across the 3D view, then the size chip by the shape being drawn.
|
|
995
996
|
'In the 3D model band', 'In the sketch corner chip',
|
|
996
997
|
'In the label menus', 'On the select bar', 'On the snap bar',
|
|
@@ -1007,6 +1008,8 @@
|
|
|
1007
1008
|
'In the Connections dialog', 'In the Frames dialog', 'In the reference-model dialogs', 'In the connection-import dialog',
|
|
1008
1009
|
'In the confidence report', 'In the Ask AI panel', 'In the Ask AI dialog', 'In the Favourites dialog',
|
|
1009
1010
|
'In the Review changes panel', // #3537: the drawer beside the steel model, opened from the ⋯ menu
|
|
1011
|
+
'In the Check for clashes dialog', 'In the Clashes panel', // #4029: the clash check settings dialog and its result drawer
|
|
1012
|
+
'In the Model checks panel', // #3690 E1d: the fit drawer beside the steel model, opened from the ⋯ menu (Model checks)
|
|
1010
1013
|
// the read-only Revit model editor
|
|
1011
1014
|
'In the Revit model header', 'In the Revit model toolbar', 'In the Revit Saved views panel', 'In the Revit model coordinate HUD', 'In the Revit model selection bar', 'In the Revit model snapping bar', 'In the Revit spatial controls',
|
|
1012
1015
|
'In the Tekla Parser header', 'In the Tekla Parser hierarchy', 'In the Tekla Parser model toolbar', 'In the Tekla Parser Saved views panel', 'In the Tekla Parser coordinate HUD', 'In the Tekla Parser selection bar', 'In the Tekla Parser snapping bar', 'In the Tekla Parser spatial controls', 'In the Tekla Parser Audit pane', 'In the Tekla Parser Changes pane',
|
|
@@ -190,12 +190,17 @@
|
|
|
190
190
|
state.answered.add(o.offerId);
|
|
191
191
|
try {
|
|
192
192
|
if (kind === 'run') {
|
|
193
|
-
|
|
193
|
+
// #2470 R6.8 slice 4 (review R3): through the page's ask helper, so a run's own questions (Teams channel reading,
|
|
194
|
+
// another FloLess) are asked here as on Run now, and a Run anyway is sent with the question id.
|
|
195
|
+
await ctx.postRun(`/api/routines/${encodeURIComponent(o.routineId)}/run`, { missedOfferId: o.offerId }, o.routineId);
|
|
194
196
|
} else {
|
|
195
197
|
await ctx.api(`/api/routines/${encodeURIComponent(o.routineId)}/missed-offer/skip`, { method: 'POST', body: JSON.stringify({ expectedOfferId: o.offerId }) });
|
|
196
198
|
}
|
|
197
199
|
done.push(o.name);
|
|
198
200
|
} catch (error) {
|
|
201
|
+
// The person cancelled one of the run's questions: nothing ran, and the question stays for when they are ready. Keyed
|
|
202
|
+
// on the ask helper's own flag: any other not-run answer (FloLess closing, say) is the server's, and is said (review R4 #2).
|
|
203
|
+
if (error?.body?.elsewhereStopped) { state.answered.delete(o.offerId); continue; }
|
|
199
204
|
if (error?.body?.running) alreadyRunning.push(o.name);
|
|
200
205
|
else if (error?.body?.code === 'no-missed-offer') gone.push(o.name);
|
|
201
206
|
else { state.answered.delete(o.offerId); ctx.reportErr(error, kind === 'run' ? `run “${o.name}”` : `skip “${o.name}”`); }
|
|
@@ -63,6 +63,7 @@ const CLASH_REASON = {
|
|
|
63
63
|
'stack-still-split': 'the bolt stack is still split',
|
|
64
64
|
'bolt-head-size-assumed': 'the bolt head size is assumed, because the bolt catalogue gives none',
|
|
65
65
|
'plane-cut-side-assumed': 'which side its plane cuts remove is assumed, because the Tekla version that saved it doesn’t record it',
|
|
66
|
+
'cut-sliver-uncleaned': 'it is drawn as computed, but a sliver a cut left could not be cleaned',
|
|
66
67
|
interpenetrates: 'they pass into each other, but the overlap check did not run',
|
|
67
68
|
'rule-not-applicable-in-base': 'the check did not apply to them in the earlier saved state',
|
|
68
69
|
};
|
|
@@ -148,7 +149,7 @@ const WORDS = {
|
|
|
148
149
|
stateGone: 'That saved state is no longer part of this project, so this object cannot be shown in 3D.',
|
|
149
150
|
notOpened: 'The 3D view did not finish opening that saved state, so nothing is shown yet. Try again.',
|
|
150
151
|
notDrawn: 'is not drawn in that saved state, so it is not shown.',
|
|
151
|
-
locateFailed: () => 'That saved state could not be opened in 3D. Open the Model tab and try again.',
|
|
152
|
+
locateFailed: (error) => (typeof error?.said === 'string' && error.said ? error.said : 'That saved state could not be opened in 3D. Open the Model tab and try again.'),
|
|
152
153
|
fixRecorded: (chat) => `${chat ? 'AI Chat recorded that this will be fixed in Tekla' : 'You said you’d fix this in Tekla'}`,
|
|
153
154
|
fixCheck: 'To check it, save in Tekla, import the model folder again and compare with the same earlier saved state.',
|
|
154
155
|
newerState: 'Decided while the model had a newer saved state than the one reviewed.',
|
|
@@ -185,10 +186,30 @@ const WORDS = {
|
|
|
185
186
|
},
|
|
186
187
|
};
|
|
187
188
|
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
189
|
+
/**
|
|
190
|
+
* `endpoints`, `words`, `items` and `locateView` let another panel reuse the finding cards over its own routes (#4029, the
|
|
191
|
+
* clash check of the current model): `endpoints.load(id)` is the path a load reads and `endpoints.act(id, name)` the
|
|
192
|
+
* path a decision posts to (`name` is `decisions`, `accept` or `withdraw`); `words` replaces any of the source's words;
|
|
193
|
+
* `items(reply)` reads the list of findings from a loaded reply; `locateView(view)` shows one in 3D and resolves the
|
|
194
|
+
* sentence to announce. Left out, a review's own routes, words and Show in 3D apply, exactly as before.
|
|
195
|
+
*/
|
|
196
|
+
export function createFindings({ doc, el, api, projectId, live, locate, sideState, parseEntity = null, rerender, focusCompare, clipboard = null, source = 'tekla', zones = () => [],
|
|
197
|
+
locateSays = (text) => { live.textContent = text; }, shownNow = () => {},
|
|
198
|
+
cid = (name) => `tekla-parser.change-review-${name}`, endpoints = null, words = null, items = null, locateView = null }) {
|
|
199
|
+
const W = words ? { ...(WORDS[source] || WORDS.tekla), ...words } : (WORDS[source] || WORDS.tekla);
|
|
191
200
|
const steel = source === 'steel';
|
|
201
|
+
/**
|
|
202
|
+
* What a finding calls one of its objects, in the card title's words (#4018). A steel member has no name of its own: it
|
|
203
|
+
* reads as its kind and its own id ("Beam B3"), the first in a pair capitalised and the next one not ("beam T1").
|
|
204
|
+
*/
|
|
205
|
+
const called = (p, index = 0) => {
|
|
206
|
+
if (typeof p?.name === 'string' && p.name.trim()) return p.name;
|
|
207
|
+
const parsed = steel && parseEntity ? parseEntity(p?.entityIdRevised ?? p?.entityIdBase) : null;
|
|
208
|
+
if (!parsed) return named(p);
|
|
209
|
+
const kind = p?.type || 'Object';
|
|
210
|
+
return `${index ? kind.charAt(0).toLowerCase() + kind.slice(1) : kind} ${parsed.id}`;
|
|
211
|
+
};
|
|
212
|
+
const calledAll = (list) => list.map((p, index) => called(p, index)).join(' and ');
|
|
192
213
|
const copyText = (text) => (clipboard ? clipboard(text) : doc.defaultView.navigator.clipboard.writeText(text));
|
|
193
214
|
let data = null;
|
|
194
215
|
let reviewId = null;
|
|
@@ -221,7 +242,7 @@ export function createFindings({ doc, el, api, projectId, live, locate, sideStat
|
|
|
221
242
|
const id = review?.reviewId ?? null;
|
|
222
243
|
reviewId = id; data = null; failed = null; loading = Boolean(id);
|
|
223
244
|
if (!id) return true;
|
|
224
|
-
const path = `${base()}/findings`;
|
|
245
|
+
const path = endpoints ? endpoints.load(id) : `${base()}/findings`;
|
|
225
246
|
// A reply for a load that is no longer the latest is dropped, error or not.
|
|
226
247
|
try { const reply = await api(path); if (g === gen) data = reply; }
|
|
227
248
|
catch (error) { if (g === gen) failed = error?.body?.userMessage || W.findingsFailed; }
|
|
@@ -229,7 +250,7 @@ export function createFindings({ doc, el, api, projectId, live, locate, sideStat
|
|
|
229
250
|
return g === gen;
|
|
230
251
|
}
|
|
231
252
|
|
|
232
|
-
function views() { return data?.view?.findings ?? []; }
|
|
253
|
+
function views() { return (items ? items(data) : data?.view?.findings) ?? []; }
|
|
233
254
|
|
|
234
255
|
function counts() {
|
|
235
256
|
const out = {};
|
|
@@ -247,7 +268,7 @@ export function createFindings({ doc, el, api, projectId, live, locate, sideStat
|
|
|
247
268
|
if (busy || !current(shown)) return;
|
|
248
269
|
busy = true;
|
|
249
270
|
try {
|
|
250
|
-
const url = path.startsWith('/') ? path : `${project()}/reviews/${shown.reviewId}/${path}`;
|
|
271
|
+
const url = path.startsWith('/') ? path : endpoints ? endpoints.act(shown.reviewId, path) : `${project()}/reviews/${shown.reviewId}/${path}`;
|
|
251
272
|
const reply = await api(url, { method: 'POST', headers: { 'content-type': 'application/json' }, body: JSON.stringify(body) });
|
|
252
273
|
// If the person opened a review meanwhile (even this one again), nothing about this decision is said or shown over it.
|
|
253
274
|
if (shown.gen !== gen) return;
|
|
@@ -255,11 +276,11 @@ export function createFindings({ doc, el, api, projectId, live, locate, sideStat
|
|
|
255
276
|
const left = counts().decide;
|
|
256
277
|
const text = typeof said === 'function' ? said(reply) : said;
|
|
257
278
|
live.textContent = failed
|
|
258
|
-
? `${text} The findings could not be shown again: reload the review to see where they stand
|
|
279
|
+
? `${text} ${W.reloadFailed || 'The findings could not be shown again: reload the review to see where they stand.'}`
|
|
259
280
|
: typeof said === 'function' ? text : `${text}${left ? ` ${plural(left, 'finding')} still ${left === 1 ? 'needs' : 'need'} a decision.` : ''}`;
|
|
260
281
|
if (key) { openKey = key; delete openChoice[key]; focusAfter = key; }
|
|
261
282
|
} catch (error) {
|
|
262
|
-
if (shown.gen === gen) live.textContent = error?.body?.userMessage || 'That could not be recorded. Reload the review and try again.';
|
|
283
|
+
if (shown.gen === gen) live.textContent = error?.body?.userMessage || W.recordFailed || 'That could not be recorded. Reload the review and try again.';
|
|
263
284
|
} finally { busy = false; rerender(); }
|
|
264
285
|
}
|
|
265
286
|
|
|
@@ -372,34 +393,46 @@ export function createFindings({ doc, el, api, projectId, live, locate, sideStat
|
|
|
372
393
|
|
|
373
394
|
function showButton(view) {
|
|
374
395
|
const forReview = renderingFor;
|
|
396
|
+
if (locateView) {
|
|
397
|
+
// The panel's own Show in 3D (the clash check's typed locator): it says what it showed, this announces it.
|
|
398
|
+
const both = (view.locate?.ids?.length ?? 0) > 1;
|
|
399
|
+
return button({ class: 'tekla-changes-locate', 'data-command-id': both ? cid('finding-locate-both') : cid('finding-locate'), 'aria-label': `${both ? 'Show both in 3D' : 'Show in 3D'}: ${view.words.title}` },
|
|
400
|
+
both ? 'Show both in 3D' : 'Show in 3D', async () => {
|
|
401
|
+
if (!current(forReview)) return;
|
|
402
|
+
let said = null;
|
|
403
|
+
try { said = await locateView(view); }
|
|
404
|
+
catch (error) { console.warn('[change-review] Show in 3D failed:', error); said = W.locateFailed(error); }
|
|
405
|
+
if (forReview.gen === gen && typeof said === 'string' && said) locateSays(said);
|
|
406
|
+
});
|
|
407
|
+
}
|
|
375
408
|
const all = view.finding.participants;
|
|
376
409
|
// A pair is shown together (S3); a part with nothing drawn (a bolt group) is left out and the line says so.
|
|
377
410
|
const drawn = all.filter((p) => p?.entityIdRevised && !(all.length > 1 && BOLT_TYPES.has(p.type) && view.finding.ruleId === 'clash.bolted-plies-apart'));
|
|
378
411
|
const p = drawn[0] ?? all[0];
|
|
379
412
|
const both = drawn.length > 1;
|
|
380
|
-
const
|
|
381
|
-
const label = both ? `Show ${names} in 3D` : `Show ${p?.name || p?.type || 'the object'} in 3D`;
|
|
413
|
+
const label = both ? `Show ${calledAll(drawn)} in 3D` : `Show ${steel && p ? called(p) : p?.name || p?.type || 'the object'} in 3D`;
|
|
382
414
|
return button({ class: 'tekla-changes-locate', 'data-command-id': both ? cid('finding-locate-both') : cid('finding-locate'), 'aria-label': label },
|
|
383
415
|
both ? 'Show both in 3D' : 'Show in 3D', async () => {
|
|
384
416
|
if (!current(forReview)) return;
|
|
385
417
|
const state = sideState('revised');
|
|
386
|
-
if ((!state && !steel) || !p?.entityIdRevised) {
|
|
418
|
+
if ((!state && !steel) || !p?.entityIdRevised) { locateSays(W.stateGone); return; }
|
|
387
419
|
try {
|
|
388
420
|
const selected = await locate({ state, entityId: p.entityIdRevised, entityIds: drawn.map((q) => q.entityIdRevised) });
|
|
389
421
|
// Announce only what the 3D view really selected: a part not drawn in that saved state is named as left out.
|
|
390
422
|
const shownIds = Array.isArray(selected) ? selected : [];
|
|
391
423
|
const shown = drawn.filter((q) => shownIds.includes(q.entityIdRevised));
|
|
392
424
|
const missing = all.filter((q) => !shown.includes(q));
|
|
425
|
+
if (forReview.gen === gen && shown.length) shownNow();
|
|
393
426
|
if (forReview.gen === gen && all.length > 1) {
|
|
394
|
-
|
|
395
|
-
: shown.length > 1 ? `Showing ${shown
|
|
396
|
-
: !drawn.includes(missing[0]) && BOLT_TYPES.has(missing[0]?.type) ? `Showing ${
|
|
397
|
-
: `Showing ${
|
|
427
|
+
locateSays(!shown.length ? W.notOpened
|
|
428
|
+
: shown.length > 1 ? `Showing ${calledAll(shown)} in 3D.`
|
|
429
|
+
: !drawn.includes(missing[0]) && BOLT_TYPES.has(missing[0]?.type) ? `Showing ${called(p)} in 3D. The bolt group has no solid of its own, so only the part is shown.`
|
|
430
|
+
: `Showing ${called(shown[0] ?? p)} in 3D. ${calledAll(missing)} ${W.notDrawn}`);
|
|
398
431
|
}
|
|
399
432
|
}
|
|
400
433
|
catch (error) {
|
|
401
434
|
console.warn('[change-review] Show in 3D failed:', error);
|
|
402
|
-
if (forReview.gen === gen)
|
|
435
|
+
if (forReview.gen === gen) locateSays(W.locateFailed(error));
|
|
403
436
|
}
|
|
404
437
|
});
|
|
405
438
|
}
|
|
@@ -412,9 +445,14 @@ export function createFindings({ doc, el, api, projectId, live, locate, sideStat
|
|
|
412
445
|
() => act(forReview, 'withdraw', { decisionId: d.decisionId }, `${label === 'Undo' ? 'Undone' : 'Withdrawn'}. “${view.words.title}” needs a decision again.`, key));
|
|
413
446
|
const lines = [];
|
|
414
447
|
if (d.kind === 'fix') lines.push(el(doc, 'p', { class: 'tekla-changes-finding-record', text: `${W.fixRecorded(viaChat(d))} (${who(d)}, ${day(d.at)}). ${W.fixCheck}` }), withdraw('Undo'));
|
|
415
|
-
if (d.kind === 'rfi') lines.push(el(doc, 'p', { class: 'tekla-changes-finding-record', text:
|
|
448
|
+
if (d.kind === 'rfi') lines.push(el(doc, 'p', { class: 'tekla-changes-finding-record', text: `${/^rfi\b/i.test(d.rfiReference) ? '' : 'RFI '}${d.rfiReference} raised (${who(d)}, ${day(d.at)}).` }), withdraw('Withdraw'));
|
|
416
449
|
if (d.kind === 'accept') lines.push(el(doc, 'p', { class: 'tekla-changes-finding-record' }, el(doc, 'span', { text: 'Going ahead on this assumption: ' }), el(doc, 'q', { text: d.assumption })),
|
|
417
|
-
el(doc, 'p', { class: 'tekla-changes-finding-meta', text: `Recorded by you, ${day(d.at)}. The review now says it proceeds on this assumption
|
|
450
|
+
el(doc, 'p', { class: 'tekla-changes-finding-meta', text: `Recorded by you, ${day(d.at)}. ${W.acceptRecorded || 'The review now says it proceeds on this assumption.'}` }),
|
|
451
|
+
// #4029: a clash acceptance made under other settings names them, so the person sees what they accepted under.
|
|
452
|
+
// Change Review items carry no `decidedUnder`, so their cards are unchanged.
|
|
453
|
+
...(view.decidedUnder?.sameSettings === false && typeof view.decidedUnder.settingsLine === 'string' && view.decidedUnder.settingsLine
|
|
454
|
+
? [el(doc, 'p', { class: 'tekla-changes-finding-meta ccx-decided-under', text: `Accepted under: ${view.decidedUnder.settingsLine}` })] : []),
|
|
455
|
+
withdraw('Withdraw'));
|
|
418
456
|
if (d.live?.matchesReviewed === 'different') lines.push(el(doc, 'p', { class: 'tekla-changes-finding-meta', text: W.newerState }));
|
|
419
457
|
return lines;
|
|
420
458
|
}
|
|
@@ -429,7 +467,7 @@ export function createFindings({ doc, el, api, projectId, live, locate, sideStat
|
|
|
429
467
|
el(doc, 'p', { class: 'tekla-changes-finding-text', text: words.fix }),
|
|
430
468
|
button({ class: 'primary', 'data-command-id': cid('finding-fix-record') }, W.fixButton,
|
|
431
469
|
() => act(forReview, 'decisions', { correspondenceKey: key, evidenceFingerprint: f.evidenceFingerprint, kind: 'fix' }, W.fixSaid(words.title), key)),
|
|
432
|
-
el(doc, 'p', { class: 'tekla-changes-finding-meta', text: 'This records that you are fixing it; only a later review can show it fixed.' }),
|
|
470
|
+
el(doc, 'p', { class: 'tekla-changes-finding-meta', text: W.fixMeta || 'This records that you are fixing it; only a later review can show it fixed.' }),
|
|
433
471
|
]),
|
|
434
472
|
choice(key, 'rfi', 'Raise an RFI', 'Ask the design team, then record the RFI number here.', () => {
|
|
435
473
|
const ref = drafts.rfi[key] ?? '';
|
|
@@ -490,7 +528,7 @@ export function createFindings({ doc, el, api, projectId, live, locate, sideStat
|
|
|
490
528
|
paint();
|
|
491
529
|
return [
|
|
492
530
|
el(doc, 'label', { class: 'tekla-changes-picker-label', for: areaId, text: 'What are you assuming?' }), area, countEl,
|
|
493
|
-
el(doc, 'p', { class: 'tekla-changes-finding-meta', text: 'This is written into the review as your assumption, with your name and the time.' }), slot,
|
|
531
|
+
el(doc, 'p', { class: 'tekla-changes-finding-meta', text: W.acceptMeta || 'This is written into the review as your assumption, with your name and the time.' }), slot,
|
|
494
532
|
];
|
|
495
533
|
}),
|
|
496
534
|
];
|
|
@@ -509,11 +547,12 @@ export function createFindings({ doc, el, api, projectId, live, locate, sideStat
|
|
|
509
547
|
if (openKey && openKey !== key && (drafts.assumption[openKey] || drafts.rfi[openKey])) { openKey = key; rerender(); return; }
|
|
510
548
|
openKey = open ? null : key; focusAfter = key; rerender();
|
|
511
549
|
});
|
|
512
|
-
const line = view.words.line || objectLine(f);
|
|
550
|
+
const line = view.words.line || (steel ? calledAll(f.participants) : objectLine(f));
|
|
513
551
|
head.append(el(doc, 'strong', { text: view.words.title, 'data-tip': view.words.title }), el(doc, 'span', { text: line, 'data-tip': line }),
|
|
514
552
|
...(view.note ? [el(doc, 'span', { class: 'tekla-changes-finding-note', text: `• ${NOTE[view.note]}` })] : []),
|
|
515
553
|
el(doc, 'span', { class: 'tekla-changes-chips' }, chip(statusText, status.tone, statusText),
|
|
516
|
-
|
|
554
|
+
// A check of one model has nothing to be new against: `words.presenceChip: false` leaves the chip out.
|
|
555
|
+
W.presenceChip === false ? null : chip(f.presence === 'introduced' ? 'New in this change' : f.presence === 'unknown' ? 'Not known if new' : W.alreadyThere, 'neutral',
|
|
517
556
|
f.presence === 'unknown' ? (view.presenceNote && String(f.ruleId).startsWith('firm.') ? view.presenceNote : W.presenceUnknown) : undefined),
|
|
518
557
|
...(f.evidence?.approximate === true ? [chip('Approximate geometry', 'neutral', 'One of these parts is not drawn exactly (for example, its cuts or holes were not applied or its bolt head size is assumed), so the measurement may differ from the real part.')] : [])));
|
|
519
558
|
const detail = open ? el(doc, 'div', { class: 'tekla-changes-detail tekla-changes-finding-detail', id: detailId },
|
|
@@ -573,10 +612,23 @@ export function createFindings({ doc, el, api, projectId, live, locate, sideStat
|
|
|
573
612
|
.filter((c) => c && typeof c.id === 'string' && typeof c.why === 'string')
|
|
574
613
|
.sort((a, b) => a.id.localeCompare(b.id, undefined, { numeric: true }))
|
|
575
614
|
.map((c) => `Connection ${c.id}${typeof c.kind === 'string' && c.kind ? ` (${kindWords(c.kind)})` : ''} was not checked for clash: ${c.why.replace(/\.+$/, '')}.`);
|
|
615
|
+
// #3997/#4011: shear plate placement warnings, grouped under the server's own heading for their kind, in its order.
|
|
616
|
+
const placement = (Array.isArray(data?.steel?.clashConnections?.placement) ? data.steel.clashConnections.placement : [])
|
|
617
|
+
.filter((c) => c && typeof c.id === 'string' && typeof c.heading === 'string' && typeof c.text === 'string')
|
|
618
|
+
.map((c, i) => ({ ...c, i }))
|
|
619
|
+
.sort((a, b) => a.id.localeCompare(b.id, undefined, { numeric: true }) || a.i - b.i);
|
|
620
|
+
const placementGroup = (heading) => {
|
|
621
|
+
const items = placement.filter((c) => c.heading === heading);
|
|
622
|
+
return el(doc, 'details', { class: 'tekla-changes-group', open: true },
|
|
623
|
+
el(doc, 'summary', { text: `${heading} (${items.length})` }),
|
|
624
|
+
el(doc, 'ul', { class: 'tekla-audit-omissions' }, ...items.map((c) => el(doc, 'li', { text: `Connection ${c.id}: ${c.text}` }))));
|
|
625
|
+
};
|
|
576
626
|
const reasons = [...notBuilt, ...(Array.isArray(statement?.notChecked) ? statement.notChecked : []).map((entry) => entry?.reason)
|
|
577
627
|
.filter((text) => typeof text === 'string' && text && !zoneLabels.has(text))];
|
|
578
|
-
|
|
579
|
-
|
|
628
|
+
const headings = [...new Map([...placement].sort((a, b) => a.i - b.i).map((c) => [c.heading, 1])).keys()];
|
|
629
|
+
const differently = headings.length ? el(doc, 'div', {}, ...headings.map(placementGroup)) : null;
|
|
630
|
+
if (!statement && !zoneList.length) return differently;
|
|
631
|
+
if (!reasons.length && !zoneList.length && !statement.scope) return differently;
|
|
580
632
|
const total = reasons.length + zoneList.length;
|
|
581
633
|
const zoneItem = (zone) => el(doc, 'li', { class: 'crv-zone' }, el(doc, 'span', { text: zone.label }),
|
|
582
634
|
zone.entityIds.length ? button({ class: 'tekla-changes-locate', 'data-command-id': cid('zone-locate'), 'aria-label': `Show in 3D: ${zone.label}` }, 'Show in 3D', async () => {
|
|
@@ -585,18 +637,20 @@ export function createFindings({ doc, el, api, projectId, live, locate, sideStat
|
|
|
585
637
|
const selected = await locate({ state: sideState('revised'), entityId: zone.entityIds[0], entityIds: zone.entityIds });
|
|
586
638
|
if (forReview.gen !== gen) return;
|
|
587
639
|
const n = Array.isArray(selected) ? selected.length : 0;
|
|
588
|
-
|
|
640
|
+
if (n) shownNow();
|
|
641
|
+
locateSays(!n ? W.notOpened : n < zone.entityIds.length ? 'Showing the one member of this connection that is in the current model.' : 'Showing the members that meet at this connection in 3D.');
|
|
589
642
|
} catch (error) {
|
|
590
643
|
console.warn('[change-review] Show in 3D failed:', error);
|
|
591
|
-
if (forReview.gen === gen)
|
|
644
|
+
if (forReview.gen === gen) locateSays(W.locateFailed(error));
|
|
592
645
|
}
|
|
593
646
|
}) : null);
|
|
594
647
|
// Open when there is a zone (its Show in 3D is the way to look at what was not checked) or a connection that was
|
|
595
648
|
// not checked: a gap is never folded away.
|
|
596
|
-
|
|
649
|
+
const unchecked = el(doc, 'details', { class: 'tekla-changes-group tekla-changes-clash-unchecked', open: zoneList.length || notBuilt.length ? true : null },
|
|
597
650
|
el(doc, 'summary', { text: total ? `Not checked for clash (${total})` : 'How clashes were checked' }),
|
|
598
651
|
el(doc, 'ul', { class: 'tekla-audit-omissions' }, ...zoneList.map(zoneItem), ...reasons.map((text) => el(doc, 'li', { text })),
|
|
599
652
|
statement?.scope ? el(doc, 'li', { text: statement.scope }) : null));
|
|
653
|
+
return differently ? el(doc, 'div', {}, differently, unchecked) : unchecked;
|
|
600
654
|
}
|
|
601
655
|
const c = data?.clash;
|
|
602
656
|
if (!c || data?.clashState !== 'ran') return null;
|
|
@@ -626,7 +680,7 @@ export function createFindings({ doc, el, api, projectId, live, locate, sideStat
|
|
|
626
680
|
const lines = [];
|
|
627
681
|
if (s) {
|
|
628
682
|
// The groups can overlap (a changed object can also be re-checked), so no total is claimed.
|
|
629
|
-
lines.push(`Looked at ${plural(s.added, 'added object')} and ${plural(s.changed, 'changed object')}${s.focus ? `, and re-checked ${plural(s.focus, 'object')} from earlier findings` : ''}: ${plural(s.evaluated, 'object was', 'objects were')} checked.`);
|
|
683
|
+
lines.push(`Looked at ${plural(s.added, 'added object')} and ${plural(s.changed, 'changed object')}${s.notCompared ? ` (${s.notCompared})` : ''}${s.focus ? `, and re-checked ${plural(s.focus, 'object')} from earlier findings` : ''}: ${plural(s.evaluated, 'object was', 'objects were')} checked.`);
|
|
630
684
|
if (s.notApplicable) lines.push(`${plural(s.notApplicable, 'object was', 'objects were')} not the kind these checks apply to.`);
|
|
631
685
|
if (s.excluded) lines.push(`${plural(s.excluded, 'object was', 'objects were')} left out of the checks.`);
|
|
632
686
|
}
|
|
@@ -707,5 +761,21 @@ export function createFindings({ doc, el, api, projectId, live, locate, sideStat
|
|
|
707
761
|
target?.focus();
|
|
708
762
|
}
|
|
709
763
|
|
|
710
|
-
|
|
764
|
+
/**
|
|
765
|
+
* #4029: the cards of `list` (findings of the loaded reply), in the panel's own sections, needing-a-decision first.
|
|
766
|
+
* Every control belongs to the load on screen, exactly as the review's own cards do.
|
|
767
|
+
*/
|
|
768
|
+
function cards(list) {
|
|
769
|
+
if (!reviewId || loading) return [];
|
|
770
|
+
renderingFor = { reviewId, gen };
|
|
771
|
+
return [...list].sort((a, b) => ORDER[a.status] - ORDER[b.status]).map(card);
|
|
772
|
+
}
|
|
773
|
+
|
|
774
|
+
/** #4029: take a reply the panel already has (a check just run) as a load, without reading it again. */
|
|
775
|
+
function adopt(id, reply) {
|
|
776
|
+
gen += 1; reviewId = id ?? null; data = reply ?? null; failed = null; loading = false;
|
|
777
|
+
return gen;
|
|
778
|
+
}
|
|
779
|
+
|
|
780
|
+
return { load, nodes, cards, adopt, data: () => data, failed: () => failed, restoreFocus, reset: () => { data = null; reviewId = null; failed = null; filter = null; openKey = null; }, state: () => ({ findings: views().length, gate: data?.view?.gate?.kind ?? data?.checks?.state ?? null }) };
|
|
711
781
|
}
|