@floless/app 0.161.0 → 0.162.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.
@@ -684,8 +684,19 @@
684
684
 
685
685
  /* ── the stop / sign-out question (web/leave-guard.js) ───────────────────── */
686
686
 
687
+ def('app.reconnect-refresh', {
688
+ label: 'Refresh page', actsOn: 'Reloads this page after checking for unsaved work in every open editor and workflow',
689
+ group: 'While reconnecting to FloLess', persistence: 'none', interaction: 'dialog', risk: [], guidance: 'on-demand',
690
+ why: 'Automatic reconnection continues. The question lets you save, cancel, or explicitly refresh without saving. A running workflow keeps running.',
691
+ });
692
+ def('app.reconnect-start', {
693
+ label: 'Start FloLess now', actsOn: 'Asks your browser to open FloLess on this computer',
694
+ group: 'While reconnecting to FloLess', persistence: 'external', interaction: 'instant', risk: [], guidance: 'on-demand',
695
+ why: 'Use this if FloLess is closed. If your browser does not open it, use the Start menu or desktop shortcut. This tab keeps trying to reconnect.',
696
+ });
697
+
687
698
  def('leave.confirm', {
688
- label: 'Stop FloLess, Sign out or Leave the project',
699
+ label: 'Stop FloLess, Sign out, Leave the project or Refresh page',
689
700
  actsOn: 'Goes ahead — shown only when nothing is left unsaved',
690
701
  group: 'In the FloLess dialogs',
691
702
  persistence: 'external',
@@ -696,7 +707,7 @@
696
707
 
697
708
  def('leave.save', {
698
709
  label: 'Save and continue',
699
- actsOn: 'Saves everything listed, then stops FloLess, signs out or leaves the project',
710
+ actsOn: 'Saves everything listed, then stops FloLess, signs out, leaves the project or refreshes the page',
700
711
  group: 'In the FloLess dialogs',
701
712
  persistence: 'working',
702
713
  interaction: 'instant',
@@ -707,7 +718,7 @@
707
718
 
708
719
  def('leave.discard', {
709
720
  label: 'Continue without saving',
710
- actsOn: 'Stops FloLess, signs out or leaves the project, leaving the listed changes unsaved',
721
+ actsOn: 'Stops FloLess, signs out, leaves the project or refreshes the page, leaving the listed changes unsaved',
711
722
  group: 'In the FloLess dialogs',
712
723
  persistence: 'working',
713
724
  interaction: 'instant',
@@ -910,7 +921,7 @@
910
921
 
911
922
  def('shell.restore-workflow', {
912
923
  label: 'Restore the official workflow',
913
- actsOn: 'Undoes out-of-band edits and re-arms Run',
924
+ actsOn: 'Restores the reviewed official workflow; a source repair still needs your Compile approval',
914
925
  group: 'In the header',
915
926
  persistence: 'working',
916
927
  interaction: 'instant',
@@ -961,8 +972,8 @@
961
972
 
962
973
  def('shell.workflow-update', {
963
974
  label: 'Workflow update',
964
- actsOn: 'Shows what a newer version of this workflow changes',
965
- group: 'In the workflow picker',
975
+ actsOn: 'Reviews the bundled update or compatibility repair for {instance} without approving the model',
976
+ group: 'In the FloLess dialogs',
966
977
  persistence: 'none',
967
978
  interaction: 'dialog',
968
979
  risk: [],
@@ -971,13 +982,13 @@
971
982
 
972
983
  def('shell.workflow-update-apply', {
973
984
  label: 'Update the workflow',
974
- actsOn: 'Replaces this workflow with the newer version',
985
+ actsOn: 'Applies the reviewed update or compatibility repair, or prepares an unsent AI Chat review for a customized workflow; Steel Model changes never approve your model',
975
986
  group: 'In the workflow picker',
976
987
  persistence: 'working',
977
988
  interaction: 'instant',
978
989
  risk: [],
979
990
  guidance: 'on-demand',
980
- why: 'Your own edits to a customized workflow are not overwritten — it is left off the update path instead.',
991
+ why: 'A backup is saved first. A narrow compatibility repair preserves your other source bytes and version. Customized workflows need individual review before a full update.',
981
992
  });
982
993
 
983
994
  def('shell.project-select', {
@@ -2044,6 +2055,17 @@
2044
2055
  why: 'Your terminal AI compares it with what is already here and tells you what changed. For a Steel model, FloLess first asks whether to read it as a Quick or a Precise model, preset to how the model was built so far.',
2045
2056
  });
2046
2057
 
2058
+ def('shell.workspace-progress-toggle', {
2059
+ label: 'Expand or collapse drawing read progress',
2060
+ actsOn: 'Changes how much drawing read progress is visible above the drawing',
2061
+ group: 'In the project workspace',
2062
+ persistence: 'local',
2063
+ interaction: 'instant',
2064
+ risk: [],
2065
+ guidance: 'on-demand',
2066
+ why: 'Collapse keeps a single status line and makes more room for the drawing. Expand shows all checks, warnings and next actions. Your choice lasts for this project in this window; the drawing read keeps running.',
2067
+ });
2068
+
2047
2069
  def('shell.revision-filter-open', {
2048
2070
  label: 'Open Drawing Filter',
2049
2071
  actsOn: 'Opens the Drawing Filter and moves focus to the next required Drawing Filter action for this drawing read, including a confirmation still waiting for your answer or the explanation of a save that could not finish',
@@ -2132,7 +2154,7 @@
2132
2154
 
2133
2155
  def('shell.add-knowledge', {
2134
2156
  label: 'Add knowledge',
2135
- actsOn: 'Adds a document to this project’s knowledge',
2157
+ actsOn: 'Opens the file picker below the References list to add reference files to this project',
2136
2158
  group: 'In the project workspace',
2137
2159
  persistence: 'working',
2138
2160
  interaction: 'instant',
@@ -2141,6 +2163,41 @@
2141
2163
  why: 'Read while a workflow is being written, and cited in the node description — never reasoned over while one runs.',
2142
2164
  });
2143
2165
 
2166
+ def('shell.kb-organize', {
2167
+ label: 'Organize references',
2168
+ actsOn: 'Sends the selected references to this project’s AI Chat to create knowledge summaries',
2169
+ group: 'In the project workspace', persistence: 'working', interaction: 'instant', risk: [], guidance: 'on-demand',
2170
+ why: 'Uploaded files can be previewed immediately. Organize creates summaries from the references you switched on.',
2171
+ });
2172
+ def('shell.kb-organize-cancel', {
2173
+ label: 'Cancel pending organization', actsOn: 'Cancels an organization task that has not been handed to AI Chat or started',
2174
+ group: 'In the project workspace', persistence: 'working', interaction: 'instant', risk: [], guidance: 'on-demand',
2175
+ });
2176
+ def('shell.kb-open-chat', {
2177
+ label: 'Open knowledge task in chat', actsOn: 'Opens the project conversation handling organization, without stopping its work',
2178
+ group: 'In the project workspace', persistence: 'none', interaction: 'instant', risk: [], guidance: 'on-demand',
2179
+ });
2180
+ def('shell.kb-retry-handoff', {
2181
+ label: 'Retry knowledge handoff', actsOn: 'Checks the saved organization task and retries delivery to the same project’s AI Chat',
2182
+ group: 'In the project workspace', persistence: 'working', interaction: 'instant', risk: [], guidance: 'on-demand',
2183
+ });
2184
+ def('shell.kb-retry-adjustment', {
2185
+ label: 'Retry adjustment handoff', actsOn: 'Retries delivery of the saved knowledge adjustment to the same project’s AI Chat',
2186
+ group: 'In the project workspace', persistence: 'working', interaction: 'instant', risk: [], guidance: 'on-demand',
2187
+ });
2188
+ def('shell.kb-adjust-open', {
2189
+ label: 'Adjust knowledge summaries', actsOn: 'Opens the instruction box below Organize to describe a change to existing summaries',
2190
+ group: 'In the project workspace', persistence: 'none', interaction: 'instant', risk: [], guidance: 'on-demand',
2191
+ });
2192
+ def('shell.kb-adjust-input', {
2193
+ label: 'Knowledge adjustment instruction', actsOn: 'Holds your instruction for changes to the project’s knowledge summaries',
2194
+ group: 'In the project workspace', persistence: 'none', interaction: 'instant', risk: [], guidance: 'on-demand',
2195
+ });
2196
+ def('shell.kb-adjust-submit', {
2197
+ label: 'Send knowledge adjustment', actsOn: 'Sends your instruction to the project’s AI Chat using its normal Access and consent settings',
2198
+ group: 'In the project workspace', persistence: 'working', interaction: 'instant', risk: [], guidance: 'on-demand',
2199
+ });
2200
+
2144
2201
  // #2491 R6.9 — categories in References and the company library, multi-select, Move to…, and the knowledge map.
2145
2202
  // Every category change is the person's own click: an AI can only suggest one on a card.
2146
2203
  def('shell.kb-category-new', {
@@ -3231,7 +3288,7 @@
3231
3288
  why: 'FloLess reads the height you typed in this project’s units and refuses anything it cannot read, so a typo never becomes a height.',
3232
3289
  });
3233
3290
  def('shell.chat-height-change', {
3234
- label: 'Change answered height', actsOn: 'Reopens {instance} so you can confirm or type a different height; your earlier answer counts until you give a new one', anyInstance: 'a member end',
3291
+ label: 'Answer or change a member height', actsOn: 'Opens {instance} so you can answer it yourself, including while the AI investigates; opening saves no height and keeps your draft', anyInstance: 'a member end',
3235
3292
  group: 'In AI Chat', persistence: 'none', interaction: 'instant', risk: [], guidance: 'on-demand',
3236
3293
  });
3237
3294
  def('shell.chat-height-confirm-all', {
@@ -3251,7 +3308,7 @@
3251
3308
  group: 'In AI Chat', persistence: 'working', interaction: 'instant', risk: [], guidance: 'on-demand',
3252
3309
  });
3253
3310
  def('shell.chat-height-other', {
3254
- label: 'Give your own height answer', actsOn: 'Opens a typed height and a source note or picture for {instance}', anyInstance: 'a member end',
3311
+ label: 'Give your own height answer', actsOn: 'Opens an optional height, an explanation and a picture for {instance}; an explanation alone leaves the height unresolved for the read to propose', anyInstance: 'a member end',
3255
3312
  group: 'In AI Chat', persistence: 'none', interaction: 'instant', risk: [], guidance: 'on-demand',
3256
3313
  });
3257
3314
  def('shell.chat-height-back', {
@@ -3259,7 +3316,7 @@
3259
3316
  group: 'In AI Chat', persistence: 'working', interaction: 'instant', risk: [], guidance: 'on-demand',
3260
3317
  });
3261
3318
  def('shell.chat-height-tell-read', {
3262
- label: 'Tell the read', actsOn: 'Puts a short message saying {instance} is answered in the message box and moves to Send; you send it', anyInstance: 'a height question',
3319
+ label: 'Tell the read', actsOn: 'Puts a message about saved heights or unresolved clarification for {instance} in the message box and moves to Send; you send it', anyInstance: 'a height question',
3263
3320
  group: 'In AI Chat', persistence: 'none', interaction: 'instant', risk: [], guidance: 'on-demand',
3264
3321
  });
3265
3322
  def('shell.chat-height-next-step', {
@@ -3267,7 +3324,7 @@
3267
3324
  group: 'In AI Chat', persistence: 'none', interaction: 'instant', risk: [], guidance: 'on-demand',
3268
3325
  });
3269
3326
  def('shell.chat-height-send-read', {
3270
- label: 'Send to the read', actsOn: 'Sends a short message saying {instance} is answered to the AI now, after anything already in the message box', anyInstance: 'a height question',
3327
+ label: 'Send to the read', actsOn: 'Sends a message about saved heights or unresolved clarification for {instance} to the AI now, after anything already in the message box', anyInstance: 'a height question',
3271
3328
  group: 'In AI Chat', persistence: 'external', interaction: 'instant', risk: ['costs-time', 'costs-money'], guidance: 'on-demand',
3272
3329
  });
3273
3330
  // Owner, 2026-10-23: a drawing read's question card no longer holds half of AI Chat once the person has moved on.
@@ -3346,13 +3403,23 @@
3346
3403
  anyInstance: 'an answer',
3347
3404
  group: 'In AI Chat', persistence: 'none', interaction: 'instant', risk: [], guidance: 'on-demand',
3348
3405
  });
3406
+ def('shell.chat-auto-review-details', {
3407
+ label: 'Show or hide auto-approval details', actsOn: 'Opens or closes the exact review record for {instance}. This is a receipt, not an approval request; nothing is run or decided',
3408
+ anyInstance: 'an auto-approved action', group: 'In AI Chat', persistence: 'none', interaction: 'instant', risk: [], guidance: 'on-demand',
3409
+ key: 'Also: Esc inside the expanded record',
3410
+ why: 'Receipts start as one quiet line. Expanding one leaves other receipts as you chose them; technical commands stay in Details.',
3411
+ });
3412
+ def('shell.chat-auto-review-record', {
3413
+ label: 'Read an auto-approval record', actsOn: 'Focuses the exact recorded command and available review explanation for {instance}, where you can scroll to read it. Nothing is run or approved',
3414
+ anyInstance: 'an auto-approved action', group: 'In AI Chat', persistence: 'none', interaction: 'instant', risk: [], guidance: 'on-demand',
3415
+ });
3349
3416
  // #1906: where an answer came from — a note and the person's own pictures, on any question card.
3350
3417
  def('shell.chat-answer-source', {
3351
3418
  label: 'Add a source to an answer', actsOn: 'Opens a note and a paperclip for {instance}, to say where your answer comes from', anyInstance: 'an answer',
3352
3419
  group: 'In AI Chat', persistence: 'none', interaction: 'instant', risk: [], guidance: 'on-demand',
3353
3420
  });
3354
3421
  def('shell.chat-answer-note', {
3355
- label: 'Source note', actsOn: 'Type where your answer for {instance} comes from, for example per 7/S-502; it is kept with the answer', anyInstance: 'an answer',
3422
+ label: 'Source note or height explanation', actsOn: 'Type where your answer for {instance} comes from, or explain what the read should use for a height; the text stays with this answer and an explanation alone confirms no height', anyInstance: 'an answer',
3356
3423
  group: 'In AI Chat', persistence: 'none', interaction: 'instant', risk: [], guidance: 'on-demand',
3357
3424
  });
3358
3425
  def('shell.chat-answer-attach', {
@@ -3374,7 +3441,7 @@
3374
3441
  why: 'A picture is your evidence, not a number. Nothing reaches the model until you confirm the read’s reading of it.',
3375
3442
  });
3376
3443
  def('shell.chat-answer-picture-open', {
3377
- label: 'Open a picture on an answer', actsOn: 'Opens the picture kept with your answer for {instance}', anyInstance: 'an answer',
3444
+ label: 'Open an answer picture', actsOn: 'Opens the picture attached to your draft or saved answer for {instance}; opening does not submit it', anyInstance: 'an answer or retained draft',
3378
3445
  group: 'In AI Chat', persistence: 'none', interaction: 'instant', risk: [], guidance: 'on-demand',
3379
3446
  });
3380
3447
  // #2439: the connection readiness card. It lists what FloLess measured; nothing on it certifies or signs off anything.
@@ -3407,6 +3474,11 @@
3407
3474
  label: 'Open a height’s sheet from the list', actsOn: 'Opens the drawing page with {instance} outlined, cropped to that place; nothing changes', anyInstance: 'a member end in the height card’s list',
3408
3475
  group: 'In AI Chat', persistence: 'none', interaction: 'instant', risk: [], guidance: 'on-demand',
3409
3476
  });
3477
+ def('shell.chat-height-batch-place', {
3478
+ label: 'Show a grouped height on the drawing', actsOn: 'Opens the drawing page with {instance} outlined; nothing is selected or answered', anyInstance: 'a member end in the grouped height question',
3479
+ group: 'In AI Chat', persistence: 'none', interaction: 'instant', risk: [], guidance: 'on-demand',
3480
+ why: 'Each member end keeps its own drawing place while you choose which heights to answer together. Opening it keeps your selected ends and unfinished answer.',
3481
+ });
3410
3482
  def('shell.chat-height-place-view', {
3411
3483
  label: 'Show this area or the whole sheet', actsOn: 'Shows {instance} of the drawing page opened from the height card', anyInstance: 'this area or the whole sheet',
3412
3484
  group: 'In AI Chat', persistence: 'none', interaction: 'instant', risk: [], guidance: 'on-demand',
@@ -3459,6 +3531,14 @@
3459
3531
  label: 'Close the drawing', actsOn: 'Closes the drawing page opened from a place the AI showed and returns to the conversation',
3460
3532
  group: 'In AI Chat', persistence: 'none', interaction: 'instant', risk: [], guidance: 'on-demand',
3461
3533
  });
3534
+ def('shell.chat-drawing-fit', {
3535
+ label: 'Fit the whole drawing', actsOn: 'Fits the cited drawing or image inside its viewer; nothing changes',
3536
+ group: 'In AI Chat', persistence: 'none', interaction: 'instant', risk: [], guidance: 'on-demand',
3537
+ });
3538
+ def('shell.chat-drawing-retry', {
3539
+ label: 'Try opening the drawing again', actsOn: 'Checks this source again and retries opening it in the drawing viewer; nothing changes',
3540
+ group: 'In AI Chat', persistence: 'none', interaction: 'instant', risk: [], guidance: 'on-demand',
3541
+ });
3462
3542
  // #2777: the drawing viewer AI Chat opens a sheet in zooms and moves.
3463
3543
  def('shell.chat-drawing-zoom-in', {
3464
3544
  label: 'Zoom in on the drawing', actsOn: 'Shows a smaller part of the drawing page, larger; nothing changes',
@@ -89,7 +89,7 @@
89
89
  </div>
90
90
  </div>
91
91
  <select data-command-id="shell.workflow-picker" id="prompt-select" hidden></select>
92
- <button data-command-id="shell.workflow-update" id="wf-update" class="wf-update-pill" type="button" hidden aria-haspopup="dialog"></button>
92
+ <button data-command-id="shell.workflow-update#the selected workflow" data-command-instance-label="the selected workflow" id="wf-update" class="wf-update-pill" type="button" hidden aria-haspopup="dialog"></button>
93
93
  <!-- Shown only when the OPEN workflow is forked (user-owned, off the update channel). Purely
94
94
  informational (the badge of ownership); the picker row carries the same "yours" cue. -->
95
95
  <span id="wf-forked" class="wf-forked-pill" hidden role="status" data-tip="You forked this workflow — it no longer receives FloLess updates. You are responsible for verifying its output.">yours · off updates</span>
@@ -877,7 +877,7 @@
877
877
  'In the contract editor', 'In the report viewer', 'In the Page viewer', 'In My shared links', 'In the video player', 'In the Knowledge Base viewer',
878
878
  'In the Tools library', 'In Discover local tools', 'In the requests list', 'In the revision review', 'In the run request dialog', 'In the Integrations dialog', 'In the Routines dialog', 'In the Automatic tool updates dialog', 'In the terminal requests dialog',
879
879
  'In the Report an issue dialog', 'In the Build a tool dialog', 'In the Bake dialog', 'In the CAD send review',
880
- 'In the FloLess dialogs', 'On the FloLess has stopped screen',
880
+ 'While reconnecting to FloLess', 'In the FloLess dialogs', 'On the FloLess has stopped screen',
881
881
  // #2381: the first-run setup card, which covers the whole window until AWARE is ready.
882
882
  'On the setup card',
883
883
  // #2786: the full-window sign-in screen, shown whenever the subscription gate locks FloLess.
@@ -142,6 +142,15 @@
142
142
  /* ── the dialog ────────────────────────────────────────────────────────── */
143
143
 
144
144
  var COPY = {
145
+ refresh: {
146
+ title: 'Refresh this page?',
147
+ clean: 'This page will reload. FloLess will keep running.',
148
+ unsaved: 'Some of your work is not saved yet. Save it before this page reloads?',
149
+ running: 'A workflow is still running. Refreshing does not stop it; reconnect to see its result.',
150
+ confirm: 'Refresh page', save: 'Save and refresh', discard: 'Refresh without saving',
151
+ working: 'Refreshing…',
152
+ failed: 'This page could not refresh. Try again in a moment.',
153
+ },
145
154
  stop: {
146
155
  title: 'Stop FloLess?',
147
156
  clean: 'FloLess will close on this computer. Open it again from the Start menu or the desktop shortcut whenever you need it.',
@@ -265,12 +274,13 @@
265
274
  * dialog, which stays open (nothing was discarded, nothing was left).
266
275
  */
267
276
  function confirm(opts) {
268
- var action = opts && opts.action === 'signout' ? 'signout' : opts && opts.action === 'project' ? 'project' : 'stop';
277
+ var action = opts && opts.action === 'refresh' ? 'refresh' : opts && opts.action === 'signout' ? 'signout' : opts && opts.action === 'project' ? 'project' : 'stop';
269
278
  var only = onlyFor(opts);
270
279
  if (openPromise) return openPromise;
271
280
  $modal = $modal || el('leave-guard-modal');
272
281
  var other = el('confirm-modal');
273
- if (!$modal || (other && other.classList.contains('show'))) return Promise.resolve(false);
282
+ // Recovery may cover a pending confirmation. Keep it intact and inert below this question.
283
+ if (!$modal || (action !== 'refresh' && other && other.classList.contains('show'))) return Promise.resolve(false);
274
284
 
275
285
  openPromise = new Promise(function (resolve) {
276
286
  var returnFocus = document.activeElement instanceof HTMLElement ? document.activeElement : null;
@@ -42,6 +42,8 @@
42
42
  var CANCEL_COMMAND = $cancel.getAttribute('data-command-id');
43
43
 
44
44
  var view = null;
45
+ var templateUpdates = [];
46
+ var templateTicket = 0;
45
47
  var results = null;
46
48
  var compileSelection = null; // immutable review shown before the person's separate confirmation
47
49
  var compileExcluded = [];
@@ -304,7 +306,7 @@
304
306
  var urgent = offers.filter(function (o) { return !!o.advisory; }).length;
305
307
  var firstCheck = !!(view && view.supported && view.checking && !view.checkedAt);
306
308
  // Only a check this page started: a background pass is not something the person is waiting for.
307
- if (!offers.length && !needCount && !cleanup.length && !checking && !firstCheck) {
309
+ if (!offers.length && !templateUpdates.length && !needCount && !cleanup.length && !checking && !firstCheck) {
308
310
  // A pill that disappears under the keyboard's focus must not drop focus to the page behind.
309
311
  if (document.activeElement === $pill) { var menu = document.getElementById('menu-btn'); if (menu) menu.focus(); }
310
312
  $pill.hidden = true;
@@ -314,7 +316,10 @@
314
316
  }
315
317
  var text;
316
318
  var state = 'offer';
317
- if (offers.length) {
319
+ if (templateUpdates.length) {
320
+ text = plural(templateUpdates.length, 'workflow file update', 'workflow file updates');
321
+ if (offers.length || needCount || cleanup.length) text += ' · ' + (offers.length + needCount + cleanup.length) + ' also need you';
322
+ } else if (offers.length) {
318
323
  text = plural(offers.length, 'workflow update', 'workflow updates');
319
324
  if (urgent) {
320
325
  state = 'urgent';
@@ -382,6 +387,32 @@
382
387
  return card;
383
388
  }
384
389
 
390
+ /** Bundled workflow files use their own review; reviewing never approves a model or a tool update. */
391
+ function templateUpdateRow(item) {
392
+ var row = el('div', 'tool-updates-needs');
393
+ row.setAttribute('data-template-update', item.id);
394
+ var text = el('div', 'tool-updates-needs-text');
395
+ var name = item.templateId === 'steel-model' ? 'Steel Model' + (item.id !== item.templateId ? ' (' + item.id + ')' : '') : item.id;
396
+ text.appendChild(el('span', 'tool-updates-needs-name', name + ' ' + item.installed + ' → ' + item.available));
397
+ var explanation = item.sourceUpdate && item.sourceUpdate.explanation;
398
+ text.appendChild(el('span', 'tool-updates-needs-sentence', explanation || 'A newer workflow file is included with FloLess. Review its changes before updating.'));
399
+ var button = el('button', 'tool-updates-open', 'Review workflow update');
400
+ button.type = 'button';
401
+ button.setAttribute('data-command-id', 'shell.workflow-update#updates:' + item.id);
402
+ button.setAttribute('data-command-instance-label', name);
403
+ button.setAttribute('aria-label', 'Review workflow update for ' + item.id);
404
+ button.addEventListener('click', function () {
405
+ var bridge = window.flolessBridge;
406
+ if (typeof bridge?.reviewWorkflowUpdate !== 'function') { $live.textContent = 'Workflow updates are still starting. Try again in a moment.'; return; }
407
+ close();
408
+ Promise.resolve(bridge.reviewWorkflowUpdate(item.id)).catch(function (error) {
409
+ open($pill); $live.textContent = error.message;
410
+ });
411
+ });
412
+ row.appendChild(text); row.appendChild(button);
413
+ return row;
414
+ }
415
+
385
416
  /** A row under a group's explanation says only which workflow (and what is specific to it); a row with no group (an older server) carries its own sentence. */
386
417
  function needsRow(item, grouped) {
387
418
  var row = el('div', 'tool-updates-needs');
@@ -744,6 +775,11 @@
744
775
  }
745
776
  var offers = (view && view.offers) || [];
746
777
  var needs = (view && view.needsYou) || [];
778
+ if (templateUpdates.length) {
779
+ var bundled = section('Workflow files supplied by FloLess', templateUpdates.length);
780
+ templateUpdates.forEach(function (item) { bundled.appendChild(templateUpdateRow(item)); });
781
+ $body.appendChild(bundled);
782
+ }
747
783
  if (view && !view.supported) {
748
784
  $body.appendChild(el('div', 'tool-updates-summary', view.sentence || 'Tool updates are not available on this computer.'));
749
785
  } else if (view && view.sentence) {
@@ -775,7 +811,7 @@
775
811
  var needsYou = paintNeeds(needs, cleanup);
776
812
  // Nothing to approve and nothing the person can act on: say so first, above any quiet "Nothing to do" rows, and do
777
813
  // not title the dialog as if something were waiting for approval.
778
- var allClear = !results && !offers.length && !needsYou && view && view.supported && !view.sentence;
814
+ var allClear = !results && !offers.length && !templateUpdates.length && !needsYou && view && view.supported && !view.sentence;
779
815
  if (allClear) {
780
816
  $body.insertBefore(el('div', 'tool-updates-summary', view.checking
781
817
  ? 'Checking which workflows a tool update affects…'
@@ -837,6 +873,20 @@
837
873
  }
838
874
  paintPill();
839
875
  syncProgress();
876
+ void refreshTemplates();
877
+ }
878
+
879
+ async function refreshTemplates() {
880
+ var ticket = ++templateTicket;
881
+ try {
882
+ var templates = await call('/api/workflows/updates');
883
+ if (ticket === templateTicket && templates?.ok === true && Array.isArray(templates.updates)) {
884
+ templateUpdates = templates.updates;
885
+ paintPill();
886
+ }
887
+ } catch (error) {
888
+ if (isOpen()) $live.textContent = 'FloLess could not check bundled workflow files just now. Reopen this review to try again.';
889
+ }
840
890
  }
841
891
 
842
892
  async function compileReviewed() {
@@ -1068,6 +1118,7 @@
1068
1118
  }
1069
1119
 
1070
1120
  window.addEventListener('floless:tool-updates-changed', function () { void refresh(); });
1121
+ window.addEventListener('floless:workflow-updates-changed', function () { void refresh(); });
1071
1122
  window.addEventListener('floless:apps-changed', function () { void refresh(); });
1072
1123
  window.addEventListener('floless:workflows-listed', giveAwaitingOpenButtons);
1073
1124
  window.flolessToolUpdates = { refresh: refresh, open: open };