@floless/app 0.135.0 → 0.136.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 +890 -263
- package/dist/schemas/steel.model.v2.schema.json +11 -11
- package/dist/skills/floless-app-report-issue/SKILL.md +46 -9
- package/dist/skills/floless-app-steel-takeoff/SKILL.md +57 -59
- package/dist/skills/floless-app-steel-takeoff/references/elevation-registration.md +92 -0
- package/dist/templates/steel-model.flo +44 -4
- package/dist/web/aware-update-client.js +137 -25
- package/dist/web/aware.js +269 -28
- package/dist/web/commands-shell.js +35 -4
- package/dist/web/commands-steel.js +6 -0
- package/dist/web/instructor.js +1 -0
- package/dist/web/steel-editor.html +238 -13
- package/dist/web/steel-model-v2-client-validation.js +20 -14
- package/dist/web/steel-model-v2-commands.js +8 -23
- package/dist/web/steel-model-v2-projection.js +96 -3
- package/dist/web/steel-plan-transform.js +123 -25
- package/package.json +1 -1
package/dist/web/aware.js
CHANGED
|
@@ -3904,7 +3904,7 @@
|
|
|
3904
3904
|
const $dont = document.getElementById('confirm-dont-save');
|
|
3905
3905
|
const $cancel = document.getElementById('confirm-cancel');
|
|
3906
3906
|
$save.textContent = (actionLabels && actionLabels.confirm) || 'Save';
|
|
3907
|
-
$dont.textContent = (actionLabels && actionLabels.discard) || 'Don
|
|
3907
|
+
$dont.textContent = (actionLabels && actionLabels.discard) || 'Don’t save';
|
|
3908
3908
|
$cancel.textContent = (actionLabels && actionLabels.cancel) || 'Cancel';
|
|
3909
3909
|
$dont.hidden = !!(actionLabels && actionLabels.hideDiscard);
|
|
3910
3910
|
$title.textContent = titleMsg || 'Unsaved input changes'; // reset each call (default = the inputs-switch copy)
|
|
@@ -6126,12 +6126,35 @@
|
|
|
6126
6126
|
* static markup default says an AWARE *upgrade* is available, so a pill that reaches this state
|
|
6127
6127
|
* without passing through an offer branch would otherwise hover-explain the wrong thing entirely.
|
|
6128
6128
|
*/
|
|
6129
|
+
/**
|
|
6130
|
+
* ONE definition of the unfinished-update pill, because two surfaces reach it: the check-driven
|
|
6131
|
+
* paint (a marker is outstanding) and the attention paint (a recovery failed). Two literals would
|
|
6132
|
+
* drift, and the single-painter guard exists precisely to stop that.
|
|
6133
|
+
*/
|
|
6134
|
+
const AWARE_RECOVERY_PILL = 'AWARE update needs finishing';
|
|
6135
|
+
const AWARE_RECOVERY_PILL_TIP = "An earlier AWARE update didn't finish — open this to pick it up";
|
|
6136
|
+
|
|
6129
6137
|
function paintAwareAttentionPill() {
|
|
6130
6138
|
if (!$awareUpdate) return;
|
|
6139
|
+
// The KIND is derived here rather than passed in, so this stays the single painter and every
|
|
6140
|
+
// existing caller keeps its signature. Widening awareNeedsAttention to cover a failed recovery
|
|
6141
|
+
// would otherwise have announced "Installed bridges need attention" for an unfinished UPDATE —
|
|
6142
|
+
// the exact class of lie the comments around this pill were written to kill.
|
|
6143
|
+
const live = window.awareUpdateController && window.awareUpdateController.getState();
|
|
6144
|
+
// `|| awareUpgradeOperation` to MATCH awareNeedsAttention exactly. Without it the predicate
|
|
6145
|
+
// said "this needs attention" for a recovery while the painter said "bridges", and a refused
|
|
6146
|
+
// start — which carried no operation — landed on the bridge label every time.
|
|
6147
|
+
const recovery = !!live && live.status === 'runtime-failed'
|
|
6148
|
+
&& (live.operation || awareUpgradeOperation) === 'maintenance-recovery';
|
|
6131
6149
|
$awareUpdate.hidden = false;
|
|
6132
6150
|
$awareUpdate.disabled = false;
|
|
6133
|
-
|
|
6134
|
-
|
|
6151
|
+
// No ↑ on either: that glyph means "a runtime upgrade is on offer", and neither of these is one.
|
|
6152
|
+
// The command id moves with the label, or Instructor narrates the wrong job from the registry.
|
|
6153
|
+
$awareUpdate.dataset.commandId = recovery ? 'shell.aware-update-finish' : 'shell.aware-update';
|
|
6154
|
+
$awareUpdate.textContent = recovery ? AWARE_RECOVERY_PILL : 'Installed bridges need attention';
|
|
6155
|
+
$awareUpdate.dataset.tip = recovery
|
|
6156
|
+
? AWARE_RECOVERY_PILL_TIP
|
|
6157
|
+
: 'A bridge repair did not finish — open it to see which bridge and try again';
|
|
6135
6158
|
$awareUpdate.setAttribute('aria-haspopup', 'dialog');
|
|
6136
6159
|
}
|
|
6137
6160
|
|
|
@@ -6142,9 +6165,14 @@
|
|
|
6142
6165
|
* `runtime-failed` on a runtime UPGRADE is the upgrade failing — labelling that "Installed
|
|
6143
6166
|
* bridges need attention" would be the same class of lie this change set out to remove, and the
|
|
6144
6167
|
* ordinary re-check below correctly re-offers the upgrade instead.
|
|
6168
|
+
*
|
|
6169
|
+
* A failed `maintenance-recovery` belongs here too, and for a sharper reason: an unfinished
|
|
6170
|
+
* update blocks every later one, so a pill that quietly fell through to the release-notes
|
|
6171
|
+
* popover would leave the user with no route back to the only action that unblocks them.
|
|
6145
6172
|
*/
|
|
6146
6173
|
const awareNeedsAttention = (s) => !!s && (s.status === 'partial'
|
|
6147
|
-
|| (s.status === 'runtime-failed'
|
|
6174
|
+
|| (s.status === 'runtime-failed'
|
|
6175
|
+
&& ['bridge-repair', 'maintenance-recovery'].includes(s.operation || awareUpgradeOperation)));
|
|
6148
6176
|
|
|
6149
6177
|
/**
|
|
6150
6178
|
* True when the live job state owns the pill and this generic re-check must keep its hands off.
|
|
@@ -6175,8 +6203,20 @@
|
|
|
6175
6203
|
// opened. paintAwareUpgrade is also driven by the client subscription (a server-started job
|
|
6176
6204
|
// never opens the modal), so without this a stale set from an earlier open could be named.
|
|
6177
6205
|
awareUpgradeInventory = awareInventoryOf(awareUpdateCheck);
|
|
6178
|
-
if (r.ok && d.
|
|
6206
|
+
if (r.ok && d.recoveryPending) {
|
|
6207
|
+
// OUTRANKS both offers, because an unfinished update blocks them: starting one is what the
|
|
6208
|
+
// server does with this click either way. A machine already on the newest release still
|
|
6209
|
+
// lands here, which is exactly the case a version-only check renders as "nothing to do".
|
|
6210
|
+
$awareUpdate.dataset.commandId = 'shell.aware-update-finish';
|
|
6211
|
+
$awareUpdate.textContent = AWARE_RECOVERY_PILL;
|
|
6212
|
+
$awareUpdate.dataset.target = d.targetVersion || '';
|
|
6213
|
+
$awareUpdate.dataset.operation = 'maintenance-recovery';
|
|
6214
|
+
$awareUpdate.dataset.tip = AWARE_RECOVERY_PILL_TIP;
|
|
6215
|
+
$awareUpdate.setAttribute('aria-haspopup', 'dialog');
|
|
6216
|
+
$awareUpdate.hidden = false;
|
|
6217
|
+
} else if (r.ok && d.updateAvailable && d.targetVersion && d.operation === 'bridge-repair') {
|
|
6179
6218
|
const count = Array.isArray(d.bridges) ? d.bridges.filter((row) => row.status !== 'current').length : 0;
|
|
6219
|
+
$awareUpdate.dataset.commandId = 'shell.aware-update';
|
|
6180
6220
|
$awareUpdate.textContent = `Repair ${count || ''} installed bridge${count === 1 ? '' : 's'}`.replace(' ', ' ');
|
|
6181
6221
|
$awareUpdate.dataset.target = d.targetVersion;
|
|
6182
6222
|
$awareUpdate.dataset.operation = 'bridge-repair';
|
|
@@ -6184,6 +6224,7 @@
|
|
|
6184
6224
|
$awareUpdate.setAttribute('aria-haspopup', 'dialog');
|
|
6185
6225
|
$awareUpdate.hidden = false;
|
|
6186
6226
|
} else if (r.ok && d.updateAvailable && d.targetVersion) {
|
|
6227
|
+
$awareUpdate.dataset.commandId = 'shell.aware-update';
|
|
6187
6228
|
$awareUpdate.textContent = '↑ Upgrade AWARE to v' + d.targetVersion;
|
|
6188
6229
|
$awareUpdate.dataset.target = d.targetVersion;
|
|
6189
6230
|
$awareUpdate.dataset.operation = 'runtime-update';
|
|
@@ -6195,6 +6236,11 @@
|
|
|
6195
6236
|
if (!applyDevForcedUpdate('aware', $awareUpdate)) $awareUpdate.hidden = true; // up-to-date / absent / registry error → no pill
|
|
6196
6237
|
}
|
|
6197
6238
|
} catch {
|
|
6239
|
+
// The check FAILED, so nothing it last said is current. Leaving the previous answer in place
|
|
6240
|
+
// let the post-recovery handoff read it and re-offer the very version the recovery had just
|
|
6241
|
+
// finished installing — an offer whose only possible end is "already the current release".
|
|
6242
|
+
awareUpdateCheck = null;
|
|
6243
|
+
awareUpgradeInventory = awareInventoryOf(null);
|
|
6198
6244
|
if (!applyDevForcedUpdate('aware', $awareUpdate)) $awareUpdate.hidden = true;
|
|
6199
6245
|
}
|
|
6200
6246
|
}
|
|
@@ -6290,7 +6336,60 @@
|
|
|
6290
6336
|
};
|
|
6291
6337
|
// A registry hiccup leaves `target` empty; "v" + nothing used to render "vthe current release".
|
|
6292
6338
|
const awareVersionLabel = (target) => (target ? `v${target}` : 'the current release');
|
|
6339
|
+
/**
|
|
6340
|
+
* What the recovery modal says, keyed on the terminal code the JOB reports.
|
|
6341
|
+
*
|
|
6342
|
+
* Kept as data rather than nested ternaries because there are seven states and the failure
|
|
6343
|
+
* heading is not the same sentence for all of them: two of these outcomes are not failures of
|
|
6344
|
+
* the recovery at all, and one is explicitly "still going, nothing lost". Rendering them all
|
|
6345
|
+
* under the old fixed "AWARE could not be upgraded." was the defect that sank the first attempt.
|
|
6346
|
+
*/
|
|
6347
|
+
const AWARE_RECOVERY_COPY = {
|
|
6348
|
+
'maintenance-pending': {
|
|
6349
|
+
live: 'The interrupted AWARE update could not be sorted out.',
|
|
6350
|
+
note: 'Close any AWARE or npm installer that is still running, then try again.',
|
|
6351
|
+
action: 'Try again',
|
|
6352
|
+
},
|
|
6353
|
+
'marker-superseded': {
|
|
6354
|
+
live: 'The interrupted AWARE update changed while FloLess was working on it.',
|
|
6355
|
+
note: 'Nothing was lost. Try again to pick up where it now stands.',
|
|
6356
|
+
action: 'Try again',
|
|
6357
|
+
},
|
|
6358
|
+
'recovery-unverified': {
|
|
6359
|
+
live: 'The interrupted AWARE update was cleared, but AWARE did not start correctly.',
|
|
6360
|
+
note: 'Try again. If it keeps happening, reinstall AWARE and relaunch FloLess.',
|
|
6361
|
+
action: 'Try again',
|
|
6362
|
+
},
|
|
6363
|
+
'recovery-target-unknown': {
|
|
6364
|
+
// A torn marker plus an unreadable runtime. Trying again re-derives the same nothing, so the
|
|
6365
|
+
// action must not be "Try again" — that is the dead-end control this whole change exists to
|
|
6366
|
+
// remove, rebuilt one state further along. The live region carries the instruction because
|
|
6367
|
+
// #aware-update-results is outside the dialog's aria-describedby and is never spoken.
|
|
6368
|
+
live: 'FloLess cannot tell which AWARE version the interrupted update was returning to. Reinstall AWARE, then relaunch FloLess.',
|
|
6369
|
+
note: 'Trying again cannot help: the record of what was being installed is damaged.',
|
|
6370
|
+
action: null,
|
|
6371
|
+
},
|
|
6372
|
+
'recovery-incomplete': {
|
|
6373
|
+
// Deliberately NOT phrased as a failure. The durable record is left in place on purpose, so
|
|
6374
|
+
// the next attempt continues rather than restarts — saying otherwise would send the user
|
|
6375
|
+
// hunting for damage that is not there.
|
|
6376
|
+
live: 'FloLess is still working through the interrupted AWARE update.',
|
|
6377
|
+
note: 'It stopped for now so the rest of FloLess stays usable. Continue when you are ready — it picks up where it left off.',
|
|
6378
|
+
action: 'Continue',
|
|
6379
|
+
},
|
|
6380
|
+
};
|
|
6381
|
+
const awareRecoveryCopy = (code) => AWARE_RECOVERY_COPY[code] || {
|
|
6382
|
+
live: 'The interrupted AWARE update could not be sorted out.',
|
|
6383
|
+
note: 'Try again.',
|
|
6384
|
+
action: 'Try again',
|
|
6385
|
+
};
|
|
6386
|
+
|
|
6293
6387
|
const awareUpgradeCopyText = (target, operation, inventory) => {
|
|
6388
|
+
if (operation === 'maintenance-recovery') {
|
|
6389
|
+
// No version offer: a recovery finishes what was already started, it does not choose a
|
|
6390
|
+
// target. And no duration — this runs in npm on an unbounded machine.
|
|
6391
|
+
return 'An earlier AWARE update did not finish. FloLess will sort it out. Other AWARE actions pause until it is done.';
|
|
6392
|
+
}
|
|
6294
6393
|
if (operation === 'bridge-repair') {
|
|
6295
6394
|
const stale = (inventory || []).filter((row) => row.status === 'stale' || row.status === 'unverifiable');
|
|
6296
6395
|
const versions = stale.map((row) => `${awareHostLabel(row.host)}${row.version ? ` v${row.version}` : ''}`).join(', ');
|
|
@@ -6348,32 +6447,69 @@
|
|
|
6348
6447
|
const busy = awareBusy(status);
|
|
6349
6448
|
$awareUpgradeModal.dataset.state = status;
|
|
6350
6449
|
$awareUpgradeModal.setAttribute('aria-busy', busy ? 'true' : 'false');
|
|
6351
|
-
if ($awareUpgradeTitle) $awareUpgradeTitle.textContent = operation === '
|
|
6352
|
-
? '
|
|
6353
|
-
: operation === '
|
|
6450
|
+
if ($awareUpgradeTitle) $awareUpgradeTitle.textContent = operation === 'maintenance-recovery'
|
|
6451
|
+
? 'Finish the interrupted AWARE update'
|
|
6452
|
+
: operation === 'bridge-repair'
|
|
6453
|
+
? 'Repair installed bridges'
|
|
6454
|
+
: operation === 'combined' ? 'Update AWARE and installed bridges' : 'Upgrade AWARE';
|
|
6354
6455
|
$awareUpgradeCopy.textContent = awareUpgradeCopyText(target, operation, awareUpgradeInventory);
|
|
6355
6456
|
$awareUpgradeResults.innerHTML = '';
|
|
6356
|
-
|
|
6357
|
-
|
|
6358
|
-
|
|
6359
|
-
|
|
6457
|
+
// 'runtime-current' is the one runtime-failed that must NOT offer a retry: nothing is wrong, so
|
|
6458
|
+
// trying again can only reproduce the same sentence — the dead-end shape, one layer up.
|
|
6459
|
+
// `unknown-operation` belongs here beside `runtime-current`: its own message says the accepted
|
|
6460
|
+
// job is STILL RUNNING, so a retry could only be refused — and offering one contradicts the
|
|
6461
|
+
// sentence directly above it.
|
|
6462
|
+
const nothingToDo = status === 'runtime-failed' && s.error
|
|
6463
|
+
&& (s.error.code === 'runtime-current' || s.error.code === 'unknown-operation'
|
|
6464
|
+
// A recovery whose copy declares no action has nothing that pressing could achieve.
|
|
6465
|
+
|| (operation === 'maintenance-recovery' && !awareRecoveryCopy(s.error.code).action));
|
|
6466
|
+
$awareUpgradeOk.hidden = (status !== 'idle' && status !== 'runtime-failed') || nothingToDo;
|
|
6467
|
+
// The recovery arms take their label from the code, because "Continue" and "Try again" mean
|
|
6468
|
+
// different things to the user and only one of them is true per outcome.
|
|
6469
|
+
$awareUpgradeOk.textContent = operation === 'maintenance-recovery'
|
|
6470
|
+
? (status === 'runtime-failed'
|
|
6471
|
+
? awareRecoveryCopy(s.error && s.error.code).action
|
|
6472
|
+
: 'Finish the update')
|
|
6473
|
+
: status === 'runtime-failed'
|
|
6474
|
+
? (operation === 'bridge-repair' ? 'Try repair again' : 'Try upgrade again')
|
|
6475
|
+
: (operation === 'bridge-repair' ? 'Repair bridges' : operation === 'combined' ? 'Update all' : 'Upgrade now');
|
|
6360
6476
|
$awareUpgradeRetry.hidden = status !== 'partial' || !s.failed || !s.failed.length;
|
|
6361
|
-
$awareUpgradeCancel.textContent = status === 'idle' ? 'Not now' : 'Close';
|
|
6477
|
+
$awareUpgradeCancel.textContent = status === 'idle' ? 'Not now' : nothingToDo ? 'Done' : 'Close';
|
|
6362
6478
|
|
|
6363
6479
|
if (status === 'idle') $awareUpgradeLive.textContent = '';
|
|
6364
|
-
|
|
6365
|
-
|
|
6480
|
+
// Operation-NEUTRAL on purpose. This fires before the POST returns, i.e. before anyone can know
|
|
6481
|
+
// whether the server will start an upgrade or a recovery — and it is spoken. Announcing
|
|
6482
|
+
// "Starting the AWARE upgrade…" and then flipping to a recovery reads as a contradiction to a
|
|
6483
|
+
// screen-reader user; this way the flip reads as an answer.
|
|
6484
|
+
else if (status === 'starting') $awareUpgradeLive.textContent = 'Starting — checking what AWARE needs first…';
|
|
6366
6485
|
else if (status === 'running') {
|
|
6367
6486
|
const count = s.total > 0 ? ` ${s.completed || 0} of ${s.total} bridges checked.` : '';
|
|
6368
6487
|
$awareUpgradeLive.textContent = s.connectionMessage
|
|
6369
|
-
||
|
|
6488
|
+
|| (operation === 'maintenance-recovery'
|
|
6489
|
+
// No stage name: 'recovering' is the only stage a recovery has, and echoing it as
|
|
6490
|
+
// "Recovery in progress — recovering." says nothing twice.
|
|
6491
|
+
? 'Sorting out the interrupted AWARE update. Other AWARE actions pause until it is done.'
|
|
6492
|
+
: `${operation === 'bridge-repair' ? 'Repair' : 'Upgrade'} in progress — ${String(s.stage || 'preparing').replaceAll('-', ' ')}.${count}`);
|
|
6370
6493
|
} else if (status === 'retrying') {
|
|
6371
6494
|
$awareUpgradeLive.textContent = s.connectionMessage || `Trying the ${awareHostLabel(s.host || '')} bridge again…`;
|
|
6372
6495
|
} else if (status === 'success') {
|
|
6373
6496
|
const version = s.observedVersion || target;
|
|
6374
6497
|
const count = (s.updated || []).length;
|
|
6375
|
-
|
|
6376
|
-
|
|
6498
|
+
if (operation === 'maintenance-recovery') {
|
|
6499
|
+
// THE state this whole change exists for. A recovery that worked used to render under
|
|
6500
|
+
// "AWARE could not be upgraded." with a retry button that could never succeed.
|
|
6501
|
+
//
|
|
6502
|
+
// It names only what it just finished. Reading `awareUpdateCheck` here to advertise a
|
|
6503
|
+
// NEWER release named the check taken BEFORE the recovery ran — which is the one thing
|
|
6504
|
+
// that recovery may have changed — so a stale answer could offer a version that is no
|
|
6505
|
+
// longer on offer, or the very one that was just installed. The handoff below re-checks
|
|
6506
|
+
// first and then names it; that is the only place with an answer worth naming.
|
|
6507
|
+
$awareUpgradeLive.textContent = `The interrupted AWARE update is sorted out. AWARE v${version || ''} is ready.`;
|
|
6508
|
+
$awareUpgradeResults.innerHTML = '';
|
|
6509
|
+
} else {
|
|
6510
|
+
$awareUpgradeLive.textContent = `AWARE v${version || ''}${count ? ` and ${count} installed bridge${count === 1 ? '' : 's'}` : ''} are up to date.`;
|
|
6511
|
+
$awareUpgradeResults.innerHTML = awareHostRows('Updated bridges', s.updated || [], false);
|
|
6512
|
+
}
|
|
6377
6513
|
} else if (status === 'partial') {
|
|
6378
6514
|
$awareUpgradeLive.textContent = 'AWARE is up to date, but some installed bridges still need attention.';
|
|
6379
6515
|
$awareUpgradeResults.innerHTML = '<div class="aware-update-summary">FloLess will keep incompatible bridges blocked until they are refreshed. You can retry only the failed bridges below.</div>'
|
|
@@ -6386,11 +6522,31 @@
|
|
|
6386
6522
|
// A bridge repair can terminalize here too (a failed preflight, smoke, or a runtime that
|
|
6387
6523
|
// moved underneath it) — and it never set out to upgrade anything, so the generic wording
|
|
6388
6524
|
// would be simply untrue.
|
|
6389
|
-
|
|
6390
|
-
|
|
6391
|
-
|
|
6392
|
-
|
|
6393
|
-
|
|
6525
|
+
if (s.error && s.error.code === 'runtime-current') {
|
|
6526
|
+
// FIRST, ahead of the operation arms. A recovery can terminalise with this code when the
|
|
6527
|
+
// marker was discharged elsewhere between the pill's check and the click — and the recovery
|
|
6528
|
+
// arm below would then fall to its default copy, announcing "could not be sorted out" and
|
|
6529
|
+
// telling the user to "Try again" beside a Try-again button that `nothingToDo` has hidden.
|
|
6530
|
+
// Nothing is wrong here, so nothing is announced as wrong.
|
|
6531
|
+
$awareUpgradeLive.textContent = s.error.message;
|
|
6532
|
+
$awareUpgradeResults.innerHTML = '';
|
|
6533
|
+
} else if (operation === 'maintenance-recovery') {
|
|
6534
|
+
// Keyed on the CODE, not on the state. `recovery-incomplete` in particular is not a
|
|
6535
|
+
// failure — the work is paused with its place kept — and announcing it as one in the live
|
|
6536
|
+
// region is what a screen-reader user would be left with, since the results div below is
|
|
6537
|
+
// not part of the dialog's accessible description.
|
|
6538
|
+
const copy = awareRecoveryCopy(s.error && s.error.code);
|
|
6539
|
+
$awareUpgradeLive.textContent = copy.live;
|
|
6540
|
+
const detail = s.error && s.error.message ? s.error.message : '';
|
|
6541
|
+
$awareUpgradeResults.innerHTML = `<div class="aware-update-summary">${escapeHtml(copy.note)}</div>`
|
|
6542
|
+
+ (detail && detail !== copy.live ? `<div class="aware-update-summary">${escapeHtml(detail)}</div>` : '');
|
|
6543
|
+
} else {
|
|
6544
|
+
$awareUpgradeLive.textContent = operation === 'bridge-repair'
|
|
6545
|
+
? "AWARE's installed bridges could not be refreshed."
|
|
6546
|
+
: 'AWARE could not be upgraded.';
|
|
6547
|
+
const reason = s.error && s.error.message ? s.error.message : 'Check your connection and try again.';
|
|
6548
|
+
$awareUpgradeResults.innerHTML = `<div class="aware-update-summary">${escapeHtml(reason)}</div>`;
|
|
6549
|
+
}
|
|
6394
6550
|
} else if (status === 'expired') {
|
|
6395
6551
|
$awareUpgradeLive.textContent = s.message || 'The previous upgrade result expired.';
|
|
6396
6552
|
$awareUpgradeResults.innerHTML = '<div class="aware-update-summary">The installed runtime was checked again. Use the current upgrade action if an update is still available.</div>';
|
|
@@ -6437,7 +6593,18 @@
|
|
|
6437
6593
|
}
|
|
6438
6594
|
}
|
|
6439
6595
|
const check = awareUpdateCheck || {};
|
|
6440
|
-
|
|
6596
|
+
// A pending recovery wins over the version check, which cannot see one: `check.operation` is
|
|
6597
|
+
// 'none' on a machine already at the newest release — and 'none' is TRUTHY, so it beat the
|
|
6598
|
+
// pill's own dataset and opened this dialog titled "Upgrade AWARE" over an interrupted update.
|
|
6599
|
+
// A live job that this dialog is about to show OWNS the answer. Taking it from the check
|
|
6600
|
+
// instead let a failed recovery open under its own copy — the painter reads `s.operation` —
|
|
6601
|
+
// and then start a runtime UPGRADE when the button was pressed, because the button passes this
|
|
6602
|
+
// variable. The dialog and its button have to be acting on the same job.
|
|
6603
|
+
const showing = awareBusy(current.status) || awareNeedsAttention(current) ? current.operation : null;
|
|
6604
|
+
awareUpgradeOperation = showing
|
|
6605
|
+
|| (check.recoveryPending
|
|
6606
|
+
? 'maintenance-recovery'
|
|
6607
|
+
: (check.operation || ($awareUpdate && $awareUpdate.dataset.operation) || 'runtime-update'));
|
|
6441
6608
|
awareUpgradeInventory = awareInventoryOf(check);
|
|
6442
6609
|
awareUpgradeTarget = target;
|
|
6443
6610
|
awareUpgradeReturnFocus = returnFocusTo || document.activeElement;
|
|
@@ -6474,7 +6641,29 @@
|
|
|
6474
6641
|
// every bridge-repair label deliberately goes without it, and a retry is bridge work.
|
|
6475
6642
|
$awareUpdate.textContent = s.status === 'retrying'
|
|
6476
6643
|
? 'Retrying bridge…'
|
|
6477
|
-
: operation === 'bridge-repair' ? 'Repairing installed bridges…'
|
|
6644
|
+
: operation === 'bridge-repair' ? 'Repairing installed bridges…'
|
|
6645
|
+
// A recovery is not an upgrade, and the ↑ glyph means "a runtime upgrade is on
|
|
6646
|
+
// offer" everywhere else in this footer — so it announced the wrong work with the
|
|
6647
|
+
// wrong glyph for the whole time the job ran.
|
|
6648
|
+
: operation === 'maintenance-recovery' ? 'Finishing AWARE update…'
|
|
6649
|
+
: '↑ Upgrading AWARE…';
|
|
6650
|
+
// The id follows the label HERE too, not only on the attention pill. The footer can be
|
|
6651
|
+
// painted as an upgrade and become a recovery when the 202 says so — and Instructor
|
|
6652
|
+
// narrates from the registry, so the id left behind described an upgrade over
|
|
6653
|
+
// "Finishing AWARE update…" for the whole time the job ran.
|
|
6654
|
+
// BOTH branches stamp BOTH fields. A one-sided write is how the id came to disagree
|
|
6655
|
+
// with the label in the first place, and `dataset.operation` is what openAwareUpgrade
|
|
6656
|
+
// falls back to — so a stale one reopens the dialog on the wrong job.
|
|
6657
|
+
$awareUpdate.dataset.operation = operation;
|
|
6658
|
+
if (operation === 'maintenance-recovery') {
|
|
6659
|
+
$awareUpdate.dataset.commandId = 'shell.aware-update-finish';
|
|
6660
|
+
$awareUpdate.dataset.tip = AWARE_RECOVERY_PILL_TIP;
|
|
6661
|
+
} else {
|
|
6662
|
+
$awareUpdate.dataset.commandId = 'shell.aware-update';
|
|
6663
|
+
$awareUpdate.dataset.tip = operation === 'bridge-repair'
|
|
6664
|
+
? 'Repair installed bridges that do not match AWARE'
|
|
6665
|
+
: "What's new in v" + (s.target || '');
|
|
6666
|
+
}
|
|
6478
6667
|
} else if (awareNeedsAttention(s)) {
|
|
6479
6668
|
// Every suppressed automatic failure must land on an ENABLED attention pill. Without the
|
|
6480
6669
|
// runtime-failed arm the pill stays frozen on "Repairing installed bridges…" forever,
|
|
@@ -6513,14 +6702,57 @@
|
|
|
6513
6702
|
awareUpgradeFloorUntil = Date.now() + 10000;
|
|
6514
6703
|
refreshVersionNotesTip('aware', version, wv, true);
|
|
6515
6704
|
}
|
|
6705
|
+
// A recovery that succeeded hands straight over to the upgrade it was blocking, in ONE
|
|
6706
|
+
// click. Without this the modal auto-closes, and the pill then opens the release-notes
|
|
6707
|
+
// popover rather than starting anything — three actions to finish what the user asked for
|
|
6708
|
+
// once. Awaited, because the offer depends on the re-check that refreshAwareUpdate runs.
|
|
6709
|
+
if (operation === 'maintenance-recovery' && $awareUpgradeModal.classList.contains('show')) {
|
|
6710
|
+
refreshAwareUpdate().then(() => {
|
|
6711
|
+
if (awareUpdateClient.getState().transaction !== s.transaction) return; // superseded
|
|
6712
|
+
const check = awareUpdateCheck;
|
|
6713
|
+
if (!check || !check.updateAvailable || !check.targetVersion) return;
|
|
6714
|
+
awareUpgradeOperation = check.operation === 'bridge-repair' ? 'bridge-repair' : 'runtime-update';
|
|
6715
|
+
awareUpgradeTarget = check.targetVersion;
|
|
6716
|
+
awareUpgradeInventory = awareInventoryOf(check);
|
|
6717
|
+
// Repainted as a fresh OFFER so the primary button is visible, enabled and armed with
|
|
6718
|
+
// the new target — paintAwareUpgrade hides it on every non-idle, non-failed status, and
|
|
6719
|
+
// painting `idle` also makes the pending auto-close timer self-cancel through its own
|
|
6720
|
+
// dataset guard.
|
|
6721
|
+
paintAwareUpgrade({ status: 'idle', transaction: null, target: check.targetVersion,
|
|
6722
|
+
operation: awareUpgradeOperation, origin: 'user' });
|
|
6723
|
+
// AFTER the paint, never before: the idle arm sets the live region to '' , so a
|
|
6724
|
+
// sentence written first is wiped and the one thing a screen-reader user is told about
|
|
6725
|
+
// the recovery having WORKED disappears silently.
|
|
6726
|
+
$awareUpgradeLive.textContent = awareUpgradeOperation === 'bridge-repair'
|
|
6727
|
+
// "interrupted", the ONE word this feature uses for this thing — the same one the
|
|
6728
|
+
// dialog title and the `?` entry use. Two words for it, one after the other on the
|
|
6729
|
+
// same screen, read as two different things.
|
|
6730
|
+
? `The interrupted AWARE update is finished. Some installed bridges still need to match it — choose Repair bridges.`
|
|
6731
|
+
: `The interrupted AWARE update is finished. AWARE v${check.targetVersion} is now available — choose Upgrade now to install it.`;
|
|
6732
|
+
// Only steal focus if the user is already in this dialog; otherwise they are elsewhere
|
|
6733
|
+
// and a recovery they may not have been watching must not yank them back.
|
|
6734
|
+
if ($awareUpgradeModal.contains(document.activeElement)) {
|
|
6735
|
+
try { $awareUpgradeOk.focus(); } catch { /* best effort */ }
|
|
6736
|
+
}
|
|
6737
|
+
}).catch(() => { /* the pill keeps its own state */ });
|
|
6738
|
+
return;
|
|
6739
|
+
}
|
|
6516
6740
|
refreshAwareUpdate();
|
|
6517
6741
|
if (!$awareUpgradeModal.classList.contains('show')) {
|
|
6518
6742
|
showToast($awareUpgradeLive.textContent, 'ok');
|
|
6519
6743
|
} else {
|
|
6520
6744
|
// Success is a brief confirmation; partial results remain available
|
|
6521
6745
|
// until dismissed because they still carry recovery actions.
|
|
6746
|
+
//
|
|
6747
|
+
// SCOPED TO THIS TRANSACTION. The old check looked only at the current status and a
|
|
6748
|
+
// dataset attribute, both of which a LATER job satisfies just as well — so a timer armed
|
|
6749
|
+
// by one success could close the modal of the next job that happened to be showing. Now
|
|
6750
|
+
// a timer that outlives its own transaction does nothing.
|
|
6751
|
+
const closing = s.transaction;
|
|
6522
6752
|
setTimeout(() => {
|
|
6523
|
-
|
|
6753
|
+
const now = awareUpdateClient.getState();
|
|
6754
|
+
if (now.status === 'success'
|
|
6755
|
+
&& now.transaction === closing
|
|
6524
6756
|
&& $awareUpgradeModal.dataset.state === 'success'
|
|
6525
6757
|
&& $awareUpgradeModal.classList.contains('show')) {
|
|
6526
6758
|
closeAwareUpgradeModal();
|
|
@@ -6530,7 +6762,12 @@
|
|
|
6530
6762
|
}
|
|
6531
6763
|
});
|
|
6532
6764
|
$awareUpgradeOk.onclick = () => {
|
|
6533
|
-
|
|
6765
|
+
// Caught: start() can reject on a response this build cannot describe, and an unhandled
|
|
6766
|
+
// rejection here leaves the modal busy with no buttons and nothing said.
|
|
6767
|
+
// The operation goes WITH the target. Sending only the target left `starting` with no
|
|
6768
|
+
// identity, so a refusal was narrated as a failed upgrade whatever the dialog had offered.
|
|
6769
|
+
awareUpdateClient.start(awareUpgradeTarget, awareUpgradeOperation)
|
|
6770
|
+
.catch(() => { /* the emitted state explains it */ });
|
|
6534
6771
|
};
|
|
6535
6772
|
$awareUpgradeRetry.onclick = () => awareUpdateClient.retryFailed();
|
|
6536
6773
|
$awareUpgradeCancel.onclick = closeAwareUpgradeModal;
|
|
@@ -6573,7 +6810,11 @@
|
|
|
6573
6810
|
return;
|
|
6574
6811
|
}
|
|
6575
6812
|
const version = $awareUpdate.dataset.target || '';
|
|
6576
|
-
|
|
6813
|
+
// A pending recovery opens the dialog, never the changelog. Falling through would show
|
|
6814
|
+
// release notes to a user whose pill says an update needs finishing — and leave the only
|
|
6815
|
+
// action that unblocks them unreachable.
|
|
6816
|
+
if ($awareUpdate.dataset.operation === 'bridge-repair'
|
|
6817
|
+
|| $awareUpdate.dataset.operation === 'maintenance-recovery') {
|
|
6577
6818
|
openAwareUpgrade(version, $awareUpdate);
|
|
6578
6819
|
return;
|
|
6579
6820
|
}
|
|
@@ -835,6 +835,26 @@
|
|
|
835
835
|
guidance: 'on-demand',
|
|
836
836
|
});
|
|
837
837
|
|
|
838
|
+
/**
|
|
839
|
+
* The SAME footer pill, when an earlier update did not finish.
|
|
840
|
+
*
|
|
841
|
+
* A distinct definition rather than broadened prose on `shell.aware-update`: that entry says
|
|
842
|
+
* "Upgrades the AWARE runtime in place", and while the pill reads "AWARE update needs finishing"
|
|
843
|
+
* every word of it is false. Instructor takes the registry label over the DOM accessible name
|
|
844
|
+
* (see instructor.js), so a stable id cannot describe a carrier whose job changes — the id is
|
|
845
|
+
* swapped at paint time instead, which adds no carrier.
|
|
846
|
+
*/
|
|
847
|
+
def('shell.aware-update-finish', {
|
|
848
|
+
label: 'Finish the interrupted AWARE update',
|
|
849
|
+
actsOn: 'Opens the dialog that completes an AWARE update that stopped part-way',
|
|
850
|
+
group: 'In the footer',
|
|
851
|
+
persistence: 'external',
|
|
852
|
+
interaction: 'dialog',
|
|
853
|
+
risk: ['costs-time'],
|
|
854
|
+
guidance: 'on-demand',
|
|
855
|
+
why: 'Until it finishes, AWARE cannot be updated or repaired — this is the only action that unblocks it.',
|
|
856
|
+
});
|
|
857
|
+
|
|
838
858
|
def('shell.aware-update', {
|
|
839
859
|
label: 'Update AWARE',
|
|
840
860
|
actsOn: 'Upgrades the AWARE runtime in place',
|
|
@@ -951,8 +971,16 @@
|
|
|
951
971
|
/* ── updates ────────────────────────────────────────────────────────────── */
|
|
952
972
|
|
|
953
973
|
def('shell.aware-update-apply', {
|
|
954
|
-
|
|
955
|
-
|
|
974
|
+
// NOT "Install the AWARE update". Instructor prefers the registry label over the button's own
|
|
975
|
+
// accessible name, and this one button reads "Upgrade now", "Repair bridges", "Update all" or
|
|
976
|
+
// "Finish the update" depending on what is being offered — so a label naming one of them is
|
|
977
|
+
// wrong three times out of four.
|
|
978
|
+
label: 'Start what the AWARE dialog is offering',
|
|
979
|
+
// Covers all THREE things this one carrier runs. Its data-command-id is deliberately stable
|
|
980
|
+
// (the rubric requires that of the exact carrier), so the narration has to be true whichever
|
|
981
|
+
// job the dialog is currently offering — including finishing an update that was interrupted,
|
|
982
|
+
// which is neither an upgrade nor a bridge repair.
|
|
983
|
+
actsOn: 'Runs what this dialog is offering — an AWARE upgrade, a bridge repair, or finishing an update that did not complete',
|
|
956
984
|
group: 'In the FloLess dialogs',
|
|
957
985
|
persistence: 'external',
|
|
958
986
|
interaction: 'instant',
|
|
@@ -961,8 +989,11 @@
|
|
|
961
989
|
});
|
|
962
990
|
|
|
963
991
|
def('shell.aware-update-retry', {
|
|
964
|
-
|
|
965
|
-
|
|
992
|
+
// This button appears only on a PARTIAL result and calls retryFailed(), which re-runs the
|
|
993
|
+
// bridges that failed and leaves the ones that worked alone. "Retry the update" described a
|
|
994
|
+
// different action entirely.
|
|
995
|
+
label: 'Retry the bridges that failed',
|
|
996
|
+
actsOn: 'Tries the installed bridges that did not refresh, without repeating the ones that worked',
|
|
966
997
|
group: 'In the FloLess dialogs',
|
|
967
998
|
persistence: 'external',
|
|
968
999
|
interaction: 'instant',
|
|
@@ -1894,6 +1894,12 @@
|
|
|
1894
1894
|
def('steel.connections-delete', { label: 'Delete connections', actsOn: 'Removes every selected connection from the model', group: 'In the Inspect panel', persistence: 'working', interaction: 'instant', risk: [], guidance: 'on-demand', why: 'Their parent members remain. Undo restores the whole selection.' });
|
|
1895
1895
|
def('steel.review-list', { label: 'Connections needing review', actsOn: 'Lists the imported connections whose steel has moved since they were placed', group: 'In the steel editor header', persistence: 'none', interaction: 'instant', risk: [], guidance: 'on-demand', why: 'Listing them changes nothing in the model; picking one selects the steel it is watching.' });
|
|
1896
1896
|
def('steel.untracked-list', { label: 'Connections not being watched', actsOn: 'Lists the imported connections that are not being watched for moved steel', group: 'In the steel editor header', persistence: 'none', interaction: 'instant', risk: [], guidance: 'on-demand', why: 'Every connection placed before this feature existed is untracked. It is not a fault.' });
|
|
1897
|
+
// #935 — the plan-registration refusal surfaces. Listing and reading change nothing in the model; the
|
|
1898
|
+
// fix is a contract edit the user's terminal AI makes, which is why the narration says so out loud.
|
|
1899
|
+
def('steel.registration-list', { label: 'Sheets positioned wrong', actsOn: 'Lists the plan sheets whose registration points do not agree with the grid lines they name', group: 'In the steel editor header', persistence: 'none', interaction: 'instant', risk: [], guidance: 'on-demand', why: 'Listing them changes nothing; picking one opens that sheet so you can see what is drawn out of place.' });
|
|
1900
|
+
def('steel.registration-select', { label: 'Open this sheet', actsOn: 'Switches the plan view to {instance}', group: 'In the registration list', persistence: 'none', interaction: 'instant', risk: [], guidance: 'on-demand' });
|
|
1901
|
+
def('steel.registration-detail', { label: 'Registration details', actsOn: 'Shows the exact reason this sheet’s registration was refused, naming the contract fields to change', group: 'On the steel canvas', persistence: 'none', interaction: 'instant', risk: [], guidance: 'on-demand', why: 'The plain-English warning is for you; this is the sentence your terminal AI needs.' });
|
|
1902
|
+
def('steel.registration-copy', { label: 'Copy reason', actsOn: 'Copies the exact registration refusal to the clipboard', group: 'On the steel canvas', persistence: 'none', interaction: 'instant', risk: [], guidance: 'on-demand', why: 'This sheet cannot be corrected in the editor — paste the reason to your terminal AI and ask it to fix the registration.' });
|
|
1897
1903
|
def('steel.review-select', { label: 'Select this connection', actsOn: 'Selects {instance} from the review list', group: 'In the review list', persistence: 'none', interaction: 'instant', risk: [], guidance: 'on-demand', why: 'A watched connection selects the members it watches; an unwatched one opens the 3D view and selects the connection itself.' });
|
|
1898
1904
|
def('steel.connection-part-back', { label: 'Back to connection', actsOn: 'Selects the whole connection that owns this part', group: 'In the Inspect panel', persistence: 'none', interaction: 'instant', risk: [], guidance: 'on-demand' });
|
|
1899
1905
|
def('steel.connection-part-edit', { label: 'Edit on parent member', actsOn: 'Selects the member that owns this connection part', group: 'In the Inspect panel', persistence: 'none', interaction: 'instant', risk: [], guidance: 'on-demand' });
|
package/dist/web/instructor.js
CHANGED
|
@@ -594,6 +594,7 @@
|
|
|
594
594
|
'In the grid panel', 'In the Inspect panel',
|
|
595
595
|
'In the Properties popup', 'In the snap override menu', 'In the dimension value popup', 'In the selection filter',
|
|
596
596
|
'In the review list', // the connection-review popover — a sibling of the selection filter, and it hangs off the header stats above
|
|
597
|
+
'In the registration list', // the SAME popover, different heading: it serves three header stats and names each list on screen (#935)
|
|
597
598
|
'In the ⋯ menu',
|
|
598
599
|
'In the ⋯ menu — Snapping', 'In the ⋯ menu — Display', 'In the ⋯ menu — Detailing',
|
|
599
600
|
'In the ⋯ menu — Model checks', 'In the ⋯ menu — Coordinate system', 'In the ⋯ menu — Session',
|