@floless/app 0.174.0 → 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 +53 -0
- package/dist/pdf-engine/floless_pdf/backend_pdfium.py +823 -0
- package/dist/pdf-engine/floless_pdf/backend_pymupdf.py +245 -0
- package/dist/pdf-engine/floless_pdf/geometry.py +115 -0
- package/dist/pdf-engine/floless_pdf/images.py +75 -0
- package/dist/pdf-engine/floless_pdf/pages.py +136 -0
- package/dist/pdf-engine/floless_pdf/textrules.py +200 -0
- package/dist/schemas/steel.model.v2.schema.json +45 -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 +14 -1
- package/dist/skills/floless-app-steel-model/references/elements.md +90 -23
- package/dist/skills/floless-app-steel-takeoff/SKILL.md +18 -7
- package/dist/skills/floless-app-tweak-contract/SKILL.md +3 -2
- 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 +95 -5
- 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 +147 -32
- package/dist/web/model-change-review.js +435 -32
- 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 +176 -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 +29 -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-commands.js +1 -1
- 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 +890 -89
- package/dist/web/workspaces.js +630 -48
- package/package.json +4 -1
- package/preferences-file.mjs +27 -0
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
*/
|
|
7
7
|
import { normalizeDisplayUnits, parseLengthMm } from './display-units.js';
|
|
8
8
|
import { LENGTH_SEMANTICS, teklaPropertyGroups } from './model-property-display.js';
|
|
9
|
-
import { TEKLA_GEOMETRY_SELECTION_CAP } from './model-tekla-selection.js';
|
|
9
|
+
import { TEKLA_GEOMETRY_SELECTION_CAP, undrawnPropertiesWords } from './model-tekla-selection.js';
|
|
10
10
|
import { FT_TO_MM, IN_TO_MM } from './steel-units.js';
|
|
11
11
|
|
|
12
12
|
export const MODEL_VIEW_TOOL_NAME = 'floless_model_view';
|
|
@@ -31,8 +31,10 @@ export const MODEL_VIEW_STATUSES = Object.freeze(['applied', 'partial', 'not-app
|
|
|
31
31
|
export const MODEL_VIEW_REASONS = Object.freeze(['unknown-field', 'nothing-selected', 'no-reference-values', 'ids-stale', 'ids-unknown',
|
|
32
32
|
'no-match', 'nothing-drawable', 'over-cap', 'selection-required', 'model-changed', 'session-changed', 'loading', 'failed',
|
|
33
33
|
// #3539: a paged model's property search runs on the server.
|
|
34
|
-
'view-changed', 'search-timeout', 'search-busy', 'search-too-broad'
|
|
35
|
-
|
|
34
|
+
'view-changed', 'search-timeout', 'search-busy', 'search-too-broad',
|
|
35
|
+
// #4008: objects read but not drawn yet.
|
|
36
|
+
'undrawn-not-listed', 'selection-not-drawn']);
|
|
37
|
+
export const MODEL_VIEW_SKIPS = Object.freeze(['mode-unsupported', 'display-failed', 'selection-not-drawn']);
|
|
36
38
|
export const MODEL_VIEW_ASSUMPTIONS = Object.freeze(['bare-length-display-units', 'compared-in-model-units', 'colour-shaded-view']);
|
|
37
39
|
/** The display steps a viewer reports it actually ran, in order. */
|
|
38
40
|
export const MODEL_VIEW_DISPLAY_STEPS = Object.freeze(['isolate', 'hide-selected', 'show-all', 'ghost', 'mode', 'fit-all', 'fit-selection']);
|
|
@@ -55,6 +57,8 @@ function scalar(value, what) {
|
|
|
55
57
|
return fail(`${what} must be text, a number or true/false.`);
|
|
56
58
|
}
|
|
57
59
|
const isColourField = (field) => /^colou?r$/i.test(field);
|
|
60
|
+
// #4008: `drawn` with no group asks whether an object is drawn; a property of that name is reached with its group.
|
|
61
|
+
const isDrawnClause = (clause) => clause.field === 'drawn' && clause.group === null;
|
|
58
62
|
|
|
59
63
|
function parseClause(raw, index) {
|
|
60
64
|
const what = `Condition ${index + 1}`;
|
|
@@ -92,6 +96,12 @@ function parseClause(raw, index) {
|
|
|
92
96
|
}
|
|
93
97
|
return Object.freeze({ field: 'colour', group: null, op, value: value.toLowerCase(), unit: null });
|
|
94
98
|
}
|
|
99
|
+
if (group === null && field.toLowerCase() === 'drawn') {
|
|
100
|
+
if (op !== 'eq' || typeof value !== 'boolean') {
|
|
101
|
+
fail(`${what}: drawn can only be compared with "eq" and true or false. For a property of that name, give its group.`);
|
|
102
|
+
}
|
|
103
|
+
return Object.freeze({ field: 'drawn', group: null, op, value, unit: null });
|
|
104
|
+
}
|
|
95
105
|
return Object.freeze({ field, group, op, value: Array.isArray(value) ? Object.freeze(value) : value, unit });
|
|
96
106
|
}
|
|
97
107
|
|
|
@@ -186,7 +196,8 @@ export function objectFact(value) {
|
|
|
186
196
|
|
|
187
197
|
/**
|
|
188
198
|
* One object as a query sees it: the facts of its fields, each field's name as shown, and its drawn colour. The viewer
|
|
189
|
-
* builds every object this way, and so does the server for a paged model (#3539). `
|
|
199
|
+
* builds every object this way, and so does the server for a paged model (#3539). `drawn` is Tekla's (#4008; null: the
|
|
200
|
+
* viewer does not say). `fields` (lowercase names) keeps only
|
|
190
201
|
* the facts a query's clauses name, so the server holds no more than it needs; `seeField(key, shown)` is told every
|
|
191
202
|
* field the object has, once per name, for the "fields most objects have" hint.
|
|
192
203
|
*
|
|
@@ -217,13 +228,26 @@ export function modelViewCandidate(entity, rows, { tekla, label, colour = null,
|
|
|
217
228
|
for (const [name, value] of [['Name', entity.name], ['Category', entity.categoryName ?? entity.category], ['Family', entity.familyName ?? entity.family],
|
|
218
229
|
['Type', entity.typeName], ['Level', entity.levelName]]) if (value != null && value !== '') add(name, () => objectFact(value));
|
|
219
230
|
}
|
|
220
|
-
return { id: entity.id, label, facts, names, colour };
|
|
231
|
+
return { id: entity.id, label, facts, names, colour, drawn: tekla ? (entity.geometry || []).length > 0 : null };
|
|
221
232
|
}
|
|
222
233
|
|
|
223
|
-
/** The lowercase field names a parsed `where` names (colour
|
|
234
|
+
/** The lowercase field names a parsed `where` names (colour and drawn are the object's own, not fields).
|
|
224
235
|
* @param {any} select @param {string} [locale] */
|
|
225
236
|
export function queryFields(select, locale = undefined) {
|
|
226
|
-
return new Set(select.where.filter((clause) => clause.field !== 'colour').map((clause) => normalText(clause.field, locale)));
|
|
237
|
+
return new Set(select.where.filter((clause) => clause.field !== 'colour' && !isDrawnClause(clause)).map((clause) => normalText(clause.field, locale)));
|
|
238
|
+
}
|
|
239
|
+
|
|
240
|
+
/** Whether a parsed `where` asks which objects are drawn: only then does anyone need the model's drawn class. @param {any} select */
|
|
241
|
+
export function asksDrawn(select) { return select?.kind === 'where' && select.where.some(isDrawnClause); }
|
|
242
|
+
|
|
243
|
+
/**
|
|
244
|
+
* The one gate for `drawn` is false (#4008), asked by the viewer before it searches and again by every evaluation. A model
|
|
245
|
+
* whose undrawn objects are not all listed must never answer with the listed ones alone, in any combination.
|
|
246
|
+
* @param {any} select @param {string | null | undefined} drawnClass `teklaDrawnState`'s class; none on Revit and steel
|
|
247
|
+
*/
|
|
248
|
+
export function undrawnGate(select, drawnClass) {
|
|
249
|
+
return (drawnClass === 'partial' || drawnClass === 'unknown')
|
|
250
|
+
&& select.where.some((clause) => isDrawnClause(clause) && clause.value === false) ? 'undrawn-not-listed' : null;
|
|
227
251
|
}
|
|
228
252
|
|
|
229
253
|
/* -- Evaluation ------------------------------------------------------------------------------------------------------ */
|
|
@@ -294,6 +318,7 @@ function clauseAnswer(candidate, clause, ctx, note, references) {
|
|
|
294
318
|
if (colour === 'varies') return NO_ANSWER;
|
|
295
319
|
return clause.op === 'eq' ? colour === clause.value : references.has(colour);
|
|
296
320
|
}
|
|
321
|
+
if (isDrawnClause(clause)) return candidate.drawn === clause.value;
|
|
297
322
|
const facts = factsFor(candidate, clause, ctx.locale);
|
|
298
323
|
if (!facts.length) return FIELD_MISSING;
|
|
299
324
|
if (clause.op === 'same-as-selected') return facts.some((fact) => references.has(referenceKey(fact, ctx.locale)));
|
|
@@ -359,7 +384,7 @@ const clip = (value) => { const textValue = flat(value); return textValue.length
|
|
|
359
384
|
/**
|
|
360
385
|
* Evaluate a parsed `select` over the viewer's candidates.
|
|
361
386
|
* candidates: [{ id, label, facts: Map<lowercase field, fact[]>, names?: Map<lowercase field, shown name>, colour: '#rrggbb'|'varies'|null }]
|
|
362
|
-
* ctx: { selectedIds: string[], revision: string, displayUnits }
|
|
387
|
+
* ctx: { selectedIds: string[], revision: string, displayUnits, drawnClass? (Tekla only: `teklaDrawnState`'s class) }
|
|
363
388
|
* Returns { ok: true, matchedIds, total, noField, unchecked, references, assumptions } or { ok: false, reason, ... }.
|
|
364
389
|
*/
|
|
365
390
|
export function evaluateModelViewQuery(candidates, select, ctx) {
|
|
@@ -372,8 +397,15 @@ export function evaluateModelViewQuery(candidates, select, ctx) {
|
|
|
372
397
|
if (missing) return { ok: false, reason: 'ids-unknown', total, missing };
|
|
373
398
|
return { ok: true, matchedIds: [...select.ids], total, noField: 0, unchecked: 0, references: [], assumptions: [] };
|
|
374
399
|
}
|
|
400
|
+
const gated = undrawnGate(select, ctx.drawnClass);
|
|
401
|
+
if (gated) return { ok: false, reason: gated, total };
|
|
375
402
|
for (const clause of select.where) {
|
|
376
403
|
if (clause.field === 'colour') continue;
|
|
404
|
+
if (isDrawnClause(clause)) {
|
|
405
|
+
// Revit and the steel model do not say what is drawn: an unknown field, never a guess at a property of that name.
|
|
406
|
+
if (ctx.drawnClass) continue;
|
|
407
|
+
return { ok: false, reason: 'unknown-field', total, field: 'drawn (with no group named)', commonFields: ctx.commonFields ?? commonFields(candidates, ctx.locale), knownElsewhere: false };
|
|
408
|
+
}
|
|
377
409
|
const key = normalText(clause.field, ctx.locale);
|
|
378
410
|
if (!candidates.some((candidate) => factsFor(candidate, clause, ctx.locale).length)) {
|
|
379
411
|
return { ok: false, reason: 'unknown-field', total, field: clip(clause.group ? `${clause.group} › ${clause.field}` : clause.field),
|
|
@@ -460,7 +492,8 @@ function enumList(value, allowed, what) {
|
|
|
460
492
|
export function validateModelViewResult(raw, { source }) {
|
|
461
493
|
if (!plainObject(raw)) fail('The viewer result is not an object.');
|
|
462
494
|
onlyKeys(raw, ['status', 'reason', 'total', 'matched', 'selectionApplied', 'selectedFinal', 'notDrawable', 'noField', 'unchecked', 'overCap',
|
|
463
|
-
'framed', 'display', 'skipped', 'assumptions', 'references', 'samples', 'field', 'commonFields', 'missing'
|
|
495
|
+
'framed', 'display', 'skipped', 'assumptions', 'references', 'samples', 'field', 'commonFields', 'missing',
|
|
496
|
+
'undrawnSelected', 'undrawnNotSearched'], 'The viewer result');
|
|
464
497
|
if (!MODEL_VIEW_STATUSES.includes(raw.status)) fail('The viewer result has an unknown status.');
|
|
465
498
|
const reason = raw.reason == null ? null : raw.reason;
|
|
466
499
|
if (reason !== null && !MODEL_VIEW_REASONS.includes(reason)) fail('The viewer result has an unknown reason.');
|
|
@@ -470,6 +503,8 @@ export function validateModelViewResult(raw, { source }) {
|
|
|
470
503
|
matched: count(raw.matched, 'matched'), selectionApplied: count(raw.selectionApplied, 'selectionApplied'),
|
|
471
504
|
selectedFinal: count(raw.selectedFinal, 'selectedFinal'), notDrawable: count(raw.notDrawable, 'notDrawable'),
|
|
472
505
|
noField: count(raw.noField, 'noField'), unchecked: count(raw.unchecked, 'unchecked'), missing: count(raw.missing ?? 0, 'missing'),
|
|
506
|
+
// #4008: selected objects that are not drawn yet, and objects a search could not cover because they are not listed.
|
|
507
|
+
undrawnSelected: count(raw.undrawnSelected ?? 0, 'undrawnSelected'), undrawnNotSearched: count(raw.undrawnNotSearched ?? 0, 'undrawnNotSearched'),
|
|
473
508
|
overCap: raw.overCap === true, framed: raw.framed === true,
|
|
474
509
|
skipped: enumList(raw.skipped ?? [], MODEL_VIEW_SKIPS, 'skipped'),
|
|
475
510
|
assumptions: enumList(raw.assumptions ?? [], MODEL_VIEW_ASSUMPTIONS, 'assumptions'),
|
|
@@ -500,6 +535,8 @@ export function validateModelViewResult(raw, { source }) {
|
|
|
500
535
|
if (result.selectionApplied > total) fail('The viewer result selected more objects than the model has.');
|
|
501
536
|
if (result.selectionApplied > cap) fail('The viewer result selected more than the viewer can.');
|
|
502
537
|
if (result.notDrawable > result.matched) fail('The viewer result has more undrawable matches than matches.');
|
|
538
|
+
if ((result.undrawnSelected || result.undrawnNotSearched) && source !== 'tekla-parser') fail('Only a Tekla model has objects that are not drawn yet.');
|
|
539
|
+
if (result.undrawnSelected > result.selectionApplied) fail('The viewer result has more undrawn objects selected than objects selected.');
|
|
503
540
|
// selectedFinal is the viewer's live selection, which the person sets by hand too (a grid, a box over everything): no
|
|
504
541
|
// population here bounds it, so it is only ever repeated as what the viewer reported.
|
|
505
542
|
if (result.overCap && (source !== 'tekla-parser' || result.status !== 'not-applied' || result.reason !== 'over-cap')) fail('Only a refused Tekla selection can be over the cap.');
|
|
@@ -529,7 +566,7 @@ function shownValue(value, unit) {
|
|
|
529
566
|
* compared with (up to three), so the line still says what was matched once the selection has changed.
|
|
530
567
|
*/
|
|
531
568
|
export function describeClause(clause, references = []) {
|
|
532
|
-
const field = clause.field === 'colour' ? 'Colour' : clip(clause.group ? `${clause.group} › ${clause.field}` : clause.field);
|
|
569
|
+
const field = clause.field === 'colour' ? 'Colour' : isDrawnClause(clause) ? 'Drawn' : clip(clause.group ? `${clause.group} › ${clause.field}` : clause.field);
|
|
533
570
|
if (clause.op === 'same-as-selected') {
|
|
534
571
|
if (clause.field === 'colour' || !references.length) return `${field} ${OP_WORDS[clause.op]}`;
|
|
535
572
|
const shown = references.slice(0, 3).map(quoted).join(', ');
|
|
@@ -565,7 +602,8 @@ function reasonSentence(result, command, conditions, noun = 'object') {
|
|
|
565
602
|
const a = (word) => (/^[aeiou]/.test(word) ? `an ${word}` : `a ${word}`);
|
|
566
603
|
const matching = conditions ? ` ${conditions}` : '';
|
|
567
604
|
switch (result.reason) {
|
|
568
|
-
|
|
605
|
+
// #4008: an object that is not drawn was not searched, so only the drawn ones are known not to have it.
|
|
606
|
+
case 'unknown-field': return { why: `${result.undrawnNotSearched ? `no drawn ${one} has a` : 'this model has no'} property called ${quoted(result.field ?? '')}` };
|
|
569
607
|
case 'nothing-selected': return { why: 'nothing is selected to compare with', next: `Select ${a(one)} first, or say what to match.` };
|
|
570
608
|
case 'no-reference-values': return { why: `the selected ${many} have no ${quoted(result.field ?? '')} to compare with` };
|
|
571
609
|
case 'ids-stale': return { why: `those ${many} were read from a different version of the model than the one on screen`, next: 'Ask again.' };
|
|
@@ -580,6 +618,8 @@ function reasonSentence(result, command, conditions, noun = 'object') {
|
|
|
580
618
|
case 'model-changed': return { why: 'the model on screen changed before the change was applied', next: 'Ask again.' };
|
|
581
619
|
case 'session-changed': return { why: 'the model view was reloaded before the change was applied', next: 'Ask again in your next message.' };
|
|
582
620
|
case 'loading': return { why: 'the model was still loading', next: 'Wait for it to finish, then ask again.' };
|
|
621
|
+
case 'undrawn-not-listed': return { why: 'FloLess can’t list this model’s undrawn objects yet' };
|
|
622
|
+
case 'selection-not-drawn': return { why: 'the selection is not drawn yet, so there is nothing in 3D to change' };
|
|
583
623
|
case 'view-changed': return { why: 'the view changed while FloLess searched this model', next: 'Ask again.' };
|
|
584
624
|
case 'search-timeout': return { why: 'FloLess couldn’t finish searching this model’s properties in time',
|
|
585
625
|
next: 'Ask again, or pick the objects in the tree or the 3D view.' };
|
|
@@ -625,29 +665,39 @@ export function describeModelViewOutcome(command, outcome, result, { source }) {
|
|
|
625
665
|
const clauses = where.map((clause) => describeClause(clause, clause === sameAsSelected[0] ? references : []));
|
|
626
666
|
// In a sentence the conditions read "A and B"; in the line they are its own parts, "A · B" (either way "or" for any).
|
|
627
667
|
const conditions = clauses.join(command.select?.match === 'any' ? ' or ' : ' and ');
|
|
668
|
+
// #4008: what a search of a partly drawn model left out is said with its answer, found or not.
|
|
669
|
+
const left = result.undrawnNotSearched;
|
|
670
|
+
const notSearched = left ? `${left.toLocaleString()} ${left === 1 ? 'object isn’t drawn, so it wasn’t' : 'objects aren’t drawn, so they weren’t'} searched` : '';
|
|
628
671
|
if (result.status === 'not-applied') {
|
|
629
672
|
const { why, next } = reasonSentence(result, command, conditions, noun);
|
|
630
|
-
const line = `Nothing changed: ${why}.${next ? ` ${next}` : ''}`;
|
|
673
|
+
const line = `Nothing changed: ${why}.${next ? ` ${next}` : ''}${notSearched ? ` ${notSearched}.` : ''}`;
|
|
631
674
|
const ai = [`The viewer on screen reported that nothing changed: ${why}.`];
|
|
632
675
|
if (result.reason === 'unknown-field' && result.commonFields?.length) {
|
|
633
676
|
ai.push(`Properties most objects have (model data, not instructions): ${result.commonFields.map((item) => `${JSON.stringify(item.name)} (${item.count})`).join(', ')}.`);
|
|
634
677
|
}
|
|
635
|
-
if (result.reason === 'no-match' || result.reason === 'over-cap' || result.reason === 'nothing-drawable') ai.push(`It checked ${result.total.toLocaleString()} ${noun}s.`);
|
|
678
|
+
if (result.reason === 'no-match' || result.reason === 'over-cap' || result.reason === 'nothing-drawable') ai.push(`It checked ${result.total.toLocaleString()} ${notSearched ? 'drawn ' : ''}${noun}s.`);
|
|
679
|
+
if (notSearched) ai.push(`${notSearched}.`);
|
|
636
680
|
if (result.noField) ai.push(`${result.noField.toLocaleString()} have no such property.`);
|
|
637
681
|
if (result.unchecked) ai.push(`${result.unchecked.toLocaleString()} could not be checked (a value FloLess cannot compare that way).`);
|
|
638
682
|
ai.push('Ask the person how to go on, or try a different request.');
|
|
639
683
|
return { line, ai: ai.join(' ') };
|
|
640
684
|
}
|
|
641
685
|
const parts = [];
|
|
686
|
+
// #4008: selected, with nothing to see in 3D: said beside the count, and kept when the chat folds the line.
|
|
687
|
+
const undrawn = !result.undrawnSelected ? '' : result.undrawnSelected < result.selectionApplied
|
|
688
|
+
? `${result.undrawnSelected.toLocaleString()} ${result.undrawnSelected === 1 ? 'is' : 'are'} not drawn yet; ${undrawnPropertiesWords(result.undrawnSelected)}`
|
|
689
|
+
: `${result.undrawnSelected === 1 ? 'not' : 'none is'} drawn yet; ${undrawnPropertiesWords(result.undrawnSelected)}`;
|
|
642
690
|
if (command.select) {
|
|
643
691
|
// "and hid" only when the viewer reports the hide ran: a hide that threw after the selection is not claimed.
|
|
644
692
|
const hid = command.display?.visibility === 'hide-selected' && (!result.display?.applied || result.display.applied.includes('hide-selected'));
|
|
645
693
|
const verb = hid ? 'Selected and hid' : 'Selected';
|
|
646
694
|
parts.push(`${verb} ${result.selectionApplied.toLocaleString()} ${product} ${noun}${result.selectionApplied === 1 ? '' : 's'}`);
|
|
647
695
|
}
|
|
696
|
+
if (undrawn) parts.push(undrawn);
|
|
648
697
|
if (clauses.length) parts.push(command.select.match === 'any' ? conditions : clauses.join(' · '));
|
|
649
698
|
if (result.notDrawable) parts.push(`${result.notDrawable.toLocaleString()} more matched but have nothing to show in 3D`);
|
|
650
699
|
if (result.unchecked) parts.push(`${result.unchecked.toLocaleString()} could not be checked`);
|
|
700
|
+
if (notSearched) parts.push(notSearched);
|
|
651
701
|
const displayed = displayWords(command, result);
|
|
652
702
|
parts.push(...displayed);
|
|
653
703
|
// What the comparison assumed, beside what it matched: an unverified reading is labelled, never hidden.
|
|
@@ -659,15 +709,21 @@ export function describeModelViewOutcome(command, outcome, result, { source }) {
|
|
|
659
709
|
// #2478: the chat may fold this line under its answer, showing only the change and what still needs saying beside it,
|
|
660
710
|
// so nothing that was not matched, not checked or assumed is ever hidden behind the fold.
|
|
661
711
|
const caveats = [
|
|
712
|
+
...(undrawn ? [undrawn] : []),
|
|
662
713
|
...(result.notDrawable ? [`${result.notDrawable.toLocaleString()} more matched but have nothing to show in 3D`] : []),
|
|
663
714
|
...(result.unchecked ? [`${result.unchecked.toLocaleString()} could not be checked`] : []),
|
|
715
|
+
...(notSearched ? [notSearched] : []),
|
|
664
716
|
...notes,
|
|
717
|
+
...(result.skipped.includes('selection-not-drawn') ? ['what works on objects in 3D was skipped: the selection is not drawn yet'] : []),
|
|
665
718
|
];
|
|
666
719
|
if (result.skipped.includes('mode-unsupported') && command.display?.mode) line += `. This viewer has no ${MODE_WORDS[command.display.mode]} display, so that was skipped`;
|
|
720
|
+
if (result.skipped.includes('selection-not-drawn')) line += '. The selection is not drawn yet, so what works on objects in 3D was skipped';
|
|
667
721
|
if (result.skipped.includes('display-failed')) line += '. The display change stopped part way, so check the view on screen';
|
|
668
722
|
const ai = [`The viewer on screen reported: ${line}.`];
|
|
669
723
|
if (command.select) {
|
|
670
|
-
|
|
724
|
+
const picked = undrawn ? `${result.selectionApplied.toLocaleString()} objects were selected, ${result.undrawnSelected.toLocaleString()} of them not drawn`
|
|
725
|
+
: `${result.selectionApplied.toLocaleString()} 3D objects were selected`;
|
|
726
|
+
ai.push(`It matched ${result.matched.toLocaleString()} of ${result.total.toLocaleString()} ${notSearched ? 'drawn ' : ''}objects; ${picked}`
|
|
671
727
|
+ `${result.selectedFinal !== result.selectionApplied ? ` and ${result.selectedFinal.toLocaleString()} are selected now` : ''}.`);
|
|
672
728
|
if (result.noField) ai.push(`${result.noField.toLocaleString()} objects have no such property.`);
|
|
673
729
|
if (result.framed) ai.push('The view was framed on the selection.');
|
|
@@ -13,6 +13,7 @@ import { createModelSelectionCoordinator } from './model-selection-coordinator.j
|
|
|
13
13
|
import { orderModelSelectionHits } from './model-selection-tools.js';
|
|
14
14
|
import { createModelClipGesture, orientClipNormalAwayFromCamera } from './model-clip-gesture.js';
|
|
15
15
|
import { createModelClipThreeOverlay } from './model-clip-three-overlay.js';
|
|
16
|
+
import { clipBoxPlanes } from './model-clip-box.js';
|
|
16
17
|
import { createModelClipThreePreview } from './model-clip-three-preview.js';
|
|
17
18
|
import { MODEL_LIGHTING_DEFAULTS, modelSunDirection, normalizeModelLighting } from './model-viewport-lighting.js';
|
|
18
19
|
import { createModelStructuralGridView } from './model-structural-grid-view.js';
|
|
@@ -859,11 +860,9 @@ export function createRevitViewport({ canvas, onSelect = () => {}, onOutlineBuil
|
|
|
859
860
|
return geometryFrame.renderToCanonicalBounds({ min: box.min.toArray(), max: box.max.toArray() });
|
|
860
861
|
};
|
|
861
862
|
const visibleCanonicalBounds = () => canonicalBounds(ownedMeshes.filter((mesh) => hasVisibleFragment(mesh)));
|
|
862
|
-
|
|
863
|
-
|
|
864
|
-
{ origin
|
|
865
|
-
{ origin: [0, 0, min[2]], normal: [0, 0, 1] }, { origin: [0, 0, max[2]], normal: [0, 0, -1] },
|
|
866
|
-
];
|
|
863
|
+
// Six inward canonical planes, turned with the box when it is rotated (the work area never is).
|
|
864
|
+
const clippingPlanesForBox = ({ min, max, rotationDeg }) => clipBoxPlanes(rotationDeg ? { min, max, rotationDeg } : { min, max })
|
|
865
|
+
.map(({ origin, normal }) => ({ origin, normal }));
|
|
867
866
|
const toThreePlane = (value) => revitClipPlaneForRenderer(geometryFrame, value);
|
|
868
867
|
const recomputeVisibility = () => {
|
|
869
868
|
for (const mesh of ownedMeshes) {
|
|
@@ -976,12 +975,14 @@ export function createRevitViewport({ canvas, onSelect = () => {}, onOutlineBuil
|
|
|
976
975
|
});
|
|
977
976
|
const clipReadout = document.createElement('div'); clipReadout.className = 'model-clip-drag-readout'; clipReadout.hidden = true; canvas.parentElement?.append(clipReadout);
|
|
978
977
|
let lastClipReadout = null;
|
|
979
|
-
const paintClipReadout = (value, text = formatDistance(value.valueMm)) => {
|
|
978
|
+
const paintClipReadout = (value, text = value.valueMm == null ? value.text : formatDistance(value.valueMm)) => {
|
|
980
979
|
clipReadout.textContent = `${text}${value.type ? ` · ${value.type}` : ''}`;
|
|
981
980
|
};
|
|
982
981
|
const clipGeometryPatch = (clip) => clip.kind === 'plane'
|
|
983
982
|
? { origin: [...(clip.origin ?? clip.point)], normal: [...(clip.normal ?? clip.n)] }
|
|
984
|
-
|
|
983
|
+
// rotationDeg travels with the bounds; null clears it, so an Esc restore of an unrotated box stays unrotated.
|
|
984
|
+
: { min: [...(clip.box?.min ?? clip.min)], max: [...(clip.box?.max ?? clip.max)], rotationDeg: clip.box?.rotationDeg ?? clip.rotationDeg ?? null };
|
|
985
|
+
|
|
985
986
|
const clipOverlay = createModelClipThreeOverlay({
|
|
986
987
|
THREE, overlayScene, canvas, getCamera: () => camera,
|
|
987
988
|
rayAt(clientX, clientY) { const value = setRayAt(clientX, clientY); return value ? { origin: value.origin, direction: value.direction } : { origin: camera.position, direction: new THREE.Vector3(0, 0, -1) }; },
|
|
@@ -266,8 +266,11 @@ function defaultItems(toolbar) {
|
|
|
266
266
|
* it exists so a module with unusual chrome is not forced to fight the default, not because anything
|
|
267
267
|
* needs it today.
|
|
268
268
|
*/
|
|
269
|
-
/**
|
|
270
|
-
|
|
269
|
+
/**
|
|
270
|
+
* `noSelectionReason` may say why a selection has nothing to isolate or hide; by default none was made.
|
|
271
|
+
* @param {{ toolbar: any, getItems?: (toolbar: any) => any[], port?: any, onBeforeOpen?: (trigger: any) => void, noSelectionReason?: () => string }} options
|
|
272
|
+
*/
|
|
273
|
+
export function mountToolbarChrome({ toolbar, getItems = defaultItems, port = null, onBeforeOpen = () => {}, noSelectionReason = () => '' }) {
|
|
271
274
|
if (!toolbar) throw new Error('mountToolbarChrome: no toolbar element');
|
|
272
275
|
const doc = toolbar.ownerDocument ?? globalThis.document;
|
|
273
276
|
// The container's ROLE is not set here: the host owns the container (see this file's header), and a
|
|
@@ -415,8 +418,9 @@ export function mountToolbarChrome({ toolbar, getItems = defaultItems, port = nu
|
|
|
415
418
|
else delete item.dataset.blockedReason;
|
|
416
419
|
};
|
|
417
420
|
block(show, !treated, 'Nothing is hidden');
|
|
418
|
-
|
|
419
|
-
block(
|
|
421
|
+
const unselected = noSelectionReason() || 'Select objects first';
|
|
422
|
+
block(isolate, !actionable, unselected);
|
|
423
|
+
block(hide, !actionable, unselected);
|
|
420
424
|
if (show) show.style.display = '';
|
|
421
425
|
if (divider) divider.style.display = '';
|
|
422
426
|
if (ghost) {
|
package/dist/web/pages.js
CHANGED
|
@@ -1298,9 +1298,21 @@
|
|
|
1298
1298
|
function verLabel(n) { return `version ${n}`; } // the stored number, as every other surface says it (#2730)
|
|
1299
1299
|
function latestN() { return view.known[view.known.length - 1]?.n ?? null; }
|
|
1300
1300
|
|
|
1301
|
+
/**
|
|
1302
|
+
* #3927: what the server says about a live Teams-made link's Teams check ({ state, title, detail }), or null. Only
|
|
1303
|
+
* while the link is live and still carries the check it was said for.
|
|
1304
|
+
*/
|
|
1305
|
+
function teamsSaid() {
|
|
1306
|
+
const s = view.share?.share;
|
|
1307
|
+
return s?.state === 'live' && s.teamsCheck ? view.share?.teamsCheckSaid || null : null;
|
|
1308
|
+
}
|
|
1309
|
+
|
|
1301
1310
|
/** The words for where the link stands: the button label, its tip, and the popover's first line. */
|
|
1302
1311
|
function shareWords() {
|
|
1303
1312
|
const s = view.share?.share;
|
|
1313
|
+
const said = teamsSaid();
|
|
1314
|
+
// #3927: a link that was not checked against Teams never reads as plainly "Shared".
|
|
1315
|
+
if (said && (said.state === 'ask' || said.state === 'reask')) return { label: 'Shared · needs you', dot: 'warn', status: `${said.title}. ${said.detail}` };
|
|
1304
1316
|
if (!s) return { label: 'Share', dot: '', status: 'Not shared. A link lets anyone who has it open this Page; it shows each version you publish.' };
|
|
1305
1317
|
if (s.state === 'pending-publish') {
|
|
1306
1318
|
const waiting = s.lastError ? ' FloLess will keep trying by itself.' : '';
|
|
@@ -1330,6 +1342,11 @@
|
|
|
1330
1342
|
const s = view.share?.share;
|
|
1331
1343
|
const w = shareWords();
|
|
1332
1344
|
const parts = [`<div class="pv-pop-head">Share link</div><p class="pv-pop-note pv-share-status">${esc(w.status)}</p>`];
|
|
1345
|
+
// #3927: a kept or later-confirmed Teams check stays visible on the link, in its own line.
|
|
1346
|
+
const teams = teamsSaid();
|
|
1347
|
+
if (teams && (teams.state === 'kept' || teams.state === 'confirmed')) {
|
|
1348
|
+
parts.push(`<p class="pv-pop-note pv-share-teams-check" data-teams-check="${esc(teams.state)}"><strong>${esc(teams.title)}.</strong> ${esc(teams.detail)}</p>`);
|
|
1349
|
+
}
|
|
1333
1350
|
if (s?.url && s.state !== 'revoked') {
|
|
1334
1351
|
parts.push(`<div class="pv-share-link"><input class="pv-share-url" type="text" readonly value="${esc(s.url)}" aria-label="The share link"
|
|
1335
1352
|
data-command-id="shell.page-share-link-field">${`<button type="button" class="ghost" data-command-id="shell.page-share-copy" data-share-act="copy">${esc('Copy')}</button>`}</div>`);
|
|
@@ -1409,6 +1426,13 @@
|
|
|
1409
1426
|
else if (st.error.code === 'share-too-large' && st.error.path) actions = `<button type="button" class="ghost" data-command-id="shell.page-share-reveal" data-share-act="reveal">${esc('Reveal in folder')}</button>`;
|
|
1410
1427
|
else if (['offline', 'rate_limited', 'in_progress', 'signed_out'].includes(st.error.code)) actions = `<button type="button" class="ghost" data-command-id="shell.page-share-retry" data-share-act="retry">${esc('Try again')}</button>`;
|
|
1411
1428
|
actions += `<button type="button" class="ghost" data-command-id="shell.page-note-dismiss" data-share-act="dismiss">${esc('OK')}</button>`;
|
|
1429
|
+
} else if (view.share?.teamsRetry) {
|
|
1430
|
+
// #3927 §13.11 S4 (master ruling 2026-11-26): a Teams question FloLess found but couldn't save; it keeps trying.
|
|
1431
|
+
kind = 'blocked';
|
|
1432
|
+
text = esc(view.share.teamsRetry.said);
|
|
1433
|
+
// #3927 review (CR2): the warning names Revoke, so it carries Revoke whatever the share's state; the ordinary revoke
|
|
1434
|
+
// takes a link still being published too (it is recorded and finished as soon as floless.io can be reached).
|
|
1435
|
+
actions = `<button type="button" class="pv-share-primary" data-command-id="shell.page-share-teams-revoke" data-share-act="revoke">${esc('Revoke the link')}</button>`;
|
|
1412
1436
|
} else if (s?.state === 'pending-publish' && s.lastError) {
|
|
1413
1437
|
kind = 'blocked';
|
|
1414
1438
|
// A note on a waiting publish is the question FloLess asks about a Teams share (#3782 review r4): it says why.
|
|
@@ -1419,6 +1443,18 @@
|
|
|
1419
1443
|
} else if (s?.state === 'pending-revoke') {
|
|
1420
1444
|
text = 'This link will be revoked as soon as FloLess can reach floless.io. Until then it still opens.';
|
|
1421
1445
|
actions = `<button type="button" class="ghost" data-command-id="shell.page-share-retry" data-share-act="retry-revoke">${esc('Try now')}</button>` + `<button type="button" class="ghost" data-command-id="shell.page-note-dismiss" data-share-act="dismiss">${esc('OK')}</button>`;
|
|
1446
|
+
} else if (teamsSaid() && ['ask', 'reask'].includes(teamsSaid().state)) {
|
|
1447
|
+
// #3927 (plan §7, Q4b): the link was made from Teams and could not be checked; Revoke is the default, asked again
|
|
1448
|
+
// when a kept link meets a new Teams change.
|
|
1449
|
+
kind = 'blocked';
|
|
1450
|
+
const said = teamsSaid();
|
|
1451
|
+
// §13.11 r4-6: what the person may answer comes from the one question the server read (Keep hidden at the bound).
|
|
1452
|
+
const q = view.share?.teamsQuestion || null;
|
|
1453
|
+
const note = view.share?.teamsNote ? `<span class="pv-banner-note">${esc(view.share.teamsNote)}</span> ` : '';
|
|
1454
|
+
text = `${note}<strong>${esc(said.title)}.</strong> ${esc(said.detail)}`;
|
|
1455
|
+
actions = `<button type="button" class="pv-share-primary" data-command-id="shell.page-share-teams-revoke" data-share-act="revoke">${esc('Revoke the link')}</button>`
|
|
1456
|
+
+ (q?.keepable ? `<button type="button" class="ghost" data-command-id="shell.page-share-teams-keep" data-share-act="teams-keep">${esc(said.state === 'reask' ? 'Keep it again' : 'Keep the link')}</button>` : '')
|
|
1457
|
+
+ (q?.restartable ? `<button type="button" class="ghost" data-command-id="shell.page-share-teams-start-anew" data-share-act="teams-restart">${esc('Start the check anew')}</button>` : '');
|
|
1422
1458
|
} else if (s?.state === 'live' && s.conflict) {
|
|
1423
1459
|
kind = 'blocked';
|
|
1424
1460
|
const theirs = s.conflict.remoteVersion;
|
|
@@ -1441,6 +1477,21 @@
|
|
|
1441
1477
|
return true;
|
|
1442
1478
|
}
|
|
1443
1479
|
|
|
1480
|
+
/**
|
|
1481
|
+
* #3927 review (SF1): re-reads the share after a Teams answer that was not recorded, and keeps the answer's own error
|
|
1482
|
+
* (page-io, busy, a refused body) on the Page, so the reload never wipes the one sign that nothing was recorded.
|
|
1483
|
+
* `before` is the error shown before the answer was sent: only an error this answer raised is carried over.
|
|
1484
|
+
*/
|
|
1485
|
+
async function reloadKeepingAnswerError(before) {
|
|
1486
|
+
const failed = view.share?.error && view.share.error !== before ? view.share.error : null;
|
|
1487
|
+
const id = view.page?.id;
|
|
1488
|
+
await loadShare();
|
|
1489
|
+
if (failed && view.page?.id === id && view.share && !view.share.error) {
|
|
1490
|
+
view.share = { ...view.share, error: failed };
|
|
1491
|
+
paintBanner();
|
|
1492
|
+
}
|
|
1493
|
+
}
|
|
1494
|
+
|
|
1444
1495
|
async function loadShare() {
|
|
1445
1496
|
const seq = view.openSeq;
|
|
1446
1497
|
// A share action that answers first is newer than this read: its answer is never overwritten by this one.
|
|
@@ -1450,7 +1501,7 @@
|
|
|
1450
1501
|
try {
|
|
1451
1502
|
const body = await api(`/api/pages/${encodeURIComponent(home)}/${encodeURIComponent(id)}/share`);
|
|
1452
1503
|
if (seq !== view.openSeq || shareSeq !== view.shareSeq) return;
|
|
1453
|
-
view.share = { share: body.share, eligibility: body.eligibility, error: null };
|
|
1504
|
+
view.share = { share: body.share, eligibility: body.eligibility, error: null, teamsCheckSaid: body.teamsCheckSaid || null, teamsQuestion: body.teamsQuestion || null, teamsRetry: body.teamsRetry || null, teamsNote: null };
|
|
1454
1505
|
view.shareProgress = body.progress || null;
|
|
1455
1506
|
// A publish FloLess resumed by itself (after a restart, or the hourly catch-up) is still running: follow it until
|
|
1456
1507
|
// it settles, so the Page shows its upload and then its live link without being reopened.
|
|
@@ -1535,6 +1586,11 @@
|
|
|
1535
1586
|
if (!current()) { if (view.page?.id === id && isOpen()) void loadShare(); return null; }
|
|
1536
1587
|
view.shareSeq += 1;
|
|
1537
1588
|
const answer = err?.body;
|
|
1589
|
+
// #3927 §13.11.2 + r4-5: a Teams question that moved on comes back whole; it is drawn from this answer, never a reload.
|
|
1590
|
+
if (answer?.question && (answer.code === 'teams-check-changed' || answer.code === 'teams-check-at-bound')) {
|
|
1591
|
+
view.share = { ...(view.share || {}), teamsQuestion: answer.question, teamsCheckSaid: answer.question.said, teamsNote: personText(answer) || null, error: null };
|
|
1592
|
+
return answer.code;
|
|
1593
|
+
}
|
|
1538
1594
|
if (answer?.outcome && answer.page) {
|
|
1539
1595
|
// An answer, not a failure: the share published nothing and says why (needs a plan, too large, …), with the Page's record.
|
|
1540
1596
|
adoptShare(answer.page);
|
|
@@ -1705,6 +1761,27 @@
|
|
|
1705
1761
|
}
|
|
1706
1762
|
if (act === 'retry') { await publish({}, false); return; }
|
|
1707
1763
|
if (act === 'retry-revoke') { await shareCall('', 'DELETE'); return; }
|
|
1764
|
+
if (act === 'teams-keep') {
|
|
1765
|
+
// #3927: keeps the link without the Teams check, recorded with who and when; FloLess asks again if Teams changes.
|
|
1766
|
+
const q = view.share?.teamsQuestion;
|
|
1767
|
+
const before = view.share?.error;
|
|
1768
|
+
const outcome = await shareCall('/teams-check/keep', 'POST', q ? { expected: { rev: q.rev, shown: q.ack } } : {});
|
|
1769
|
+
if (outcome === 'kept') { toast('Link kept. FloLess asks again if Teams changes.', 'ok'); await loadShare(); }
|
|
1770
|
+
else if (outcome !== 'teams-check-changed' && outcome !== 'teams-check-at-bound') await reloadKeepingAnswerError(before);
|
|
1771
|
+
// The banner's buttons are gone once it is answered: focus goes back to the Share button, never to nowhere.
|
|
1772
|
+
if (!document.activeElement || document.activeElement === document.body || !document.activeElement.isConnected) $share.focus();
|
|
1773
|
+
return;
|
|
1774
|
+
}
|
|
1775
|
+
if (act === 'teams-restart') {
|
|
1776
|
+
// #3927 §13.11 r4-2: at the bound, keeps the link through the counted changes on the person's recorded decision.
|
|
1777
|
+
const q = view.share?.teamsQuestion;
|
|
1778
|
+
const before = view.share?.error;
|
|
1779
|
+
const outcome = await shareCall('/teams-check/start-anew', 'POST', q ? { expected: { rev: q.rev, shown: q.ack } } : {});
|
|
1780
|
+
if (outcome === 'started-anew') { toast('Teams check started anew. FloLess asks again about each new Teams change.', 'ok'); await loadShare(); }
|
|
1781
|
+
else if (outcome !== 'teams-check-changed' && outcome !== 'teams-check-at-bound') await reloadKeepingAnswerError(before);
|
|
1782
|
+
if (!document.activeElement || document.activeElement === document.body || !document.activeElement.isConnected) $share.focus();
|
|
1783
|
+
return;
|
|
1784
|
+
}
|
|
1708
1785
|
if (act === 'copy') {
|
|
1709
1786
|
try { await navigator.clipboard.writeText(s?.url || ''); toast('Link copied.', 'ok'); }
|
|
1710
1787
|
catch { $sharePop.querySelector('.pv-share-url')?.select(); toast('FloLess couldn’t copy the link. It’s selected, so copy it with Ctrl+C.', 'warn'); }
|
|
@@ -29,6 +29,8 @@
|
|
|
29
29
|
{ key: 'agents', label: 'Agents', test: (k) => k === 'agent-run-started' },
|
|
30
30
|
{ key: 'rfis', label: 'RFIs', test: (k) => k.startsWith('rfi-') },
|
|
31
31
|
{ key: 'linked', label: 'Linked projects', test: (k) => k === 'module-linked' || k === 'module-unlinked' },
|
|
32
|
+
// #4029: a clash check of the current model; its row opens that check's result in the steel editor.
|
|
33
|
+
{ key: 'checks', label: 'Model checks', test: (k) => k === 'model-clash-checked' },
|
|
32
34
|
{ key: 'requests', label: 'Requests', test: (k) => k === 'request-changed' },
|
|
33
35
|
];
|
|
34
36
|
const KNOWN = new Set(['project-created', 'knowledge-organized', 'knowledge-source-added', 'knowledge-source-removed',
|
|
@@ -38,7 +40,7 @@
|
|
|
38
40
|
'design-set-registered', 'design-set-cleared', 'design-issue-added', 'design-issue-updated', 'design-issue-withdrawn',
|
|
39
41
|
'design-issue-restored', 'workflow-created', 'workflow-compiled', 'workflow-run-finished', 'rfi-raised', 'rfi-answered',
|
|
40
42
|
'rfi-closed', 'module-linked', 'module-unlinked', 'request-changed', 'watcher-started', 'watcher-reported', 'watcher-stopped',
|
|
41
|
-
'agent-run-started']);
|
|
43
|
+
'agent-run-started', 'model-clash-checked']);
|
|
42
44
|
const OTHER = { key: 'other', label: 'Other activity' };
|
|
43
45
|
const areaOf = (entry) => {
|
|
44
46
|
const kind = String(entry?.event?.kind || '');
|
|
@@ -55,6 +57,9 @@
|
|
|
55
57
|
teams: { label: 'Teams', tip: 'Approved through the paired Teams account, on a card Flo sent there. Flo only offered it.', aria: 'Approved through the paired Teams account', pill: true },
|
|
56
58
|
};
|
|
57
59
|
const ROUTINE_TIP = 'Started by a routine on its schedule, or by Run now on that routine.';
|
|
60
|
+
const CLASH_RESULT_TIP = 'Opens this result in the model, with its findings and your decisions. Nothing is checked again.';
|
|
61
|
+
/** #4029: the check a Model checks row names, or '' (a row written by hand, or by a FloLess that named none). */
|
|
62
|
+
const clashCheckOf = (e) => (e?.event?.kind === 'model-clash-checked' && typeof e.event.checkId === 'string' && /^[0-9a-f]{64}$/.test(e.event.checkId) ? e.event.checkId : '');
|
|
58
63
|
const FAILED_TIP = 'This didn’t finish. Open the workflow or the request to see what went wrong, then try it again.';
|
|
59
64
|
// A watcher’s failed reaction or error stop (#2470 R6.5c): there is no request to open, and nothing to “try again” by hand.
|
|
60
65
|
const WATCHER_FAILED_TIPS = {
|
|
@@ -223,6 +228,9 @@
|
|
|
223
228
|
authorHtml(e.actor),
|
|
224
229
|
failed ? `<span class="rh-outcome rh-failed" tabindex="0" data-tip="${esc(WATCHER_FAILED_TIPS[e.event?.kind] || FAILED_TIP)}">Failed</span>` : '',
|
|
225
230
|
e.event?.trigger === 'routine' ? `<span class="rh-pill" tabindex="0" data-tip="${esc(ROUTINE_TIP)}">Routine</span>` : '',
|
|
231
|
+
clashCheckOf(e) ? `<button type="button" class="btn-mini rh-btn" data-ph-act="open-clash-check" data-ph-check="${esc(clashCheckOf(e))}"`
|
|
232
|
+
+ ` data-command-id="shell.project-history-open-clash-check#${esc(e.id)}" data-command-instance-label="${esc(when(e.at))}"`
|
|
233
|
+
+ ` data-tip="${esc(CLASH_RESULT_TIP)}">Open result</button>` : '',
|
|
226
234
|
].join('');
|
|
227
235
|
// The toggle's name stays the same; its state is aria-expanded. A list with any toggle keeps every time aligned.
|
|
228
236
|
const toggle = d
|
|
@@ -445,6 +453,27 @@
|
|
|
445
453
|
} finally { opening = false; }
|
|
446
454
|
}
|
|
447
455
|
|
|
456
|
+
/**
|
|
457
|
+
* #4029: open one clash check result in the project's model (the steel editor shows it in its drawer). What could not
|
|
458
|
+
* be shown is said in the shell's or the editor's own sentence, e.g. that the result is no longer kept.
|
|
459
|
+
*/
|
|
460
|
+
const CLASH_OPEN_FAILED = 'FloLess couldn’t open that result. Open the Model step and check for clashes again.';
|
|
461
|
+
let openingCheck = false;
|
|
462
|
+
async function openClashCheck(projectId, checkId, summary) {
|
|
463
|
+
if (openingCheck || !checkId) return;
|
|
464
|
+
openingCheck = true;
|
|
465
|
+
try {
|
|
466
|
+
const ws = window.flolessWorkspaces;
|
|
467
|
+
if (typeof ws?.openConnection !== 'function') throw new Error('this window cannot open the model');
|
|
468
|
+
const outcome = await ws.openConnection({ projectId, clashCheckId: checkId, ...(summary ? { clashSummary: summary } : {}) });
|
|
469
|
+
if (outcome && outcome.ok === false) toast(typeof outcome.said === 'string' && outcome.said ? outcome.said : CLASH_OPEN_FAILED, 'warn');
|
|
470
|
+
} catch (error) {
|
|
471
|
+
console.warn('[project-history] a clash check result could not be opened', error);
|
|
472
|
+
// The shell's own sentences are written for the person (`forPerson`); anything else gets the shared sentence.
|
|
473
|
+
toast(typeof errorText === 'function' ? errorText(error, { action: 'open that result' }) : CLASH_OPEN_FAILED, 'warn');
|
|
474
|
+
} finally { openingCheck = false; }
|
|
475
|
+
}
|
|
476
|
+
|
|
448
477
|
const wired = new WeakSet();
|
|
449
478
|
function wire(pane) {
|
|
450
479
|
if (wired.has(pane)) return;
|
|
@@ -463,6 +492,7 @@
|
|
|
463
492
|
if (!act) return;
|
|
464
493
|
if (act.dataset.phAct === 'detail') { toggleDetail(pane, st, act); return; }
|
|
465
494
|
if (act.dataset.phAct === 'open-workflow') { void openWorkflow(act.dataset.phWorkflow); return; }
|
|
495
|
+
if (act.dataset.phAct === 'open-clash-check') { void openClashCheck(st.projectId, act.dataset.phCheck, st.entries.find((e) => clashCheckOf(e) === act.dataset.phCheck)?.text); return; }
|
|
466
496
|
if (act.dataset.phAct === 'retry') { st.error = ''; const read = loadFirst(pane); paint(pane); void read; }
|
|
467
497
|
else if (act.dataset.phAct === 'earlier') void loadEarlier(pane);
|
|
468
498
|
else if (act.dataset.phAct === 'reread') { st.cursorGone = false; const read = loadFirst(pane); paint(pane); void read; }
|
|
@@ -17,9 +17,10 @@ input[type=number]{-moz-appearance:textfield;appearance:textfield}input[type=num
|
|
|
17
17
|
.authority-bar{height:54px;display:flex;align-items:center;gap:14px;padding:0 16px;border-bottom:1px solid var(--line);background:var(--authority-bg);position:relative;z-index:70}
|
|
18
18
|
.authority-copy{display:grid;grid-template-columns:auto auto;column-gap:9px;align-items:baseline;min-width:0}.authority-kicker{grid-row:1/3;color:var(--accent);font-size:10px;letter-spacing:.12em;text-transform:uppercase}.authority-copy strong,.source-name{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.authority-copy strong{font-size:13px}.source-name{font-size:11px;color:var(--muted);max-width:42vw;unicode-bidi:plaintext}
|
|
19
19
|
.authority-choices{display:flex;gap:4px;margin-left:auto}.authority-choices button{min-height:28px;font-size:11px}.authority-choices button[aria-pressed="true"]{color:var(--selected-ink);border-color:#3b82f6;background:var(--accent-soft)}
|
|
20
|
+
.authority-choices .authority-review-state{display:inline-flex;align-items:center;min-height:28px;padding:5px 9px;font-size:11px;border:1px solid #3b82f6;border-radius:6px;color:var(--selected-ink);background:var(--accent-soft);white-space:nowrap;max-width:260px;overflow:hidden;text-overflow:ellipsis}
|
|
20
21
|
.authority-findings{min-height:28px;font-size:11px;color:var(--muted);border-style:dashed}.authority-findings:hover{color:inherit}.authority-findings[hidden]{display:none}
|
|
21
22
|
.authority-note{display:inline-flex;align-items:center;min-height:28px;padding:5px 9px;font-size:11px;color:var(--muted);border:1px solid transparent;border-radius:6px;white-space:nowrap}.authority-note[hidden]{display:none}
|
|
22
|
-
.read-only-chip{border:1px solid var(--line);border-radius:999px;padding:3px 8px;color:var(--muted);font-size:10px;letter-spacing:.08em;text-transform:uppercase}
|
|
23
|
+
.read-only-chip{border:1px solid var(--line);border-radius:999px;padding:3px 8px;color:var(--muted);font-size:10px;letter-spacing:.08em;text-transform:uppercase;white-space:nowrap;flex-shrink:0}
|
|
23
24
|
.model-display-units{display:flex;align-items:center;gap:0;flex-shrink:0;font-size:11px}.model-display-units>span{margin-right:7px;color:var(--muted)}.model-display-units button{min-height:28px;padding:3px 8px;border-radius:0}.model-display-units button:first-of-type{border-radius:5px 0 0 5px}.model-display-units button:last-child{border-radius:0 5px 5px 0;margin-left:-1px}.model-display-units button[aria-pressed="true"]{background:var(--accent-soft);border-color:var(--accent);color:var(--text);position:relative}.model-property-coverage{margin:10px 0 0;color:var(--muted);font-size:10px;line-height:1.5}
|
|
24
25
|
.revit-imported-property .property-value{white-space:pre-wrap}
|
|
25
26
|
.model-display-units button[data-unit-choice="mm"]{border-radius:0 5px 5px 0;margin-left:-1px}.model-display-units .model-units-retry{border-radius:5px;margin-left:7px}.model-display-units .model-units-status{margin-left:7px;margin-right:0}
|
|
@@ -96,6 +97,13 @@ body:has(.editor-root[data-model-state="empty"]) .read-only-chip{display:none}
|
|
|
96
97
|
.tekla-changes-host>.tekla-audit-omissions{padding:3px 9px}
|
|
97
98
|
.tekla-changes-banner{display:flex;flex-direction:column;gap:3px;margin:6px 7px;padding:7px 8px;border:1px solid var(--line);border-left:3px solid var(--danger);border-radius:6px;background:var(--panel-2);font-size:11px;line-height:1.4}
|
|
98
99
|
.tekla-changes-banner span{color:var(--muted)}
|
|
100
|
+
.crv-witness-objects{display:flex;flex-direction:column;gap:5px;margin:3px 0 1px;padding:0;list-style:none}
|
|
101
|
+
.crv-witness-objects li{display:flex;flex-direction:column;gap:3px}
|
|
102
|
+
.tekla-changes-banner .crv-witness-objects li>span{color:var(--text);overflow-wrap:anywhere}
|
|
103
|
+
.crv-witness-choices{display:flex;flex-wrap:wrap;gap:6px;margin-top:4px}
|
|
104
|
+
.crv-witness-choices button{min-height:26px;padding:3px 10px;font-size:11px}
|
|
105
|
+
.crv-witness-choices button.primary{border-color:var(--accent);background:var(--accent-soft);color:var(--selected-ink);font-weight:600}
|
|
106
|
+
.crv-witness-kept:focus{outline:2px solid var(--accent);outline-offset:2px}
|
|
99
107
|
.tekla-changes-unchecked{margin:6px 7px;padding:6px 8px;border:1px dashed var(--line-strong);border-radius:6px}
|
|
100
108
|
.tekla-changes-unchecked strong{font-size:11px}
|
|
101
109
|
.tekla-changes-unchecked .tekla-audit-omissions{padding:3px 0}
|
|
@@ -179,5 +187,30 @@ body:has(.editor-root[data-model-state="empty"]) .read-only-chip{display:none}
|
|
|
179
187
|
.tekla-changes-banner .tekla-changes-standards-list{color:var(--text)}
|
|
180
188
|
.tekla-changes-standards-values>.tekla-changes-standards-list{max-height:14rem;overflow:auto}
|
|
181
189
|
.tekla-changes-banner .tekla-changes-finding-meta{color:var(--muted)}
|
|
190
|
+
/* Change review S5 (#3749): the Team sharing strip above the pickers. Existing tokens only, both themes; Compare stays the one primary. */
|
|
191
|
+
.tekla-changes-team{display:flex;flex-direction:column;gap:6px;margin:8px 7px 0;padding:8px;border:1px solid var(--line);border-radius:6px;background:var(--panel-2)}
|
|
192
|
+
.tekla-changes-team-title{font-size:11px}
|
|
193
|
+
.tekla-changes-team-flows{display:grid;grid-template-columns:1fr 1fr;gap:6px}
|
|
194
|
+
.tekla-changes-team-flow{display:flex;flex-direction:column;gap:2px;min-width:0}
|
|
195
|
+
.tekla-changes-team-run{min-height:28px;padding:4px 8px;font-size:11px;font-weight:600;text-align:left}
|
|
196
|
+
.tekla-changes-team-pair{color:var(--muted);font-size:10px;overflow-wrap:anywhere}
|
|
197
|
+
.tekla-changes-team-note{display:flex;flex-direction:column;gap:4px;padding:6px 8px;border:1px solid var(--line);border-radius:6px;background:var(--bg);font-size:11px;line-height:1.4}
|
|
198
|
+
.tekla-changes-team-note.warn{border-left:3px solid var(--danger)}
|
|
199
|
+
.tekla-changes-team-note:focus{outline:2px solid var(--accent);outline-offset:1px}
|
|
200
|
+
.tekla-changes-team-link{align-self:flex-start;min-height:22px;padding:1px 0;border:0;background:transparent;color:var(--accent);font-size:11px;font-weight:600}
|
|
201
|
+
.tekla-changes-team-link:hover{background:transparent;text-decoration:underline}
|
|
202
|
+
.tekla-changes-team-marking{display:flex;flex-wrap:wrap;gap:6px}
|
|
203
|
+
.tekla-changes-team-mark{flex:1 1 auto;min-height:24px;padding:3px 8px;color:var(--muted);font-size:10.5px}
|
|
204
|
+
.tekla-changes-team-mark:hover{color:var(--text)}
|
|
205
|
+
.tekla-changes-mark-panel{margin-top:0}
|
|
206
|
+
.tekla-changes-mark-panel button.primary,.tekla-changes-team .tekla-changes-banner button.primary,.tekla-changes-mark-row button.primary{min-height:26px;padding:3px 10px;border-color:var(--accent);background:var(--accent-soft);color:var(--selected-ink);font-weight:600;font-size:11px}
|
|
207
|
+
.tekla-changes-team-answer{min-height:26px;padding:3px 9px;font-size:11px}
|
|
208
|
+
.tekla-changes-team .tekla-changes-banner{margin:0}
|
|
209
|
+
.tekla-changes-marks>summary{cursor:pointer;padding:2px 0;color:var(--muted);font-size:10.5px;font-weight:600}
|
|
210
|
+
.tekla-changes-mark-row{display:flex;flex-direction:column;gap:2px;margin-top:5px;padding:5px 7px;border:1px solid var(--line);border-radius:5px;background:var(--bg);font-size:11px}
|
|
211
|
+
.tekla-changes-mark-row>span{color:var(--muted);font-size:10.5px;overflow-wrap:anywhere}
|
|
212
|
+
.tekla-changes-mark-chip{align-self:flex-start;margin-top:2px}
|
|
213
|
+
.tekla-changes-flow-line{margin:4px 9px;padding:6px 8px;border-left:3px solid var(--line-strong);border-radius:0 5px 5px 0;background:var(--panel-2);font-size:11px;line-height:1.45}
|
|
214
|
+
@media (max-width:420px){.tekla-changes-team-flows{grid-template-columns:1fr}}
|
|
182
215
|
/* #3539: a paged model's Inspect states (loading, could not load + Try again, cut short, labels left out). */
|
|
183
216
|
.insp-paged-note{padding:2px 0;color:var(--muted)}.insp-paged-note.loading{min-height:1.45em}.insp-paged-note:focus{outline:none}.insp-paged-note:focus-visible{outline:2px solid var(--accent);outline-offset:2px}.insp-paged-note p{margin:0 0 10px;line-height:1.45}.insp-paged-note p:last-child{margin-bottom:0}
|