Repository navigation
feat(crdt): make the debug panel a first-class instrument - #16209
christian-byrne wants to merge 6 commits into
Conversation
The overlay was blocking the product: a status strip above the agent panel pushed the composer below the fold, and a fixed-position "CRDT dev" pill sat on top of the composer's submit button. - Contain the instrument inside #agent-panel-root. The chip lives in the title row and the sheet opens below the panel header, so neither can cover the composer or the canvas. - Fold the status strip into the chip label, removing the block element that consumed vertical space (and its now-unused i18n keys). - Gate on DEV *or* an explicit ?crdtDebug=1 opt-in. The audience is product testers on staging builds, where DEV is false. - Route every CRDT-internal event through one logger so the console and the copied report are the same record read two ways, with scope (wire/doc/ecs/ops) and level axes. - Add a merge lab: replay op sequences through the pinned applier and report per-op verdict, contested register, stamp order and node incarnation, in one vocabulary. Includes the delete/set_widget/add case and a free-text field for the rule a tester would prefer. - Restore the copy-system-stats bundle deleted in #5259 (system stats, server logs, settings, extensions, versions) and merge it with the existing copy into one report.
- stale_probe logged at warn, and warn bypasses the debug gate by design, so an idle bound workflow emitted a console warning every 30s in every build — including for users who had explicitly opted out. Demote to info. - The batch-abort scenario applied its ops one per batch, so it could not produce the abort it narrated: the trace said the remainder was abandoned and then showed it applied. Model batches explicitly; the tail is now not-reached/batch_aborted. The test had pinned the wrong outcome and now asserts what its own name promised. - The report shipped all settings and 40k chars of server logs with no warning. addSetting is public extension API, so the dictionary is an open set: redact credential-shaped keys and mark both sections, and the workflow section, as needing review before sharing. - The panel was a static import, so the CRDT applier reached every agent-panel user to serve the ?crdtDebug minority. Load it async. - Anchor at top-12: the header is h-12 and top-10 painted over its last 8px. End the sheet above the composer so a tester can drive the agent and watch the log at once. - Key trace rows on index; the idempotent-resend scenario is deliberately one op twice, so op_id is not unique across rows. - devEventReplacer tracked every visited object, reporting a value referenced twice from sibling positions as [Circular]. Track ancestors. - Snapshot the doc when Copy is pressed rather than trusting the 1s poll, and keep a malformed /system_stats payload from aborting the report. - Drop the retained op payload from op_minted, the unproduced 'panel' log scope, and update the runbook that pointed at the deleted status strip.
The sheet was still an overlay reserving space with `bottom-1/3` — a percentage against a composer whose height is fixed in pixels, so it covered the composer below roughly a 910px viewport. Measured at 1366x768 it pushed the submit button from y=679 to y=869, out of the clipped column entirely. It is now a real child of AgentPanel's flex column via an #instrument slot, above the shrink-0 composer. Getting there needed three things that each failed once and are all load-bearing: the OUTER wrapper carries the cap (a percentage max-height resolves against the parent, so on the inner sheet it measured an auto-height wrapper and capped nothing); `max-h-[50%]` not `max-h-1/2` (Tailwind has no max-h fraction utility, so the class emitted nothing); and `min-h-0` plus `grow` rather than `flex-1` (flex items default to min-height:auto and refuse to shrink, while flex-1's basis:0 collapses the wrapper to nothing). Verified at 1366x768 and 1280x600: the submit button does not move at all when the panel opens, and is hit-testable in both states. Report: logs, settings and the workflow are now per-source opt-ins, defaulting off, as the dialog deleted in #5259 had them — restoring the collection without the consent was the regression. Redaction recurses, because Comfy.Server.LaunchArgs is a Record<string,string> whose own key matches nothing, so a one-level walk emitted --api-token whole; argv gets the same treatment. Also: keep raw payloads out of an opted-out user's console while leaving the always-on warning line; stop ?crdtDebug=1 resetting a chosen verbosity and let a later dismissal survive reload; truncate collapsed log rows and poll the document only on the Status tab; seed node incarnations only from ops that applied; drop the never-emitted 'panel' scope.
The blocker: `dismissed` was per-mount state seeded from `false`, and the panel lives in a slot inside `v-if="!showHistory"` — so opening chat history and coming back destroyed and re-created it, resurrecting a chip the tester had explicitly hidden, with the opt-out still persisted. Seed it from the gate instead. The test that claimed to cover this only asserted within one mount; it now unmounts and re-renders. - doc_gap and a non-acknowledged batch both repeat indefinitely, and warn bypasses the debug gate by design, so both drop to info. The floor is now reserved for terminal conditions (schema_error, doc_reset). - Cache the gate: isLevelEnabled runs once per outbound frame, per applied frame and per minted op, and each call was a synchronous localStorage.getItem — paid by opted-out users for nothing. Declared above applyQueryOverride's module-evaluation call, which now goes through the setters and would otherwise hit the temporal dead zone. - max-h-[50%] -> max-h-1/2: AGENTS.md forbids arbitrary percentages where a fraction utility exists, and the doc comment already said max-h-1/2. - Cap the event-log and stamp-ledger report sections, which grow with session length, the way the workflow and log sections already are. - Surface meta.schema_version, the one fact that explains a schema_error. - Evaluate duplicate-op and node-presence at each op's own position in a batch, so an intra-batch resend or delete no longer resolves to 'unknown' — the one answer a merge explainer must not give wrongly. - redactArgv no longer blanks the argument after an inline --flag=value. - Hoist defineAsyncComponent to module scope and narrow its comment to what is genuinely deferred.
The blocker: the three opt-in controls gating server logs, settings and the workflow rendered at 0x0. agentPanel.css strips `appearance` from every input under #agent-panel-root with no replacement sizing, so a bare checkbox collapses while its <label> still forwards clicks — brushing the word "Settings" armed the toggle invisibly, and the next Copy folded the settings dictionary into the paste with no indication. They are now role=switch buttons (the CSS reset leaves buttons sized), with an on/off icon and border, and the test asserts their rendered state. - ws_out retained the whole parsed frame. Once the human write leg lands that is every widget value a user typed, sitting in an un-gated report section while the same text in the workflow JSON sits behind a toggle and a warning. Log the envelope only, as opSender already does, and add the sharing warning to the event-log and stamp-ledger sections. - schema_error re-dispatched per frame, and warn bypasses the debug gate, so an unreadable doc warned once per frame forever in shipping builds. Announce the first failure only. - Split readCrdtSnapshot into crdtSnapshot.ts: the follower imported it from crdtDebugReport, dragging the collector, redaction helpers and the extension store into the eager bundle the async panel exists to avoid. - The trace <ol> kept UA decimal markers while the template numbered each step, rendering "1. 1. delete_node". - The closed chip floated over the empty-state greeting; put it in flow. - Guard copyLog like copyReport; persist the tester note across the remount a chat-history toggle causes; fall back when a device reports no index; correct the gate comment (DEV *or* opt-in, not plus).
Both were introduced by earlier rounds of this branch, not by the base. 1. The schema_error de-dup I added to quieten the console suppressed the EVENT, and its listener also clears `connected`, cancels the stale probe and discards pending effects. A reconnect re-armed all three, the next bad frame was silently swallowed, and the probe resubscribed every 30s forever while the panel reported connected:yes. This is the live follower path, not behind the debug gate. Dispatch every failing frame and move the once-only guard into the detail so only the log dedupes. Test: two consecutive bad frames must produce two events. 2. The fault-tolerance fallback I added to renderSystem dumped the raw /system_stats payload on any render error — putting argv back on the clipboard unredacted, in the one collected section with no opt-in. systemSection is now total (the payload is asserted, not parsed, so a 200 with a different shape is expected) and the raw fallback is gone. Test: a secret in argv stays absent when devices is malformed. Also from the review: - redactArgv pattern-tested every token as if it were a flag, so '/home/me/private/x' leaked (it matched) while the harmless argument after it was blanked. Identify flags by the leading dash, and blank path- and URL-shaped values whatever flag names them: --output-directory and --extra-model-paths-config match no credential pattern. - MAX_WORKFLOW_CHARS 20k dropped nearly every real graph a tester had just opted in to share (the sandbox's 10-node default is already 10k). - A log line containing a triple backtick closed its own fence; pick a delimiter longer than anything in the body. - An explicit opt-out now skips the ring buffer too, not just the console. - doc_reset is a host re-mint, not a client fault: info, not warn. - The consent comment claimed the deleted dialog gated three sources; it gated four, and the fourth was SystemStats. Say why that one is not gated here rather than misdescribing the prior art.
|
Important Review skippedAuto reviews are disabled on base/target branches other than the default branch. Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: ASSERTIVE Plan: Pro Plus Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
Comment |
🎭 Playwright: ❌ 1914 passed, 48 failed · 3 flaky❌ Failed Tests📊 Browser Reports
🎨 Storybook: ✅ Built — View Storybook📦 Bundle Size
⚡ Performance Report
Absolute values
Raw data{
"timestamp": "2026-08-29T00:32:16.208Z",
"gitSha": "1106abd5aa65efaf4e93a21152d2883692412b94",
"branch": "glary/crdt-dev-panel-visibility",
"measurements": [
{
"name": "canvas-idle",
"durationMs": 2052.2020000000225,
"styleRecalcs": 5,
"styleRecalcDurationMs": 4.614000000000002,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 526.598,
"heapDeltaBytes": 2866692,
"heapUsedBytes": 98875556,
"domNodes": 10,
"jsHeapTotalBytes": 5767168,
"scriptDurationMs": 9.552000000000001,
"eventListeners": 4,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.66333333333332,
"p95FrameDurationMs": 16.700000000000728
},
{
"name": "canvas-idle",
"durationMs": 2050.6010000000288,
"styleRecalcs": 7,
"styleRecalcDurationMs": 7.324999999999998,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 496.105,
"heapDeltaBytes": 2586272,
"heapUsedBytes": 98822048,
"domNodes": 14,
"jsHeapTotalBytes": 6029312,
"scriptDurationMs": 9.832,
"eventListeners": 6,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.666666666666668,
"p95FrameDurationMs": 16.700000000000728
},
{
"name": "canvas-mouse-sweep",
"durationMs": 2191.9109999999478,
"styleRecalcs": 83,
"styleRecalcDurationMs": 45.053999999999995,
"layouts": 14,
"layoutDurationMs": 4.939,
"taskDurationMs": 1183.453,
"heapDeltaBytes": -6960744,
"heapUsedBytes": 90249112,
"domNodes": 65,
"jsHeapTotalBytes": 7864320,
"scriptDurationMs": 158.002,
"eventListeners": 6,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.66333333333332,
"p95FrameDurationMs": 16.700000000000728
},
{
"name": "canvas-mouse-sweep",
"durationMs": 2203.5699999998997,
"styleRecalcs": 84,
"styleRecalcDurationMs": 52.756,
"layouts": 14,
"layoutDurationMs": 4.92,
"taskDurationMs": 1211.07,
"heapDeltaBytes": -7880328,
"heapUsedBytes": 89223156,
"domNodes": 65,
"jsHeapTotalBytes": 7077888,
"scriptDurationMs": 165.42600000000002,
"eventListeners": 6,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.670000000000012,
"p95FrameDurationMs": 16.700000000000728
},
{
"name": "canvas-zoom-sweep",
"durationMs": 1742.4980000000119,
"styleRecalcs": 31,
"styleRecalcDurationMs": 19.819999999999997,
"layouts": 6,
"layoutDurationMs": 1.1039999999999999,
"taskDurationMs": 403.856,
"heapDeltaBytes": 5797004,
"heapUsedBytes": 102849592,
"domNodes": 76,
"jsHeapTotalBytes": 6815744,
"scriptDurationMs": 13.504999999999999,
"eventListeners": 21,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.66333333333332,
"p95FrameDurationMs": 16.699999999999818
},
{
"name": "canvas-zoom-sweep",
"durationMs": 1728.1849999999395,
"styleRecalcs": 31,
"styleRecalcDurationMs": 18.628000000000004,
"layouts": 6,
"layoutDurationMs": 1.7139999999999997,
"taskDurationMs": 398.782,
"heapDeltaBytes": 5699796,
"heapUsedBytes": 102495576,
"domNodes": 76,
"jsHeapTotalBytes": 6815744,
"scriptDurationMs": 13.141000000000004,
"eventListeners": 19,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.66999999999998,
"p95FrameDurationMs": 16.800000000000182
},
{
"name": "dom-widget-clipping",
"durationMs": 998.0350000000158,
"styleRecalcs": 10,
"styleRecalcDurationMs": 6.386999999999999,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 725.617,
"heapDeltaBytes": 7313584,
"heapUsedBytes": 104240156,
"domNodes": 12,
"jsHeapTotalBytes": 7077888,
"scriptDurationMs": 152.79999999999998,
"eventListeners": 2,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.666666666666668,
"p95FrameDurationMs": 16.800000000000182
},
{
"name": "dom-widget-clipping",
"durationMs": 985.6210000000374,
"styleRecalcs": 11,
"styleRecalcDurationMs": 6.7139999999999995,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 705.626,
"heapDeltaBytes": 8452292,
"heapUsedBytes": 103796556,
"domNodes": 14,
"jsHeapTotalBytes": 7864320,
"scriptDurationMs": 143.539,
"eventListeners": 4,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.66333333333332,
"p95FrameDurationMs": 16.799999999999272
},
{
"name": "large-graph-idle",
"durationMs": 2023.887000000002,
"styleRecalcs": 5,
"styleRecalcDurationMs": 4.843999999999998,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 569.461,
"heapDeltaBytes": 16782016,
"heapUsedBytes": 121326272,
"domNodes": 10,
"jsHeapTotalBytes": 3670016,
"scriptDurationMs": 36.992000000000004,
"eventListeners": 6,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.666666666666668,
"p95FrameDurationMs": 16.800000000000182
},
{
"name": "large-graph-idle",
"durationMs": 2010.1809999999887,
"styleRecalcs": 4,
"styleRecalcDurationMs": 3.8200000000000003,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 526.4989999999999,
"heapDeltaBytes": 16598904,
"heapUsedBytes": 119700876,
"domNodes": 8,
"jsHeapTotalBytes": 3670016,
"scriptDurationMs": 41.41,
"eventListeners": 6,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.666666666666668,
"p95FrameDurationMs": 16.700000000000728
},
{
"name": "large-graph-pan",
"durationMs": 3303.532999999959,
"styleRecalcs": 66,
"styleRecalcDurationMs": 12.235,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 2594.3610000000003,
"heapDeltaBytes": -6584464,
"heapUsedBytes": 98700488,
"domNodes": 8,
"jsHeapTotalBytes": 5505024,
"scriptDurationMs": 903.645,
"eventListeners": 8,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.666666666666668,
"p95FrameDurationMs": 16.799999999999272
},
{
"name": "large-graph-pan",
"durationMs": 3216.3519999999153,
"styleRecalcs": 65,
"styleRecalcDurationMs": 11.373999999999999,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 2531.4569999999994,
"heapDeltaBytes": -5474404,
"heapUsedBytes": 98474300,
"domNodes": 6,
"jsHeapTotalBytes": 4718592,
"scriptDurationMs": 891.429,
"eventListeners": 8,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.66333333333332,
"p95FrameDurationMs": 16.700000000000728
},
{
"name": "large-graph-zoom",
"durationMs": 4458.941999999979,
"styleRecalcs": 67,
"styleRecalcDurationMs": 13.316999999999998,
"layouts": 60,
"layoutDurationMs": 13.589,
"taskDurationMs": 2566.5719999999997,
"heapDeltaBytes": -4037248,
"heapUsedBytes": 105944820,
"domNodes": 26,
"jsHeapTotalBytes": 5505024,
"scriptDurationMs": 863.288,
"eventListeners": 10,
"totalBlockingTimeMs": 2,
"frameDurationMs": 16.666666666666668,
"p95FrameDurationMs": 16.799999999999272
},
{
"name": "large-graph-zoom",
"durationMs": 4335.663999999952,
"styleRecalcs": 66,
"styleRecalcDurationMs": 12.185999999999998,
"layouts": 60,
"layoutDurationMs": 13.526,
"taskDurationMs": 2531.5820000000003,
"heapDeltaBytes": -3264940,
"heapUsedBytes": 106156160,
"domNodes": 24,
"jsHeapTotalBytes": 4980736,
"scriptDurationMs": 852.869,
"eventListeners": 12,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.66333333333332,
"p95FrameDurationMs": 16.700000000000728
},
{
"name": "legacy-node-drag",
"durationMs": 4862.469999999974,
"styleRecalcs": 40,
"styleRecalcDurationMs": 4.540000000000003,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 3664.812,
"heapDeltaBytes": -12602952,
"heapUsedBytes": 98826792,
"domNodes": 0,
"jsHeapTotalBytes": 6029312,
"scriptDurationMs": 1031.7999999999997,
"eventListeners": 192,
"totalBlockingTimeMs": 4,
"frameDurationMs": 16.66333333333338,
"p95FrameDurationMs": 16.700000000000728
},
{
"name": "legacy-node-drag",
"durationMs": 4843.412000000058,
"styleRecalcs": 40,
"styleRecalcDurationMs": 4.364,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 3595.8219999999997,
"heapDeltaBytes": -13332380,
"heapUsedBytes": 98769936,
"domNodes": 0,
"jsHeapTotalBytes": 6815744,
"scriptDurationMs": 1004.445,
"eventListeners": 192,
"totalBlockingTimeMs": 1,
"frameDurationMs": 16.66333333333338,
"p95FrameDurationMs": 16.799999999999272
},
{
"name": "minimap-idle",
"durationMs": 2011.4469999999756,
"styleRecalcs": 3,
"styleRecalcDurationMs": 3.0489999999999995,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 594.216,
"heapDeltaBytes": -18730356,
"heapUsedBytes": 87590336,
"domNodes": 6,
"jsHeapTotalBytes": -4067328,
"scriptDurationMs": 36.994,
"eventListeners": -229,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.666666666666668,
"p95FrameDurationMs": 16.799999999999272
},
{
"name": "minimap-idle",
"durationMs": 1993.355000000065,
"styleRecalcs": 3,
"styleRecalcDurationMs": 2.8940000000000006,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 543.3430000000001,
"heapDeltaBytes": 16742808,
"heapUsedBytes": 122162704,
"domNodes": 6,
"jsHeapTotalBytes": 4194304,
"scriptDurationMs": 37.136,
"eventListeners": 6,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.666666666666668,
"p95FrameDurationMs": 16.799999999999272
},
{
"name": "subgraph-dom-widget-clipping",
"durationMs": 742.4730000000181,
"styleRecalcs": 45,
"styleRecalcDurationMs": 9.908,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 518.0319999999999,
"heapDeltaBytes": -5460788,
"heapUsedBytes": 91429040,
"domNodes": 16,
"jsHeapTotalBytes": 7340032,
"scriptDurationMs": 137.96800000000002,
"eventListeners": 8,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.66333333333332,
"p95FrameDurationMs": 16.700000000000728
},
{
"name": "subgraph-dom-widget-clipping",
"durationMs": 742.9150000000391,
"styleRecalcs": 46,
"styleRecalcDurationMs": 11.005999999999998,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 536.98,
"heapDeltaBytes": -5483504,
"heapUsedBytes": 92351552,
"domNodes": 18,
"jsHeapTotalBytes": 7864320,
"scriptDurationMs": 142.61200000000002,
"eventListeners": 8,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.666666666666668,
"p95FrameDurationMs": 16.700000000000728
},
{
"name": "subgraph-idle",
"durationMs": 2004.1209999999978,
"styleRecalcs": 10,
"styleRecalcDurationMs": 10.485999999999999,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 473.29800000000006,
"heapDeltaBytes": 3008588,
"heapUsedBytes": 100749624,
"domNodes": 20,
"jsHeapTotalBytes": 6291456,
"scriptDurationMs": 9.184,
"eventListeners": 4,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.666666666666668,
"p95FrameDurationMs": 16.800000000000182
},
{
"name": "subgraph-idle",
"durationMs": 2038.864999999987,
"styleRecalcs": 8,
"styleRecalcDurationMs": 8.140999999999998,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 449.898,
"heapDeltaBytes": 3063652,
"heapUsedBytes": 99558140,
"domNodes": 16,
"jsHeapTotalBytes": 6553600,
"scriptDurationMs": 7.84,
"eventListeners": 6,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.666666666666668,
"p95FrameDurationMs": 16.800000000000182
},
{
"name": "subgraph-mouse-sweep",
"durationMs": 1967.666999999949,
"styleRecalcs": 80,
"styleRecalcDurationMs": 41.885,
"layouts": 18,
"layoutDurationMs": 5.923,
"taskDurationMs": 1126.136,
"heapDeltaBytes": 6654896,
"heapUsedBytes": 104425684,
"domNodes": 68,
"jsHeapTotalBytes": 7077888,
"scriptDurationMs": 122.55,
"eventListeners": 6,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.666666666666668,
"p95FrameDurationMs": 16.700000000000728
},
{
"name": "subgraph-mouse-sweep",
"durationMs": 1892.6770000000488,
"styleRecalcs": 80,
"styleRecalcDurationMs": 41.516000000000005,
"layouts": 18,
"layoutDurationMs": 6.175,
"taskDurationMs": 1117.313,
"heapDeltaBytes": 6062236,
"heapUsedBytes": 102673948,
"domNodes": 68,
"jsHeapTotalBytes": 6553600,
"scriptDurationMs": 116.524,
"eventListeners": 6,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.666666666666668,
"p95FrameDurationMs": 16.799999999999272
},
{
"name": "subgraph-transition-enter",
"durationMs": 1401.3749999999163,
"styleRecalcs": 19,
"styleRecalcDurationMs": 30.657000000000004,
"layouts": 15,
"layoutDurationMs": 12.911000000000003,
"taskDurationMs": 950.3349999999999,
"heapDeltaBytes": 19784036,
"heapUsedBytes": 126075120,
"domNodes": 13671,
"jsHeapTotalBytes": 5505024,
"scriptDurationMs": 34.647000000000006,
"eventListeners": 2383,
"totalBlockingTimeMs": 139,
"frameDurationMs": 16.666666666666668,
"p95FrameDurationMs": 16.799999999999272
},
{
"name": "viewport-pan-sweep",
"durationMs": 12502.355999999963,
"styleRecalcs": 247,
"styleRecalcDurationMs": 37.539,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 9021.016999999998,
"heapDeltaBytes": 5229804,
"heapUsedBytes": 109853676,
"domNodes": -281,
"jsHeapTotalBytes": -3588096,
"scriptDurationMs": 3077.6569999999997,
"eventListeners": -189,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.66333333333338,
"p95FrameDurationMs": 16.700000000000728
},
{
"name": "viewport-pan-sweep",
"durationMs": 12579.322000000047,
"styleRecalcs": 247,
"styleRecalcDurationMs": 40.32,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 9098.775,
"heapDeltaBytes": -1116348,
"heapUsedBytes": 102617068,
"domNodes": -283,
"jsHeapTotalBytes": -2015232,
"scriptDurationMs": 3064.028,
"eventListeners": -155,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.666666666666668,
"p95FrameDurationMs": 16.799999999999272
},
{
"name": "vue-large-graph-idle",
"durationMs": 18276.410999999996,
"styleRecalcs": 0,
"styleRecalcDurationMs": 0,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 17416.889,
"heapDeltaBytes": -43638596,
"heapUsedBytes": 199721448,
"domNodes": -1550,
"jsHeapTotalBytes": 9900032,
"scriptDurationMs": 341.48400000000004,
"eventListeners": -7455,
"totalBlockingTimeMs": 0,
"frameDurationMs": 17.776666666666642,
"p95FrameDurationMs": 16.799999999999272
},
{
"name": "vue-large-graph-idle",
"durationMs": 18283.31300000002,
"styleRecalcs": 0,
"styleRecalcDurationMs": 0,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 17446.544,
"heapDeltaBytes": -28947016,
"heapUsedBytes": 200401564,
"domNodes": -6548,
"jsHeapTotalBytes": 10141696,
"scriptDurationMs": 336.02500000000003,
"eventListeners": -7455,
"totalBlockingTimeMs": 0,
"frameDurationMs": 17.779999999999927,
"p95FrameDurationMs": 16.799999999999272
},
{
"name": "vue-large-graph-pan",
"durationMs": 22331.698999999957,
"styleRecalcs": 180,
"styleRecalcDurationMs": 22.765000000000036,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 21998.615,
"heapDeltaBytes": -10893292,
"heapUsedBytes": 213919404,
"domNodes": -6548,
"jsHeapTotalBytes": 13193216,
"scriptDurationMs": 942.246,
"eventListeners": -7447,
"totalBlockingTimeMs": 184,
"frameDurationMs": 17.780000000000047,
"p95FrameDurationMs": 16.80000000000291
},
{
"name": "vue-large-graph-pan",
"durationMs": 22516.430000000015,
"styleRecalcs": 179,
"styleRecalcDurationMs": 21.293000000000006,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 22192.916,
"heapDeltaBytes": -25482672,
"heapUsedBytes": 193337148,
"domNodes": -6548,
"jsHeapTotalBytes": 12926976,
"scriptDurationMs": 939.408,
"eventListeners": -7453,
"totalBlockingTimeMs": 80,
"frameDurationMs": 17.776666666666763,
"p95FrameDurationMs": 16.700000000004366
},
{
"name": "workflow-execution",
"durationMs": 508.93299999995634,
"styleRecalcs": 18,
"styleRecalcDurationMs": 22.781000000000002,
"layouts": 4,
"layoutDurationMs": 1.9149999999999998,
"taskDurationMs": 144.52799999999996,
"heapDeltaBytes": 6207488,
"heapUsedBytes": 99882652,
"domNodes": 144,
"jsHeapTotalBytes": 0,
"scriptDurationMs": 11.002999999999998,
"eventListeners": 99,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.66999999999998,
"p95FrameDurationMs": 16.799999999999272
},
{
"name": "workflow-execution",
"durationMs": 139.82899999996334,
"styleRecalcs": 9,
"styleRecalcDurationMs": 18.72,
"layouts": 3,
"layoutDurationMs": 1.032,
"taskDurationMs": 95.10400000000003,
"heapDeltaBytes": 3681016,
"heapUsedBytes": 97366588,
"domNodes": 110,
"jsHeapTotalBytes": 0,
"scriptDurationMs": 5.044999999999999,
"eventListeners": 49,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.666666666666668,
"p95FrameDurationMs": 16.700000000000728
}
]
} |
|
@coderabbitai review (No code changes in response to the previous bot comment — it was the "review skipped" status message, not feedback. Auto-reviews are disabled for base branches other than the default, and this PR deliberately targets Two notes that may be useful to a reviewer, human or bot: Scope. The diff is large (~2,360 lines of non-test code) because it bundles four interlocking pieces — the opt-in gate + structured logging, the debug report collector, the merge-semantics explainer, and the panel UI that consumes all three. It splits cleanly along those seams if the team would prefer four PRs; say so and I'll break it up. Where the risk actually is. Most of the diff is a dev-only instrument behind an explicit opt-in gate, but three files sit on the live follower path and are not gated, so they deserve the closest look:
Sensitive sources in the report (server logs, settings, workflow JSON) are per-source opt-ins defaulting off, matching the dialog deleted in #5259; |
Codecov Report❌ Patch coverage is @@ Coverage Diff @@
## christian-byrne/crdt-impl-integration-candidate #16209 +/- ##
===================================================================================
+ Coverage 83.15% 83.17% +0.02%
===================================================================================
Files 2014 2020 +6
Lines 116266 116836 +570
Branches 33722 34503 +781
===================================================================================
+ Hits 96676 97179 +503
- Misses 19248 19314 +66
- Partials 342 343 +1
Flags with carried forward coverage won't be shown. Click here to find out more.
... and 8 files with indirect coverage changes 🚀 New features to boost your workflow:
|
TL;DR: Ports the six commits from [#16209](#16209) onto the current v2 ci-fix line without merging its stale candidate ancestry. Adds the gated CRDT debug panel, redacted report/snapshot tooling, structured logs, and merge scenarios for live QA. Base SHA: `ec2997283e42aa72cdd0121c803ffc5e4343d924`. Gates: `pnpm typecheck` passed; `pnpm lint` passed (0 errors, existing warnings only); `pnpm exec vitest run src/workbench/extensions/agent/ --reporter=dot` passed (66 files, 743 tests); `pnpm build:cloud` passed. <details><summary>Full context for agent readers</summary> This is an ancestry-safe replay of exactly these six [#16209](#16209) commits, in order: `5e5acb29f`, `a3b24aab6`, `2793fda86a`, `3335de89ec`, `9cdfc0d2a3`, and `956fd013c3`. Conflict resolution kept the ci-fix seams authoritative while retaining the dev-panel behavior: - `src/locales/en/main.json`: reused the recorded deduplicated locale resolution, leaving one `agent` object. - `ecsFollowerAdapter.ts`: retained per-workflow target sessions and session-scoped mutations; added structured effect logging around that seam. - `useAgentCrdtFollower.ts`: retained per-workflow bind/unbind, safe teardown, persisted rebind, retry/probe behavior, and workflow-scoped pending cleanup; added debug logs, snapshots, and redacted outbound envelopes. - `followerSubscription.test.ts`: retained the current schema-version source and added repeated-failure metadata assertions. - `mergeTrace.ts`: labels the current package's index-based widget register with the authored widget name for readable QA traces. The resulting tree keeps one `AgentPanelRoot` mount, one Ask Comfy Agent locale/button seam, no duplicate store/locale surface, and no orphaned e2e fixture. </details> <!-- authored-by:agent worker-3 --> --------- Co-authored-by: glary-bot <bot@comfy.org>
|
Closing this old non-main-base source PR as superseded by the main-based debug instrument port in #16365. The remaining follower/fix substrate from this stack is now split across the active main-based PRs #16340, #16364, and #16359, so this branch should stay readable as source history rather than continue as a merge target. Ledger: christian-byrne/in-app-agent-program reports/review/overlap-dedupe-2026-08-31.md. |
Agreed, and no commits pushed — pushing to a branch that is now source history would work against the thing you're asking it to be. Confirmed the state: this PR is closed with base One handover item, since it only ever lived in this PR's description and dies with it. The final review round here left five non-blocking items on the table. I checked each against
None of these block #16365; they're polish on a dev-only surface. Filing them here so they land in the ledger rather than getting lost with this branch. Posted on the timeline rather than as an inline reply — the original comment is PR-level and has no diff anchor to reply against. |
Addresses review feedback: #16209 (comment)
Addresses review feedback: #16209 (comment)
Addresses review feedback: #16209 (comment)
Addresses review feedback: #16209 (comment)
Addresses review feedback: #16209 (comment)
Addresses review feedback: #16209 (comment)
PR Created by the Glary-Bot Agent
Targets
christian-byrne/crdt-impl-integration-candidate, notmain.The reported bug
The status strip above the agent panel pushed the composer below the fold, and a
fixed right-3 bottom-3pill sat on the composer's submit button. Worth noting what the strip actually was: it rendered onv-if="crdtStatus.enabled", andenabledis hardcodedtruein the composable — so every agent-panel user in every build got CRDT debug chrome above the composer, not just developers. That is now deleted, along with its four i18n keys.The instrument is now a real child of
AgentPanel's flex column via an#instrumentslot, directly above theshrink-0composer. Being a flex sibling is what makes the obstruction unrepeatable: the composer claims its intrinsic height before the panel is offered any. Verified in a browser at 1600×1000, 1366×768 and 1280×600 — the submit button does not move at all when the panel opens, and is hit-testable in both states.Who can see it
Was
import.meta.env.DEValone, which is the wrong audience: the people who need this are product testers on staging builds, whereDEVis false. NowDEVor a sticky?crdtDebug=1opt-in, with an explicit opt-out beating both.?crdtDebug=tracealso sets console verbosity. The panel isdefineAsyncComponent-loaded so the CRDT applier it uses to simulate merges never reaches the bundle of users who cannot open it.What's in it
Logging. One
crdtLogmodule, so the console and the copied report are the same record read two ways. Events carry a scope (wire/doc/ecs/ops) and a level, which is how the panel offers varying levels of abstraction. Wired through the follower, the bridge, the ECS adapter and the op sender. An explicit opt-out skips both sinks.Merge lab — the "why did that happen" ask. Replays op sequences through the real pinned applier (
applyOps), not a model of it, and reports per op: the contested register, the stamp order[base_version, actor, op_id], the verdict, and a plain-English explanation. Six scenarios including the one from the thread — delete A → set widget on A → add A — which resolves toapplied/no-op · delete-wins/applied, with the explanation spelling out that a re-add is a fresh incarnation and does not resurrect the value. Plus grouping by contested register, a node-lifecycle view with incarnation numbers, a glossary, and a free-text field for the rule a tester would rather have, which goes into the report verbatim.Copy full report. Restores the collector deleted in #5259 (system stats, server logs, settings, extensions, versions) and merges it with the existing copy. Server logs, settings and workflow are per-source opt-ins defaulting off, as the deleted dialog had them; credential-shaped keys are redacted recursively, and
argvvalues that look like paths or URLs are blanked whatever flag names them.Review
Five rounds of
deep-reviewer; final verdict PASS. Four rounds found real defects, several of them mine — awarnlevel that bypassed the debug gate and spammed opted-out users' consoles every 30s; a batch-abort scenario that narrated the opposite of what it demonstrated; consent checkboxes that rendered at 0×0 becauseagentPanel.cssstripsappearancefrom every input under#agent-panel-root; aschema_errorde-dup that suppressed state transitions and left the follower resubscribing forever while reporting itself connected; and a fault-tolerance fallback that dumped the unredacted/system_statspayload. All fixed, each with a regression test.Non-blocking items the final review left on the table, for whoever owns the branch: an unset-default test for the gate, widening the 1 Hz Status poll,
SHARING_WARNINGon## System, per-op stamp snapshots inmergeScenarios, and a deadrelativeon#agent-panel-root.Size
~2,360 lines of non-test code. Large for one PR, and it splits cleanly along four seams if you'd prefer: gate + logging, report collector, merge lab, panel UI. The pieces interlock (the panel is the only consumer of the other three), so it's offered whole — say the word and I'll break it up.
Verification
pnpm typecheck,pnpm lint,pnpm format:check,pnpm knipall clean; 201 CRDT unit tests pass. The 3AgentPanelRoot.test.tsfailures are pre-existing — reproduced identically on the merge base. Manually verified in a real browser against a live ComfyUI backend: layout geometry and hit-testing at three viewports, console output at each level, the merge lab, the consent toggles gating the report (2.8 KB default → 27.5 KB opted in), and the?crdtDebug=1/ hide round trip including a chat-history remount.Screenshots