Skip to content

[agent-v1 09/18] feat(agent): transcript persistence - chat history store - #16206

Closed
CodeJuggernaut wants to merge 9 commits into
nathaniel/agent-v1/08-session-statefrom
nathaniel/agent-v1/09-transcript-persistence
Closed

CodeJuggernaut wants to merge 9 commits into
nathaniel/agent-v1/08-session-statefrom
nathaniel/agent-v1/09-transcript-persistence

Conversation

@CodeJuggernaut

@CodeJuggernaut CodeJuggernaut commented Aug 28, 2026 •

Copy link
Copy Markdown
Contributor

Merge after: #16204 (08) - stacked on its branch per the successive-stack chain.
Decisions: Agent V1 Decision Log
Landing strategy: SQUASH-MERGE ONLY - owner order 2026-08-28 (branch-history containment; do not merge-commit).

Summary

Slice 09 of the agent-v1 chain: the transcript data model's past-chat persistence seam - the chat-history store (session grouping, rename overlay, delete tombstones) with its suite. The row's normalization and message-identity clauses landed with slices 07/08; this slice carries persistence. Census vs merge-base: 2 files, +254.

Changes

  • What: agentChatHistoryStore and its test, extracted from the reviewed integration snapshot; one review-driven fix round added test pins only.

