@floless/app 0.157.0 → 0.158.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/cli-actions.mjs +7 -0
- package/dist/floless-server.cjs +47535 -31688
- package/dist/skills/floless-app-actions/SKILL.md +4 -1
- package/dist/skills/floless-app-knowledge/SKILL.md +14 -1
- package/dist/skills/floless-app-knowledge/references/schema.md +4 -1
- package/dist/skills/floless-app-steel-model/SKILL.md +35 -1
- package/dist/skills/floless-app-steel-takeoff/SKILL.md +51 -1
- package/dist/web/app.css +143 -15
- package/dist/web/aware.js +246 -60
- package/dist/web/chat.css +18 -0
- package/dist/web/chat.js +215 -29
- package/dist/web/commands-shell.js +241 -7
- package/dist/web/index.html +25 -3
- package/dist/web/instructor.js +1 -1
- package/dist/web/kb-categories.js +351 -0
- package/dist/web/kb-graph-worker.js +73 -0
- package/dist/web/pages.js +114 -6
- package/dist/web/run-page-view.js +353 -0
- package/dist/web/steel-editor.html +42 -3
- package/dist/web/tab-signal.js +323 -0
- package/dist/web/terminal-requests.js +48 -7
- package/dist/web/workspaces.js +1240 -107
- package/launch-starting-page.mjs +181 -0
- package/launch.mjs +88 -5
- package/package.json +3 -1
- package/dist/web/report-files.js +0 -50
package/dist/web/aware.js
CHANGED
|
@@ -22,6 +22,8 @@
|
|
|
22
22
|
const $kbDriftChip = document.getElementById('kb-drift-chip');
|
|
23
23
|
const $reportModal = document.getElementById('report-modal');
|
|
24
24
|
const $reportFrame = document.getElementById('report-frame');
|
|
25
|
+
const $reportFramePage = document.getElementById('report-frame-page'); // #2476: the saved Page version of a report with files
|
|
26
|
+
const $reportFilesNote = document.getElementById('report-files-note');
|
|
25
27
|
const $reportFrame3d = document.getElementById('report-frame-3d');
|
|
26
28
|
const $reportOverlay = document.getElementById('report-overlay');
|
|
27
29
|
const $reportTitle = document.getElementById('report-title');
|
|
@@ -2535,7 +2537,12 @@
|
|
|
2535
2537
|
let wsTitleLanding = false; // explicit because a project may itself be named "Workspaces"
|
|
2536
2538
|
let wsTitleProjectId = null; // identity: two projects may legitimately share a display name
|
|
2537
2539
|
// #1890: on the Workflows landing the tab is named after it, not after the workflow still loaded underneath.
|
|
2538
|
-
|
|
2540
|
+
// The tab signal (web/tab-signal.js) leads the title with how a run is going; aware.js stays its one writer.
|
|
2541
|
+
const syncTabTitle = () => {
|
|
2542
|
+
const lead = window.flolessTabSignal ? window.flolessTabSignal.prefix() : '';
|
|
2543
|
+
document.title = lead + tabTitle(wsTitleName || (wfLanding ? 'Workflows' : null), wfTitleText);
|
|
2544
|
+
};
|
|
2545
|
+
if (window.flolessTabSignal) window.flolessTabSignal.onChange(syncTabTitle);
|
|
2539
2546
|
function setComboTriggerLabel(text) {
|
|
2540
2547
|
if ($wfTriggerLabel) $wfTriggerLabel.textContent = text || 'select workflow';
|
|
2541
2548
|
wfTitleText = text || '';
|
|
@@ -4159,6 +4166,33 @@
|
|
|
4159
4166
|
const workflowPageLatest = new Map(); // app id → { home, pageId, version, at }
|
|
4160
4167
|
const WORKFLOW_PAGE_RUNS_KEPT = 64;
|
|
4161
4168
|
|
|
4169
|
+
// #2476: the run viewer's view of a report that carries files — the inert copy and a plain note while its Page version is
|
|
4170
|
+
// being saved, then that version's own isolated frame once it says it is ready. Its state comes from the server's answer
|
|
4171
|
+
// about this exact run (web/run-page-view.js); this file only feeds it the report on screen, the news, and the end of a view.
|
|
4172
|
+
const runPageView = window.FlolessRunPageView.create({
|
|
4173
|
+
api, inert: $reportFrame, page: $reportFramePage, note: $reportFilesNote, win: window,
|
|
4174
|
+
currentApp: () => currentId,
|
|
4175
|
+
// A lookup that found the version: the header's "Version N · Open in Pages" learns it even if the news was missed.
|
|
4176
|
+
onSaved: ({ app, runId, fire, home, pageId, version }) => {
|
|
4177
|
+
const key = captureKeyOf(runId, fire);
|
|
4178
|
+
if (!key) return;
|
|
4179
|
+
const known = workflowPageByRun.get(key);
|
|
4180
|
+
if (known && known.version >= version) return;
|
|
4181
|
+
workflowPageByRun.set(key, { app, home, pageId, version });
|
|
4182
|
+
if (workflowPageByRun.size > WORKFLOW_PAGE_RUNS_KEPT) workflowPageByRun.delete(workflowPageByRun.keys().next().value);
|
|
4183
|
+
noteWorkflowPageLatest(app, { home, pageId, version });
|
|
4184
|
+
if (currentId === app) paintReportPageLinks();
|
|
4185
|
+
},
|
|
4186
|
+
});
|
|
4187
|
+
// A workspace switch: what this window knows about saved versions belongs to the old workspace.
|
|
4188
|
+
let runPageRoot = null;
|
|
4189
|
+
window.addEventListener('floless:workspace-root-state', (event) => {
|
|
4190
|
+
const root = event.detail && event.detail.root;
|
|
4191
|
+
const id = root ? `${root.rootId}#${root.generation}` : null;
|
|
4192
|
+
if (runPageRoot !== null && id !== runPageRoot) { runPageView.reset(); workflowPageByRun.clear(); paintReportPageLinks(); }
|
|
4193
|
+
runPageRoot = id;
|
|
4194
|
+
});
|
|
4195
|
+
|
|
4162
4196
|
function noteWorkflowPageLatest(app, page) {
|
|
4163
4197
|
const prev = workflowPageLatest.get(app);
|
|
4164
4198
|
if (prev && prev.home === page.home && prev.pageId === page.pageId && prev.version >= page.version) return;
|
|
@@ -4173,6 +4207,7 @@
|
|
|
4173
4207
|
|
|
4174
4208
|
function applyWorkflowPageCaptured(m) {
|
|
4175
4209
|
if (!m || typeof m.app !== 'string' || typeof m.runId !== 'string') return;
|
|
4210
|
+
runPageView.onNews(m); // #2476: a report with files on screen follows its own capture
|
|
4176
4211
|
if (typeof m.warning === 'string') {
|
|
4177
4212
|
// The run itself succeeded and its report is shown; the window on this workflow is told, the others log it.
|
|
4178
4213
|
if (currentId === m.app) showToast(m.warning, 'warn');
|
|
@@ -4453,6 +4488,8 @@
|
|
|
4453
4488
|
}
|
|
4454
4489
|
/** Show one section of a saved complete report. Resolves true once it is on screen, false when it is not. */
|
|
4455
4490
|
async function paintCompleteReport(report, asked = null, busyUntil = null) {
|
|
4491
|
+
runPageView.invalidate(); // #2476: another view replaces a report-with-files view
|
|
4492
|
+
$reportFrame.hidden = false;
|
|
4456
4493
|
// #2539: a report another read holds is waited for, not failed — right after a run that is the workflow's Page
|
|
4457
4494
|
// saving its copy, which reads the whole report. Past this wait the viewer offers Try again instead.
|
|
4458
4495
|
const REPORT_BUSY_WAIT_MS = 5 * 60_000;
|
|
@@ -4598,13 +4635,14 @@
|
|
|
4598
4635
|
// origin, cannot touch the app page) and keeps a "Loading 3D view…" overlay until the doc
|
|
4599
4636
|
// posts `viewer-ready`. Exactly one frame is shown at a time.
|
|
4600
4637
|
function paintReport(html, interactive, entry = null) {
|
|
4638
|
+
runPageView.invalidate(); // #2476: a new paint ends the previous report's Page frame, its lookups and its timers
|
|
4601
4639
|
clearCompleteReportView();
|
|
4602
4640
|
$reportOpen.hidden = false;
|
|
4603
4641
|
lastPaintedHtml = html || '';
|
|
4604
4642
|
lastPaintedInteractive = !!interactive; // drives the share copy: a 3D model is not a "frozen report"
|
|
4605
4643
|
showSavedPathActions(''); // default off; the caller re-shows if this report saved a file
|
|
4606
4644
|
if ($reportPage) $reportPage.hidden = true; // likewise its Page link (paintReportPageLinks, once it is cached)
|
|
4607
|
-
if (!interactive && entry && entry.withFiles) { paintReportWithFiles(html); return; }
|
|
4645
|
+
if (!interactive && entry && entry.withFiles) { paintReportWithFiles(html, entry); return; }
|
|
4608
4646
|
if (interactive) {
|
|
4609
4647
|
$reportFrame.hidden = true; $reportFrame.srcdoc = '';
|
|
4610
4648
|
$reportFrame3d.hidden = false;
|
|
@@ -4624,25 +4662,26 @@
|
|
|
4624
4662
|
}
|
|
4625
4663
|
}
|
|
4626
4664
|
|
|
4627
|
-
// #2262 slice 3c: a report that carries files (`report_folder`) refers to them as `assets/…`, which resolve only in
|
|
4628
|
-
// Page version.
|
|
4629
|
-
//
|
|
4630
|
-
//
|
|
4631
|
-
//
|
|
4632
|
-
|
|
4633
|
-
function paintReportWithFiles(html) {
|
|
4665
|
+
// #2262 slice 3c / #2476: a report that carries files (`report_folder`) refers to them as `assets/…`, which resolve only in
|
|
4666
|
+
// its Page version. `html` is the inert copy the SERVER made (nothing asks FloLess for a missing file); the controller
|
|
4667
|
+
// (web/run-page-view.js) says what is happening to the version and shows it in its own isolated frame once it is ready.
|
|
4668
|
+
// Open and Share stay hidden in every state of this view: they would hand out the copy without its files — the Page has
|
|
4669
|
+
// its own Share, and "Version N · Open in Pages" is the way out.
|
|
4670
|
+
function paintReportWithFiles(html, entry) {
|
|
4634
4671
|
$reportFrame3d.hidden = true; $reportFrame3d.removeAttribute('src');
|
|
4635
4672
|
$reportFrame.hidden = false;
|
|
4636
|
-
$reportFrame.srcdoc =
|
|
4673
|
+
$reportFrame.srcdoc = html;
|
|
4637
4674
|
$reportOverlay.hidden = true; $reportOverlay.replaceChildren();
|
|
4638
4675
|
$reportOpen.hidden = true;
|
|
4639
4676
|
$reportShare.hidden = true;
|
|
4677
|
+
runPageView.paint(entry);
|
|
4640
4678
|
}
|
|
4641
4679
|
|
|
4642
4680
|
// Reset the viewer to "no report shown": clear BOTH frames + the Open buffer, so a stale
|
|
4643
4681
|
// interactive 3D doc can't linger (its WebGL loop running) behind an overlay, and ↗ Open
|
|
4644
4682
|
// can't reopen a previous app's report. Used by every empty / transition state.
|
|
4645
4683
|
function clearReportFrames() {
|
|
4684
|
+
runPageView.invalidate(); // #2476
|
|
4646
4685
|
clearCompleteReportView();
|
|
4647
4686
|
$reportOpen.hidden = false;
|
|
4648
4687
|
$reportFrame.srcdoc = ''; $reportFrame.hidden = false;
|
|
@@ -6588,6 +6627,7 @@
|
|
|
6588
6627
|
|
|
6589
6628
|
async function closeReportViewer() {
|
|
6590
6629
|
hideModal($reportModal);
|
|
6630
|
+
runPageView.invalidate(); // #2476: nothing about a report with files keeps running behind a closed viewer
|
|
6591
6631
|
reportSectionRequest += 1; // #2539: a section still waiting for a busy report stops asking once the viewer closes
|
|
6592
6632
|
const routineId = viewingScheduledReportRoutine;
|
|
6593
6633
|
viewingScheduledReportRoutine = null;
|
|
@@ -10783,8 +10823,9 @@
|
|
|
10783
10823
|
// workflow this tab shows that someone else started is followed read-only (no Stop).
|
|
10784
10824
|
// #2241: a run that FAILED after an Agent answered ends with run-finished, not run-ended: its AI record is read then too.
|
|
10785
10825
|
if (m.type === 'run-finished' && m.id && m.id === currentId) void globalThis.flolessAgentSteps?.refreshRunRecord(m.id);
|
|
10826
|
+
signalRunEvent(m); // the browser tab hears its run's ending even when the strip already settled
|
|
10786
10827
|
if (liveRunOwns(m)) {
|
|
10787
|
-
if (m.type === 'run-live') { if (m.runId) liveRun.runId = m.runId; }
|
|
10828
|
+
if (m.type === 'run-live') { if (m.runId) { liveRun.runId = m.runId; signalRunNote(liveRun); } }
|
|
10788
10829
|
else if (m.type === 'node-progress') onLiveProgress(m);
|
|
10789
10830
|
else finishLiveRun(typeof m.outcome === 'string' ? m.outcome : 'failed');
|
|
10790
10831
|
} else if (m.id === currentId && !(liveRun && liveRun.owner && !liveRun.ended)) {
|
|
@@ -16364,7 +16405,7 @@
|
|
|
16364
16405
|
if (!m || !m.workflow || typeof m.html !== 'string') return;
|
|
16365
16406
|
const runId = typeof m.runId === 'string' ? m.runId : null;
|
|
16366
16407
|
const entry = { nodeId: m.nodeId || null, label: 'live · on selection change', html: m.html,
|
|
16367
|
-
runId, captureKey: captureKeyOf(runId, m.fireKey), withFiles: m.withFiles === true };
|
|
16408
|
+
runId, captureKey: captureKeyOf(runId, m.fireKey), fireKey: typeof m.fireKey === 'string' ? m.fireKey : null, withFiles: m.withFiles === true };
|
|
16368
16409
|
lastReportByApp.set(m.workflow, entry);
|
|
16369
16410
|
const open = $reportModal && $reportModal.classList.contains('show');
|
|
16370
16411
|
if (!open || currentId !== m.workflow || reportRunning) return;
|
|
@@ -16544,8 +16585,10 @@
|
|
|
16544
16585
|
syncRunStrip();
|
|
16545
16586
|
}
|
|
16546
16587
|
|
|
16547
|
-
function disposeLiveRun() {
|
|
16588
|
+
function disposeLiveRun({ keepSignal = false } = {}) {
|
|
16548
16589
|
if (!liveRun) return;
|
|
16590
|
+
// A run let go before its ending takes the tab signal along; a video offer keeps it for the ending to come.
|
|
16591
|
+
if (!liveRun.ended && !keepSignal && signalRunIs(liveRun)) signalRunDrop();
|
|
16549
16592
|
if (liveRun.showTimer) clearTimeout(liveRun.showTimer);
|
|
16550
16593
|
if (liveRun.lingerTimer) clearTimeout(liveRun.lingerTimer);
|
|
16551
16594
|
if (liveRun.view) liveRun.view.destroy();
|
|
@@ -16562,6 +16605,7 @@
|
|
|
16562
16605
|
const token = newRunToken();
|
|
16563
16606
|
rememberRunToken(appId, token);
|
|
16564
16607
|
liveRun = { appId, token, runId: null, owner: true, surface, view: null, shown: false, showTimer: null, lingerTimer: null, ended: false, startedAt: Date.now() };
|
|
16608
|
+
signalRunBegin(liveRun);
|
|
16565
16609
|
if (surface === 'overlay' && overlayHost && window.flolessRunProgressView) {
|
|
16566
16610
|
liveRun.view = window.flolessRunProgressView.create({ size: 40, hat: true, fallbackHeadline, stop: null });
|
|
16567
16611
|
overlayHost.append(liveRun.view.root);
|
|
@@ -16572,6 +16616,55 @@
|
|
|
16572
16616
|
return token;
|
|
16573
16617
|
}
|
|
16574
16618
|
|
|
16619
|
+
// ── tab signal (begin) — lifted by server/tab-signal-ui.test.ts; keep it self-contained.
|
|
16620
|
+
// The browser tab follows the run too (web/tab-signal.js), so a person working in Tekla sees it end. It follows
|
|
16621
|
+
// the RUN, by its token and run id, not the liveRun view: a video offer can replace that view before the run's
|
|
16622
|
+
// own ending arrives, and the tab must still hear that ending.
|
|
16623
|
+
let signalRun = null; // { run, token, runId }
|
|
16624
|
+
function signalRunBegin(run) {
|
|
16625
|
+
if (!window.flolessTabSignal) return;
|
|
16626
|
+
signalRun = { run, token: run.token || null, runId: run.runId || null };
|
|
16627
|
+
const app = apps.get(run.appId);
|
|
16628
|
+
window.flolessTabSignal.begin((app && app.displayName) || run.appId, run.startedAt);
|
|
16629
|
+
}
|
|
16630
|
+
function signalRunIs(r) {
|
|
16631
|
+
if (!signalRun || !r) return false;
|
|
16632
|
+
return r === signalRun.run || !!(r.token && r.token === signalRun.token) || !!(r.runId && r.runId === signalRun.runId);
|
|
16633
|
+
}
|
|
16634
|
+
/** The run learned its id (run-live, node-progress): the tab can now match its ending by it. */
|
|
16635
|
+
function signalRunNote(run) {
|
|
16636
|
+
if (signalRun && run && run.runId && signalRunIs(run)) signalRun.runId = run.runId;
|
|
16637
|
+
}
|
|
16638
|
+
function signalRunEnd(outcome) {
|
|
16639
|
+
if (!signalRun) return;
|
|
16640
|
+
const { runId } = signalRun;
|
|
16641
|
+
signalRun = null;
|
|
16642
|
+
if (window.flolessTabSignal) window.flolessTabSignal.finish(outcome, runId);
|
|
16643
|
+
}
|
|
16644
|
+
function signalRunDrop() {
|
|
16645
|
+
if (!signalRun) return;
|
|
16646
|
+
signalRun = null;
|
|
16647
|
+
if (window.flolessTabSignal) window.flolessTabSignal.cancel();
|
|
16648
|
+
}
|
|
16649
|
+
function signalRunOwns(m) {
|
|
16650
|
+
return !!(signalRun && m && ((m.clientRunToken && m.clientRunToken === signalRun.token) || (m.runId && m.runId === signalRun.runId)));
|
|
16651
|
+
}
|
|
16652
|
+
/** Every run event the server sends, before the liveRun view decides whether it is still its own. */
|
|
16653
|
+
function signalRunEvent(m) {
|
|
16654
|
+
if (!signalRunOwns(m)) return;
|
|
16655
|
+
if (m.runId) signalRun.runId = m.runId;
|
|
16656
|
+
if (m.type !== 'run-finished') return;
|
|
16657
|
+
// The ending can beat this tab's own Run answer after a video offer settled the strip: the saved token goes
|
|
16658
|
+
// now either way, so a reload never rediscovers a finished run.
|
|
16659
|
+
if (signalRun.token) forgetRunToken(signalRun.token);
|
|
16660
|
+
signalRunEnd(typeof m.outcome === 'string' ? m.outcome : 'failed');
|
|
16661
|
+
}
|
|
16662
|
+
/** A progress record reaches the tab only when it is the followed run's own (another workflow's is not). */
|
|
16663
|
+
function signalRunProgress(m) {
|
|
16664
|
+
if (signalRunOwns(m) && window.flolessTabSignal) window.flolessTabSignal.progress(m);
|
|
16665
|
+
}
|
|
16666
|
+
// ── tab signal (end)
|
|
16667
|
+
|
|
16575
16668
|
function liveRunOwns(m) {
|
|
16576
16669
|
if (!liveRun || liveRun.ended) return false;
|
|
16577
16670
|
if (m.clientRunToken && m.clientRunToken === liveRun.token) return true;
|
|
@@ -16580,9 +16673,10 @@
|
|
|
16580
16673
|
|
|
16581
16674
|
function onLiveProgress(m) {
|
|
16582
16675
|
if (!liveRun) return;
|
|
16583
|
-
if (m.runId && !liveRun.runId) liveRun.runId = m.runId;
|
|
16676
|
+
if (m.runId && !liveRun.runId) { liveRun.runId = m.runId; signalRunNote(liveRun); }
|
|
16584
16677
|
if (liveRun.surface === 'strip' && !liveRun.shown) showRunStrip();
|
|
16585
16678
|
if (liveRun.view) liveRun.view.apply(m);
|
|
16679
|
+
signalRunProgress(m);
|
|
16586
16680
|
if (liveRun.appId === currentId) setNodeProgress(m.node, m);
|
|
16587
16681
|
}
|
|
16588
16682
|
|
|
@@ -16606,8 +16700,11 @@
|
|
|
16606
16700
|
const appName = (apps.get(appId) && apps.get(appId).displayName) || appId;
|
|
16607
16701
|
let run = liveRun && liveRun.appId === appId && liveRun.surface === 'strip' ? liveRun : null;
|
|
16608
16702
|
if (!run || !run.view) {
|
|
16609
|
-
|
|
16610
|
-
|
|
16703
|
+
// The videos can arrive before the run's own ending: the offer keeps the run's identity, so the tab signal
|
|
16704
|
+
// still hears that ending (signalRunEvent, or this tab's own Run answer through finishLiveRun).
|
|
16705
|
+
const prior = liveRun && !liveRun.ended ? liveRun : null;
|
|
16706
|
+
disposeLiveRun({ keepSignal: !!prior });
|
|
16707
|
+
liveRun = { appId, token: prior ? prior.token : null, runId: prior ? prior.runId : null, owner: true, surface: 'strip', view: null, shown: false, showTimer: null, lingerTimer: null, ended: false, startedAt: Date.now() };
|
|
16611
16708
|
showRunStrip();
|
|
16612
16709
|
run = liveRun;
|
|
16613
16710
|
run.view.finish('ok');
|
|
@@ -16640,9 +16737,16 @@
|
|
|
16640
16737
|
|
|
16641
16738
|
function finishLiveRun(outcome) {
|
|
16642
16739
|
if (pageLeaving) return; // the page is going away mid-run: keep the token so the next page resumes it
|
|
16740
|
+
if (liveRun && liveRun.ended && signalRunIs(liveRun)) {
|
|
16741
|
+
// Its videos came first and settled the strip; this is the ending the tab was still waiting for.
|
|
16742
|
+
forgetRunToken(liveRun.token);
|
|
16743
|
+
signalRunEnd(outcome);
|
|
16744
|
+
return;
|
|
16745
|
+
}
|
|
16643
16746
|
if (!liveRun || liveRun.ended) return;
|
|
16644
16747
|
const run = liveRun;
|
|
16645
16748
|
run.ended = true;
|
|
16749
|
+
if (signalRunIs(run)) signalRunEnd(outcome);
|
|
16646
16750
|
forgetRunToken(run.token);
|
|
16647
16751
|
syncRunControls();
|
|
16648
16752
|
if (run.showTimer) { clearTimeout(run.showTimer); run.showTimer = null; }
|
|
@@ -16698,6 +16802,7 @@
|
|
|
16698
16802
|
if (liveRun && !liveRun.ended) return;
|
|
16699
16803
|
disposeLiveRun();
|
|
16700
16804
|
liveRun = { appId: m.id, token: m.clientRunToken || null, runId: m.runId || null, owner: false, surface: 'strip', view: null, shown: false, showTimer: null, lingerTimer: null, ended: false, startedAt: typeof m.startedAt === 'number' ? m.startedAt : Date.now() };
|
|
16805
|
+
signalRunBegin(liveRun);
|
|
16701
16806
|
liveRun.showTimer = setTimeout(showRunStrip, RUN_STRIP_DELAY_MS);
|
|
16702
16807
|
}
|
|
16703
16808
|
|
|
@@ -16793,6 +16898,7 @@
|
|
|
16793
16898
|
}
|
|
16794
16899
|
disposeLiveRun();
|
|
16795
16900
|
liveRun = { appId: snap.id, token: saved.token, runId: snap.runId, runRequestId: typeof snap.runRequestId === 'string' ? snap.runRequestId : null, owner: true, surface: 'strip', view: null, shown: false, showTimer: null, lingerTimer: null, ended: false, startedAt: snap.startedAt };
|
|
16901
|
+
signalRunBegin(liveRun); // a reload mid-run: the tab says it is still going
|
|
16796
16902
|
showRunStrip();
|
|
16797
16903
|
for (const rec of snap.nodes || []) onLiveProgress({ ...rec, runId: snap.runId });
|
|
16798
16904
|
}
|
|
@@ -16826,7 +16932,7 @@
|
|
|
16826
16932
|
// revert to the last cached report if there is one, else an idle prompt.
|
|
16827
16933
|
function clearTriggerCollecting() {
|
|
16828
16934
|
const cached = currentId && lastReportByApp.get(currentId);
|
|
16829
|
-
if (cached && cached.html) { paintReport(cached.html); return; }
|
|
16935
|
+
if (cached && cached.html) { paintReport(cached.html, cached.interactive, cached); return; }
|
|
16830
16936
|
$reportOverlay.replaceChildren();
|
|
16831
16937
|
$reportOverlay.hidden = false;
|
|
16832
16938
|
$reportOverlay.append(mkEl('div', null, 'Listening for the next selection…'));
|
|
@@ -16875,7 +16981,7 @@
|
|
|
16875
16981
|
$reportTitle.textContent = `HTML Viewer · ${app.displayName}`;
|
|
16876
16982
|
$reportModal.dataset.nodeId = reportNodeId() || '';
|
|
16877
16983
|
const cached = lastReportByApp.get(id);
|
|
16878
|
-
if (cached && cached.html) paintReport(cached.html);
|
|
16984
|
+
if (cached && cached.html) paintReport(cached.html, cached.interactive, cached);
|
|
16879
16985
|
else { clearReportFrames(); $reportShare.hidden = true; }
|
|
16880
16986
|
$reportOverlay.hidden = false;
|
|
16881
16987
|
$reportOverlay.replaceChildren();
|
|
@@ -16968,7 +17074,7 @@
|
|
|
16968
17074
|
if (cached && cached.html) {
|
|
16969
17075
|
$reportOverlay.hidden = true;
|
|
16970
17076
|
$reportOverlay.replaceChildren();
|
|
16971
|
-
$reportShare.hidden =
|
|
17077
|
+
$reportShare.hidden = !!cached.withFiles && !cached.interactive; // the cached report is the primary content (a report with files is not shared from here)
|
|
16972
17078
|
$reportSub.innerHTML = `<span class="live-pip" aria-hidden="true"></span>Live · waiting for the next change — change your selection in Tekla to refresh the report.`;
|
|
16973
17079
|
} else {
|
|
16974
17080
|
clearReportFrames();
|
|
@@ -16993,7 +17099,7 @@
|
|
|
16993
17099
|
if (cached && cached.html) {
|
|
16994
17100
|
$reportOverlay.hidden = true;
|
|
16995
17101
|
$reportOverlay.replaceChildren();
|
|
16996
|
-
$reportShare.hidden =
|
|
17102
|
+
$reportShare.hidden = !!cached.withFiles && !cached.interactive;
|
|
16997
17103
|
$reportSub.innerHTML = complete
|
|
16998
17104
|
? `Run complete · last report above — click <strong>▶ Run workflow</strong> to run again.`
|
|
16999
17105
|
: `Live session stopped · last report above — click <strong>▶ Run workflow</strong> to start again.`;
|
|
@@ -18607,6 +18713,10 @@
|
|
|
18607
18713
|
if (selectionTicket === selectionAtStart) selectionTicket += 1;
|
|
18608
18714
|
const committed = { ...row, ...workflow, restoreRefreshState: 'pending' };
|
|
18609
18715
|
wfOwned = wfOwned.filter((item) => item.workflowId !== workflowId).concat(committed);
|
|
18716
|
+
// It lands in Your workflows: open that section now, so the restored card and its "Refreshing…" line show at once
|
|
18717
|
+
// rather than only after the list refresh, however long that takes.
|
|
18718
|
+
const yours = $wfLanding?.querySelector('.wf-section[data-wf-section="yours"]');
|
|
18719
|
+
if (yours) yours.open = true;
|
|
18610
18720
|
if (wfLanding) renderWorkflowsLanding();
|
|
18611
18721
|
let refreshFailed = false;
|
|
18612
18722
|
try { await loadApps({ preserveSelection: true }); }
|
|
@@ -18631,6 +18741,9 @@
|
|
|
18631
18741
|
? $wfLanding.querySelector(`[data-wf-restored="${CSS.escape(workflowId)}"]`)
|
|
18632
18742
|
|| $wfLanding.querySelector(publication ? `[data-wf-id="${CSS.escape(publication.id)}"]` : `[data-wf-draft="${CSS.escape(workflowId)}"]`)
|
|
18633
18743
|
: $wfLanding.querySelector(`[data-wf-restore="${CSS.escape(workflowId)}"]`);
|
|
18744
|
+
// A card in a section the person closed cannot take focus: open its section first.
|
|
18745
|
+
const section = target?.closest('.wf-section');
|
|
18746
|
+
if (section && !section.open) section.open = true;
|
|
18634
18747
|
(target && !target.hidden ? target : document.getElementById('wf-landing-title'))?.focus();
|
|
18635
18748
|
}
|
|
18636
18749
|
}
|
|
@@ -18641,6 +18754,10 @@
|
|
|
18641
18754
|
const $wfLanding = document.getElementById('wf-landing');
|
|
18642
18755
|
// The landing search's query, kept outside the input because the landing re-renders with innerHTML.
|
|
18643
18756
|
let wfLandingQuery = '';
|
|
18757
|
+
// #2568: the landing's two tabs. The choice is remembered by this browser window; anything unknown, or a store that
|
|
18758
|
+
// throws (private window, blocked site data), reads as Workflows.
|
|
18759
|
+
const WF_TAB_KEY = 'floless.workflowsLandingTab';
|
|
18760
|
+
let wfLandingTab = (() => { try { return localStorage.getItem(WF_TAB_KEY) === 'pages' ? 'pages' : 'workflows'; } catch { return 'workflows'; } })();
|
|
18644
18761
|
function showWorkflowsLanding(on) {
|
|
18645
18762
|
const next = Boolean(on);
|
|
18646
18763
|
if (next === wfLanding && (!next || $wfLanding?.childElementCount)) { if (next) renderWorkflowsLanding(); return; }
|
|
@@ -18690,19 +18807,75 @@
|
|
|
18690
18807
|
+ `Your other workflows are not affected. Ask AI Chat to repair or reinstall ${one ? 'it' : 'them'}.</div>`;
|
|
18691
18808
|
}
|
|
18692
18809
|
|
|
18810
|
+
/** The Workflows landing's heading, sub line, tabs and (when there is something to search) search box, shared by both tabs. */
|
|
18811
|
+
function workflowsLandingHeadHtml(esc, showSearch) {
|
|
18812
|
+
const pages = wfLandingTab === 'pages';
|
|
18813
|
+
const tab = (id, label) => `<button type="button" role="tab" id="wf-tab-${id}" data-wf-tab="${id}" class="${wfLandingTab === id ? 'active' : ''}"`
|
|
18814
|
+
+ ` aria-selected="${wfLandingTab === id}"${id === 'pages' ? ' aria-controls="wf-pages-panel"' : ''} tabindex="${wfLandingTab === id ? 0 : -1}"`
|
|
18815
|
+
+ ` data-command-id="shell.workflows-landing-tab#${esc(id)}">${label}</button>`;
|
|
18816
|
+
return `<div class="ws-head"><div class="ws-head-text"><h2 tabindex="-1" id="wf-landing-title">Workflows</h2>`
|
|
18817
|
+
+ `<p class="ws-sub">Build, run and manage the workflows behind your projects. Ask AI Chat on the left to build one with you.</p>`
|
|
18818
|
+
+ `<div class="tabs ws-step-tabs wf-landing-tabs" role="tablist" aria-label="Workflows page">${tab('workflows', 'Workflows')}${tab('pages', 'Pages')}</div></div>`
|
|
18819
|
+
+ (showSearch ? `<div class="ws-head-actions"><input type="search" id="wf-landing-search" class="ws-landing-search" data-command-id="shell.workflows-landing-search" placeholder="${pages ? 'Search pages' : 'Search workflows'}" aria-label="${pages ? 'Search Pages by workflow, Page title or project' : 'Search workflows by name, project or tool'}" autocomplete="off" spellcheck="false" value="${esc(wfLandingQuery)}"></div>` : '')
|
|
18820
|
+
+ `</div>`;
|
|
18821
|
+
}
|
|
18822
|
+
|
|
18823
|
+
/** Switch the landing's tab: remember it, repaint, and (for a keyboard or button move) put focus on the chosen tab. */
|
|
18824
|
+
function setWorkflowsLandingTab(tab, focusTab) {
|
|
18825
|
+
const next = tab === 'pages' ? 'pages' : 'workflows';
|
|
18826
|
+
if (next !== wfLandingTab) {
|
|
18827
|
+
wfLandingTab = next;
|
|
18828
|
+
try { localStorage.setItem(WF_TAB_KEY, next); } catch { /* not remembered; the tab still switches */ }
|
|
18829
|
+
}
|
|
18830
|
+
renderWorkflowsLanding();
|
|
18831
|
+
if (focusTab) $wfLanding.querySelector(`[data-wf-tab="${next}"]`)?.focus();
|
|
18832
|
+
}
|
|
18833
|
+
|
|
18834
|
+
/** The Pages tab: the heading and tabs, the search, and a panel pages.js fills with every workflow's Page. */
|
|
18835
|
+
function renderWorkflowsPagesTab() {
|
|
18836
|
+
const focusedTab = document.activeElement?.closest?.('#wf-landing [data-wf-tab]')?.dataset.wfTab || null;
|
|
18837
|
+
const search = document.activeElement?.id === 'wf-landing-search' ? document.activeElement : null;
|
|
18838
|
+
const keepCaret = search ? [search.selectionStart, search.selectionEnd] : null;
|
|
18839
|
+
const esc = (s) => String(s ?? '').replace(/&/g, '&').replace(/</g, '<').replace(/>/g, '>').replace(/"/g, '"');
|
|
18840
|
+
$wfLanding.innerHTML = workflowsLandingHeadHtml(esc, true)
|
|
18841
|
+
+ '<div id="wf-pages-panel" class="wf-pages-panel" role="tabpanel" aria-labelledby="wf-tab-pages"></div>';
|
|
18842
|
+
const panel = $wfLanding.querySelector('#wf-pages-panel');
|
|
18843
|
+
if (window.flolessPages?.renderWorkflowsList) {
|
|
18844
|
+
void window.flolessPages.renderWorkflowsList(panel, {
|
|
18845
|
+
getQuery: () => wfLandingQuery,
|
|
18846
|
+
onAction: (act) => {
|
|
18847
|
+
if (act === 'show-workflows') setWorkflowsLandingTab('workflows', true);
|
|
18848
|
+
else if (act === 'clear-search') { setWorkflowsLandingQuery(''); $wfLanding.querySelector('#wf-landing-search')?.focus(); }
|
|
18849
|
+
},
|
|
18850
|
+
});
|
|
18851
|
+
} else {
|
|
18852
|
+
panel.innerHTML = '<div class="pg-empty" role="alert"><p>FloLess couldn’t load the workflows’ Pages. Check that FloLess is running, then try again.</p></div>';
|
|
18853
|
+
}
|
|
18854
|
+
if (focusedTab) $wfLanding.querySelector(`[data-wf-tab="${focusedTab}"]`)?.focus();
|
|
18855
|
+
if (keepCaret) { const box = $wfLanding.querySelector('#wf-landing-search'); box?.focus(); box?.setSelectionRange?.(keepCaret[0], keepCaret[1]); }
|
|
18856
|
+
}
|
|
18857
|
+
|
|
18693
18858
|
function renderWorkflowsLanding() {
|
|
18694
18859
|
if (!$wfLanding) return;
|
|
18860
|
+
if (wfLandingTab === 'pages') { renderWorkflowsPagesTab(); return; }
|
|
18861
|
+
const focusedTab = document.activeElement?.closest?.('#wf-landing [data-wf-tab]')?.dataset.wfTab || null;
|
|
18695
18862
|
const focusedId = document.activeElement?.closest?.('#wf-landing [data-wf-id]')?.dataset.wfId || null;
|
|
18696
18863
|
const search = document.activeElement?.id === 'wf-landing-search' ? document.activeElement : null;
|
|
18697
18864
|
const keepCaret = search ? [search.selectionStart, search.selectionEnd] : null;
|
|
18698
18865
|
const clearFocused = document.activeElement?.id === 'wf-search-clear';
|
|
18699
18866
|
const focusedDraft = document.activeElement?.closest?.('#wf-landing [data-wf-draft]')?.dataset.wfDraft || null;
|
|
18700
18867
|
const focusedRestore = document.activeElement?.closest?.('[data-wf-restore]')?.dataset.wfRestore || null;
|
|
18701
|
-
//
|
|
18702
|
-
//
|
|
18703
|
-
|
|
18704
|
-
const
|
|
18705
|
-
const
|
|
18868
|
+
// Every section (Your workflows, Installed, Archived) is the same disclosure, and each keeps its open state across
|
|
18869
|
+
// repaints (apps-changed, search, restore, coming back to the tab); focus on a card inside implies open. Focus on
|
|
18870
|
+
// the summary alone must NOT force it open (the person just closed it).
|
|
18871
|
+
const keptSections = {};
|
|
18872
|
+
for (const box of $wfLanding.querySelectorAll('.wf-section')) {
|
|
18873
|
+
keptSections[box.dataset.wfSection] = {
|
|
18874
|
+
open: !!box.open || document.activeElement?.closest?.('.wf-section > .ws-grid')?.parentElement === box,
|
|
18875
|
+
searchOpened: !!box.dataset.searchOpened,
|
|
18876
|
+
summaryFocused: document.activeElement?.closest?.('.wf-section > summary')?.parentElement === box,
|
|
18877
|
+
};
|
|
18878
|
+
}
|
|
18706
18879
|
const focusedRestored = document.activeElement?.closest?.('[data-wf-restored]')?.dataset.wfRestored || null;
|
|
18707
18880
|
const esc = (s) => String(s ?? '').replace(/&/g, '&').replace(/</g, '<').replace(/>/g, '>').replace(/"/g, '"');
|
|
18708
18881
|
const restoredRows = wfOwned.filter((row) => row.status !== 'archived' && row.restoreRefreshState);
|
|
@@ -18750,28 +18923,34 @@
|
|
|
18750
18923
|
+ `<div class="ws-name">${esc(name)}</div><div class="ws-meta">${esc(where)}</div>`
|
|
18751
18924
|
+ `<div class="ws-meta wf-card-nodes">${esc(workflowCardMeta(row))}</div></div></div></div>`;
|
|
18752
18925
|
};
|
|
18753
|
-
|
|
18754
|
-
|
|
18755
|
-
|
|
18756
|
-
const
|
|
18757
|
-
|
|
18758
|
-
|
|
18759
|
-
: ''
|
|
18760
|
-
|
|
18761
|
-
|
|
18762
|
-
|
|
18763
|
-
|
|
18926
|
+
// One section: a disclosure whose summary names it and counts its cards. Your workflows and Installed start open,
|
|
18927
|
+
// Archived starts closed; a section the person opened or closed stays that way (keptSections). The summary's
|
|
18928
|
+
// Instructor carrier is passed whole by each caller: a command id is never assembled from parts.
|
|
18929
|
+
const section = (key, carrier, title, count, cards, openByDefault) => {
|
|
18930
|
+
if (!count) return '';
|
|
18931
|
+
const open = keptSections[key] ? keptSections[key].open : openByDefault;
|
|
18932
|
+
return `<details class="ws-archived wf-section wf-${key}" data-wf-section="${key}"${open ? ' open' : ''}>`
|
|
18933
|
+
+ `<summary class="ws-archived-summary" ${carrier}><span class="ws-archived-caret hd-caret" aria-hidden="true">▸</span>${title} <span class="ws-archived-count">${count}</span></summary>`
|
|
18934
|
+
+ `<div class="ws-grid">${cards}</div></details>`;
|
|
18935
|
+
};
|
|
18936
|
+
const yoursSection = section('yours', 'data-command-id="shell.workflows-landing-yours"', 'Your workflows', unlisted.length + owned.length + restoredRows.length,
|
|
18937
|
+
`${unlisted.map(draftCard).join('')}${owned.map(card).join('')}${restoredRows.map(restoredCard).join('')}`, true);
|
|
18938
|
+
$wfLanding.innerHTML = workflowsLandingHeadHtml(esc, Boolean(wfLibrary.length || unlisted.length || archived.length || restoredRows.length))
|
|
18764
18939
|
+ `<div class="ws-create-grid"><div class="ws-card ws-create ws-card-create wf-create" role="button" tabindex="0" data-wf-new="1" data-command-id="shell.workflows-landing-new">`
|
|
18765
18940
|
+ `<div class="ws-thumb">+</div><div class="ws-body"><div><div class="ws-name">New workflow</div>`
|
|
18766
18941
|
+ `<div class="ws-meta">Name it and choose where it belongs. AI builds it with you.</div></div></div></div></div>`
|
|
18767
18942
|
+ unreadableNote
|
|
18768
18943
|
+ (wfLibrary.length || unlisted.length || archived.length || restoredRows.length
|
|
18769
|
-
?
|
|
18944
|
+
? yoursSection + section('installed', 'data-command-id="shell.workflows-landing-installed"', 'Installed', installed.length, installed.map(card).join(''), true)
|
|
18945
|
+
+ section('archived', 'data-command-id="shell.workflows-landing-archived"', 'Archived', archived.length, archived.map(archivedCard).join(''), false)
|
|
18770
18946
|
+ '<div class="ws-empty-note ws-search-empty" id="wf-search-empty" role="status" aria-live="polite"></div>'
|
|
18771
|
-
: '<div class="ws-empty-note">No active workflows yet. Start with New workflow, or ask AI Chat on the left.</div>')
|
|
18772
|
-
|
|
18773
|
-
|
|
18774
|
-
|
|
18947
|
+
: '<div class="ws-empty-note">No active workflows yet. Start with New workflow, or ask AI Chat on the left.</div>');
|
|
18948
|
+
for (const box of $wfLanding.querySelectorAll('.wf-section')) {
|
|
18949
|
+
const kept = keptSections[box.dataset.wfSection];
|
|
18950
|
+
if (kept?.open && kept.searchOpened) box.dataset.searchOpened = '1';
|
|
18951
|
+
if (kept?.summaryFocused) box.querySelector(':scope > summary')?.focus();
|
|
18952
|
+
}
|
|
18953
|
+
if (focusedTab) $wfLanding.querySelector(`[data-wf-tab="${focusedTab}"]`)?.focus();
|
|
18775
18954
|
if (focusedId) $wfLanding.querySelector(`[data-wf-id="${CSS.escape(focusedId)}"]`)?.focus();
|
|
18776
18955
|
if (focusedDraft) $wfLanding.querySelector(`[data-wf-draft="${CSS.escape(focusedDraft)}"]`)?.focus();
|
|
18777
18956
|
if (focusedRestore) $wfLanding.querySelector(`[data-wf-restore="${CSS.escape(focusedRestore)}"]:not(:disabled)`)?.focus();
|
|
@@ -18784,10 +18963,12 @@
|
|
|
18784
18963
|
/** Hide the workflow cards that don't match the landing search: every typed word must appear somewhere in the
|
|
18785
18964
|
* card's name or the line under it (its project, or the tool an installed workflow runs on), never in its
|
|
18786
18965
|
* "N nodes · tool" line, which every card has. New workflow is an action,
|
|
18787
|
-
* not a result, so it stays. A
|
|
18966
|
+
* not a result, so it stays. A section with nothing left hides whole; a shown one counts "1 of 3" in its summary. */
|
|
18788
18967
|
function applyWorkflowsLandingSearch(caret) {
|
|
18789
18968
|
const input = $wfLanding.querySelector('#wf-landing-search');
|
|
18790
18969
|
if (!input) return;
|
|
18970
|
+
// The Pages tab filters its own rows (pages.js), from the same query.
|
|
18971
|
+
if (wfLandingTab === 'pages') { window.flolessPages?.repaintWorkflowsList?.($wfLanding.querySelector('#wf-pages-panel')); return; }
|
|
18791
18972
|
const terms = wfLandingQuery.trim().toLowerCase().split(/\s+/).filter(Boolean);
|
|
18792
18973
|
let shownAll = 0;
|
|
18793
18974
|
for (const grid of $wfLanding.querySelectorAll('.ws-grid')) {
|
|
@@ -18798,23 +18979,15 @@
|
|
|
18798
18979
|
card.hidden = !terms.every((t) => hay.includes(t));
|
|
18799
18980
|
if (!card.hidden) shown++;
|
|
18800
18981
|
}
|
|
18801
|
-
|
|
18802
|
-
if
|
|
18803
|
-
|
|
18804
|
-
|
|
18805
|
-
|
|
18806
|
-
const count =
|
|
18982
|
+
// Each section counts in its summary; a search that matches opens a closed one, an empty match hides all of it,
|
|
18983
|
+
// and clearing the search closes it again only if the search was what opened it.
|
|
18984
|
+
const box = grid.closest('.wf-section');
|
|
18985
|
+
if (box) {
|
|
18986
|
+
box.hidden = !shown;
|
|
18987
|
+
const count = box.querySelector('.ws-archived-count');
|
|
18807
18988
|
if (count) count.textContent = terms.length ? `${shown} of ${cards.length}` : String(cards.length);
|
|
18808
|
-
if (terms.length && shown && !
|
|
18809
|
-
else if (!terms.length &&
|
|
18810
|
-
shownAll += shown;
|
|
18811
|
-
continue;
|
|
18812
|
-
}
|
|
18813
|
-
grid.hidden = !shown;
|
|
18814
|
-
const label = grid.previousElementSibling?.classList.contains('wf-group-label') ? grid.previousElementSibling : null;
|
|
18815
|
-
if (label) {
|
|
18816
|
-
label.hidden = !shown;
|
|
18817
|
-
label.textContent = label.textContent.replace(/\(\d+(?: of \d+)?\)$/, terms.length ? `(${shown} of ${cards.length})` : `(${cards.length})`);
|
|
18989
|
+
if (terms.length && shown && !box.open) { box.open = true; box.dataset.searchOpened = '1'; }
|
|
18990
|
+
else if (!terms.length && box.dataset.searchOpened) { box.open = false; delete box.dataset.searchOpened; }
|
|
18818
18991
|
}
|
|
18819
18992
|
shownAll += shown;
|
|
18820
18993
|
}
|
|
@@ -19089,8 +19262,8 @@
|
|
|
19089
19262
|
|
|
19090
19263
|
if ($wfLanding) {
|
|
19091
19264
|
$wfLanding.addEventListener('click', (event) => {
|
|
19092
|
-
// A hand toggle of
|
|
19093
|
-
if (event.target.closest('.wf-
|
|
19265
|
+
// A hand toggle of a section means the person owns its state now: clearing the search must not undo it.
|
|
19266
|
+
if (event.target.closest('.wf-section > summary')) delete event.target.closest('.wf-section').dataset.searchOpened;
|
|
19094
19267
|
const restore = event.target.closest('[data-wf-restore]');
|
|
19095
19268
|
if (restore) {
|
|
19096
19269
|
if (!restore.disabled) {
|
|
@@ -19101,6 +19274,8 @@
|
|
|
19101
19274
|
}
|
|
19102
19275
|
return;
|
|
19103
19276
|
}
|
|
19277
|
+
const tabEl = event.target.closest('[data-wf-tab]');
|
|
19278
|
+
if (tabEl) { setWorkflowsLandingTab(tabEl.dataset.wfTab, true); return; }
|
|
19104
19279
|
if (event.target.closest('[data-wf-new]')) { requestNewWorkflow(); return; }
|
|
19105
19280
|
// Clearing empties the message the button sits in, so focus goes back to the search box.
|
|
19106
19281
|
if (event.target.closest('#wf-search-clear')) { setWorkflowsLandingQuery(''); $wfLanding.querySelector('#wf-landing-search')?.focus(); return; }
|
|
@@ -19119,6 +19294,17 @@
|
|
|
19119
19294
|
if (event.key === 'Escape' && event.target.id === 'wf-landing-search' && event.target.value) {
|
|
19120
19295
|
event.preventDefault(); event.stopPropagation(); setWorkflowsLandingQuery(''); return;
|
|
19121
19296
|
}
|
|
19297
|
+
// The tabs move by arrow keys (the focused tab is the one tab stop) and activate as they take focus.
|
|
19298
|
+
const onTab = event.target.closest?.('[data-wf-tab]');
|
|
19299
|
+
if (onTab && ['ArrowLeft', 'ArrowRight', 'Home', 'End'].includes(event.key)) {
|
|
19300
|
+
event.preventDefault();
|
|
19301
|
+
const order = ['workflows', 'pages'];
|
|
19302
|
+
const at = order.indexOf(onTab.dataset.wfTab);
|
|
19303
|
+
const to = event.key === 'Home' ? 0 : event.key === 'End' ? order.length - 1
|
|
19304
|
+
: (at + (event.key === 'ArrowRight' ? 1 : order.length - 1)) % order.length;
|
|
19305
|
+
setWorkflowsLandingTab(order[to], true);
|
|
19306
|
+
return;
|
|
19307
|
+
}
|
|
19122
19308
|
if (event.key !== 'Enter' && event.key !== ' ') return;
|
|
19123
19309
|
const target = event.target.closest('[data-wf-id], [data-wf-new], [data-wf-draft]');
|
|
19124
19310
|
if (!target || target !== event.target) return;
|
package/dist/web/chat.css
CHANGED
|
@@ -1110,6 +1110,17 @@
|
|
|
1110
1110
|
.ai-chat-source-viewer button { appearance: none; border: 1px solid var(--border-strong); border-radius: 5px; background: var(--surface-2); color: var(--text); font: 11px/1 var(--ui); padding: 6px 10px; cursor: pointer; }
|
|
1111
1111
|
.ai-chat-source-viewer button:hover { background: var(--surface-3); }
|
|
1112
1112
|
.ai-chat-source-viewer-knowledge { align-self: flex-end; margin: 0 12px 12px; }
|
|
1113
|
+
/* #2471: a cited member as it was cited, and a cited data file's text. */
|
|
1114
|
+
.ai-chat-source-viewer-sub { margin: 0 0 4px; color: var(--text-dim); font: 600 9.5px/1.4 var(--mono); letter-spacing: .04em; text-transform: uppercase; }
|
|
1115
|
+
.ai-chat-source-viewer-facts { display: grid; grid-template-columns: max-content 1fr; gap: 4px 12px; margin: 0 0 10px; font: 12px/1.45 var(--ui); }
|
|
1116
|
+
.ai-chat-source-viewer-facts dt { color: var(--text-muted); }
|
|
1117
|
+
.ai-chat-source-viewer-facts dd { margin: 0; min-width: 0; overflow-wrap: anywhere; }
|
|
1118
|
+
.ai-chat-source-viewer-text { max-height: 55vh; margin: 8px 0 0; padding: 8px 10px; overflow: auto; border: 1px solid var(--border); border-radius: 4px; background: var(--surface-2); color: var(--text); font: 11px/1.45 var(--mono); white-space: pre; scrollbar-width: thin; scrollbar-color: var(--text-dim) var(--surface-2); }
|
|
1119
|
+
.ai-chat-source-viewer-text::-webkit-scrollbar { width: 8px; height: 8px; }
|
|
1120
|
+
.ai-chat-source-viewer-text::-webkit-scrollbar-track { background: var(--surface-2); }
|
|
1121
|
+
.ai-chat-source-viewer-text::-webkit-scrollbar-thumb { background: var(--text-dim); border-radius: 8px; }
|
|
1122
|
+
.ai-chat-source-viewer-text::-webkit-scrollbar-corner { background: var(--surface-2); }
|
|
1123
|
+
.ai-chat-source-viewer-text:focus-visible { outline: 2px solid var(--accent); outline-offset: 1px; }
|
|
1113
1124
|
[data-theme="light"] .ai-chat-source-viewer::backdrop { background: rgba(15, 23, 42, .35); }
|
|
1114
1125
|
[data-theme="light"] .ai-chat-sources, [data-theme="light"] .ai-chat-source-viewer { --text-muted: #475569; }
|
|
1115
1126
|
/* The light theme's dim text is 2.7:1 on a chip, and its warning text 4.1:1 on a marker: below the 4.5:1 floor at these
|
|
@@ -1745,11 +1756,18 @@
|
|
|
1745
1756
|
.ai-chat-action-summary { margin: 6px 0 0; color: var(--text); font-size: 12px; line-height: 16px; overflow-wrap: anywhere; }
|
|
1746
1757
|
.ai-chat-action-why { color: var(--text-muted); }
|
|
1747
1758
|
.ai-chat-action-changed { margin-top: 6px; color: var(--text); }
|
|
1759
|
+
/* #2521 row 3a: what confirming a Quick model read agrees to. Set apart from the summary and never clamped. */
|
|
1760
|
+
.ai-chat-action-terms { padding: 4px 8px; border-left: 2px solid var(--border-strong); border-radius: 0 4px 4px 0; background: var(--surface); color: var(--text-muted); }
|
|
1761
|
+
.ai-chat-action-terms-label { display: block; margin-bottom: 2px; color: var(--text-muted); font-size: 10px; font-weight: 600; letter-spacing: 0.04em; text-transform: uppercase; }
|
|
1762
|
+
/* A Quick read that was queued Precise: the person's choice is not what ran, so the done card's edge turns amber. */
|
|
1763
|
+
.ai-chat-action-card.is-done.is-fallback { border-left-color: var(--warn); }
|
|
1748
1764
|
.ai-chat-action-status:empty { display: none; }
|
|
1749
1765
|
.ai-chat-action-status:focus { outline: none; }
|
|
1750
1766
|
.ai-chat-action-status:focus-visible { outline: 2px solid var(--accent); outline-offset: 1px; }
|
|
1751
1767
|
.ai-chat-action-card.is-done { border-left: 3px solid var(--ok); background: color-mix(in srgb, var(--ok) 8%, var(--surface-2)); }
|
|
1752
1768
|
.ai-chat-action-card.is-failed { border-left: 3px solid var(--err); }
|
|
1769
|
+
/* #2427: the last click is the person's: an accent edge, not the red of a failure or the green of a finish. */
|
|
1770
|
+
.ai-chat-action-card.is-handed-over { border-left: 3px solid var(--accent); }
|
|
1753
1771
|
.ai-chat-action-card.is-collapsed { padding: 6px 10px; border-left-color: var(--border-strong); }
|
|
1754
1772
|
.ai-chat-action-line { margin: 0; color: var(--text-muted); font-size: 11px; line-height: 15px; overflow-wrap: anywhere; }
|
|
1755
1773
|
|