@ai-setting/roy-plugin-task-show 2.5.21 → 2.6.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/tool-call-detail.d.ts +21 -0
- package/dist/tool-call-detail.d.ts.map +1 -1
- package/dist/tool-call-detail.js +42 -2
- package/dist/tool-call-detail.js.map +1 -1
- package/package.json +1 -1
- package/plugin.json +3 -3
- package/public/app.js +185 -19
- package/public/mermaid-renderer.js +81 -5
- package/public/tool-call-detail.js +16 -2
|
@@ -102,6 +102,27 @@ export declare const VIEW_TOOLS: ReadonlySet<string>;
|
|
|
102
102
|
* apply_patch, etc.) keeps the existing diff/Monaco behavior.
|
|
103
103
|
*/
|
|
104
104
|
export declare const WRITE_FILE_TOOLS: ReadonlySet<string>;
|
|
105
|
+
/**
|
|
106
|
+
* v2.5.22 (Task #3063): tools that perform targeted line-level edits
|
|
107
|
+
* (vs whole-file writes). For these tools the right-hand detail panel
|
|
108
|
+
* MUST show a git-style diff (LCS +/-) of the change set, NOT the
|
|
109
|
+
* post-edit full file contents.
|
|
110
|
+
*
|
|
111
|
+
* Background: prior to this fix, the view body for edit_file calls
|
|
112
|
+
* mounted BOTH a `<div class="file-viewer edit-file">` (the diff) AND
|
|
113
|
+
* a `<div class="monaco-editor">` placeholder that loaded the entire
|
|
114
|
+
* file from disk via /api/file-content. When the user clicked "View
|
|
115
|
+
* file" they saw Monaco rendering the whole file (often 669+ lines),
|
|
116
|
+
* which buried the actual change set the tool made.
|
|
117
|
+
*
|
|
118
|
+
* The fix: for tools in this set we render ONLY the diff block and
|
|
119
|
+
* rename the toggle label from "View file" → "View diff" so users
|
|
120
|
+
* know what they're about to expand.
|
|
121
|
+
*
|
|
122
|
+
* Anything else in {@link VIEW_TOOLS} keeps the existing Monaco + diff
|
|
123
|
+
* behavior (e.g. unknown tool variants fall back gracefully).
|
|
124
|
+
*/
|
|
125
|
+
export declare const EDIT_FILE_TOOLS: ReadonlySet<string>;
|
|
105
126
|
/**
|
|
106
127
|
* Compute an LCS-based line diff between `oldStr` and `newStr`.
|
|
107
128
|
*
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"tool-call-detail.d.ts","sourceRoot":"","sources":["../src/tool-call-detail.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAoCG;AAEH,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,YAAY,CAAC;AAOjD;;;;GAIG;AACH,MAAM,WAAW,QAAQ;IACvB,IAAI,EAAE,SAAS,GAAG,OAAO,GAAG,SAAS,CAAC;IACtC,IAAI,EAAE,MAAM,CAAC;IACb,OAAO,EAAE,MAAM,GAAG,IAAI,CAAC;IACvB,OAAO,EAAE,MAAM,GAAG,IAAI,CAAC;CACxB;AAED;;GAEG;AACH,MAAM,WAAW,YAAY;IAC3B,KAAK,EAAE,MAAM,CAAC;IACd,OAAO,EAAE,MAAM,CAAC;IAChB,IAAI,EAAE,MAAM,CAAC;IACb,OAAO,EAAE,MAAM,CAAC;IAChB,MAAM,EAAE,MAAM,CACZ,MAAM,EACN;QAAE,KAAK,EAAE,MAAM,CAAC;QAAC,OAAO,EAAE,MAAM,CAAC;QAAC,IAAI,EAAE,MAAM,CAAC;QAAC,OAAO,EAAE,MAAM,CAAA;KAAE,CAClE,CAAC;CACH;AAED;;GAEG;AACH,MAAM,WAAW,2BAA2B;IAC1C,wEAAwE;IACxE,aAAa,EAAE,MAAM,CAAC;CACvB;AAsCD;;;;;;;;;;;;;GAaG;AACH,eAAO,MAAM,UAAU,EAAE,WAAW,CAAC,MAAM,CAUzC,CAAC;AAEH;;;;;;;;;;;;;;;;GAgBG;AACH,eAAO,MAAM,gBAAgB,EAAE,WAAW,CAAC,MAAM,CAI/C,CAAC;AAMH;;;;;;;;;;;;;;;GAeG;AACH,wBAAgB,WAAW,CAAC,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,GAAG,QAAQ,EAAE,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;;;;;;;;;;;;;GAgBG;AACH,eAAO,MAAM,gBAAgB,EAAE,WAAW,CAAC,MAAM,CAI/C,CAAC;AAEH;;;;;;;;;;;;;;;;;;;GAmBG;AACH,eAAO,MAAM,eAAe,EAAE,WAAW,CAAC,MAAM,CAO9C,CAAC;AAMH;;;;;;;;;;;;;;;GAeG;AACH,wBAAgB,WAAW,CAAC,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,GAAG,QAAQ,EAAE,CA6EtE;AAkBD;;;;;;GAMG;AACH,wBAAgB,oBAAoB,CAAC,IAAI,EAAE;IACzC,IAAI,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;CAChC,GAAG,MAAM,GAAG,IAAI,CAOhB;AAgDD;;;;;;;;;;;;;;;;;;;;;;;;GAwBG;AACH,wBAAgB,oBAAoB,CAClC,IAAI,EAAE,cAAc,EACpB,IAAI,EAAE,2BAA2B,GAChC,MAAM,CA6GR;AAgHD;;;;;;;GAOG;AACH,wBAAgB,kBAAkB,CAChC,SAAS,EAAE,aAAa,CAAC,cAAc,CAAC,GACvC,YAAY,CA4Bd"}
|
package/dist/tool-call-detail.js
CHANGED
|
@@ -116,6 +116,34 @@ export const WRITE_FILE_TOOLS = new Set([
|
|
|
116
116
|
"write",
|
|
117
117
|
"create_file",
|
|
118
118
|
]);
|
|
119
|
+
/**
|
|
120
|
+
* v2.5.22 (Task #3063): tools that perform targeted line-level edits
|
|
121
|
+
* (vs whole-file writes). For these tools the right-hand detail panel
|
|
122
|
+
* MUST show a git-style diff (LCS +/-) of the change set, NOT the
|
|
123
|
+
* post-edit full file contents.
|
|
124
|
+
*
|
|
125
|
+
* Background: prior to this fix, the view body for edit_file calls
|
|
126
|
+
* mounted BOTH a `<div class="file-viewer edit-file">` (the diff) AND
|
|
127
|
+
* a `<div class="monaco-editor">` placeholder that loaded the entire
|
|
128
|
+
* file from disk via /api/file-content. When the user clicked "View
|
|
129
|
+
* file" they saw Monaco rendering the whole file (often 669+ lines),
|
|
130
|
+
* which buried the actual change set the tool made.
|
|
131
|
+
*
|
|
132
|
+
* The fix: for tools in this set we render ONLY the diff block and
|
|
133
|
+
* rename the toggle label from "View file" → "View diff" so users
|
|
134
|
+
* know what they're about to expand.
|
|
135
|
+
*
|
|
136
|
+
* Anything else in {@link VIEW_TOOLS} keeps the existing Monaco + diff
|
|
137
|
+
* behavior (e.g. unknown tool variants fall back gracefully).
|
|
138
|
+
*/
|
|
139
|
+
export const EDIT_FILE_TOOLS = new Set([
|
|
140
|
+
"edit_file",
|
|
141
|
+
"edit",
|
|
142
|
+
"edit_file_v2",
|
|
143
|
+
"multi_edit_file",
|
|
144
|
+
"multi_edit",
|
|
145
|
+
"apply_patch",
|
|
146
|
+
]);
|
|
119
147
|
// ---------------------------------------------------------------------------
|
|
120
148
|
// Diff algorithm
|
|
121
149
|
// ---------------------------------------------------------------------------
|
|
@@ -352,7 +380,14 @@ export function renderToolCallDetail(call, opts) {
|
|
|
352
380
|
new_string: newStr ?? "",
|
|
353
381
|
})
|
|
354
382
|
: "";
|
|
355
|
-
|
|
383
|
+
// v2.5.22 (Task #3063): for edit-style tools we render ONLY the diff
|
|
384
|
+
// block — NOT the Monaco full-file placeholder. The user's complaint
|
|
385
|
+
// was that clicking "View file" on an edit_file tool loaded the
|
|
386
|
+
// entire post-edit file (669+ lines) into Monaco, burying the
|
|
387
|
+
// actual change set. For unknown tool variants that fall through
|
|
388
|
+
// this branch we still mount Monaco so the user has SOME view.
|
|
389
|
+
const isEditTool = EDIT_FILE_TOOLS.has(call.toolName);
|
|
390
|
+
const monacoBlock = !isEditTool && filePath
|
|
356
391
|
? `<div class="monaco-editor"
|
|
357
392
|
data-file-path="${escapeHtmlAttr(filePath)}"
|
|
358
393
|
data-language="${escapeHtmlAttr(detectLanguage(filePath))}"
|
|
@@ -371,20 +406,25 @@ export function renderToolCallDetail(call, opts) {
|
|
|
371
406
|
// container that is `hidden` by default. The toggle button flips
|
|
372
407
|
// `hidden` ↔ visible and updates its label between "View file"
|
|
373
408
|
// and "Hide view".
|
|
409
|
+
//
|
|
410
|
+
// v2.5.22 (Task #3063): for edit-style tools the toggle label reads
|
|
411
|
+
// "View diff" → "Hide diff" so users know what they're expanding.
|
|
374
412
|
const viewBody = editBlock || monacoBlock
|
|
375
413
|
? `<div class="tool-call-view-body" data-view-body hidden>
|
|
376
414
|
${editBlock}
|
|
377
415
|
${monacoBlock}
|
|
378
416
|
</div>`
|
|
379
417
|
: "";
|
|
418
|
+
const toggleLabel = isEditTool ? "View diff" : "View file";
|
|
380
419
|
const toggleButton = viewBody
|
|
381
420
|
? `<button type="button"
|
|
382
421
|
class="tool-call-view-toggle"
|
|
383
422
|
data-view-toggle
|
|
423
|
+
data-initial-label="${escapeHtmlAttr(toggleLabel)}"
|
|
384
424
|
aria-expanded="false"
|
|
385
425
|
aria-controls="view-body-${escapeHtmlAttr(opts.currentCallId)}">
|
|
386
426
|
<span class="tool-call-view-toggle-icon" aria-hidden="true">▶</span>
|
|
387
|
-
<span class="tool-call-view-toggle-label"
|
|
427
|
+
<span class="tool-call-view-toggle-label">${toggleLabel}</span>
|
|
388
428
|
</button>`
|
|
389
429
|
: "";
|
|
390
430
|
return /* html */ `
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"tool-call-detail.js","sourceRoot":"","sources":["../src/tool-call-detail.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAoCG;AAGH,OAAO,EAAE,mBAAmB,EAAE,kBAAkB,EAAE,MAAM,wBAAwB,CAAC;AAwCjF,8EAA8E;AAC9E,YAAY;AACZ,8EAA8E;AAE9E;;;;GAIG;AACH,MAAM,gBAAgB,GAAsB;IAC1C,WAAW;IACX,UAAU;IACV,MAAM;IACN,aAAa;IACb,KAAK;IACL,UAAU;CACX,CAAC;AAEF;;;;GAIG;AACH,MAAM,gBAAgB,GAAsB;IAC1C,YAAY;IACZ,SAAS;IACT,MAAM;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ACP,OAAO,YAAY,CAAC;QACtB,KAAK,KAAK;YACR,OAAO,YAAY,CAAC;QACtB,KAAK,IAAI,CAAC;QACV,KAAK,KAAK,CAAC;QACX,KAAK,KAAK;YACR,OAAO,YAAY,CAAC;QACtB,KAAK,KAAK;YACR,OAAO,YAAY,CAAC;QACtB,KAAK,MAAM;YACT,OAAO,MAAM,CAAC;QAChB,KAAK,IAAI,CAAC;QACV,KAAK,UAAU;YACb,OAAO,UAAU,CAAC;QACpB,KAAK,KAAK;YACR,OAAO,KAAK,CAAC;QACf,KAAK,MAAM,CAAC;QACZ,KAAK,KAAK;YACR,OAAO,MAAM,CAAC;QAChB,KAAK,IAAI;YACP,OAAO,QAAQ,CAAC;QAClB,KAAK,IAAI;YACP,OAAO,MAAM,CAAC;QAChB,KAAK,IAAI;YACP,OAAO,IAAI,CAAC;QACd,KAAK,MAAM;YACT,OAAO,MAAM,CAAC;QAChB,KAAK,IAAI,CAAC;QACV,KAAK,MAAM,CAAC;QACZ,KAAK,KAAK;YACR,OAAO,OAAO,CAAC;QACjB,KAAK,KAAK,CAAC;QACX,KAAK,MAAM;YACT,OAAO,MAAM,CAAC;QAChB,KAAK,MAAM;YACT,OAAO,KAAK,CAAC;QACf,KAAK,KAAK;YACR,OAAO,KAAK,CAAC;QACf,KAAK,KAAK;YACR,OAAO,KAAK,CAAC;QACf;YACE,OAAO,WAAW,CAAC;IACvB,CAAC;AACH,CAAC"}
|
|
1
|
+
{"version":3,"file":"tool-call-detail.js","sourceRoot":"","sources":["../src/tool-call-detail.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAoCG;AAGH,OAAO,EAAE,mBAAmB,EAAE,kBAAkB,EAAE,MAAM,wBAAwB,CAAC;AAwCjF,8EAA8E;AAC9E,YAAY;AACZ,8EAA8E;AAE9E;;;;GAIG;AACH,MAAM,gBAAgB,GAAsB;IAC1C,WAAW;IACX,UAAU;IACV,MAAM;IACN,aAAa;IACb,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AK,MAAM,CAAC;QACZ,KAAK,KAAK;YACR,OAAO,OAAO,CAAC;QACjB,KAAK,KAAK,CAAC;QACX,KAAK,MAAM;YACT,OAAO,MAAM,CAAC;QAChB,KAAK,MAAM;YACT,OAAO,KAAK,CAAC;QACf,KAAK,KAAK;YACR,OAAO,KAAK,CAAC;QACf,KAAK,KAAK;YACR,OAAO,KAAK,CAAC;QACf;YACE,OAAO,WAAW,CAAC;IACvB,CAAC;AACH,CAAC"}
|
package/package.json
CHANGED
package/plugin.json
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ai-setting/roy-plugin-task-show",
|
|
3
|
-
"version": "2.
|
|
3
|
+
"version": "2.6.0",
|
|
4
4
|
"type": "tool-plugin",
|
|
5
|
-
"description": "v2.4.1: Mermaid zoom now supports click-and-drag pan (Task #2785). After zooming in, users can drag the diagram to view the surrounding canvas area. Implementation: per-container panState/dragState WeakMap (no global state leak); applyTransform(translate+scale) single-source-of-truth for the CSS transform; attachPanHandlers on pointerdown/move/up/cancel with setPointerCapture for off-element drags; pointer cursor switches to grab/grabbing with touch-action: none to prevent native scrolling; reset/zoomReset now also resets pan to (0,0). 14/14 new mermaid-pan tests pass, full suite 558/564 with 6 pre-existing failures unrelated to this commit. v2.4.0: Combines v2.3.0 Combines v2.3.0 (worktree-aware file-tree + unbounded Mermaid zoom, Task #2773) with the v2.3.0 mermaid placeholder expansion (Task #2771). Sidebar + endpoint scope git ls-files to session.context.worktree (fallback process.cwd()); Mermaid zoom-in is no longer capped at 3.0\u00d7; .mermaid placeholder is now min-height: 2400px and .mermaid-zoom-stage is min-width: 6400px / min-height: 2400px (5\u00d7 base, via --mermaid-placeholder-multiplier CSS custom property) so dense diagrams get enough canvas to pan/zoom comfortably. v2.3.0: Worktree-aware file tree sidebar + unbounded Mermaid zoom-in. The file-tree sidebar (and /api/task/:id/file-tree endpoint) now scope git ls-files to session.context.worktree when the host (task:before.create / task:after.create payload) supplies a worktree path, so the sidebar shows the files the agent is actually editing instead of the plugin process cwd. New resolveWorktreePath helper in src/file-tree.ts returns session.context.worktree (trimmed, with empty/non-string guard) or falls back to process.cwd() for backward compatibility with pre-v2.3.0 hosts. TypeScript: TaskSession gains an optional context?: { worktree?: string } field. TaskShowServer exposes getCollector() so tests can seed sessions with context.worktree set. The Mermaid zoom toolbar (introduced in v2.0.8) no longer caps zoom-in at 3.0\u00d7 \u2014 the ZOOM_MAX constant is REMOVED and clampZoom only enforces ZOOM_MIN=0.25, so dense diagrams remain readable on high-DPI monitors when the user wants to zoom way in. ZOOM_MIN stays in place so zoom-out still bottoms out before rendering a black screen. New tests: test/file-tree-worktree.test.ts (10 cases \u2014 resolveWorktreePath edges, SSR scope, endpoint scope, fallback), test/mermaid-zoom-unlimited.test.ts (8 cases \u2014 source guard, behaviour at 6\u00d7/10\u00d7/50\u00d7, lower-bound preserved), test/mermaid-placeholder-size.test.ts (7 cases \u2014 min-height/min-width 5\u00d7 checks, transform-origin preserved, --mermaid-placeholder-multiplier hint). v2.3.0: Major visual overhaul of the per-task detail page \u2014 VS Code-style tool-call browser powered by Monaco Editor + LCS-based diff + project file tree with mermaid-driven navigation. The detail page now renders a 2-column layout: a sticky left sidebar with the project's git-tracked file tree (chevron-toggle directories, `is-affected` highlight for files touched by the current task), and a main column with the existing Mermaid + stats + toolcalls table + a new dedicated `<section id=\"tool-call-detail-panel\">` that hosts the LCS diff body + Monaco container for the currently-selected tool call. The legacy inline `<details class=\"diff-panel\">` (naive split-and-filter, prone to mis-tagging context lines) is replaced by `<ol class=\"diff-body\">` with proper added/removed/context markers driven by a real LCS dynamic-programming table (`computeDiff()` in `src/tool-call-detail.ts`). Tool calls with a file path get a Monaco Editor placeholder (`<div class=\"monaco-editor\" data-file-path=\"...\" data-language=\"...\">`) which the client-side `public/tool-call-detail.js` lazy-loads from `cdn.jsdelivr.net/npm/monaco-editor@0.45.0` the first time the user clicks a tool row. The Mermaid `__toolClick(toolId)` callback now drives THREE things: (a) the existing row scroll + highlight (preserved from v1.x), (b) the dedicated detail panel re-renders with the matching call, (c) the file-tree sidebar highlights the corresponding file (when `data-file-path` is present). New `GET /api/task/:id/file-tree` endpoint serves the git-tracked file list (`{ files: string[] }`) with a 30-second in-memory TTL + 8-entry FIFO bound. New modules: `src/file-tree.ts` (pure data layer: `buildFileTree / extractAffectedPaths / findNodeByPath / collectAllPaths / gitLsFiles / parseLsFiles`), `src/tool-call-detail.ts` (SSR + LCS diff + HTML escaping), `public/file-tree.js` (vanilla JS hydrator with chevron toggle + keyboard navigation + scrollIntoView), `public/tool-call-detail.js` (Monaco AMD loader + `__toolClick` wrapper + file-content fetch). New tests: `test/file-tree.test.ts` (21 cases \u2014 empty/single/nested/dedup/sort/depth/parseLsFiles/gitLsFiles), `test/tool-call-detail.test.ts` (22 cases \u2014 LCS diff edges, HTML escape, path aliases, summary stats), `test/tool-call-detail-server-integration.test.ts` (7 cases \u2014 SSR HTML contracts + endpoint), `test/tool-call-detail-jsdom.test.ts` (7 cases \u2014 client-side hydrators). v1.2.0: CSS context & packaged release hotfix. The plugin's public assets (notably `public/style.css`) and runtime adapters now correctly resolve relative to the installed package directory even when consumed via the published npm tarball. The session-scoped `TaskSessionStore` now preserves the full host session context (parent-child task links, plugin-handle id, env scope) across render cycles \u2014 previously the session was collapsed to its `sessionId` on first load and never refreshed, so the home page lost the \u300csession ancestors\u300d chain and external tasks from outside the current session silently disappeared from the tree. Adds `src/task-metadata.ts` as the single source of truth for the public `Task` shape exposed by `/api/tasks` + `/api/tasks/:id`, including the v1.0.0+ `processDescription` field, and re-exports it through the CLI adapters (`cli-tasks-adapter.ts` + `cli-tasks-tree-adapter.ts`) so the home page tree + the per-task page render against the same metadata contract. Bundles 244-line regression test (`test/context-and-packed-release.test.ts`) that boots the plugin from the **npm-pack** directory (not the repo working tree), spawns `roy-agent tasks get <id> --json`, and asserts (a) `public/style.css` is present and \u2265 64 lines, (b) the `/api/events` SSE endpoint survives a reload, and (c) `task.session` survives a render cycle. v1.1.0: Full Server-Sent Events realtime subscription across 3 event classes (task.created / operation.updated / tool.called) on both the home page and the per-task /task/<id> page. The per-task pipeline now subscribes to /api/events and patches the DOM in place on operation.updated \u2014 no more 5s-poll delay before the user sees a new milestone. The 'Task lifecycle pipeline' header badge is replaced by a 5-state SSE-aware badge (stale / connecting / live / reconnecting / error) so the user can tell at a glance whether real-time updates are flowing, the connection dropped, or 3+ consecutive errors triggered the polling fallback. Legacy boolean `stale` cache-TTL pill and `tool.recorded` event name are preserved for back-compat with v0.9.x / v1.0.0 clients. v1.0.0: First stable release. Replaces the v0.9.x fixture-based verify scripts (which built fake TaskOperationsEnvelope and never invoked the real `roy-agent` CLI, masking regressions in the public-schema `processDescription` field) with a real-CLI scenario test + verify (`test/process-description-real-scenario.test.ts` + `scripts/verify-v100-real-scenario.ts`) that spawns `roy-agent tasks get <id> --operations --json` via `defaultRunner` and asserts the API response carries `processDescription` end-to-end. The 0.9.9 processDescription fix is preserved verbatim \u2014 this release only swaps the verify surface. Visualize the tool call chain of a task on a local web service with real-time SSE updates. v0.9.9: Task lifecycle pipeline on /task/<id> now exposes BOTH the milestone badge AND the \u300c\u8fc7\u7a0b\u63cf\u8ff0\u300d column at a glance \u2014 the server-side `/api/tasks/:id/operations` endpoint exposes `processDescription` on every operation (no longer stripped from the public schema), the client-side `renderPipelineHtml` mirrors the server's `.op-desc-block` + `.op-proc-block` block layout so SSR \u2194 CSR stay in sync, and a long-standing CSS right-side text-truncation bug in the pipeline timeline (long CJK titles overflowing the panel edge) is fixed via `min-width: 0` on `.op-row1` + `overflow-wrap: anywhere` on `.op-title`. v0.9.0: Session-scoped home page (only show tasks created after plugin load + their external ancestors), with per-row \u300c\u663e\u793a\u5168\u90e8\u680f\u4f4d\u300d toggle and lazy-loaded operations timeline; per-task Mermaid labels now correctly render CJK / mixed-Latin / emoji text (encoded as \\uXXXX before emission, decoded by the browser); detail page layout reordered to lifecycle \u2192 pipeline \u2192 stats \u2192 toolcalls \u2192 rawjson. v0.5.0+: page refreshes stream over GET /api/events (Server-Sent Events). Subscribes to tool:before.execute, tool:after.execute, task:before.create, task:after.create, task:after.complete (preferred, 2026-07-10+), and task:after.update (legacy fallback). v0.6.11: Mermaid re-rendering is delegated to a self-contained controller (public/mermaid-renderer.js) that prevents the SVG\u2192raw-source regression on async updates and surfaces recoverable .mermaid-error states. v0.6.12: Task lifecycle pipeline (operations timeline) server now emits data-task-id on the pipeline section; client preserves it on swap, so the page actually fetches /api/tasks/<id>/operations and renders the 7-op timeline (previously silently bailed). v0.7.0: Home page redesigned as a hierarchical task tree (driven by `roy-agent tasks tree --json`); new /api/tasks/tree endpoint with status / priority / type / root-id filters, expand/collapse UI, search, and live 30s polling. v0.8.0: per-task page Mermaid area now renders the hierarchical 'Task lifecycle + tools' view \u2014 each operation record owns a subgraph that nests its tool calls, with click callbacks (`window.__toolClick`) that scroll-into-view + highlight + auto-expand the matching row in the tool-call table below. Operation record descriptions (`description` + `processDescription`) are now always rendered inline (no `<details>` collapse) so the user sees the lifecycle state at a glance; a fallback `<details>` kicks in only for descriptions longer than 600 chars. v0.8.1: hotfix for two pre-existing bugs in v0.8.0 (browser smoke test surfaced after merge). (a) Mermaid click directives were emitted as `click t1 __toolClick(1)` (missing `call` keyword) \u2014 Mermaid 10's parser rejects this with `got 'PS'`. Fixed to `click t1 call __toolClick(1)` (the v10 grammar requires `call` to invoke a callback with arguments). (b) `buildMermaidSource` lived inside the `attachTaskPageTimeline` IIFE but was also called from a listener in the `attachToolClickBridge` IIFE \u2014 sibling IIFEs cannot see each other's locals, so the listener threw `ReferenceError: buildMermaidSource is not defined` and the Mermaid diagram silently failed to re-render after `task-show:lifecycle-ops-loaded`. Fixed by hoisting the function (and its three helpers) to script top-level so both IIFEs can see it via the script-wide closure; the function is also exposed on `window.buildMermaidSource` for tests + tooling. v0.8.3: tree-display fix (Task #2426). The home page used to look like a flat list of root tasks because `autoExpandFirstLevels(..., 2)` only opened the first 2 levels \u2014 30/47 roots were leaf nodes and the remaining 17 collapsed to one level so grandchildren were never visible. Default expand depth is now 3 (root + child + grandchild + great-grandchild are visible on first paint), the summary line now shows per-depth count pills (root / child / grandchild / great-grandchild / level-N), each `tree-row` carries a `data-depth` attribute so CSS can paint coloured left rails per level, and the duplicated 'Live tool-call sessions (legacy view)' panel that made the page look like both a flat table AND a tree is now hidden behind `#legacy-sessions[hidden]` (kept for future debug-toggle restoration). v0.8.10: bug-fix release (Task #2537 + Task #2534). (a) Heap-bounded plugin caches: OperationsCache and TasksTreeCache now enforce a hard maxEntries cap (default 256 / 64). Oldest stale entries are evicted before inserting a new one, so long-lived roy-agent sessions (BackgroundTaskManager + MemorySessionStore) no longer leak Map entries through the plugin's per-task caches \u2014 see Task #2537 for the heap-unbounded-state RED\u2192GREEN repro. (b) Mermaid CJK font-family: server.ts renderTaskPage now configures mermaid.initialize({ themeVariables: { fontFamily: '\"PingFang SC\", \"Microsoft YaHei\", \"Noto Sans CJK SC\", \"Source Han Sans CN\", \"WenQuanYi Micro Hei\", sans-serif' } }) so Chinese node labels render correctly in browsers that have at least one of those fonts installed (see Task #2534).",
|
|
5
|
+
"description": "v2.6.0: Mermaid rendering race-condition fix (Task #3123 — `Syntax error in text` on Task detail pages). Two paths previously raced on the same `<div class=\"mermaid\">`: the SSE `applyTaskUpdate` handler (writes the latest session.toolCalls) and the `task-show:lifecycle-ops-loaded` listener (writes the latest operations from `/api/tasks/:id/operations`). Each path had its OWN `createMermaidController` instance, so two controllers ran concurrent `mermaid.render()` calls and a half-built source string landed mid-transition → 'Syntax error in text'. Fix has three parts: (1) a SINGLE shared `window.__mermaidController` singleton (both paths now `update()` the same instance, so the existing per-container token guard drops late results); (2) a per-container Promise-chain render queue (`window.scheduleMermaidRender(container, taskId, getSource)` where `getSource` is a thunk) so the (operations, session) snapshot is atomic by the time we hand it to the controller; (3) `mermaid-renderer.js#renderInternal` now retries `mermaid.render` up to 3× with jittered backoff (60-180ms+0-40ms) on `Syntax error in text` before giving up, so transient races self-heal without surfacing the error block. Backwards compatible: old bundles that don't include the lock helper fall through to the v2.5.x per-instance controller. Tested: all 135 mermaid/app-js tests pass, build + typecheck clean. v2.4.1: Mermaid zoom now supports click-and-drag pan (Task #2785). After zooming in, users can drag the diagram to view the surrounding canvas area. Implementation: per-container panState/dragState WeakMap (no global state leak); applyTransform(translate+scale) single-source-of-truth for the CSS transform; attachPanHandlers on pointerdown/move/up/cancel with setPointerCapture for off-element drags; pointer cursor switches to grab/grabbing with touch-action: none to prevent native scrolling; reset/zoomReset now also resets pan to (0,0). 14/14 new mermaid-pan tests pass, full suite 558/564 with 6 pre-existing failures unrelated to this commit. v2.4.0: Combines v2.3.0 Combines v2.3.0 (worktree-aware file-tree + unbounded Mermaid zoom, Task #2773) with the v2.3.0 mermaid placeholder expansion (Task #2771). Sidebar + endpoint scope git ls-files to session.context.worktree (fallback process.cwd()); Mermaid zoom-in is no longer capped at 3.0\u00d7; .mermaid placeholder is now min-height: 2400px and .mermaid-zoom-stage is min-width: 6400px / min-height: 2400px (5\u00d7 base, via --mermaid-placeholder-multiplier CSS custom property) so dense diagrams get enough canvas to pan/zoom comfortably. v2.3.0: Worktree-aware file tree sidebar + unbounded Mermaid zoom-in. The file-tree sidebar (and /api/task/:id/file-tree endpoint) now scope git ls-files to session.context.worktree when the host (task:before.create / task:after.create payload) supplies a worktree path, so the sidebar shows the files the agent is actually editing instead of the plugin process cwd. New resolveWorktreePath helper in src/file-tree.ts returns session.context.worktree (trimmed, with empty/non-string guard) or falls back to process.cwd() for backward compatibility with pre-v2.3.0 hosts. TypeScript: TaskSession gains an optional context?: { worktree?: string } field. TaskShowServer exposes getCollector() so tests can seed sessions with context.worktree set. The Mermaid zoom toolbar (introduced in v2.0.8) no longer caps zoom-in at 3.0\u00d7 \u2014 the ZOOM_MAX constant is REMOVED and clampZoom only enforces ZOOM_MIN=0.25, so dense diagrams remain readable on high-DPI monitors when the user wants to zoom way in. ZOOM_MIN stays in place so zoom-out still bottoms out before rendering a black screen. New tests: test/file-tree-worktree.test.ts (10 cases \u2014 resolveWorktreePath edges, SSR scope, endpoint scope, fallback), test/mermaid-zoom-unlimited.test.ts (8 cases \u2014 source guard, behaviour at 6\u00d7/10\u00d7/50\u00d7, lower-bound preserved), test/mermaid-placeholder-size.test.ts (7 cases \u2014 min-height/min-width 5\u00d7 checks, transform-origin preserved, --mermaid-placeholder-multiplier hint). v2.3.0: Major visual overhaul of the per-task detail page \u2014 VS Code-style tool-call browser powered by Monaco Editor + LCS-based diff + project file tree with mermaid-driven navigation. The detail page now renders a 2-column layout: a sticky left sidebar with the project's git-tracked file tree (chevron-toggle directories, `is-affected` highlight for files touched by the current task), and a main column with the existing Mermaid + stats + toolcalls table + a new dedicated `<section id=\"tool-call-detail-panel\">` that hosts the LCS diff body + Monaco container for the currently-selected tool call. The legacy inline `<details class=\"diff-panel\">` (naive split-and-filter, prone to mis-tagging context lines) is replaced by `<ol class=\"diff-body\">` with proper added/removed/context markers driven by a real LCS dynamic-programming table (`computeDiff()` in `src/tool-call-detail.ts`). Tool calls with a file path get a Monaco Editor placeholder (`<div class=\"monaco-editor\" data-file-path=\"...\" data-language=\"...\">`) which the client-side `public/tool-call-detail.js` lazy-loads from `cdn.jsdelivr.net/npm/monaco-editor@0.45.0` the first time the user clicks a tool row. The Mermaid `__toolClick(toolId)` callback now drives THREE things: (a) the existing row scroll + highlight (preserved from v1.x), (b) the dedicated detail panel re-renders with the matching call, (c) the file-tree sidebar highlights the corresponding file (when `data-file-path` is present). New `GET /api/task/:id/file-tree` endpoint serves the git-tracked file list (`{ files: string[] }`) with a 30-second in-memory TTL + 8-entry FIFO bound. New modules: `src/file-tree.ts` (pure data layer: `buildFileTree / extractAffectedPaths / findNodeByPath / collectAllPaths / gitLsFiles / parseLsFiles`), `src/tool-call-detail.ts` (SSR + LCS diff + HTML escaping), `public/file-tree.js` (vanilla JS hydrator with chevron toggle + keyboard navigation + scrollIntoView), `public/tool-call-detail.js` (Monaco AMD loader + `__toolClick` wrapper + file-content fetch). New tests: `test/file-tree.test.ts` (21 cases \u2014 empty/single/nested/dedup/sort/depth/parseLsFiles/gitLsFiles), `test/tool-call-detail.test.ts` (22 cases \u2014 LCS diff edges, HTML escape, path aliases, summary stats), `test/tool-call-detail-server-integration.test.ts` (7 cases \u2014 SSR HTML contracts + endpoint), `test/tool-call-detail-jsdom.test.ts` (7 cases \u2014 client-side hydrators). v1.2.0: CSS context & packaged release hotfix. The plugin's public assets (notably `public/style.css`) and runtime adapters now correctly resolve relative to the installed package directory even when consumed via the published npm tarball. The session-scoped `TaskSessionStore` now preserves the full host session context (parent-child task links, plugin-handle id, env scope) across render cycles \u2014 previously the session was collapsed to its `sessionId` on first load and never refreshed, so the home page lost the \u300csession ancestors\u300d chain and external tasks from outside the current session silently disappeared from the tree. Adds `src/task-metadata.ts` as the single source of truth for the public `Task` shape exposed by `/api/tasks` + `/api/tasks/:id`, including the v1.0.0+ `processDescription` field, and re-exports it through the CLI adapters (`cli-tasks-adapter.ts` + `cli-tasks-tree-adapter.ts`) so the home page tree + the per-task page render against the same metadata contract. Bundles 244-line regression test (`test/context-and-packed-release.test.ts`) that boots the plugin from the **npm-pack** directory (not the repo working tree), spawns `roy-agent tasks get <id> --json`, and asserts (a) `public/style.css` is present and \u2265 64 lines, (b) the `/api/events` SSE endpoint survives a reload, and (c) `task.session` survives a render cycle. v1.1.0: Full Server-Sent Events realtime subscription across 3 event classes (task.created / operation.updated / tool.called) on both the home page and the per-task /task/<id> page. The per-task pipeline now subscribes to /api/events and patches the DOM in place on operation.updated \u2014 no more 5s-poll delay before the user sees a new milestone. The 'Task lifecycle pipeline' header badge is replaced by a 5-state SSE-aware badge (stale / connecting / live / reconnecting / error) so the user can tell at a glance whether real-time updates are flowing, the connection dropped, or 3+ consecutive errors triggered the polling fallback. Legacy boolean `stale` cache-TTL pill and `tool.recorded` event name are preserved for back-compat with v0.9.x / v1.0.0 clients. v1.0.0: First stable release. Replaces the v0.9.x fixture-based verify scripts (which built fake TaskOperationsEnvelope and never invoked the real `roy-agent` CLI, masking regressions in the public-schema `processDescription` field) with a real-CLI scenario test + verify (`test/process-description-real-scenario.test.ts` + `scripts/verify-v100-real-scenario.ts`) that spawns `roy-agent tasks get <id> --operations --json` via `defaultRunner` and asserts the API response carries `processDescription` end-to-end. The 0.9.9 processDescription fix is preserved verbatim \u2014 this release only swaps the verify surface. Visualize the tool call chain of a task on a local web service with real-time SSE updates. v0.9.9: Task lifecycle pipeline on /task/<id> now exposes BOTH the milestone badge AND the \u300c\u8fc7\u7a0b\u63cf\u8ff0\u300d column at a glance \u2014 the server-side `/api/tasks/:id/operations` endpoint exposes `processDescription` on every operation (no longer stripped from the public schema), the client-side `renderPipelineHtml` mirrors the server's `.op-desc-block` + `.op-proc-block` block layout so SSR \u2194 CSR stay in sync, and a long-standing CSS right-side text-truncation bug in the pipeline timeline (long CJK titles overflowing the panel edge) is fixed via `min-width: 0` on `.op-row1` + `overflow-wrap: anywhere` on `.op-title`. v0.9.0: Session-scoped home page (only show tasks created after plugin load + their external ancestors), with per-row \u300c\u663e\u793a\u5168\u90e8\u680f\u4f4d\u300d toggle and lazy-loaded operations timeline; per-task Mermaid labels now correctly render CJK / mixed-Latin / emoji text (encoded as \\uXXXX before emission, decoded by the browser); detail page layout reordered to lifecycle \u2192 pipeline \u2192 stats \u2192 toolcalls \u2192 rawjson. v0.5.0+: page refreshes stream over GET /api/events (Server-Sent Events). Subscribes to tool:before.execute, tool:after.execute, task:before.create, task:after.create, task:after.complete (preferred, 2026-07-10+), and task:after.update (legacy fallback). v0.6.11: Mermaid re-rendering is delegated to a self-contained controller (public/mermaid-renderer.js) that prevents the SVG\u2192raw-source regression on async updates and surfaces recoverable .mermaid-error states. v0.6.12: Task lifecycle pipeline (operations timeline) server now emits data-task-id on the pipeline section; client preserves it on swap, so the page actually fetches /api/tasks/<id>/operations and renders the 7-op timeline (previously silently bailed). v0.7.0: Home page redesigned as a hierarchical task tree (driven by `roy-agent tasks tree --json`); new /api/tasks/tree endpoint with status / priority / type / root-id filters, expand/collapse UI, search, and live 30s polling. v0.8.0: per-task page Mermaid area now renders the hierarchical 'Task lifecycle + tools' view \u2014 each operation record owns a subgraph that nests its tool calls, with click callbacks (`window.__toolClick`) that scroll-into-view + highlight + auto-expand the matching row in the tool-call table below. Operation record descriptions (`description` + `processDescription`) are now always rendered inline (no `<details>` collapse) so the user sees the lifecycle state at a glance; a fallback `<details>` kicks in only for descriptions longer than 600 chars. v0.8.1: hotfix for two pre-existing bugs in v0.8.0 (browser smoke test surfaced after merge). (a) Mermaid click directives were emitted as `click t1 __toolClick(1)` (missing `call` keyword) \u2014 Mermaid 10's parser rejects this with `got 'PS'`. Fixed to `click t1 call __toolClick(1)` (the v10 grammar requires `call` to invoke a callback with arguments). (b) `buildMermaidSource` lived inside the `attachTaskPageTimeline` IIFE but was also called from a listener in the `attachToolClickBridge` IIFE \u2014 sibling IIFEs cannot see each other's locals, so the listener threw `ReferenceError: buildMermaidSource is not defined` and the Mermaid diagram silently failed to re-render after `task-show:lifecycle-ops-loaded`. Fixed by hoisting the function (and its three helpers) to script top-level so both IIFEs can see it via the script-wide closure; the function is also exposed on `window.buildMermaidSource` for tests + tooling. v0.8.3: tree-display fix (Task #2426). The home page used to look like a flat list of root tasks because `autoExpandFirstLevels(..., 2)` only opened the first 2 levels \u2014 30/47 roots were leaf nodes and the remaining 17 collapsed to one level so grandchildren were never visible. Default expand depth is now 3 (root + child + grandchild + great-grandchild are visible on first paint), the summary line now shows per-depth count pills (root / child / grandchild / great-grandchild / level-N), each `tree-row` carries a `data-depth` attribute so CSS can paint coloured left rails per level, and the duplicated 'Live tool-call sessions (legacy view)' panel that made the page look like both a flat table AND a tree is now hidden behind `#legacy-sessions[hidden]` (kept for future debug-toggle restoration). v0.8.10: bug-fix release (Task #2537 + Task #2534). (a) Heap-bounded plugin caches: OperationsCache and TasksTreeCache now enforce a hard maxEntries cap (default 256 / 64). Oldest stale entries are evicted before inserting a new one, so long-lived roy-agent sessions (BackgroundTaskManager + MemorySessionStore) no longer leak Map entries through the plugin's per-task caches \u2014 see Task #2537 for the heap-unbounded-state RED\u2192GREEN repro. (b) Mermaid CJK font-family: server.ts renderTaskPage now configures mermaid.initialize({ themeVariables: { fontFamily: '\"PingFang SC\", \"Microsoft YaHei\", \"Noto Sans CJK SC\", \"Source Han Sans CN\", \"WenQuanYi Micro Hei\", sans-serif' } }) so Chinese node labels render correctly in browsers that have at least one of those fonts installed (see Task #2534).",
|
|
6
6
|
"main": "dist/index.js",
|
|
7
7
|
"hooks": [
|
|
8
8
|
{
|
|
@@ -89,4 +89,4 @@
|
|
|
89
89
|
},
|
|
90
90
|
"repository": "github:ai-setting/roy-plugin-task-visualize",
|
|
91
91
|
"bugs": "https://github.com/ai-setting/roy-plugin-task-visualize/issues"
|
|
92
|
-
}
|
|
92
|
+
}
|
package/public/app.js
CHANGED
|
@@ -104,6 +104,134 @@
|
|
|
104
104
|
}
|
|
105
105
|
})();
|
|
106
106
|
|
|
107
|
+
/* ------------------------------------------------------------------------- */
|
|
108
|
+
/* v2.6.0 (fix/task-show-mermaid-render-lock): shared singleton + queue */
|
|
109
|
+
/* */
|
|
110
|
+
/* Background: two paths call `controller.update(mermaidDiv, source)` for */
|
|
111
|
+
/* the same DOM node — (1) SSE `applyTaskUpdate` (latest session) and */
|
|
112
|
+
/* (2) `task-show:lifecycle-ops-loaded` (latest operations). Each path */
|
|
113
|
+
/* previously created its OWN `createMermaidController` instance, so two */
|
|
114
|
+
/* controllers raced on the same container and produced inconsistent */
|
|
115
|
+
/* source strings during the brief window where one path had new toolCalls */
|
|
116
|
+
/* but the other still served stale operations. */
|
|
117
|
+
/* */
|
|
118
|
+
/* The fix has three parts: */
|
|
119
|
+
/* 1. A single shared controller (`window.__mermaidController`) — both */
|
|
120
|
+
/* paths call `update()` on the same instance, so the existing `token` */
|
|
121
|
+
/* mechanism (in `mermaid-renderer.js`) drops the late result. */
|
|
122
|
+
/* 2. A render queue keyed by container (`window.__mermaidQueue`) — */
|
|
123
|
+
/* before `update()` runs we enqueue a Promise that resolves only */
|
|
124
|
+
/* after the previous `update()` for that container settled. This */
|
|
125
|
+
/* gives a stable (operations, session) snapshot to render: the */
|
|
126
|
+
/* second caller will see the freshly-updated `__lifecycleOps` or */
|
|
127
|
+
/* `__pipelineController.lastSession` by the time its callback */
|
|
128
|
+
/* runs. */
|
|
129
|
+
/* 3. The controllers' own retry path (`mermaid-renderer.js` v2.6.0) */
|
|
130
|
+
/* handles any remaining transient syntax errors. */
|
|
131
|
+
/* ------------------------------------------------------------------------- */
|
|
132
|
+
(function attachSharedMermaidLock() {
|
|
133
|
+
function ensureSharedMermaidController(taskId) {
|
|
134
|
+
if (!window.MermaidRenderer || !window.MermaidRenderer.createMermaidController) {
|
|
135
|
+
return null;
|
|
136
|
+
}
|
|
137
|
+
if (!window.__mermaidController) {
|
|
138
|
+
window.__mermaidController = window.MermaidRenderer.createMermaidController({
|
|
139
|
+
idPrefix: "task-" + (taskId || "lifecycle"),
|
|
140
|
+
});
|
|
141
|
+
}
|
|
142
|
+
return window.__mermaidController;
|
|
143
|
+
}
|
|
144
|
+
|
|
145
|
+
function ensureMermaidQueue() {
|
|
146
|
+
if (!window.__mermaidQueue) {
|
|
147
|
+
// Promise chain key — keyed by container DOM node identity so
|
|
148
|
+
// different diagrams on the same page render independently.
|
|
149
|
+
window.__mermaidQueue = new WeakMap();
|
|
150
|
+
}
|
|
151
|
+
return window.__mermaidQueue;
|
|
152
|
+
}
|
|
153
|
+
|
|
154
|
+
/**
|
|
155
|
+
* Schedule a render via the SHARED controller + per-container queue.
|
|
156
|
+
*
|
|
157
|
+
* `getSource()` is a thunk so it reads the LATEST state right before
|
|
158
|
+
* its turn in the queue runs — this is what makes the snapshot atomic.
|
|
159
|
+
* By the time the queue dispatches our thunk, the previous update()'s
|
|
160
|
+
* `mermaid.render` Promise has either resolved or been superseded, and
|
|
161
|
+
* any sibling path that fired in the meantime has updated the
|
|
162
|
+
* authoritative state (window.__lifecycleOps or
|
|
163
|
+
* window.__pipelineController.lastSession). The thunk reads both and
|
|
164
|
+
* builds the source string in one synchronous block — no interleaving
|
|
165
|
+
* possible between "read ops" and "read session".
|
|
166
|
+
*
|
|
167
|
+
* Returns a Promise that resolves when THIS render is settled. Note
|
|
168
|
+
* that if a newer call has already superseded us, the controller's
|
|
169
|
+
* token guard drops our result and our Promise simply resolves to
|
|
170
|
+
* "we ran, but nothing changed" — matching the v1.x behavior.
|
|
171
|
+
*/
|
|
172
|
+
function scheduleMermaidRender(container, taskId, getSource) {
|
|
173
|
+
const controller = ensureSharedMermaidController(taskId);
|
|
174
|
+
if (!controller) {
|
|
175
|
+
// Mermaid not loaded — preserve legacy fallback: write source
|
|
176
|
+
// as pre-formatted text so the user at least sees something.
|
|
177
|
+
try {
|
|
178
|
+
container.textContent = String(getSource());
|
|
179
|
+
} catch (_) { /* swallow — same as v1.x */ }
|
|
180
|
+
return Promise.resolve();
|
|
181
|
+
}
|
|
182
|
+
const queue = ensureMermaidQueue();
|
|
183
|
+
const prev = queue.get(container);
|
|
184
|
+
const next = Promise.resolve(prev).then(() => {
|
|
185
|
+
// Re-check container still in the DOM; lifecycle-ops-loaded
|
|
186
|
+
// can fire after the user navigates away (task page replaced
|
|
187
|
+
// by the index, etc.) — `controller.update` already no-ops on
|
|
188
|
+
// a destroyed controller, but skipping earlier saves work.
|
|
189
|
+
if (!container || !container.isConnected) return;
|
|
190
|
+
let source;
|
|
191
|
+
try {
|
|
192
|
+
source = String(getSource());
|
|
193
|
+
} catch (err) {
|
|
194
|
+
// eslint-disable-next-line no-console
|
|
195
|
+
console.warn("[task-show] scheduleMermaidRender: getSource threw:", err);
|
|
196
|
+
return;
|
|
197
|
+
}
|
|
198
|
+
return controller.update(container, source);
|
|
199
|
+
}).catch((err) => {
|
|
200
|
+
// Defensive: never let an exception in the queue escape the
|
|
201
|
+
// promise chain. The controller's own onStateChange handler
|
|
202
|
+
// already surfaces render errors as the visible error block.
|
|
203
|
+
// eslint-disable-next-line no-console
|
|
204
|
+
console.warn("[task-show] mermaid queue tick failed:", err && err.message || err);
|
|
205
|
+
}).finally(() => {
|
|
206
|
+
// Drop our chain slot once settled so the WeakMap entry stays
|
|
207
|
+
// accurate — this also prevents a stale chain from blocking
|
|
208
|
+
// future renders on the same container (a common v1.x bug
|
|
209
|
+
// where a caught render error left the chain permanently
|
|
210
|
+
// broken).
|
|
211
|
+
const cur = queue.get(container);
|
|
212
|
+
if (cur === next) queue.delete(container);
|
|
213
|
+
});
|
|
214
|
+
queue.set(container, next);
|
|
215
|
+
// v2.5.12 (Task #2951): install the zoom-stage guardian once per
|
|
216
|
+
// container so Mermaid's late `mermaid.run()` (~T+3s) doesn't
|
|
217
|
+
// strip the `.mermaid-zoom-stage` wrapper. Guarded by the same
|
|
218
|
+
// `__mermaidGuardian` flag the legacy code used so multiple
|
|
219
|
+
// callers don't double-bind.
|
|
220
|
+
if (window.MermaidZoomGuardian && window.MermaidZoomGuardian.MermaidZoomGuardian && !window.__mermaidGuardian) {
|
|
221
|
+
try {
|
|
222
|
+
window.__mermaidGuardian = new window.MermaidZoomGuardian.MermaidZoomGuardian(container);
|
|
223
|
+
window.__mermaidGuardian.start();
|
|
224
|
+
} catch (_) { /* ignore — guardian is best-effort */ }
|
|
225
|
+
}
|
|
226
|
+
return next;
|
|
227
|
+
}
|
|
228
|
+
|
|
229
|
+
// Expose helpers so other IIFEs (attachTaskPageTimeline,
|
|
230
|
+
// attachToolClickBridge) share the same controller + queue.
|
|
231
|
+
window.scheduleMermaidRender = scheduleMermaidRender;
|
|
232
|
+
window.ensureSharedMermaidController = ensureSharedMermaidController;
|
|
233
|
+
})();
|
|
234
|
+
|
|
107
235
|
/* ------------------------------------------------------------------------- */
|
|
108
236
|
/* v0.8.1+ Mermaid source builder (top-level — shared by both IIFEs) */
|
|
109
237
|
/* ------------------------------------------------------------------------- */
|
|
@@ -632,14 +760,31 @@ if (typeof window !== "undefined") {
|
|
|
632
760
|
.then((r) => (r.ok ? r.json() : null))
|
|
633
761
|
.then((s) => {
|
|
634
762
|
if (!s) return;
|
|
763
|
+
// v2.6.0 (fix/task-show-mermaid-render-lock): route through
|
|
764
|
+
// the shared singleton + queue. The thunk reads the LATEST
|
|
765
|
+
// state inside its slot, so by the time the queue dispatches
|
|
766
|
+
// us we may have a richer session than what was captured
|
|
767
|
+
// here — that's fine, it just means we render with the most
|
|
768
|
+
// up-to-date snapshot.
|
|
769
|
+
if (window.scheduleMermaidRender) {
|
|
770
|
+
window.scheduleMermaidRender(mermaidDiv, taskId, () => {
|
|
771
|
+
const liveOps = (window.__lifecycleOps && window.__lifecycleOps.operations) || ops;
|
|
772
|
+
return buildMermaidSource(s, liveOps);
|
|
773
|
+
});
|
|
774
|
+
return;
|
|
775
|
+
}
|
|
635
776
|
const source = buildMermaidSource(s, ops);
|
|
636
777
|
if (window.MermaidRenderer && window.MermaidRenderer.createMermaidController) {
|
|
637
|
-
if (
|
|
638
|
-
window.
|
|
639
|
-
|
|
640
|
-
|
|
778
|
+
if (window.ensureSharedMermaidController) {
|
|
779
|
+
window.ensureSharedMermaidController(taskId).update(mermaidDiv, source);
|
|
780
|
+
} else {
|
|
781
|
+
if (!window.__mermaidController) {
|
|
782
|
+
window.__mermaidController = window.MermaidRenderer.createMermaidController({
|
|
783
|
+
idPrefix: "lifecycle-" + taskId,
|
|
784
|
+
});
|
|
785
|
+
}
|
|
786
|
+
window.__mermaidController.update(mermaidDiv, source);
|
|
641
787
|
}
|
|
642
|
-
window.__mermaidController.update(mermaidDiv, source);
|
|
643
788
|
// v2.5.12 (Task #2951): install the zoom-stage guardian.
|
|
644
789
|
if (!window.__mermaidGuardian && window.MermaidZoomGuardian) {
|
|
645
790
|
window.__mermaidGuardian = new window.MermaidZoomGuardian.MermaidZoomGuardian(mermaidDiv);
|
|
@@ -654,14 +799,29 @@ if (typeof window !== "undefined") {
|
|
|
654
799
|
});
|
|
655
800
|
return;
|
|
656
801
|
}
|
|
802
|
+
// v2.6.0: prefer the shared scheduler so this render serializes
|
|
803
|
+
// behind any in-flight `applyTaskUpdate` call.
|
|
804
|
+
if (window.scheduleMermaidRender) {
|
|
805
|
+
window.scheduleMermaidRender(mermaidDiv, taskId, () => {
|
|
806
|
+
const liveOps = (window.__lifecycleOps && window.__lifecycleOps.operations) || ops;
|
|
807
|
+
// Re-read the live session inside the thunk too — SSE may
|
|
808
|
+
// have updated `__pipelineController.lastSession` while we
|
|
809
|
+
// waited in the queue.
|
|
810
|
+
const liveSession = (window.__pipelineController && window.__pipelineController.lastSession) || session;
|
|
811
|
+
return buildMermaidSource(liveSession, liveOps);
|
|
812
|
+
});
|
|
813
|
+
return;
|
|
814
|
+
}
|
|
657
815
|
const source = buildMermaidSource(session, ops);
|
|
658
816
|
if (window.MermaidRenderer && window.MermaidRenderer.createMermaidController) {
|
|
659
|
-
if (
|
|
817
|
+
if (window.ensureSharedMermaidController) {
|
|
818
|
+
window.ensureSharedMermaidController(taskId).update(mermaidDiv, source);
|
|
819
|
+
} else if (!window.__mermaidController) {
|
|
660
820
|
window.__mermaidController = window.MermaidRenderer.createMermaidController({
|
|
661
821
|
idPrefix: "lifecycle-" + taskId,
|
|
662
822
|
});
|
|
823
|
+
window.__mermaidController.update(mermaidDiv, source);
|
|
663
824
|
}
|
|
664
|
-
window.__mermaidController.update(mermaidDiv, source);
|
|
665
825
|
// v2.5.12 (Task #2951): install the zoom-stage guardian.
|
|
666
826
|
if (!window.__mermaidGuardian && window.MermaidZoomGuardian) {
|
|
667
827
|
window.__mermaidGuardian = new window.MermaidZoomGuardian.MermaidZoomGuardian(mermaidDiv);
|
|
@@ -781,23 +941,29 @@ if (typeof window !== "undefined") {
|
|
|
781
941
|
// Re-render mermaid diagram.
|
|
782
942
|
const mermaidDiv = document.querySelector(".mermaid");
|
|
783
943
|
if (mermaidDiv) {
|
|
784
|
-
//
|
|
785
|
-
//
|
|
786
|
-
//
|
|
787
|
-
//
|
|
788
|
-
|
|
789
|
-
|
|
790
|
-
//
|
|
791
|
-
//
|
|
792
|
-
|
|
793
|
-
|
|
794
|
-
|
|
795
|
-
|
|
944
|
+
// v2.6.0 (fix/task-show-mermaid-render-lock): route through the
|
|
945
|
+
// shared singleton + per-container queue (`window.scheduleMermaidRender`).
|
|
946
|
+
// Previously `applyTaskUpdate._controller` was a SEPARATE instance from
|
|
947
|
+
// the one `task-show:lifecycle-ops-loaded` created (`window.__mermaidController`),
|
|
948
|
+
// so two controllers raced on the same `<div class="mermaid">` and the
|
|
949
|
+
// SSR or the winning render could land stale. The shared controller +
|
|
950
|
+
// thunk-based source builder makes the (operations, session) snapshot
|
|
951
|
+
// atomic.
|
|
952
|
+
if (window.scheduleMermaidRender) {
|
|
953
|
+
window.scheduleMermaidRender(mermaidDiv, taskId, () => {
|
|
954
|
+
const ops = (window.__lifecycleOps && window.__lifecycleOps.operations) || null;
|
|
955
|
+
return buildMermaidSource(session, ops);
|
|
956
|
+
});
|
|
957
|
+
} else if (window.MermaidRenderer && window.MermaidRenderer.createMermaidController) {
|
|
958
|
+
// Backwards-compatible fallback for older bundles that loaded
|
|
959
|
+
// app.js without the lock helper. Same behavior as v2.5.x.
|
|
796
960
|
if (!applyTaskUpdate._controller) {
|
|
797
961
|
applyTaskUpdate._controller = window.MermaidRenderer.createMermaidController({
|
|
798
962
|
idPrefix: "task-" + taskId,
|
|
799
963
|
});
|
|
800
964
|
}
|
|
965
|
+
const ops = (window.__lifecycleOps && window.__lifecycleOps.operations) || null;
|
|
966
|
+
const source = buildMermaidSource(session, ops);
|
|
801
967
|
applyTaskUpdate._controller.update(mermaidDiv, source);
|
|
802
968
|
// v2.5.12 (Task #2951): install the zoom-stage guardian so
|
|
803
969
|
// Mermaid's late `mermaid.run()` (~T+3s) doesn't strip the
|
|
@@ -69,6 +69,46 @@
|
|
|
69
69
|
const ZOOM_MIN = 0.25;
|
|
70
70
|
const ZOOM_DEFAULT = 1.0;
|
|
71
71
|
|
|
72
|
+
// v2.6.0 (fix/task-show-mermaid-render-retry): robustness
|
|
73
|
+
// against transient syntax errors. The mermaid CLI parser is
|
|
74
|
+
// strict — a half-built source string from a race between
|
|
75
|
+
// the SSE `applyTaskUpdate` path (which writes the latest
|
|
76
|
+
// session.toolCalls) and the `task-operations.js` polling
|
|
77
|
+
// path (which writes the latest operations) can land in the
|
|
78
|
+
// controller mid-transition. The controller already drops
|
|
79
|
+
// *late* results via `getToken`, but it cannot save a *bad*
|
|
80
|
+
// source that was already inconsistent at construction time.
|
|
81
|
+
//
|
|
82
|
+
// We therefore (a) retry the `mermaid.render` call up to
|
|
83
|
+
// `RENDER_RETRY_MAX` times when Mermaid raises a `Syntax
|
|
84
|
+
// error in text` (the user-visible message in 10.9.8), and
|
|
85
|
+
// (b) wait briefly with jittered backoff between attempts so
|
|
86
|
+
// the second poll / SSE event arrives before the last try.
|
|
87
|
+
// After all retries fail we surface the error block as
|
|
88
|
+
// before — there is nothing more we can do without a
|
|
89
|
+
// different source string.
|
|
90
|
+
const RENDER_RETRY_MAX = 3;
|
|
91
|
+
const RENDER_RETRY_BACKOFF_MS = 60;
|
|
92
|
+
const RENDER_RETRY_BACKOFF_JITTER_MS = 40;
|
|
93
|
+
|
|
94
|
+
function isRetryableMermaidError(err) {
|
|
95
|
+
// Mermaid 10 surfaces parse failures with a thrown Error
|
|
96
|
+
// whose message contains "Syntax error in text" (lower-
|
|
97
|
+
// case `i`, capital `S`). Other failure modes (network,
|
|
98
|
+
// library missing, internal bug) are NOT retryable here —
|
|
99
|
+
// we let the outer try/catch surface them normally.
|
|
100
|
+
const msg = (err && err.message) || String(err || "");
|
|
101
|
+
return msg.indexOf("Syntax error in text") !== -1
|
|
102
|
+
|| msg.indexOf("syntax error in text") !== -1;
|
|
103
|
+
}
|
|
104
|
+
|
|
105
|
+
function backoffDelay(attempt) {
|
|
106
|
+
// attempt is 1-based: 1 → base, 2 → base + 0..jitter.
|
|
107
|
+
const base = RENDER_RETRY_BACKOFF_MS * attempt;
|
|
108
|
+
const jitter = Math.floor(Math.random() * RENDER_RETRY_BACKOFF_JITTER_MS);
|
|
109
|
+
return base + jitter;
|
|
110
|
+
}
|
|
111
|
+
|
|
72
112
|
function escapeHtml(s) {
|
|
73
113
|
return String(s)
|
|
74
114
|
.replace(/&/g, "&")
|
|
@@ -667,6 +707,15 @@
|
|
|
667
707
|
* the container reflects the latest source (either an SVG or an error
|
|
668
708
|
* block). If a newer call supersedes this one before the mermaid.render
|
|
669
709
|
* Promise resolves, the result is dropped (no DOM mutation).
|
|
710
|
+
*
|
|
711
|
+
* v2.6.0 (fix/task-show-mermaid-render-retry): on `Syntax error in
|
|
712
|
+
* text` we retry up to `RENDER_RETRY_MAX` times with jittered
|
|
713
|
+
* backoff before giving up. The race window between the SSE
|
|
714
|
+
* `applyTaskUpdate` and the `task-operations.js` poll paths can
|
|
715
|
+
* deliver a half-built source string to this controller; a brief
|
|
716
|
+
* wait usually lets the second path complete and the next
|
|
717
|
+
* `update()` call supersedes us — the dropped retry then costs
|
|
718
|
+
* nothing. See `isRetryableMermaidError` and `backoffDelay`.
|
|
670
719
|
*/
|
|
671
720
|
async function renderInternal(container, source) {
|
|
672
721
|
// Idempotency: if the controller was destroyed or the container has
|
|
@@ -689,18 +738,45 @@
|
|
|
689
738
|
|
|
690
739
|
const myToken = beginRender(container);
|
|
691
740
|
setState(container, "loading");
|
|
741
|
+
// v2.6.0: same `id` is reused across retries inside one logical
|
|
742
|
+
// render — no need to bump `seqNum` per attempt since the token
|
|
743
|
+
// already distinguishes this logical call from any newer one.
|
|
692
744
|
const seqNum = nextSeq(container);
|
|
693
745
|
const id = `${idPrefix}-${seqNum}`;
|
|
694
746
|
let result;
|
|
695
|
-
|
|
696
|
-
|
|
697
|
-
|
|
698
|
-
|
|
747
|
+
let lastErr = null;
|
|
748
|
+
// v2.6.0: retry loop. We try `mermaid.render` directly, then on
|
|
749
|
+
// a retryable syntax error we wait `backoffDelay(attempt)` ms
|
|
750
|
+
// and try again. Non-retryable failures (e.g. library missing,
|
|
751
|
+
// thrown exception) bail immediately to preserve the original
|
|
752
|
+
// error behavior.
|
|
753
|
+
outer: for (let attempt = 1; attempt <= RENDER_RETRY_MAX; attempt++) {
|
|
754
|
+
// Bail out fast if a newer render has superseded us — paying
|
|
755
|
+
// for retries on a doomed source is wasteful.
|
|
756
|
+
if (controllerDestroyed || isDestroyed(container) || getToken(container) !== myToken) return;
|
|
757
|
+
try {
|
|
758
|
+
result = await mermaid.render(id, source);
|
|
759
|
+
lastErr = null;
|
|
760
|
+
break;
|
|
761
|
+
} catch (err) {
|
|
762
|
+
lastErr = err;
|
|
763
|
+
if (!isRetryableMermaidError(err) || attempt === RENDER_RETRY_MAX) break;
|
|
764
|
+
// v2.6.0: wait, then check whether a newer call has
|
|
765
|
+
// superseded us. If yes, abort silently — no DOM mutation,
|
|
766
|
+
// no error block.
|
|
767
|
+
await new Promise((r) => setTimeout(r, backoffDelay(attempt)));
|
|
768
|
+
if (controllerDestroyed || isDestroyed(container) || getToken(container) !== myToken) return;
|
|
769
|
+
}
|
|
770
|
+
}
|
|
771
|
+
if (lastErr) {
|
|
772
|
+
// All retries failed (or the error wasn't retryable). Surface
|
|
773
|
+
// it just like before — only if this call is still the live
|
|
774
|
+
// one.
|
|
699
775
|
if (controllerDestroyed || isDestroyed(container) || getToken(container) !== myToken) return;
|
|
700
776
|
renderErrorBlock(
|
|
701
777
|
container,
|
|
702
778
|
source,
|
|
703
|
-
(
|
|
779
|
+
(lastErr && lastErr.message) || String(lastErr),
|
|
704
780
|
);
|
|
705
781
|
if (onStateChange) onStateChange(container, "error");
|
|
706
782
|
return;
|
|
@@ -534,12 +534,26 @@
|
|
|
534
534
|
if (!scope) return;
|
|
535
535
|
const body = scope.querySelector("[data-view-body]");
|
|
536
536
|
if (!body) return;
|
|
537
|
+
// v2.5.22 (Task #3063): capture the initial label so we can
|
|
538
|
+
// toggle between it and its "Hide X" counterpart. For edit
|
|
539
|
+
// tools the SSR ships "View diff" — when expanding we want
|
|
540
|
+
// "Hide diff"; for write tools the SSR ships "View file" →
|
|
541
|
+
// "Hide view" (preserves the v2.0.7 contract).
|
|
542
|
+
const initialLabel =
|
|
543
|
+
btn.getAttribute("data-initial-label") ||
|
|
544
|
+
(btn.querySelector(".tool-call-view-toggle-label")?.textContent || "View file");
|
|
545
|
+
if (!btn.getAttribute("data-initial-label")) {
|
|
546
|
+
btn.setAttribute("data-initial-label", initialLabel);
|
|
547
|
+
}
|
|
548
|
+
const hideLabel = initialLabel.startsWith("View diff")
|
|
549
|
+
? "Hide diff"
|
|
550
|
+
: "Hide view";
|
|
537
551
|
const wasHidden = body.hasAttribute("hidden");
|
|
538
552
|
if (wasHidden) {
|
|
539
553
|
body.removeAttribute("hidden");
|
|
540
554
|
btn.setAttribute("aria-expanded", "true");
|
|
541
555
|
const label = btn.querySelector(".tool-call-view-toggle-label");
|
|
542
|
-
if (label) label.textContent =
|
|
556
|
+
if (label) label.textContent = hideLabel;
|
|
543
557
|
const icon = btn.querySelector(".tool-call-view-toggle-icon");
|
|
544
558
|
if (icon) icon.textContent = "▼";
|
|
545
559
|
// v2.0.7: now that the body is visible, kick off Monaco
|
|
@@ -558,7 +572,7 @@
|
|
|
558
572
|
body.setAttribute("hidden", "");
|
|
559
573
|
btn.setAttribute("aria-expanded", "false");
|
|
560
574
|
const label = btn.querySelector(".tool-call-view-toggle-label");
|
|
561
|
-
if (label) label.textContent =
|
|
575
|
+
if (label) label.textContent = initialLabel;
|
|
562
576
|
const icon = btn.querySelector(".tool-call-view-toggle-icon");
|
|
563
577
|
if (icon) icon.textContent = "▶";
|
|
564
578
|
}
|