Review Focus

  • Extraction fidelity: BOTH content files hash-exact against the integration snapshot - and byte-identical across two independent blind extractions (the chain's strongest convergence class; a blind pre-cut census matched the same file set and blobs as a third source).
  • The fix round touched only the test file: the persistence property gained its reload pin (mutation-verified - swapping the storage for a plain ref turns exactly the new pin red), the recency-ordering assertion was made discriminating (mutation-verified), and one test was renamed to what it actually proves (its DST claim was unearned; the boundary is recorded unpinned and boarded).
  • Boarded, recorded in the round's delivery: a latent prototype-key read on the title overlay (unreachable with server-minted ids; sibling-guard shape recorded), wrong-typed persisted JSON hardening, unbounded key growth + tombstone reconciliation against the future delete endpoint, and a thread-identity sync pin for the slice that lands the panel watcher.
  • Scope law applied as a check: FE-1929 is the row's authoritative ticket (owner ruling); FE-1305's behavior is verifiably absent from the snapshot (no role-tool hydrate arm) and stays V2.
  • CRDT: zero references; ticket-cited reference SHAs were treated as context only, never the census baseline.
  • Draft until the chain's review flow completes.

Linear tickets

  • FE-1929 - the persistence seam past chats read their transcript from (model and identity land in 08)

Review-audit deltas (salvage matrix): items found during the slicing and review audits that did not make it through the integration merge (#16198).

The audit found no review artifacts missing from main in this territory; the diff is the reviewed transcript-persistence delta vs the integration copy.

@coderabbitai

coderabbitai Bot commented Aug 28, 2026 •

Copy link
Copy Markdown
Contributor

Important

Review skipped

Auto reviews are disabled on base/target branches other than the default branch.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: ASSERTIVE

Plan: Team

Run ID: 82813fdc-3214-4216-b2a2-4636b6efb65c

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review

Comment @coderabbitai help to get the list of available commands.

@github-actions

github-actions Bot commented Aug 28, 2026 •

Copy link
Copy Markdown
Contributor

🎨 Storybook: ✅ Built — View Storybook

Details

⏰ Completed at: 09/01/2026, 11:10:10 AM UTC

Links

🎭 Playwright: ✅ 1888 passed, 0 failed · 1 flaky

📊 Browser Reports
  • chromium: View Report (✅ 1867 / ❌ 0 / ⚠️ 1 / ⏭️ 4)
  • chromium-2x: View Report (✅ 2 / ❌ 0 / ⚠️ 0 / ⏭️ 0)
  • chromium-0.5x: View Report (✅ 1 / ❌ 0 / ⚠️ 0 / ⏭️ 0)
  • mobile-chrome: View Report (✅ 18 / ❌ 0 / ⚠️ 0 / ⏭️ 0)

📦 Bundle Size

⏳ Size data collection in progress…

⚡ Performance Report

canvas-idle: · 60.0 avg FPS · 59.5 P5 FPS ✅ (target: ≥52) · 0ms TBT · 60.2 MB heap
canvas-mouse-sweep: · 60.0 avg FPS · 59.9 P5 FPS ✅ (target: ≥52) · 0ms TBT · 57.3 MB heap
canvas-zoom-sweep: · 60.0 avg FPS · 59.5 P5 FPS ✅ (target: ≥52) · 0ms TBT · 70.8 MB heap
dom-widget-clipping: · 60.0 avg FPS · 59.9 P5 FPS ✅ (target: ≥52) · 0ms TBT · 83.9 MB heap
large-graph-idle: · 60.0 avg FPS · 59.7 P5 FPS ✅ (target: ≥52) · 0ms TBT · 82.8 MB heap
large-graph-pan: · 60.0 avg FPS · 59.9 P5 FPS ✅ (target: ≥52) · 0ms TBT · 84.9 MB heap
large-graph-zoom: · 60.0 avg FPS · 59.7 P5 FPS ✅ (target: ≥52) · 0ms TBT · 73.7 MB heap
legacy-node-drag: · 60.0 avg FPS · 59.9 P5 FPS ✅ (target: ≥52) · 0ms TBT · 86.9 MB heap
minimap-idle: · 60.0 avg FPS · 59.7 P5 FPS ✅ (target: ≥52) · 0ms TBT · 83.4 MB heap
subgraph-dom-widget-clipping: · 60.0 avg FPS · 59.9 P5 FPS ✅ (target: ≥52) · 0ms TBT · 82.6 MB heap
subgraph-idle: · 60.0 avg FPS · 59.7 P5 FPS ✅ (target: ≥52) · 0ms TBT · 57.3 MB heap
subgraph-mouse-sweep: · 60.0 avg FPS · 59.5 P5 FPS ✅ (target: ≥52) · 0ms TBT · 63.5 MB heap
subgraph-transition-enter: · 60.0 avg FPS · 59.9 P5 FPS ✅ (target: ≥52) · 131ms TBT · 88.9 MB heap
viewport-pan-sweep: · 60.0 avg FPS · 59.5 P5 FPS ✅ (target: ≥52) · 0ms TBT · 84.9 MB heap
vue-large-graph-idle: · 56.3 avg FPS · 59.5 P5 FPS ✅ (target: ≥52) · 0ms TBT · 166.4 MB heap
vue-large-graph-pan: · 53.7 avg FPS · 59.5 P5 FPS ✅ (target: ≥52) · 281ms TBT · 180.9 MB heap
vue-node-resize-workload: · 55.4 avg FPS · 59.7 P5 FPS ✅ (target: ≥52) · 474ms TBT · 164.4 MB heap
workflow-execution: · 60.0 avg FPS · 59.7 P5 FPS ✅ (target: ≥52) · 0ms TBT · 68.1 MB heap

ℹ️ No baseline found — significance unavailable.

Absolute values
Metric Value
canvas-idle: avg frame time 17ms
canvas-idle: p95 frame time 17ms
canvas-idle: layout duration 0ms
canvas-idle: style recalc duration 9ms
canvas-idle: layout count 0
canvas-idle: style recalc count 9
canvas-idle: task duration 570ms
canvas-idle: script duration 12ms
canvas-idle: TBT 0ms
canvas-idle: heap used 60.2 MB
canvas-idle: DOM nodes -281
canvas-idle: event listeners -171
canvas-mouse-sweep: avg frame time 17ms
canvas-mouse-sweep: p95 frame time 17ms
canvas-mouse-sweep: layout duration 5ms
canvas-mouse-sweep: style recalc duration 48ms
canvas-mouse-sweep: layout count 14
canvas-mouse-sweep: style recalc count 78
canvas-mouse-sweep: task duration 1055ms
canvas-mouse-sweep: script duration 164ms
canvas-mouse-sweep: TBT 0ms
canvas-mouse-sweep: heap used 57.3 MB
canvas-mouse-sweep: DOM nodes -282
canvas-mouse-sweep: event listeners -156
canvas-zoom-sweep: avg frame time 17ms
canvas-zoom-sweep: p95 frame time 17ms
canvas-zoom-sweep: layout duration 1ms
canvas-zoom-sweep: style recalc duration 21ms
canvas-zoom-sweep: layout count 6
canvas-zoom-sweep: style recalc count 31
canvas-zoom-sweep: task duration 433ms
canvas-zoom-sweep: script duration 16ms
canvas-zoom-sweep: TBT 0ms
canvas-zoom-sweep: heap used 70.8 MB
canvas-zoom-sweep: DOM nodes 77
canvas-zoom-sweep: event listeners 19
dom-widget-clipping: avg frame time 17ms
dom-widget-clipping: p95 frame time 17ms
dom-widget-clipping: layout duration 0ms
dom-widget-clipping: style recalc duration 9ms
dom-widget-clipping: layout count 0
dom-widget-clipping: style recalc count 10
dom-widget-clipping: task duration 507ms
dom-widget-clipping: script duration 167ms
dom-widget-clipping: TBT 0ms
dom-widget-clipping: heap used 83.9 MB
dom-widget-clipping: DOM nodes 15
dom-widget-clipping: event listeners 2
large-graph-idle: avg frame time 17ms
large-graph-idle: p95 frame time 17ms
large-graph-idle: layout duration 0ms
large-graph-idle: style recalc duration 4ms
large-graph-idle: layout count 0
large-graph-idle: style recalc count 4
large-graph-idle: task duration 765ms
large-graph-idle: script duration 43ms
large-graph-idle: TBT 0ms
large-graph-idle: heap used 82.8 MB
large-graph-idle: DOM nodes -272
large-graph-idle: event listeners -154
large-graph-pan: avg frame time 17ms
large-graph-pan: p95 frame time 17ms
large-graph-pan: layout duration 0ms
large-graph-pan: style recalc duration 13ms
large-graph-pan: layout count 0
large-graph-pan: style recalc count 65
large-graph-pan: task duration 1790ms
large-graph-pan: script duration 825ms
large-graph-pan: TBT 0ms
large-graph-pan: heap used 84.9 MB
large-graph-pan: DOM nodes -274
large-graph-pan: event listeners -74
large-graph-zoom: avg frame time 17ms
large-graph-zoom: p95 frame time 17ms
large-graph-zoom: layout duration 15ms
large-graph-zoom: style recalc duration 12ms
large-graph-zoom: layout count 60
large-graph-zoom: style recalc count 60
large-graph-zoom: task duration 1885ms
large-graph-zoom: script duration 815ms
large-graph-zoom: TBT 0ms
large-graph-zoom: heap used 73.7 MB
large-graph-zoom: DOM nodes 0
large-graph-zoom: event listeners 10
legacy-node-drag: avg frame time 17ms
legacy-node-drag: p95 frame time 17ms
legacy-node-drag: layout duration 0ms
legacy-node-drag: style recalc duration 8ms
legacy-node-drag: layout count 0
legacy-node-drag: style recalc count 40
legacy-node-drag: task duration 2116ms
legacy-node-drag: script duration 1020ms
legacy-node-drag: TBT 0ms
legacy-node-drag: heap used 86.9 MB
legacy-node-drag: DOM nodes 0
legacy-node-drag: event listeners 188
minimap-idle: avg frame time 17ms
minimap-idle: p95 frame time 17ms
minimap-idle: layout duration 0ms
minimap-idle: style recalc duration 3ms
minimap-idle: layout count 0
minimap-idle: style recalc count 3
minimap-idle: task duration 694ms
minimap-idle: script duration 39ms
minimap-idle: TBT 0ms
minimap-idle: heap used 83.4 MB
minimap-idle: DOM nodes -273
minimap-idle: event listeners -169
subgraph-dom-widget-clipping: avg frame time 17ms
subgraph-dom-widget-clipping: p95 frame time 17ms
subgraph-dom-widget-clipping: layout duration 0ms
subgraph-dom-widget-clipping: style recalc duration 11ms
subgraph-dom-widget-clipping: layout count 0
subgraph-dom-widget-clipping: style recalc count 46
subgraph-dom-widget-clipping: task duration 448ms
subgraph-dom-widget-clipping: script duration 147ms
subgraph-dom-widget-clipping: TBT 0ms
subgraph-dom-widget-clipping: heap used 82.6 MB
subgraph-dom-widget-clipping: DOM nodes 17
subgraph-dom-widget-clipping: event listeners 7
subgraph-idle: avg frame time 17ms
subgraph-idle: p95 frame time 17ms
subgraph-idle: layout duration 0ms
subgraph-idle: style recalc duration 10ms
subgraph-idle: layout count 0
subgraph-idle: style recalc count 10
subgraph-idle: task duration 607ms
subgraph-idle: script duration 11ms
subgraph-idle: TBT 0ms
subgraph-idle: heap used 57.3 MB
subgraph-idle: DOM nodes -296
subgraph-idle: event listeners -201
subgraph-mouse-sweep: avg frame time 17ms
subgraph-mouse-sweep: p95 frame time 17ms
subgraph-mouse-sweep: layout duration 7ms
subgraph-mouse-sweep: style recalc duration 47ms
subgraph-mouse-sweep: layout count 18
subgraph-mouse-sweep: style recalc count 80
subgraph-mouse-sweep: task duration 968ms
subgraph-mouse-sweep: script duration 122ms
subgraph-mouse-sweep: TBT 0ms
subgraph-mouse-sweep: heap used 63.5 MB
subgraph-mouse-sweep: DOM nodes -297
subgraph-mouse-sweep: event listeners -216
subgraph-transition-enter: avg frame time 17ms
subgraph-transition-enter: p95 frame time 17ms
subgraph-transition-enter: layout duration 16ms
subgraph-transition-enter: style recalc duration 33ms
subgraph-transition-enter: layout count 15
subgraph-transition-enter: style recalc count 19
subgraph-transition-enter: task duration 1089ms
subgraph-transition-enter: script duration 36ms
subgraph-transition-enter: TBT 131ms
subgraph-transition-enter: heap used 88.9 MB
subgraph-transition-enter: DOM nodes 13671
subgraph-transition-enter: event listeners 2383
viewport-pan-sweep: avg frame time 17ms
viewport-pan-sweep: p95 frame time 17ms
viewport-pan-sweep: layout duration 0ms
viewport-pan-sweep: style recalc duration 45ms
viewport-pan-sweep: layout count 0
viewport-pan-sweep: style recalc count 248
viewport-pan-sweep: task duration 6226ms
viewport-pan-sweep: script duration 2686ms
viewport-pan-sweep: TBT 0ms
viewport-pan-sweep: heap used 84.9 MB
viewport-pan-sweep: DOM nodes -270
viewport-pan-sweep: event listeners -151
vue-large-graph-idle: avg frame time 18ms
vue-large-graph-idle: p95 frame time 17ms
vue-large-graph-idle: layout duration 0ms
vue-large-graph-idle: style recalc duration 0ms
vue-large-graph-idle: layout count 0
vue-large-graph-idle: style recalc count 0
vue-large-graph-idle: task duration 18615ms
vue-large-graph-idle: script duration 357ms
vue-large-graph-idle: TBT 0ms
vue-large-graph-idle: heap used 166.4 MB
vue-large-graph-idle: DOM nodes -6548
vue-large-graph-idle: event listeners -7474
vue-large-graph-pan: avg frame time 19ms
vue-large-graph-pan: p95 frame time 17ms
vue-large-graph-pan: layout duration 0ms
vue-large-graph-pan: style recalc duration 29ms
vue-large-graph-pan: layout count 0
vue-large-graph-pan: style recalc count 180
vue-large-graph-pan: task duration 24130ms
vue-large-graph-pan: script duration 985ms
vue-large-graph-pan: TBT 281ms
vue-large-graph-pan: heap used 180.9 MB
vue-large-graph-pan: DOM nodes -6548
vue-large-graph-pan: event listeners -7468
vue-node-resize-workload: avg frame time 18ms
vue-node-resize-workload: p95 frame time 17ms
vue-node-resize-workload: layout duration 30ms
vue-node-resize-workload: style recalc duration 80ms
vue-node-resize-workload: layout count 20
vue-node-resize-workload: style recalc count 20
vue-node-resize-workload: task duration 6879ms
vue-node-resize-workload: script duration 134ms
vue-node-resize-workload: TBT 474ms
vue-node-resize-workload: heap used 164.4 MB
vue-node-resize-workload: DOM nodes -6548
vue-node-resize-workload: event listeners -7469
workflow-execution: avg frame time 17ms
workflow-execution: p95 frame time 17ms
workflow-execution: layout duration 1ms
workflow-execution: style recalc duration 16ms
workflow-execution: layout count 2
workflow-execution: style recalc count 6
workflow-execution: task duration 85ms
workflow-execution: script duration 8ms
workflow-execution: TBT 0ms
workflow-execution: heap used 68.1 MB
workflow-execution: DOM nodes 108
workflow-execution: event listeners 50
Raw data
{
  "timestamp": "2026-09-01T11:22:38.142Z",
  "gitSha": "2d7ea4945c124fc1ea57296948cbb8a20b580668",
  "branch": "nathaniel/agent-v1/09-transcript-persistence",
  "measurements": [
    {
      "name": "canvas-idle",
      "durationMs": 2121.959000000004,
      "styleRecalcs": 9,
      "styleRecalcDurationMs": 10.123999999999999,
      "layouts": 0,
      "layoutDurationMs": 0,
      "taskDurationMs": 598.026,
      "heapDeltaBytes": -967560,
      "heapUsedBytes": 69027960,
      "domNodes": -279,
      "jsHeapTotalBytes": 4448256,
      "scriptDurationMs": 14.136,
      "eventListeners": -187,
      "totalBlockingTimeMs": 0,
      "frameDurationMs": 16.666666666666668,
      "p95FrameDurationMs": 16.800000000000182
    },
    {
      "name": "canvas-idle",
      "durationMs": 2035.7399999999188,
      "styleRecalcs": 9,
      "styleRecalcDurationMs": 8.667000000000002,
      "layouts": 0,
      "layoutDurationMs": 0,
      "taskDurationMs": 541.5289999999999,
      "heapDeltaBytes": -12616980,
      "heapUsedBytes": 57158672,
      "domNodes": -282,
      "jsHeapTotalBytes": 4710400,
      "scriptDurationMs": 10.362000000000004,
      "eventListeners": -155,
      "totalBlockingTimeMs": 0,
      "frameDurationMs": 16.66333333333332,
      "p95FrameDurationMs": 16.800000000000182
    },
    {
      "name": "canvas-mouse-sweep",
      "durationMs": 2124.3939999999952,
      "styleRecalcs": 80,
      "styleRecalcDurationMs": 51.856,
      "layouts": 14,
      "layoutDurationMs": 5.7330000000000005,
      "taskDurationMs": 1136.345,
      "heapDeltaBytes": -9211880,
      "heapUsedBytes": 59763428,
      "domNodes": -283,
      "jsHeapTotalBytes": 6021120,
      "scriptDurationMs": 171.663,
      "eventListeners": -157,
      "totalBlockingTimeMs": 0,
      "frameDurationMs": 16.666666666666668,
      "p95FrameDurationMs": 16.700000000000728
    },
    {
      "name": "canvas-mouse-sweep",
      "durationMs": 1956.6449999999804,
      "styleRecalcs": 76,
      "styleRecalcDurationMs": 43.59,
      "layouts": 14,
      "layoutDurationMs": 5.059,
      "taskDurationMs": 973.96,
      "heapDeltaBytes": -9851076,
      "heapUsedBytes": 60307504,
      "domNodes": -280,
      "jsHeapTotalBytes": 6021120,
      "scriptDurationMs": 157.29299999999998,
      "eventListeners": -155,
      "totalBlockingTimeMs": 0,
      "frameDurationMs": 16.666666666666668,
      "p95FrameDurationMs": 16.700000000000728
    },
    {
      "name": "canvas-zoom-sweep",
      "durationMs": 1747.8270000000293,
      "styleRecalcs": 30,
      "styleRecalcDurationMs": 20.782000000000004,
      "layouts": 6,
      "layoutDurationMs": 1.454,
      "taskDurationMs": 455.25499999999994,
      "heapDeltaBytes": 4446364,
      "heapUsedBytes": 74020556,
      "domNodes": 76,
      "jsHeapTotalBytes": 5505024,
      "scriptDurationMs": 16.394,
      "eventListeners": 19,
      "totalBlockingTimeMs": 0,
      "frameDurationMs": 16.666666666666668,
      "p95FrameDurationMs": 16.800000000000182
    },
    {
      "name": "canvas-zoom-sweep",
      "durationMs": 1738.0450000000565,
      "styleRecalcs": 32,
      "styleRecalcDurationMs": 20.915999999999997,
      "layouts": 6,
      "layoutDurationMs": 1.3770000000000002,
      "taskDurationMs": 411.67300000000006,
      "heapDeltaBytes": 4466376,
      "heapUsedBytes": 74455640,
      "domNodes": 77,
      "jsHeapTotalBytes": 5767168,
      "scriptDurationMs": 14.708999999999996,
      "eventListeners": 19,
      "totalBlockingTimeMs": 0,
      "frameDurationMs": 16.666666666666668,
      "p95FrameDurationMs": 16.800000000000182
    },
    {
      "name": "dom-widget-clipping",
      "durationMs": 718.5820000000263,
      "styleRecalcs": 11,
      "styleRecalcDurationMs": 9.306,
      "layouts": 0,
      "layoutDurationMs": 0,
      "taskDurationMs": 505.08699999999993,
      "heapDeltaBytes": 18413360,
      "heapUsedBytes": 88257544,
      "domNodes": 18,
      "jsHeapTotalBytes": 5767168,
      "scriptDurationMs": 167.999,
      "eventListeners": 2,
      "totalBlockingTimeMs": 0,
      "frameDurationMs": 16.666666666666668,
      "p95FrameDurationMs": 16.699999999999818
    },
    {
      "name": "dom-widget-clipping",
      "durationMs": 735.2110000000494,
      "styleRecalcs": 8,
      "styleRecalcDurationMs": 8.493,
      "layouts": 0,
      "layoutDurationMs": 0,
      "taskDurationMs": 509.32,
      "heapDeltaBytes": 18430788,
      "heapUsedBytes": 87768892,
      "domNodes": 12,
      "jsHeapTotalBytes": 5767168,
      "scriptDurationMs": 165.13699999999997,
      "eventListeners": 2,
      "totalBlockingTimeMs": 0,
      "frameDurationMs": 16.66333333333335,
      "p95FrameDurationMs": 16.700000000000728
    },
    {
      "name": "large-graph-idle",
      "durationMs": 2070.7859999999982,
      "styleRecalcs": 5,
      "styleRecalcDurationMs": 4.875000000000001,
      "layouts": 0,
      "layoutDurationMs": 0,
      "taskDurationMs": 764.6100000000001,
      "heapDeltaBytes": -13787716,
      "heapUsedBytes": 86855748,
      "domNodes": -271,
      "jsHeapTotalBytes": -823296,
      "scriptDurationMs": 45.29999999999999,
      "eventListeners": -153,
      "totalBlockingTimeMs": 0,
      "frameDurationMs": 16.66333333333332,
      "p95FrameDurationMs": 16.800000000000182
    },
    {
      "name": "large-graph-idle",
      "durationMs": 2047.3899999999503,
      "styleRecalcs": 3,
      "styleRecalcDurationMs": 2.8390000000000013,
      "layouts": 0,
      "layoutDurationMs": 0,
      "taskDurationMs": 764.783,
      "heapDeltaBytes": -13559456,
      "heapUsedBytes": 86741052,
      "domNodes": -272,
      "jsHeapTotalBytes": -1609728,
      "scriptDurationMs": 40.275000000000006,
      "eventListeners": -155,
      "totalBlockingTimeMs": 0,
      "frameDurationMs": 16.66333333333335,
      "p95FrameDurationMs": 16.699999999999818
    },
    {
      "name": "large-graph-pan",
      "durationMs": 2646.168999999986,
      "styleRecalcs": 65,
      "styleRecalcDurationMs": 13.413000000000002,
      "layouts": 0,
      "layoutDurationMs": 0,
      "taskDurationMs": 1798.914,
      "heapDeltaBytes": -16742612,
      "heapUsedBytes": 84643344,
      "domNodes": -274,
      "jsHeapTotalBytes": -860160,
      "scriptDurationMs": 812.037,
      "eventListeners": -153,
      "totalBlockingTimeMs": 0,
      "frameDurationMs": 16.666666666666668,
      "p95FrameDurationMs": 16.700000000000728
    },
    {
      "name": "large-graph-pan",
      "durationMs": 2746.2699999999813,
      "styleRecalcs": 64,
      "styleRecalcDurationMs": 12.389999999999999,
      "layouts": 0,
      "layoutDurationMs": 0,
      "taskDurationMs": 1780.987,
      "heapDeltaBytes": 27692996,
      "heapUsedBytes": 93484184,
      "domNodes": -274,
      "jsHeapTotalBytes": 225280,
      "scriptDurationMs": 838.617,
      "eventListeners": 6,
      "totalBlockingTimeMs": 0,
      "frameDurationMs": 16.666666666666668,
      "p95FrameDurationMs": 16.699999999999818
    },
    {
      "name": "large-graph-zoom",
      "durationMs": 3982.8980000000342,
      "styleRecalcs": 60,
      "styleRecalcDurationMs": 12.339999999999996,
      "layouts": 60,
      "layoutDurationMs": 15.057999999999998,
      "taskDurationMs": 1910.9060000000002,
      "heapDeltaBytes": 8478692,
      "heapUsedBytes": 75364112,
      "domNodes": 0,
      "jsHeapTotalBytes": 0,
      "scriptDurationMs": 824.71,
      "eventListeners": 10,
      "totalBlockingTimeMs": 0,
      "frameDurationMs": 16.670000000000012,
      "p95FrameDurationMs": 16.799999999999272
    },
    {
      "name": "large-graph-zoom",
      "durationMs": 3833.472000000029,
      "styleRecalcs": 60,
      "styleRecalcDurationMs": 12.1,
      "layouts": 60,
      "layoutDurationMs": 14.399000000000001,
      "taskDurationMs": 1858.7359999999999,
      "heapDeltaBytes": 11715488,
      "heapUsedBytes": 79177872,
      "domNodes": 0,
      "jsHeapTotalBytes": 0,
      "scriptDurationMs": 805.7829999999999,
      "eventListeners": 10,
      "totalBlockingTimeMs": 0,
      "frameDurationMs": 16.666666666666668,
      "p95FrameDurationMs": 16.700000000000728
    },
    {
      "name": "legacy-node-drag",
      "durationMs": 3182.3409999999512,
      "styleRecalcs": 40,
      "styleRecalcDurationMs": 6.149000000000002,
      "layouts": 0,
      "layoutDurationMs": 0,
      "taskDurationMs": 2066.3740000000003,
      "heapDeltaBytes": 21942408,
      "heapUsedBytes": 89144516,
      "domNodes": 0,
      "jsHeapTotalBytes": 417792,
      "scriptDurationMs": 1006.4009999999998,
      "eventListeners": 188,
      "totalBlockingTimeMs": 0,
      "frameDurationMs": 16.66333333333338,
      "p95FrameDurationMs": 16.700000000000728
    },
    {
      "name": "legacy-node-drag",
      "durationMs": 3186.0560000000078,
      "styleRecalcs": 40,
      "styleRecalcDurationMs": 9.478999999999997,
      "layouts": 0,
      "layoutDurationMs": 0,
      "taskDurationMs": 2164.643,
      "heapDeltaBytes": 26482176,
      "heapUsedBytes": 93061244,
      "domNodes": 0,
      "jsHeapTotalBytes": 417792,
      "scriptDurationMs": 1033.6680000000001,
      "eventListeners": 188,
      "totalBlockingTimeMs": 0,
      "frameDurationMs": 16.66333333333332,
      "p95FrameDurationMs": 16.700000000000728
    },
    {
      "name": "minimap-idle",
      "durationMs": 2012.9370000000222,
      "styleRecalcs": 2,
      "styleRecalcDurationMs": 1.9790000000000016,
      "layouts": 0,
      "layoutDurationMs": 0,
      "taskDurationMs": 729.067,
      "heapDeltaBytes": 21852176,
      "heapUsedBytes": 87076508,
      "domNodes": -275,
      "jsHeapTotalBytes": 0,
      "scriptDurationMs": 39.357000000000006,
      "eventListeners": -183,
      "totalBlockingTimeMs": 0,
      "frameDurationMs": 16.670000000000012,
      "p95FrameDurationMs": 16.700000000000728
    },
    {
      "name": "minimap-idle",
      "durationMs": 2010.6859999999642,
      "styleRecalcs": 4,
      "styleRecalcDurationMs": 4.882000000000004,
      "layouts": 0,
      "layoutDurationMs": 0,
      "taskDurationMs": 659.7,
      "heapDeltaBytes": 22126704,
      "heapUsedBytes": 87756484,
      "domNodes": -270,
      "jsHeapTotalBytes": 0,
      "scriptDurationMs": 39.588,
      "eventListeners": -155,
      "totalBlockingTimeMs": 0,
      "frameDurationMs": 16.666666666666668,
      "p95FrameDurationMs": 16.800000000000182
    },
    {
      "name": "subgraph-dom-widget-clipping",
      "durationMs": 686.2979999999652,
      "styleRecalcs": 45,
      "styleRecalcDurationMs": 11.225999999999999,
      "layouts": 0,
      "layoutDurationMs": 0,
      "taskDurationMs": 465.353,
      "heapDeltaBytes": 14357112,
      "heapUsedBytes": 86030004,
      "domNodes": 16,
      "jsHeapTotalBytes": 4980736,
      "scriptDurationMs": 150.80200000000002,
      "eventListeners": 8,
      "totalBlockingTimeMs": 0,
      "frameDurationMs": 16.666666666666668,
      "p95FrameDurationMs": 16.699999999999818
    },
    {
      "name": "subgraph-dom-widget-clipping",
      "durationMs": 634.535000000028,
      "styleRecalcs": 46,
      "styleRecalcDurationMs": 10.96,
      "layouts": 0,
      "layoutDurationMs": 0,
      "taskDurationMs": 431.007,
      "heapDeltaBytes": 14752988,
      "heapUsedBytes": 87148184,
      "domNodes": 18,
      "jsHeapTotalBytes": 5767168,
      "scriptDurationMs": 143.16899999999998,
      "eventListeners": 6,
      "totalBlockingTimeMs": 0,
      "frameDurationMs": 16.666666666666668,
      "p95FrameDurationMs": 16.700000000000728
    },
    {
      "name": "subgraph-idle",
      "durationMs": 2053.674000000001,
      "styleRecalcs": 10,
      "styleRecalcDurationMs": 10.815999999999999,
      "layouts": 0,
      "layoutDurationMs": 0,
      "taskDurationMs": 584.604,
      "heapDeltaBytes": -12913844,
      "heapUsedBytes": 58216312,
      "domNodes": -295,
      "jsHeapTotalBytes": 5234688,
      "scriptDurationMs": 10.411,
      "eventListeners": -201,
      "totalBlockingTimeMs": 0,
      "frameDurationMs": 16.66333333333332,
      "p95FrameDurationMs": 16.800000000000182
    },
    {
      "name": "subgraph-idle",
      "durationMs": 2049.205000000029,
      "styleRecalcs": 10,
      "styleRecalcDurationMs": 9.544,
      "layouts": 0,
      "layoutDurationMs": 0,
      "taskDurationMs": 628.9429999999999,
      "heapDeltaBytes": -10378144,
      "heapUsedBytes": 61880836,
      "domNodes": -296,
      "jsHeapTotalBytes": 5496832,
      "scriptDurationMs": 12.401000000000002,
      "eventListeners": -201,
      "totalBlockingTimeMs": 0,
      "frameDurationMs": 16.666666666666668,
      "p95FrameDurationMs": 16.699999999999818
    },
    {
      "name": "subgraph-mouse-sweep",
      "durationMs": 1807.0200000000227,
      "styleRecalcs": 78,
      "styleRecalcDurationMs": 45.973,
      "layouts": 18,
      "layoutDurationMs": 6.611999999999999,
      "taskDurationMs": 947.218,
      "heapDeltaBytes": 1005928,
      "heapUsedBytes": 73070348,
      "domNodes": -297,
      "jsHeapTotalBytes": 5758976,
      "scriptDurationMs": 123.093,
      "eventListeners": -231,
      "totalBlockingTimeMs": 0,
      "frameDurationMs": 16.666666666666668,
      "p95FrameDurationMs": 16.800000000000182
    },
    {
      "name": "subgraph-mouse-sweep",
      "durationMs": 1853.8760000000138,
      "styleRecalcs": 81,
      "styleRecalcDurationMs": 48.35399999999999,
      "layouts": 18,
      "layoutDurationMs": 6.864,
      "taskDurationMs": 988.0659999999999,
      "heapDeltaBytes": -11598716,
      "heapUsedBytes": 60075792,
      "domNodes": -296,
      "jsHeapTotalBytes": 4972544,
      "scriptDurationMs": 121.683,
      "eventListeners": -201,
      "totalBlockingTimeMs": 0,
      "frameDurationMs": 16.666666666666668,
      "p95FrameDurationMs": 16.800000000000182
    },
    {
      "name": "subgraph-transition-enter",
      "durationMs": 1466.3069999999152,
      "styleRecalcs": 19,
      "styleRecalcDurationMs": 32.598,
      "layouts": 15,
      "layoutDurationMs": 15.637000000000002,
      "taskDurationMs": 1089.262,
      "heapDeltaBytes": -3591324,
      "heapUsedBytes": 93188856,
      "domNodes": 13671,
      "jsHeapTotalBytes": 10747904,
      "scriptDurationMs": 36.14899999999999,
      "eventListeners": 2383,
      "totalBlockingTimeMs": 131,
      "frameDurationMs": 16.666666666666668,
      "p95FrameDurationMs": 16.700000000000728
    },
    {
      "name": "viewport-pan-sweep",
      "durationMs": 9174.093999999968,
      "styleRecalcs": 246,
      "styleRecalcDurationMs": 44.284000000000006,
      "layouts": 0,
      "layoutDurationMs": 0,
      "taskDurationMs": 6337.041,
      "heapDeltaBytes": -10470804,
      "heapUsedBytes": 89580332,
      "domNodes": -270,
      "jsHeapTotalBytes": -892928,
      "scriptDurationMs": 2748.485,
      "eventListeners": -135,
      "totalBlockingTimeMs": 0,
      "frameDurationMs": 16.666666666666668,
      "p95FrameDurationMs": 16.799999999999272
    },
    {
      "name": "viewport-pan-sweep",
      "durationMs": 8779.109000000062,
      "styleRecalcs": 249,
      "styleRecalcDurationMs": 46.172999999999995,
      "layouts": 0,
      "layoutDurationMs": 0,
      "taskDurationMs": 6114.559,
      "heapDeltaBytes": 14129456,
      "heapUsedBytes": 88418924,
      "domNodes": -270,
      "jsHeapTotalBytes": -634880,
      "scriptDurationMs": 2623.741,
      "eventListeners": -167,
      "totalBlockingTimeMs": 0,
      "frameDurationMs": 16.666666666666668,
      "p95FrameDurationMs": 16.799999999999272
    },
    {
      "name": "vue-large-graph-idle",
      "durationMs": 18916.14100000004,
      "styleRecalcs": 0,
      "styleRecalcDurationMs": 0,
      "layouts": 0,
      "layoutDurationMs": 0,
      "taskDurationMs": 18725.595,
      "heapDeltaBytes": -34352188,
      "heapUsedBytes": 175165448,
      "domNodes": -6548,
      "jsHeapTotalBytes": -8028160,
      "scriptDurationMs": 363.126,
      "eventListeners": -7475,
      "totalBlockingTimeMs": 0,
      "frameDurationMs": 17.77333333333336,
      "p95FrameDurationMs": 16.799999999999272
    },
    {
      "name": "vue-large-graph-idle",
      "durationMs": 18771.121999999992,
      "styleRecalcs": 0,
      "styleRecalcDurationMs": 0,
      "layouts": 0,
      "layoutDurationMs": 0,
      "taskDurationMs": 18504.86,
      "heapDeltaBytes": -36300696,
      "heapUsedBytes": 173799224,
      "domNodes": -6548,
      "jsHeapTotalBytes": -5361664,
      "scriptDurationMs": 350.202,
      "eventListeners": -7473,
      "totalBlockingTimeMs": 0,
      "frameDurationMs": 17.776666666666642,
      "p95FrameDurationMs": 16.80000000000291
    },
    {
      "name": "vue-large-graph-pan",
      "durationMs": 24554.088999999978,
      "styleRecalcs": 180,
      "styleRecalcDurationMs": 31.820000000000014,
      "layouts": 0,
      "layoutDurationMs": 0,
      "taskDurationMs": 24468.077999999998,
      "heapDeltaBytes": -25845228,
      "heapUsedBytes": 183807800,
      "domNodes": -6548,
      "jsHeapTotalBytes": -2809856,
      "scriptDurationMs": 1041.554,
      "eventListeners": -7467,
      "totalBlockingTimeMs": 174,
      "frameDurationMs": 18.889999999999905,
      "p95FrameDurationMs": 16.80000000000291
    },
    {
      "name": "vue-large-graph-pan",
      "durationMs": 23964.292,
      "styleRecalcs": 180,
      "styleRecalcDurationMs": 26.105999999999963,
      "layouts": 0,
      "layoutDurationMs": 0,
      "taskDurationMs": 23791.699999999997,
      "heapDeltaBytes": -14507100,
      "heapUsedBytes": 195598372,
      "domNodes": -6548,
      "jsHeapTotalBytes": 4210688,
      "scriptDurationMs": 929.005,
      "eventListeners": -7469,
      "totalBlockingTimeMs": 388,
      "frameDurationMs": 18.333333333333332,
      "p95FrameDurationMs": 16.80000000000291
    },
    {
      "name": "vue-node-resize-workload",
      "durationMs": 6935.85900000005,
      "styleRecalcs": 20,
      "styleRecalcDurationMs": 82.54500000000003,
      "layouts": 20,
      "layoutDurationMs": 31.68,
      "taskDurationMs": 6900.640000000001,
      "heapDeltaBytes": -18699424,
      "heapUsedBytes": 183669504,
      "domNodes": -6548,
      "jsHeapTotalBytes": 17567744,
      "scriptDurationMs": 134.503,
      "eventListeners": -7469,
      "totalBlockingTimeMs": 475,
      "frameDurationMs": 18.333333333333332,
      "p95FrameDurationMs": 16.799999999999272
    },
    {
      "name": "vue-node-resize-workload",
      "durationMs": 6900.274999999965,
      "styleRecalcs": 20,
      "styleRecalcDurationMs": 78.09000000000005,
      "layouts": 20,
      "layoutDurationMs": 27.885999999999996,
      "taskDurationMs": 6856.367,
      "heapDeltaBytes": -48951796,
      "heapUsedBytes": 161150392,
      "domNodes": -6548,
      "jsHeapTotalBytes": 1912832,
      "scriptDurationMs": 132.99,
      "eventListeners": -7469,
      "totalBlockingTimeMs": 472,
      "frameDurationMs": 17.773333333333238,
      "p95FrameDurationMs": 16.700000000000728
    },
    {
      "name": "workflow-execution",
      "durationMs": 122.09699999993973,
      "styleRecalcs": 6,
      "styleRecalcDurationMs": 17.015,
      "layouts": 2,
      "layoutDurationMs": 0.8859999999999999,
      "taskDurationMs": 90.87899999999999,
      "heapDeltaBytes": 3243252,
      "heapUsedBytes": 71667316,
      "domNodes": 110,
      "jsHeapTotalBytes": 524288,
      "scriptDurationMs": 7.837000000000001,
      "eventListeners": 49,
      "totalBlockingTimeMs": 0,
      "frameDurationMs": 16.666666666666668,
      "p95FrameDurationMs": 16.699999999999818
    },
    {
      "name": "workflow-execution",
      "durationMs": 113.06999999999334,
      "styleRecalcs": 6,
      "styleRecalcDurationMs": 15.093,
      "layouts": 2,
      "layoutDurationMs": 0.9000000000000002,
      "taskDurationMs": 78.45600000000002,
      "heapDeltaBytes": 3229140,
      "heapUsedBytes": 71201064,
      "domNodes": 106,
      "jsHeapTotalBytes": 0,
      "scriptDurationMs": 7.9060000000000015,
      "eventListeners": 51,
      "totalBlockingTimeMs": 0,
      "frameDurationMs": 16.66333333333335,
      "p95FrameDurationMs": 16.799999999999272
    }
  ]
}

🔬 E2E Coverage

Metric Covered Total Pct
Lines 48058 70504 68.2% 🟡
Functions 0 0 — —
Branches 0 0 — —
Top 10 files by uncovered lines
File Coverage Missed
src/LGraphCanvas.ts 67.1% 1188
src/LGraphNode.ts 69.7% 391
src/extensions/core/cameraInfo/CameraInfoViewport.ts 2.0% 343
src/platform/workspace/stores/billingOperationStore.ts 8.3% 300
src/platform/workspace/stores/workspaceAuthStore.ts 36.0% 288
src/platform/workspace/stores/teamWorkspaceStore.ts 37.7% 261
src/LGraph.ts 78.4% 258
src/scripts/app.ts 71.5% 251
src/scripts/pnginfo.ts 21.4% 221
src/stores/assetsStore.ts 44.7% 204

@github-actions github-actions Bot added the risk:R2 PR risk grade (advisory shadow check; grader-owned) label Aug 28, 2026
@codecov

codecov Bot commented Aug 28, 2026 •

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.

@@                           Coverage Diff                           @@
##           nathaniel/agent-v1/08-session-state   #16206      +/-   ##
=======================================================================
+ Coverage                                83.25%   83.26%   +0.01%     
=======================================================================
  Files                                     2022     2023       +1     
  Lines                                   117063   117099      +36     
  Branches                                 32470    33064     +594     
=======================================================================
+ Hits                                     97460    97506      +46     
+ Misses                                   19250    19249       -1     
+ Partials                                   353      344       -9     
Flag Coverage Δ
e2e 66.65% <ø> (+0.02%) ⬆️
unit 76.50% <100.00%> (+<0.01%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

Files with missing lines Coverage Δ
...rkbench/extensions/agent/schemas/agentApiSchema.ts 100.00% <100.00%> (ø)
...extensions/agent/services/agent/agentTranscript.ts 100.00% <100.00%> (ø)
...nsions/agent/stores/agent/agentChatHistoryStore.ts 100.00% <100.00%> (ø)
...sions/agent/stores/agent/agentConversationStore.ts 91.83% <100.00%> (-1.03%) ⬇️

... and 14 files with indirect coverage changes

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@christian-byrne christian-byrne added the cursor-review Trigger multi-model Cursor agent review on this PR label Aug 30, 2026

@github-actions github-actions Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🔍 Cursor Review — Consolidated panel

Triggered by @christian-byrne.

Found 9 finding(s).

Severity Count
🟡 Medium 5
🟢 Low 4

Panel: 8/8 reviewers contributed findings.

@christian-byrne

christian-byrne commented Aug 30, 2026 •

Copy link
Copy Markdown
Contributor

Automated fleet review (desktop operator, Christian-authorized)

  • NEEDS-CHANGES.
  • Apply four prepared fixes.
  • Chain and CI blocked.
Full context for agent readers

Design-review packet — FE PR #16206 (agent-v1 09/18, transcript persistence)

Lane: pr16206-review (Class A, report-only — program/parallelization-middle-ground.md).
Written: 2026-08-29T08:51Z. Report-only: no PR comment, no issue, no FE write.
Verdict: MERGE-AFTER-CHANGES (4 enumerated, all cheap; none CRDT-related).
Merge path does not fold into #97 and needs no new packet — see §5.

0. Code-fact header

Field Value
PR Comfy-Org/ComfyUI_frontend#16206
Title [agent-v1 09/18] feat(agent): transcript persistence - chat history store
Author / state CodeJuggernaut · OPEN · DRAFT · MERGEABLE on its declared base
Head 628c7147bf722f8867c21a4404199a4a6d4ab700 (2 commits: 9e2f71b4 impl, 628c7147 test-only fix round)
Base nathaniel/agent-v1/08-session-state (PR #16204, itself draft)
Census 2 files, +252 / −0, both net-new paths
CI @ head 35 pass / 11 fail / 10 skip

Diff read directly via gh pr diff 16206; nothing here is taken from Nathaniel's design docs
(COR-8 quarantine honored — see §6).

1. What the PR actually does

Adds one Pinia store and its Vitest suite, nothing else:

  • src/workbench/extensions/agent/stores/agent/agentChatHistoryStore.ts (+111)
  • src/workbench/extensions/agent/stores/agent/agentChatHistoryStore.test.ts (+141)

Surface:

server thread list ─▶ replaceAll() ─▶ tombstone filter ─▶ titled (rename overlay) ─▶ grouped
                                            ▲                      ▲                    │
                          localStorage 'Comfy.Agent.DeletedThreads' │                    │
                          localStorage 'Comfy.Agent.ChatTitles' ────┘        useTimestamp(60s)
  • ChatSession = { id: string; title: string; updatedAt: number }; HistoryGroups = { current, today, yesterday, earlier }.
  • groupSessionsByRecency(sessions, activeId, now) — pure, copies before sorting ([...sessions]),
    sorts updatedAt desc, buckets against startOfLocalDay(now) / startOfLocalDay(startToday − 1).
    Active id short-circuits into current regardless of age.
  • rename trims and no-ops on empty; remove drops the row, deletes its title override, appends
    an id to the tombstone list, and nulls activeId only when it matched; replaceAll filters
    tombstoned ids; setActive sets the id.
  • Persistence is @vueuse/core useLocalStorage on two browser-global keys.
  • useTimestamp({ interval: 60_000 }) re-drives grouped once a minute.

Imports of CRDT internals: zero. The diff contains no yjs, no Y.Doc, no op_id, no
stamps, no doc-frame types, no docFrameClient, no websocket, no network call at all. The store
is fed by a caller that does not exist yet (§3).

2. Alignment with our design surfaces

2.1 CRDT / stamps — N/A, and cleanly so

Our stamp question (scalar-v1 vs the Lamport-merged integration candidate, comfy-multi-player main
8636af3e, verified-state row 2026-08-29) does not reach this slice. There is no wire model,
no op, no stamp, no lineage concept in the diff. ADR-007 (op-based CRDT v1), ADR-016
(incarnation-namespaced stamps), ADR-011-seq (replay-never-wipe) and ADR-012 (lifecycle/reconnect)
are all untouched — correctly, not by omission. INV-CRDT-01/02 as stated in the slice dossier
hold on inspection of the actual patch.

Rebase exposure to the integration candidate is likewise nil: both files are net-new paths
(src/workbench/extensions/agent/stores/agent/ does not exist on FE main — gh api contents
returns 404 at ref=main), so this slice's own two files cannot textually conflict with #16198 or
with main. The six main-conflicts and eleven red E2E statuses recorded against this PR are
inherited from bases 07/08, not produced here (§3).

2.2 ADR-006 (/api/agent/* route + thread list) — the real finding

ADR-006 makes GET /api/agent/threads the history-list source and flags, as an explicit ⚠️
consequence, that the FE↔agent schema is a shared contract that must be versioned/documented to
avoid drift
. That contract exists today and is authoritative:
cloud/services/ingest/openapi.yaml → AgentThreadSummary, described in-spec as
"One agent thread row for the history sidebar" — i.e. exactly this store's input row.

AgentThreadSummary requires nine fields. ChatSession hand-declares three, and one of those
changes type:

Wire (authoritative) ChatSession Consequence
title (string, may be empty) title: string —
preview (required; "shown when title is empty") absent An untitled thread renders blank; the spec's mandated fallback is unrepresentable in the store's type.
status: active | archived absent Server-archived threads are indistinguishable from active ones; the local tombstone set is a second, divergent delete concept layered over a server one that already exists.
updated_at (RFC3339 string) updatedAt: number (epoch ms) An unstated adapter must parse at the boundary. There is no parse/validate step and no test for one; a bad or empty value yields NaN, every >= comparison is false, and the row silently sinks to Earlier rather than erroring. last_message_at is explicitly "Empty when unset" in the spec — so the NaN path is reachable with legal server data if the caller ever maps that field.
workflow_id, message_count, last_message_at, created_at absent Fine to omit for this slice; noted for the adapter's shape.

Also from the same spec block: the endpoint is keyset-paginated, newest-created first,
default limit 20
. Two design consequences the store does not yet answer:

  1. replaceAll is total replacement with no append/merge affordance. A "load more" caller that
    calls replaceAll per page collapses history to the last page; the caller must accumulate.
    The store should own that, since it also owns the tombstone filter.
  2. The store buckets by updated_at while the server pages by created-at. Page boundaries and
    displayed buckets are therefore not aligned — a thread updated today can sit on page 5, so
    "Today" is only complete once every page is fetched. That is a product decision, not a bug,
    but it is currently implicit.

This is drift of exactly the kind ADR-017 was written to kill on the doc-frame side (OpenAPI
authoritative, generated types, freshness CI). ADR-017's letter covers doc_update / doc_reset /
doc_ops_result only, so this is not an ADR-017 violation — but the same failure mode, on a
route whose schema is already authored and authoritative.

2.3 Local persistence of user content — new ground, no precedent to inherit

The FE currently uses useLocalStorage for exactly two keys, both pure UI layout
(Comfy.MenuPosition.Docked / .Floating). No existing FE key persists per-account user
content metadata.
So Comfy.Agent.ChatTitles and Comfy.Agent.DeletedThreads are the first of
their class, and there is no established scoping convention for this slice to have followed —
which makes the scoping choice a design decision this slice is making, not one it inherits.

Both keys are browser-global: no workspace id, no user id, no rotation, no logout hook. ADR-006's
security posture is "tenant identity comes only from the authenticated caller"; here, chat titles
(user-authored content) and tombstones survive logout and are read by the next account on the same
browser profile. The nat-watch chamber already staged this as a privacy inline comment at
agentChatHistoryStore.ts:55-59 (READY-TO-POST, exact head 628c7147); this packet confirms
it against ADR-006 rather than restating it. Cross-account tombstone misapplication needs an id
collision and server ids look minted, so the leak (titles) is the live half, the misapply the
theoretical half.

ADR-008 is not implicated: it governs the CRDT substrate's durable ownership (agent-owned embedded
SQLite under ComfyUI's user dir), not FE presentation metadata. No conflict.

2.4 Structural growth bound — worth naming explicitly

rename writes an override for any id, including one with no session (the suite's
whitespace-rename case runs against an empty store). Neither map is ever pruned. The obvious prune
— drop overrides for ids absent from the server list — is unsafe precisely because the list is
paginated
: absent-from-page-1 ≠ deleted. So unbounded key growth here is structural, a
consequence of overlay-plus-pagination, not an oversight to be patched later. It gets bounded only
when the server owns rename/delete. Per #79 (private alpha) I am not asking for a migration or any
back-compat path; the ask is that the growth bound be stated, not engineered.

The premise behind the overlay checks out: the ingest route table
(services/ingest/server/server.go:679-686) registers create/list threads, post/get/cancel
messages, and answer-ask — and no rename or delete route. The BE-3130 rationale in the code
comment is accurate as of this workspace's cloud checkout.

3. Risk classing

Axis Classing
Shipped vs dev-only Not reachable today. Zero importers of agentChatHistoryStore across the entire main...09-transcript-persistence range (219 changed files scanned via the compare API at head 628c7147). No component, composable, or store references it.
Bundle impact Zero at present. An unimported Pinia store module is tree-shaken out; it enters the bundle only when a later slice mounts it (~111 lines of source, no new dependency — useLocalStorage/useTimestamp are existing @vueuse/core usage).
Feature gating None in this diff, and none needed yet — nothing mounts it. The gating obligation lands on the slice that adds the caller, and must satisfy the 2026-08-28 #frontend invariant (agent entry points stay feature-gated), coordinated with the /features pipeline in #16208. Flagging forward, not against this PR.
CI 11 failing checks at head (e2e-status, mobile-chrome, 9 chromium shards). Strict subset of base #16204's 12 — set difference 16206 \ 16204 is empty; 16204 \ 16206 is playwright-tests (cloud). Zero new failures introduced. Unit/typecheck/lint green.
Blast radius if merged as-is Dead code on a draft stack. The account-scoping and NaN paths cost nothing until a caller exists — which is also why fixing them now is cheap.
CRDT risk None. See §2.1.

4. Verdict — MERGE-AFTER-CHANGES

Direction is right and the slice is honestly scoped: a pure grouping function with a real
suite, an overlay explicitly justified by a missing backend route, and no reach into transcript,
turn, graph, or doc state. The dossier's warning that it must not become a second session
authority is respected — it holds no messages and no thread lifecycle.

Four changes, in severity order. All are pre-caller, so all are cheap now and expensive later:

  1. Scope the two localStorage keys to the authenticated workspace/user, and clear or rotate on
    account change.
    ADR-006 tenancy; first-of-class persistence with no convention to inherit
    (§2.3). This is the one item that is a genuine defect rather than a seam gap. Already staged as
    a COMMENT inline by nat-watch — do not double-post.
  2. Type the store's input off AgentThreadSummary rather than hand-declaring it, or state in
    the file that ChatSession is a deliberate view model and name the adapter that produces it —
    including how updated_at (RFC3339) becomes updatedAt (epoch ms) and what happens when it
    does not parse. A NaN updatedAt currently sinks a row to Earlier in silence (§2.2).
  3. Decide preview and status now, in the type. Empty title is a legal server value with a
    spec-mandated preview fallback, and archived is a server-side state that the local tombstone
    set silently shadows. Both are unrepresentable in ChatSession today.
  4. Give replaceAll a pagination story — append/merge, or a comment stating that the caller
    accumulates pages before calling it, plus a note that "Today" is complete only after full
    pagination (§2.2).

Not asked for, deliberately: any migration or back-compat path (#79, private alpha); a timezone
policy beyond the local-day implementation shown; E2E coverage (no mount exists to drive — the
dossier's VAL-HISTORY-04 BLOCKED discipline is correct).

Minor, non-blocking: useTimestamp({ interval: 60_000 }) in a store scope installs an
app-lifetime 1/min tick once the store is first used; harmless, worth knowing before it lands in a
panel that stays mounted.

Not CONFLICTS-WITH-OUR-DESIGN. Nothing here contradicts an accepted ADR. §2.2 is drift against
an authoritative schema and §2.3 a tenancy gap — both correctable inside the slice's own shape.

5. Merge path

Does not fold into #97, and needs no packet of its own.

6. Method / compliance

Staged rows for reports/audit/verified-state.md (operator to append)

Fact Verified at (SHA/state) Date (Z) Lane/actor
FE #16206 diff is CRDT-null (no yjs/op_id/stamp/doc-frame refs) and both files are net-new paths absent from FE main PR head 628c7147bf72; contents/...stores/agent?ref=main → 404 2026-08-29 pr16206-review
agentChatHistoryStore has zero importers across main...nathaniel/agent-v1/09-transcript-persistence (219 files) — dead code, tree-shaken, zero bundle impact compare API @ 628c7147bf72 2026-08-29 pr16206-review
#16206 failing-check set is a strict subset of base #16204's (11 ⊂ 12; only playwright-tests (cloud) extra on base) — zero new failures gh pr checks both PRs @ 628c7147bf72 / 1b129dff 2026-08-29 pr16206-review
Ingest exposes no thread rename/delete route (create/list threads, post/get/cancel messages, answer-ask only) — BE-3130 overlay premise confirmed cloud/services/ingest/server/server.go:679-686, workspace checkout 2026-08-29 pr16206-review
AgentThreadSummary (9 required fields, updated_at RFC3339 string, preview fallback, status active/archived) is the authoritative history-sidebar row cloud/services/ingest/openapi.yaml:12251 2026-08-29 pr16206-review
FE persists only 2 useLocalStorage keys, both UI layout — no precedent for per-account content metadata in browser storage FE checkout src/, 2026-08-29 2026-08-29 pr16206-review

Merge-readiness scorecard

Slice 09 merge-readiness scorecard

PR: Comfy-Org/ComfyUI_frontend#16206 — transcript persistence
Observed: 2026-08-30 at head 628c7147bf722f8867c21a4404199a4a6d4ab700
Overall verdict: NEEDS-CHANGES — all four review items remain absent from the unchanged PR head; the PR is also draft, red, and waiting for slices 03–08.
Score: 2.5/7 (PASS or accepted discretion = 1; PARTIAL = 0.5; FAIL/BLOCKED = 0)

03 -> 04 -> 05 -> 06 -> 07 -> 08 -> [09] -> 10 -> 11 -> 12 -> main
                                    ^
                          waits for every left-hand slice
gate status evidence
Review verdict FAIL (0/1) The review packet says MERGE-AFTER-CHANGES. None of its four items is on live head 628c7147: (1) account/workspace-scope local storage, (2) use a named AgentThreadSummary adapter with timestamp validation, (3) retain preview/archive state, and (4) define paginated accumulation. All four exist only in the detached, verified patch series.
Flag-off safety PASS (1/1) The slice audit is CLEAN: this is a dormant Pinia store with no global registration, mount, CSS, route, or listener. It satisfies issue #149's user-facing-strict standard without a discretionary waiver.
CI on current head FAIL (0/1) Live gh pr checks at 628c7147: 89 pass, 11 fail, 22 skip. Red: e2e-status, mobile Chrome, and Chromium shards 2, 3, 4, 6, 7, 8, 10, 14, and 15. The review showed this set is inherited from slice 08, but inherited red is still not green.
Conflict with declared base PASS (1/1) GitHub reports MERGEABLE against nathaniel/agent-v1/08-session-state@1b129dff; no merge conflict. mergeStateStatus=BLOCKED is policy/check state.
Draft and retarget-to-main readiness BLOCKED (0/1) Still draft. FEH-4 requires bottom-up restacking after the reconciled candidate and slices 03–08. Direct retarget to main would bypass its predecessor and is not ready.
Test coverage PARTIAL (0.5/1) The PR has one focused store suite covering grouping/order, rename, tombstones, active removal, local-day behavior, and persistence recreation. Unit/type/lint were green in the review. The history UI is not mounted at this slice, so browser coverage for list rendering, rename/delete/refresh, pagination, and account switching is correctly unproven.
Open blockers BLOCKED (0/1) Apply the four review fixes; green current-head CI; preserve owner control of draft state; then wait for slices 03–08, including parallel rp-1 packets for 03–07. The G1 Linear matrix also leaves this slice's union-preview history interactions unverified.

Merge decision

Do not merge or retarget now. Reproduce the four prepared fixes when slice 09 is restacked onto the
landed slice 08, then run the store suite, composed history UI tests, and full CI.

Provenance and glossary

Sources: live GitHub metadata/checks, internal review and patch packets, mr-1, FEH-4, and the current
G1 Linear checkpoint. No quarantined Nathaniel design document or Linear design narrative was read.

  • History overlay — browser-local title and deletion metadata layered over server thread rows.
  • Pagination — fetching thread history in pages rather than as one complete list.
  • Declared base — slice 08, the branch GitHub currently compares this PR against.
  • rp-1 — the separate review lane for slices 03–07.

@christian-byrne
christian-byrne force-pushed the nathaniel/agent-v1/08-session-state branch from 1b129df to e425af1 Compare August 30, 2026 14:47
@christian-byrne
christian-byrne force-pushed the nathaniel/agent-v1/09-transcript-persistence branch 2 times, most recently from 3c6c4f9 to ca644f2 Compare August 30, 2026 16:48
@christian-byrne
christian-byrne force-pushed the nathaniel/agent-v1/08-session-state branch from faf10c8 to bf2ca92 Compare August 30, 2026 17:40
CodeJuggernaut and others added 4 commits August 30, 2026 17:40
- thread listing with recency grouping over the server's titles
- rename overlay and delete tombstones cover the endpoints the
  server does not expose yet
DEFECT-FIX T1 (agentChatHistoryStore.test.ts): the persistence
property was unpinned - all nine shipped tests stayed green with
useLocalStorage swapped for a plain ref. New pin walks a rename and
a tombstone across the pinia re-instantiation boundary in the
sibling idiom (agentRunModeStore's save / nextTick / createPinia
round-trip). Receipt: mutant-red - the ref-swap turns exactly the
new pin red while the nine shipped tests stay green.

DEFECT-FIX T2: the newest-first assertion could not fail - the
input literal was already sorted. The literal now leads with
earlyToday so input order differs from expected order; expected
values unchanged, timezone-independent. Receipt: mutant-red -
removing the sort turns the today-bucket assertion red.

T3 (director ruling, honest minimum): the spring-forward test name
claimed DST discrimination it does not have (the transition
postdates the computed boundary in every timezone); renamed to what
it proves. startOfLocalDay's DST behavior at the yesterday boundary
stays unpinned - recorded in the round delivery and boarded to the
chain tail with the TZ-mechanism gap.

Notes

- Store blob 5ce2253 untouched (hash-verified before and after).
@christian-byrne
christian-byrne force-pushed the nathaniel/agent-v1/09-transcript-persistence branch from ca644f2 to 80f67f2 Compare August 30, 2026 17:41
@christian-byrne christian-byrne added cursor-review Trigger multi-model Cursor agent review on this PR and removed cursor-review Trigger multi-model Cursor agent review on this PR labels Aug 31, 2026
@christian-byrne

Copy link
Copy Markdown
Contributor

Superseded — closing per Christian's direction.

Full context for agent readers

Program pivot 2026-08-31: the 17-slice stack targeting the v1 integration branch is superseded by the #16198 v2 merge to main @f954e479. Per program/reorientation-plan.md, all remaining value (tests, QA artifacts, invariant checks, refactors) ports to main-based successor PRs. Pre-close dossier cross-check completed for this PR; unique unsalvaged content (if any) was filed as a salvage row in the program todo before close. This closed PR remains a readable source; review/QA deliverables are posted only on open successor PRs.

…ate' into hub-09-cascade

# Conflicts:
#	src/workbench/extensions/agent/stores/agent/agentChatHistoryStore.test.ts
#	src/workbench/extensions/agent/stores/agent/agentChatHistoryStore.ts
@christian-byrne christian-byrne added cursor-review Trigger multi-model Cursor agent review on this PR and removed cursor-review Trigger multi-model Cursor agent review on this PR labels Sep 2, 2026

@github-actions github-actions Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🔍 Cursor Review — Consolidated panel

Triggered by @christian-byrne.

Round 2 — ledger: 9 prior finding(s) across 1 round(s) (9 never answered).

Found 10 finding(s).

Severity Count
🟠 High 1
🟡 Medium 8
🟢 Low 1

Panel: 5/8 reviewers contributed findings.

Reviewers that did not contribute: claude-opus-5-thinking-max:adversarial (error), gpt-5.6-sol-max:adversarial (error), claude-opus-5-thinking-max:edge-case (error)


The finding(s) below could not be anchored to a line the reviewed diff carries, so they are reported here instead of inline:

src/lib/litegraph/src/linkDeduplication.ts:219 — 🟠 High — Termination of the rewritten while depends on every failing pass either incrementing successfulPasses or growing skipped, but when moved is empty blocked.length ? blocked : moved adds nothing and continue repeats the identical pass forever — reachable once every remaining link is already skipped or aligned and updateEndpoints still rejects the unchanged removals. The old for (let pass = 0; pass < Math.max(1, referencedNames.size); pass++) + break could not spin; bound the loop by total attempts, or break when moved.length === 0 && !result.ok. Raised by 1 of 8 reviewers (claude-opus-5-thinking-max adversarial).

src/lib/litegraph/src/linkDeduplication.ts:168 — 🟡 Medium — The loop bound changed from Math.max(1, referencedNames.size) to while (successfulPasses < referencedNames.size), so a node whose referenced input names have all disappeared (empty referencedNames) never enters the body and the removals collected from links_to_remove are never disconnected — those links stay registered and dangling after configure. The Math.max(1, ...) in the old bound existed precisely to guarantee that one pass. Raised by 1 of 8 reviewers (claude-opus-5-thinking-max adversarial).

src/workbench/extensions/agent/crdt/docFrameClient.ts:105 — 🟡 Medium — atob() throws InvalidCharacterError on malformed base64, and parseServerDocFrame runs inside the api custom-event listener installed by DocFrameClient, so a truncated relay frame or a hostile update_b64 escapes as an uncaught error out of the socket dispatch instead of being dropped like every other unparseable payload. Wrap the decode in try/catch and return null. Raised by 3 of 8 reviewers (claude-opus-5-thinking-max adversarial, gemini-3.1-pro adversarial, kimi-k3-max adversarial).

src/workbench/extensions/agent/crdt/ecsFollowerAdapter.ts:244 — 🟡 Medium — applyQueuedFrame clears the session's pending node/widget/link effects at line 221 and only then calls session.mutations.batch(...), whose boolean is discarded. If validation fails (e.g. a connect referencing a missing node) the Yjs update is already integrated into the follower doc while the ECS stores never receive that frame's effects, and applyFrame still reports success — a silent, permanent divergence until a doc_reset. Read the result and either re-queue the effects or trigger a resync. Raised by 2 of 8 reviewers (kimi-k3-max adversarial, kimi-k3-max edge-case).

src/workbench/extensions/agent/composables/agent/useAgentSession.ts:52 — 🟡 Medium — Comfy.Agent.ThreadId is origin-global and start() rehydrates it for whatever account is active. Unlike agentChatHistoryStore, which this PR now scopes by user/workspace and clears when storageScope changes, nothing scopes this key or resets the conversation store at that boundary — an in-place account or workspace switch leaves the previous account's thread id persisted and its transcript on screen. Scope the key the same way and reset the conversation at the same boundary so the fix is complete. Raised by 1 of 8 reviewers (kimi-k3-max adversarial).

src/workbench/extensions/agent/crdt/layoutFollowerBridge.ts:190 — 🟡 Medium — lastSeq is advanced before applyRemoteUpdate runs, so if Y.applyUpdate throws on corrupt bytes the sequence tracker has already moved past a frame that never integrated; the gap detector then treats the next frame as contiguous and the missed content is silently lost until an explicit doc_reset. Advance lastSeq only after the apply succeeds. Raised by 1 of 8 reviewers (kimi-k3-max adversarial).

src/workbench/extensions/agent/components/agent/message/ReplyAssetGroup.vue:83 — 🟡 Medium — This watcher auto-fetches any URL an LLM reply classified as a 3D asset and hands it to generateModelThumbnail, which fetches that arbitrary origin, parses it through Three.js/WebGL, and persists the render via persistThumbnail(assetName, blob) under a name taken straight from the untrusted URL (classifyAssetUrl reads it from ?filename=, so ../../evil.glb is reachable). Restrict auto-generation to first-party API URLs and sanitize the persisted name. Raised by 1 of 8 reviewers (kimi-k3-max adversarial).

apps/website/src/lib/markdown-twin.ts:32 — 🟡 Medium — Putting HEADER in DROPPED_TAGS removes every <header>, including ones nested inside <main> that carry a page's H1, eyebrow, and introduction — that content disappears from the generated twin, and the test fixture only exercises a <header>-free <main>, so nothing catches it. Drop page-level banners only (e.g. a <header> outside <main>) rather than the tag wholesale. Raised by 1 of 8 reviewers (gpt-5.6-sol-max edge-case).

apps/website/src/lib/markdown-twin.ts:125 — 🟡 Medium — An anchor may validly contain block content, and inline() inserts \n\n around descendant <div>/<p> elements, so this line wraps text containing blank lines in [...]; .trim() strips only the edges and a Markdown link cannot span a blank line, so card-style links (title + description inside the <a>) render as malformed text and lose their destination. Collapse interior whitespace in the link text before wrapping. Raised by 1 of 8 reviewers (gpt-5.6-sol-max edge-case).

src/platform/workflow/templates/composables/useTemplateWorkflows.ts:159 — 🟢 Low — This reverts the response.ok guard, so a non-2xx template response is fed straight into r.json(): an HTML error page from a stale pinned template package now surfaces as a generic SyntaxError instead of the descriptive "not served by this install (status)" error that distinguished a bad pin from a bad template, and a JSON error body is handed to app.loadGraphData as if it were a workflow. The guard was independent of the seeding feature being reverted and is worth keeping. Raised by 2 of 8 reviewers (kimi-k3-max adversarial, kimi-k3-max edge-case).

@huang47 huang47 added the risk:high PR risk grade (advisory shadow check; grader-owned) label Sep 2, 2026 — with ChatGPT Codex Connector
@huang47 huang47 removed the risk:R2 PR risk grade (advisory shadow check; grader-owned) label Sep 2, 2026

@christian-byrne christian-byrne left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Re-review at e1163eef: one medium finding.

Prior round: all 9 threads are resolved; 3 fixes remain present and 6 were explicitly dispositioned as non-blocking. Review scope was this slice against nathaniel/agent-v1/08-session-state@7f63109b; findings from the wider stacked chain were excluded.

Full context for agent readers

Prior-thread follow-through

Prior thread Status at current head Evidence
titleFor overlay contract Resolved, intentionally non-blocking The API still deliberately returns only the custom-title overlay; the caller falls back separately.
replaceAll stale active ID Addressed replaceAll now clears activeId when the retained list no longer contains it; the regression test covers absent and retained IDs.
Malformed persisted shapes Addressed Both local-storage values now use validating serializers, with malformed-shape coverage.
Account/workspace storage isolation Addressed, with one follow-up finding below Keys now include resolved user and workspace identity, and in-memory history clears on scope rotation.
Deleting the open session Resolved by the later integration seam onDeleteHistory now calls onNewChat() when the deleted ID is the open thread, which clears persisted session state.
Prototype-key hardening Resolved, intentionally non-blocking Server-generated thread IDs remain the stated contract; no new regression was introduced.
Storage-write failure semantics Resolved, intentionally non-blocking The local tombstone remains best-effort pending a server-backed lifecycle.
Overlay/tombstone growth Resolved, intentionally non-blocking Lifecycle pruning remains deferred to server-backed rename/delete behavior.
Cross-tab tombstone visibility Resolved, intentionally non-blocking The accepted behavior remains temporary visibility until the next refresh.

New-delta review

Reviewed all 7 changed files (+297/−44) against the declared stacked base. The transcript extraction preserves sequence ordering, stable turn identity, row-ID reconciliation, and the existing conversation hydration behavior. The only new actionable issue is attached inline.

CI at this head is green for the slice-relevant test, lint-and-format, and e2e-status checks. This was a static review; I did not claim a new local runtime test.

watch(
storageScope,
() => {
sessions.value = []

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

issue: The scope watcher clears the old account's sessions, but no consumer observes that scope change to fetch the new account's history. AgentPanelRoot calls refreshHistory() only on mount and after selecting a row; the store test even pins the post-switch state as empty. This is observable on the API-key auth path, where clearStoredApiKey() changes identity without reloading the page: after another key signs in, the panel remains mounted and history stays empty until a remount. Could the identity/workspace boundary also trigger a fresh listThreads() after the scoped refs rotate?

@christian-byrne

Copy link
Copy Markdown
Contributor

This slice is reference-only. Accepted work is routed to #17324 and #16406.

Full context for agent readers

Per Christian's main-target close ruling, #16206 (09 — transcript persistence) is no longer a landing vehicle. It remains readable implementation and review provenance. Runtime and permanent-test responsibilities are separated. If a genuinely unaccounted delta is found, reopen this source or file a bounded main-based carrier rather than reviving the stacked merge path.

Decision record.

@DrJKL DrJKL added agent Comfy Agent product, integration, tests or product documentation agent-session Agent sessions, history, turn lifecycle or workflow binding agent-test-unit Touches Agent-related unit/component tests or their support agent-ui Agent panel, composer, transcript or other user-interface components labels Sep 24, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

agent Comfy Agent product, integration, tests or product documentation agent-session Agent sessions, history, turn lifecycle or workflow binding agent-test-unit Touches Agent-related unit/component tests or their support agent-ui Agent panel, composer, transcript or other user-interface components cursor-review Trigger multi-model Cursor agent review on this PR risk:high PR risk grade (advisory shadow check; grader-owned)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants