@floless/app 0.136.0 → 0.137.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/floless-server.cjs +341 -139
- package/dist/schemas/steel.model.v2.schema.json +7 -6
- package/dist/skills/floless-app-steel-model/SKILL.md +13 -12
- package/dist/skills/floless-app-steel-takeoff/SKILL.md +14 -16
- package/dist/skills/floless-app-steel-takeoff/references/elevation-registration.md +28 -1
- package/dist/web/steel-editor.html +388 -60
- package/dist/web/steel-model-v2-client-validation.js +16 -3
- package/dist/web/steel-model-v2-commands.js +74 -63
- package/dist/web/steel-model-v2-projection.js +86 -22
- package/dist/web/steel-plan-transform.js +34 -20
- package/dist/web/steel-plan-view-id.js +140 -0
- package/dist/web/steel-view-generation.js +2 -1
- package/dist/web/workspaces.js +7 -2
- package/package.json +2 -1
|
@@ -33,6 +33,20 @@ export class PlanTransformError extends Error {
|
|
|
33
33
|
}
|
|
34
34
|
}
|
|
35
35
|
|
|
36
|
+
/**
|
|
37
|
+
* How a registration refusal NAMES the view it is about.
|
|
38
|
+
*
|
|
39
|
+
* Defaults to `sheet "S5.1"`, which is exactly what every one of these messages said before #938, so
|
|
40
|
+
* no existing refusal churns. A caller that KNOWS the page carries more than one view passes the
|
|
41
|
+
* disambiguated label instead — the module cannot work that out for itself, because the rule is a
|
|
42
|
+
* sibling count and a transform is handed one row.
|
|
43
|
+
*
|
|
44
|
+
* Without this, two elevations on one page produced character-identical refusals and an author could
|
|
45
|
+
* not tell which of them to go and fix. (Found by review — the fifth surface in this change where a
|
|
46
|
+
* view was named locally rather than by `planViewLabels`.)
|
|
47
|
+
*/
|
|
48
|
+
const subjectOf = (plan, subject) => subject || `sheet "${quote(plan && plan.sheet)}"`;
|
|
49
|
+
|
|
36
50
|
const refuse = (code, message, plan) => {
|
|
37
51
|
throw new PlanTransformError(code, message, plan && plan.viewKind);
|
|
38
52
|
};
|
|
@@ -86,9 +100,9 @@ const quote = (value) => clipQuoted(value);
|
|
|
86
100
|
*
|
|
87
101
|
* A duplicate id is still ambiguous and still refuses rather than quietly taking the first match.
|
|
88
102
|
*/
|
|
89
|
-
function gridIntersection(grid, ref, plan, field) {
|
|
103
|
+
function gridIntersection(grid, ref, plan, field, subject) {
|
|
90
104
|
if (!grid || typeof grid !== 'object') {
|
|
91
|
-
return refuse('grid-unavailable',
|
|
105
|
+
return refuse('grid-unavailable', `${subjectOf(plan, subject)} has no model grid to resolve its registration controls`, plan);
|
|
92
106
|
}
|
|
93
107
|
// A grid that carries axes, spacings and labels but no `origin` used to share the message above, and
|
|
94
108
|
// it sent authors back to the half they had already filled in (#925). `$.grid.origin` is optional in
|
|
@@ -97,18 +111,18 @@ function gridIntersection(grid, ref, plan, field) {
|
|
|
97
111
|
if (!finite2(grid.origin)) {
|
|
98
112
|
return refuse(
|
|
99
113
|
'grid-unavailable',
|
|
100
|
-
|
|
114
|
+
`${subjectOf(plan, subject)} cannot resolve its registration controls: $.grid.origin is missing or unreadable — it must be two finite world-mm numbers giving where the first x and y grid axes cross`,
|
|
101
115
|
plan,
|
|
102
116
|
);
|
|
103
117
|
}
|
|
104
118
|
if (!ref || typeof ref !== 'object' || typeof ref.xAxisId !== 'string' || typeof ref.yAxisId !== 'string') {
|
|
105
|
-
return refuse('control-ref-invalid',
|
|
119
|
+
return refuse('control-ref-invalid', `${subjectOf(plan, subject)} has an unreadable ${field}: a registration control needs string xAxisId and yAxisId grid axis ids`, plan);
|
|
106
120
|
}
|
|
107
121
|
|
|
108
122
|
const X = parseSpacings(grid.x), Y = parseSpacings(grid.y);
|
|
109
123
|
if (X.err || Y.err) {
|
|
110
124
|
const bad = X.err ? '$.grid.x' : '$.grid.y';
|
|
111
|
-
return refuse('grid-spacing-invalid',
|
|
125
|
+
return refuse('grid-spacing-invalid', `${subjectOf(plan, subject)} cannot use ${bad}: ${quote(X.err || Y.err)}`, plan);
|
|
112
126
|
}
|
|
113
127
|
// Authored order per direction, which is the order `parseSpacings` produces offsets in — the axis at
|
|
114
128
|
// slot i owns offset i. A direction whose axis rows and offsets disagree in count is not describable,
|
|
@@ -125,7 +139,7 @@ function gridIntersection(grid, ref, plan, field) {
|
|
|
125
139
|
if (xi < 0 || yi < 0) {
|
|
126
140
|
return refuse(
|
|
127
141
|
'control-ref-unresolved',
|
|
128
|
-
|
|
142
|
+
`${subjectOf(plan, subject)} ${field} names ${quote(ref.xAxisId)}/${quote(ref.yAxisId)}, which is not exactly one x and one y axis id on the model grid`,
|
|
129
143
|
plan,
|
|
130
144
|
);
|
|
131
145
|
}
|
|
@@ -138,33 +152,33 @@ function gridIntersection(grid, ref, plan, field) {
|
|
|
138
152
|
* `plan.grid` is the model grid exposed through the projection (canonical ModelPlan intentionally has
|
|
139
153
|
* no grid property). `datum_ref` may be absent only for the explicit "datum_at is world origin" case.
|
|
140
154
|
*/
|
|
141
|
-
export function planTransform(plan) {
|
|
155
|
+
export function planTransform(plan, subject) {
|
|
142
156
|
const kind = plan && plan.viewKind;
|
|
143
157
|
if (kind !== 'plan') {
|
|
144
158
|
const named = typeof kind === 'string' && kind ? quote(kind) : 'unknown';
|
|
145
159
|
return refuse(
|
|
146
160
|
'view-kind-unsupported',
|
|
147
|
-
|
|
161
|
+
`${subjectOf(plan, subject)} is a ${named} view; ${named} views are not supported by the plan transform`,
|
|
148
162
|
plan,
|
|
149
163
|
);
|
|
150
164
|
}
|
|
151
165
|
if (!finite2(plan.datum_at) || !finite2(plan.control2_at) || !plan.control2_ref) {
|
|
152
166
|
return refuse(
|
|
153
167
|
'registration-incomplete',
|
|
154
|
-
|
|
168
|
+
`${subjectOf(plan, subject)} needs $.datum_at, $.control2_at and $.control2_ref before it can be edited`,
|
|
155
169
|
plan,
|
|
156
170
|
);
|
|
157
171
|
}
|
|
158
172
|
const ptPerFt = Number(plan.pt_per_ft);
|
|
159
173
|
if (!(ptPerFt > 0) || !Number.isFinite(ptPerFt)) {
|
|
160
|
-
return refuse('scale-invalid',
|
|
174
|
+
return refuse('scale-invalid', `${subjectOf(plan, subject)} has no positive $.pt_per_ft, so it has no drawing scale`, plan);
|
|
161
175
|
}
|
|
162
176
|
|
|
163
177
|
// Editor projections expose a display-space `grid` because grid-core draws in pixels. The canonical
|
|
164
178
|
// world grid rides beside it as `modelGrid`; standalone callers and stored-plan fixtures use `grid`.
|
|
165
179
|
const registrationGrid = plan.modelGrid || plan.grid;
|
|
166
|
-
const world0 = plan.datum_ref ? gridIntersection(registrationGrid, plan.datum_ref, plan, '$.datum_ref') : [0, 0];
|
|
167
|
-
const world1 = gridIntersection(registrationGrid, plan.control2_ref, plan, '$.control2_ref');
|
|
180
|
+
const world0 = plan.datum_ref ? gridIntersection(registrationGrid, plan.datum_ref, plan, '$.datum_ref', subject) : [0, 0];
|
|
181
|
+
const world1 = gridIntersection(registrationGrid, plan.control2_ref, plan, '$.control2_ref', subject);
|
|
168
182
|
// The shared plan scale. Its zero/negative fallback is unreachable here — the guard above already
|
|
169
183
|
// refused any sheet whose `pt_per_ft` is not a positive finite number — so this is the same value
|
|
170
184
|
// the inline `FT_MM / ptPerFt` produced, from the one implementation.
|
|
@@ -180,14 +194,14 @@ export function planTransform(plan) {
|
|
|
180
194
|
// refs are fine, or the refs can resolve to one intersection while the display points differ. Naming
|
|
181
195
|
// the wrong pair sends the author to fields that are already correct (#925's own failure mode).
|
|
182
196
|
if (!(localLen > 1e-9)) {
|
|
183
|
-
return refuse('registration-degenerate',
|
|
197
|
+
return refuse('registration-degenerate', `${subjectOf(plan, subject)} has coincident registration controls: $.datum_at and $.control2_at are the same point on the sheet`, plan);
|
|
184
198
|
}
|
|
185
199
|
if (!(worldLen > 1e-9)) {
|
|
186
200
|
// `datum_ref` is ABSENT for the "datum_at is the model origin" case, and naming a field that is
|
|
187
201
|
// not there is the same wrong-half misdirection this refusal exists to avoid.
|
|
188
202
|
const datum = plan.datum_ref ? '$.datum_ref and $.control2_ref resolve to the same grid intersection'
|
|
189
203
|
: '$.control2_ref resolves to the model origin, which is where an absent $.datum_ref already puts the datum';
|
|
190
|
-
return refuse('registration-degenerate',
|
|
204
|
+
return refuse('registration-degenerate', `${subjectOf(plan, subject)} has coincident registration controls: ${datum}`, plan);
|
|
191
205
|
}
|
|
192
206
|
// THE SPAN INVARIANT. `fitScale` corrects a sub-point pick error; it is not evidence the registration
|
|
193
207
|
// is right, and a RATIO band cannot be made into that evidence. On a 14-axis grid there are 13 bays,
|
|
@@ -203,7 +217,7 @@ export function planTransform(plan) {
|
|
|
203
217
|
if (Math.abs(actualSpanPt - expectedSpanPt) > REGISTRATION_SPAN_TOLERANCE_PT) {
|
|
204
218
|
return refuse(
|
|
205
219
|
'registration-span-mismatch',
|
|
206
|
-
|
|
220
|
+
`${subjectOf(plan, subject)} registration controls span ${round2(actualSpanPt)} pt on the sheet, but ${plan.datum_ref ? '$.datum_ref' : 'the model origin'} and $.control2_ref are ${round2(worldLen)} mm apart, which at ${plan.pt_per_ft} pt/ft is ${round2(expectedSpanPt)} pt — a difference of ${round2(Math.abs(actualSpanPt - expectedSpanPt))} pt, past the ${REGISTRATION_SPAN_TOLERANCE_PT} pt allowed. Either a control names the wrong grid axis or $.pt_per_ft is wrong`,
|
|
207
221
|
plan,
|
|
208
222
|
);
|
|
209
223
|
}
|
|
@@ -212,17 +226,17 @@ export function planTransform(plan) {
|
|
|
212
226
|
const c = Math.cos(rotation) * fitScale;
|
|
213
227
|
const s = Math.sin(rotation) * fitScale;
|
|
214
228
|
if (![c, s, fitScale, world0[0], world0[1]].every(Number.isFinite)) {
|
|
215
|
-
return refuse('registration-invalid',
|
|
229
|
+
return refuse('registration-invalid', `${subjectOf(plan, subject)} has a non-finite registration transform`, plan);
|
|
216
230
|
}
|
|
217
231
|
return { datumPx: plan.datum_at, world0, mmPerPx: scale, fitScale, rotation, c, s };
|
|
218
232
|
}
|
|
219
233
|
|
|
220
234
|
/** Canonical world-mm work point → this plan's display px. */
|
|
221
|
-
export function worldToSheetPx(workPoint, plan) {
|
|
235
|
+
export function worldToSheetPx(workPoint, plan, subject) {
|
|
222
236
|
if (!workPoint || !Number.isFinite(workPoint.x) || !Number.isFinite(workPoint.y)) {
|
|
223
237
|
return refuse('work-point-invalid', 'a work point needs finite world x/y coordinates', plan);
|
|
224
238
|
}
|
|
225
|
-
const t = planTransform(plan);
|
|
239
|
+
const t = planTransform(plan, subject);
|
|
226
240
|
const wx = workPoint.x - t.world0[0], wy = workPoint.y - t.world0[1];
|
|
227
241
|
const det = t.c * t.c + t.s * t.s;
|
|
228
242
|
const localX = (t.c * wx + t.s * wy) / det;
|
|
@@ -234,9 +248,9 @@ export function worldToSheetPx(workPoint, plan) {
|
|
|
234
248
|
}
|
|
235
249
|
|
|
236
250
|
/** This plan's display px → canonical world-mm work point, retaining the endpoint's elevation union. */
|
|
237
|
-
export function sheetPxToWorld(point, plan, keepZ) {
|
|
251
|
+
export function sheetPxToWorld(point, plan, keepZ, subject) {
|
|
238
252
|
if (!finite2(point)) return refuse('sheet-point-invalid', 'a sheet point needs two finite pixel coordinates', plan);
|
|
239
|
-
const t = planTransform(plan);
|
|
253
|
+
const t = planTransform(plan, subject);
|
|
240
254
|
const localX = (point[0] - t.datumPx[0]) * t.mmPerPx;
|
|
241
255
|
const localY = (t.datumPx[1] - point[1]) * t.mmPerPx;
|
|
242
256
|
return {
|
|
@@ -0,0 +1,140 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* A `plans[]` row is ONE DRAWING VIEW. Its identity is `id`; its `sheet` is the physical page (#938).
|
|
3
|
+
*
|
|
4
|
+
* Those were the same string until #938, and the conflation had a consequence: five braced-frame
|
|
5
|
+
* elevations on one sheet — ordinary practice — had no legal representation at all. `sheet` was unique
|
|
6
|
+
* across rows, one row carries one `sourceRegistration`, one `viewKind` and one `pt_per_ft`, and an
|
|
7
|
+
* observation must live on the plan whose sheet its evidence cites. Nothing in that combination can say
|
|
8
|
+
* "five views, five frames, one page".
|
|
9
|
+
*
|
|
10
|
+
* SO THE TWO MEANINGS ARE SEPARATED, and the split is the whole change:
|
|
11
|
+
*
|
|
12
|
+
* PHYSICAL SHEET — the page. Not unique. Owns the raster, the Drawing Filter binding, the page
|
|
13
|
+
* previews, the detail bubbles, the callout targets, and `evidence.source.sheet` provenance.
|
|
14
|
+
*
|
|
15
|
+
* VIEW ID — the row. Model-global unique. Owns the registration, the drawing scale, the view kind,
|
|
16
|
+
* the endpoint analysis scope, the projection caches, the revision pairing and the editor selection.
|
|
17
|
+
*
|
|
18
|
+
* `id` IS OPTIONAL IN THE SCHEMA, and a row with no `id` means "my sheet name is my view id" — which
|
|
19
|
+
* is what every document written before #938 says. It stays optional because `checkModelReferences`
|
|
20
|
+
* is a READ gate as well as a write one (`readModelOrIssues` returns no view at all when it reports
|
|
21
|
+
* anything, and that backs approve/compile, BOM export, the 3D scene and the diff), so REQUIRING it
|
|
22
|
+
* would have stopped every stored project opening — including the very read that motivated #938.
|
|
23
|
+
*
|
|
24
|
+
* SO IT IS NORMALISED AT THE DOOR — `normalisePlanViewIds` (`server/steel-plan-view-id-normalise.ts`)
|
|
25
|
+
* materialises `id = sheet` on the way in and on the way out, exactly where `normaliseRollMarkers`
|
|
26
|
+
* runs and for exactly its reason. That is not politeness towards old files either: three places
|
|
27
|
+
* compare document BYTES rather than resolved identity — revision staging, the initial-read
|
|
28
|
+
* transaction's registration hash, and approval diffing — so leaving `{sheet:"S1"}` and
|
|
29
|
+
* `{sheet:"S1", id:"S1"}` as two encodings of one meaning would produce a spurious refusal, a
|
|
30
|
+
* `shell-changed`, or a phantom approval diff. Normalising BOTH sides removes the difference instead
|
|
31
|
+
* of teaching every comparison about it.
|
|
32
|
+
*
|
|
33
|
+
* THIS ACCESSOR IS STILL NEEDED, and is not a second mechanism. Two domains never see a normalised
|
|
34
|
+
* document: the BROWSER, which is served the stored bytes, and the deliberately-unvalidated input
|
|
35
|
+
* that `checkModelReferences` and revision staging accept. `planViewId` is what makes those total.
|
|
36
|
+
*/
|
|
37
|
+
|
|
38
|
+
/**
|
|
39
|
+
* This row's view identity. `id` when authored, else the sheet name.
|
|
40
|
+
*
|
|
41
|
+
* @param {{id?: unknown, sheet?: unknown} | null | undefined} plan
|
|
42
|
+
* @returns {string} the resolved view id, or `''` when the row states neither.
|
|
43
|
+
*/
|
|
44
|
+
export function planViewId(plan) {
|
|
45
|
+
const id = plan && typeof plan === 'object' ? plan.id : undefined;
|
|
46
|
+
if (typeof id === 'string' && id.trim() !== '') return id;
|
|
47
|
+
const sheet = plan && typeof plan === 'object' ? plan.sheet : undefined;
|
|
48
|
+
return typeof sheet === 'string' ? sheet : '';
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
/** Did this row state its view id explicitly? Used where absence is the thing being judged. */
|
|
52
|
+
export function hasExplicitViewId(plan) {
|
|
53
|
+
const id = plan && typeof plan === 'object' ? plan.id : undefined;
|
|
54
|
+
return typeof id === 'string' && id.trim() !== '';
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
/**
|
|
58
|
+
* The RAW resolver, for the two places that read a document before anything has vouched for it:
|
|
59
|
+
* `checkModelReferences(doc: unknown)` and revision staging, both of which accept unvalidated input
|
|
60
|
+
* on purpose.
|
|
61
|
+
*
|
|
62
|
+
* It returns `null` rather than `''` when the row states neither a usable `id` nor a usable `sheet`,
|
|
63
|
+
* and that distinction is load-bearing: `''` is a value, so several malformed rows would COLLIDE
|
|
64
|
+
* with each other and report a duplicate-identity issue that describes nothing real, burying the
|
|
65
|
+
* actual fault (a missing sheet) under a fabricated one. `null` is never equal to anything, so a
|
|
66
|
+
* malformed row is diagnosed as itself.
|
|
67
|
+
*
|
|
68
|
+
* @param {unknown} plan @returns {string | null}
|
|
69
|
+
*/
|
|
70
|
+
export function rawPlanViewId(plan) {
|
|
71
|
+
if (!plan || typeof plan !== 'object' || Array.isArray(plan)) return null;
|
|
72
|
+
const row = /** @type {{id?: unknown, sheet?: unknown}} */ (plan);
|
|
73
|
+
if (row.id !== undefined) {
|
|
74
|
+
// A row that STATED an id, badly, has no identity — falling through to its sheet would invent one,
|
|
75
|
+
// and that invented identity then collides with a perfectly valid sibling and reports a duplicate
|
|
76
|
+
// against the row that is fine. `normalisePlanViewIds` leaves a present-but-invalid `id` alone for
|
|
77
|
+
// exactly this reason (so the schema can refuse it); this must agree with it. (Found by review.)
|
|
78
|
+
//
|
|
79
|
+
// `null` is one of those bad values, not an absence — it was exempted here in the first cut, which
|
|
80
|
+
// made this the one malformed id the pair disagreed about: the normaliser preserved it (so the row
|
|
81
|
+
// stayed refusable) while this resolver read straight past it to `sheet` and handed back an
|
|
82
|
+
// identity the row never stated. Only `undefined` means "states no id". (Found by review.)
|
|
83
|
+
return typeof row.id === 'string' && row.id.trim() !== '' ? row.id : null;
|
|
84
|
+
}
|
|
85
|
+
if (typeof row.sheet === 'string' && row.sheet.trim() !== '') return row.sheet;
|
|
86
|
+
return null;
|
|
87
|
+
}
|
|
88
|
+
|
|
89
|
+
/**
|
|
90
|
+
* How to NAME each view to a human — never how to identify one. THE one rule: the server's refusal
|
|
91
|
+
* messages take it too (`member-end-centerline-report.ts`), so one view cannot be called two things.
|
|
92
|
+
*
|
|
93
|
+
* PLURAL, and it has to be: the label is the page name when that page carries ONE view and must
|
|
94
|
+
* disambiguate when it carries several, and no single-row function can know its siblings. (The first
|
|
95
|
+
* cut was `planViewLabel(plan)` and could not satisfy its own contract; review caught it.)
|
|
96
|
+
*
|
|
97
|
+
* A page with one view therefore reads exactly as it did before #938, which is why no existing
|
|
98
|
+
* label, toast or refusal message churns.
|
|
99
|
+
*
|
|
100
|
+
* @param {readonly unknown[] | null | undefined} plans
|
|
101
|
+
* @returns {Map<string, string>} resolved view id -> display label
|
|
102
|
+
*/
|
|
103
|
+
export function planViewLabels(plans) {
|
|
104
|
+
const rows = Array.isArray(plans) ? plans : [];
|
|
105
|
+
const perSheet = new Map();
|
|
106
|
+
for (const plan of rows) {
|
|
107
|
+
const sheet = plan && typeof plan === 'object' && typeof plan.sheet === 'string' ? plan.sheet : '';
|
|
108
|
+
perSheet.set(sheet, (perSheet.get(sheet) ?? 0) + 1);
|
|
109
|
+
}
|
|
110
|
+
const labels = new Map();
|
|
111
|
+
rows.forEach((plan, index) => {
|
|
112
|
+
const viewId = planViewId(plan);
|
|
113
|
+
const sheet = plan && typeof plan === 'object' && typeof plan.sheet === 'string' ? plan.sheet : '';
|
|
114
|
+
/*
|
|
115
|
+
* A row that names NEITHER a page nor a view resolves to `''`, and several such rows would then
|
|
116
|
+
* share one Map key — the last one written silently becoming every earlier one's label. Worse, the
|
|
117
|
+
* registration-refusal popover builds `data-command-id="steel.registration-select#<label>"` from
|
|
118
|
+
* this string, so two distinct refused views would render two buttons carrying the SAME command id.
|
|
119
|
+
* A document like that is refused by `plan-view-id-duplicate` before it can be stored, but a draft
|
|
120
|
+
* mid-edit and a harness both still render one. Keyed on its position so it stays distinct, under a
|
|
121
|
+
* sentinel no authored id can collide with; the TEXT is the positional fallback either way, so
|
|
122
|
+
* nothing about the ordinary case changes. (Found by UX review.)
|
|
123
|
+
*/
|
|
124
|
+
if (!sheet) { labels.set(viewId || `\u0000view${index}`, viewId || `view ${index + 1}`); return; }
|
|
125
|
+
/*
|
|
126
|
+
* ONE condition: does this PAGE carry more than one view. The first cut also required
|
|
127
|
+
* `viewId !== sheet`, which left a LEGAL mixed page — one row unnamed, its sibling named — showing
|
|
128
|
+
* the unnamed one as the bare page name beside a disambiguated sibling. The whole contract of this
|
|
129
|
+
* function is "disambiguate when the page carries several", so the sibling count is the only thing
|
|
130
|
+
* that may decide it. (Found by review.)
|
|
131
|
+
*
|
|
132
|
+
* A row on a shared page whose id IS the page name therefore reads `"S5.1 · S5.1"`. Redundant,
|
|
133
|
+
* and deliberately not special-cased: it is what that row is actually called, it stays
|
|
134
|
+
* distinguishable from its named sibling, and it looks as unfinished as it is — the reference
|
|
135
|
+
* guidance tells a reader to name every row on a page that carries several.
|
|
136
|
+
*/
|
|
137
|
+
labels.set(viewId, (perSheet.get(sheet) ?? 0) > 1 ? `${sheet} · ${viewId}` : sheet);
|
|
138
|
+
});
|
|
139
|
+
return labels;
|
|
140
|
+
}
|
|
@@ -180,7 +180,8 @@ export function nameForSource(source) {
|
|
|
180
180
|
* autosave — so it may reject what `$defs.viewGenerated` cannot hold and nothing else.
|
|
181
181
|
*
|
|
182
182
|
* BOTH IDENTITY-BEARING STRINGS ARE CARRIED BYTE-FOR-BYTE. `axisId` resolves against
|
|
183
|
-
* `grid.axes[].id
|
|
183
|
+
* `grid.axes[].id`, and `sheet` against the PAGES the plan rows were read from — physical provenance,
|
|
184
|
+
* never a view lookup, so a page carrying several views satisfies it once (#938) (`checkModelReferences` →
|
|
184
185
|
* `view-generated-unresolved` for either), and neither carries a `maxLength`, so clamping one turns
|
|
185
186
|
* a reference that resolved into one the server refuses. That is the same narrowing this file's
|
|
186
187
|
* neighbours were corrected for — the clamped id, the trimmed id (#853) — and the earlier revision
|
package/dist/web/workspaces.js
CHANGED
|
@@ -6355,7 +6355,12 @@
|
|
|
6355
6355
|
// is named from its subject.
|
|
6356
6356
|
const rf = p.kind === 'model-changed' ? rootField(p.key) : null;
|
|
6357
6357
|
head.appendChild(revEl('span', 'rev-kind-badge', rf ? rf.badge : (KIND_LABEL[p.kind] || p.kind)));
|
|
6358
|
-
|
|
6358
|
+
// A plan proposal is titled by `viewLabel`, which the SERVER computes with `planViewLabels` (#938).
|
|
6359
|
+
// The rule needs sibling context — a page's name is enough when it carries one view and must be
|
|
6360
|
+
// disambiguated when it carries several — which a single proposal row does not have, so re-deriving
|
|
6361
|
+
// it here produced a different name for the same view than every other surface shows.
|
|
6362
|
+
const planTitle = p.viewLabel || p.sheet || p.viewId || '';
|
|
6363
|
+
const title = revEl('span', 'rev-row-title', rf ? rf.title : (p.memberId || planTitle));
|
|
6359
6364
|
title.id = `${id}-title`;
|
|
6360
6365
|
head.appendChild(title);
|
|
6361
6366
|
main.appendChild(head);
|
|
@@ -6465,7 +6470,7 @@
|
|
|
6465
6470
|
desc.push(on);
|
|
6466
6471
|
}
|
|
6467
6472
|
} else if (p.kind === 'plan-added') {
|
|
6468
|
-
const keys = Object.keys(p.plan || {}).filter((k) => k !== 'sheet');
|
|
6473
|
+
const keys = Object.keys(p.plan || {}).filter((k) => k !== 'sheet' && k !== 'id');
|
|
6469
6474
|
desc.push(revEl('div', 'rev-row-sub', keys.length ? `${keys.length} field${keys.length > 1 ? 's' : ''}: ${keys.slice(0, 6).map(prettyKey).join(', ')}${keys.length > 6 ? '…' : ''}` : 'a new sheet'));
|
|
6470
6475
|
// The omission is NAMED. A reviewer who cannot see the page image should be told it comes with
|
|
6471
6476
|
// the sheet, rather than left to read the field list as complete.
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@floless/app",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.137.0",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"description": "Thin localhost host for floless.app — serves web/ and shells the aware CLI. No engine, no LLM.",
|
|
6
6
|
"bin": {
|
|
@@ -33,6 +33,7 @@
|
|
|
33
33
|
"verify:flo": "node build/verify-flo-descriptions.mjs",
|
|
34
34
|
"verify:aisc": "node build/verify-aisc-table.mjs",
|
|
35
35
|
"verify:flo-naming": "node build/verify-flo-naming.mjs",
|
|
36
|
+
"verify:forward-merge": "node build/verify-forward-merge.mjs",
|
|
36
37
|
"verify:no-title": "node build/verify-no-title.mjs",
|
|
37
38
|
"verify:native-steel": "node build/verify-native-steel.mjs",
|
|
38
39
|
"verify:no-native-select": "node build/verify-no-native-select.mjs",
|