feat: add workflow context to RUM events - #14084
Conversation
🎨 Storybook: ✅ Built — View Storybook🎭 Playwright: ✅ 1737 passed, 0 failed · 2 flaky📊 Browser Reports
📦 Bundle: 8.15 MB gzip 🔴 +1.29 kBDetailsSummary
Category Glance App Entry Points — 3.63 kB (baseline 3.64 kB) • 🟢 -7 BMain entry bundles and manifests
Status: 1 added / 1 removed Graph Workspace — 1.28 MB (baseline 1.28 MB) • 🔴 +179 BGraph editor runtime, canvas, workflow orchestration
Status: 1 added / 1 removed / 1 unchanged Views & Navigation — 112 kB (baseline 112 kB) • ⚪ 0 BTop-level views, pages, and routed surfaces
Status: 12 added / 12 removed / 4 unchanged Panels & Settings — 551 kB (baseline 551 kB) • 🟢 -7 BConfiguration panels, inspectors, and settings screens
Status: 11 added / 11 removed / 15 unchanged User & Accounts — 29.1 kB (baseline 29.1 kB) • ⚪ 0 BAuthentication, profile, and account management bundles
Status: 7 added / 7 removed / 3 unchanged Editors & Dialogs — 121 kB (baseline 121 kB) • ⚪ 0 BModals, dialogs, drawers, and in-app editors
Status: 5 added / 5 removed / 1 unchanged UI Components — 64.8 kB (baseline 64.8 kB) • ⚪ 0 BReusable component library chunks
Status: 6 added / 6 removed / 8 unchanged Data & Services — 3.41 MB (baseline 3.41 MB) • 🔴 +4.76 kBStores, services, APIs, and repositories
Status: 14 added / 14 removed / 3 unchanged Utilities & Hooks — 369 kB (baseline 369 kB) • ⚪ 0 BHelpers, composables, and utility bundles
Status: 15 added / 15 removed / 20 unchanged Vendor & Third-Party — 15.7 MB (baseline 15.7 MB) • ⚪ 0 BExternal libraries and shared vendor chunks Status: 16 unchanged Other — 12.5 MB (baseline 12.5 MB) • 🔴 +349 BBundles that do not match a named category
Status: 71 added / 71 removed / 206 unchanged ⚡ Performance Report
Show regressions
All metrics
Historical variance (last 15 runs)
Trend (last 15 commits on main)
Raw data{
"timestamp": "2026-07-28T18:26:37.371Z",
"gitSha": "403a639c8a364929ffedaadbeb3944a4142e757c",
"branch": "codex/workflow-rum-context",
"measurements": [
{
"name": "canvas-idle",
"durationMs": 2134.426000000019,
"styleRecalcs": 8,
"styleRecalcDurationMs": 7.8900000000000015,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 600.637,
"heapDeltaBytes": 3920512,
"heapUsedBytes": 71810780,
"domNodes": 16,
"jsHeapTotalBytes": 20316160,
"scriptDurationMs": 20.212,
"eventListeners": 6,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.666666666666668,
"p95FrameDurationMs": 16.800000000000182
},
{
"name": "canvas-idle",
"durationMs": 2010.8979999999974,
"styleRecalcs": 10,
"styleRecalcDurationMs": 8.694000000000003,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 454.67400000000004,
"heapDeltaBytes": 3650092,
"heapUsedBytes": 71351196,
"domNodes": 20,
"jsHeapTotalBytes": 20840448,
"scriptDurationMs": 15.405,
"eventListeners": 4,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.666666666666668,
"p95FrameDurationMs": 16.700000000000728
},
{
"name": "canvas-mouse-sweep",
"durationMs": 1858.6770000000001,
"styleRecalcs": 75,
"styleRecalcDurationMs": 38.864,
"layouts": 12,
"layoutDurationMs": 3.746,
"taskDurationMs": 869.0060000000001,
"heapDeltaBytes": -17828144,
"heapUsedBytes": 50221888,
"domNodes": -274,
"jsHeapTotalBytes": 21229568,
"scriptDurationMs": 121.454,
"eventListeners": -148,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.666666666666668,
"p95FrameDurationMs": 16.700000000000728
},
{
"name": "canvas-mouse-sweep",
"durationMs": 1793.978999999922,
"styleRecalcs": 73,
"styleRecalcDurationMs": 36.896,
"layouts": 12,
"layoutDurationMs": 3.439,
"taskDurationMs": 823.192,
"heapDeltaBytes": -1812948,
"heapUsedBytes": 66070620,
"domNodes": 55,
"jsHeapTotalBytes": 21626880,
"scriptDurationMs": 119.589,
"eventListeners": 4,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.666666666666668,
"p95FrameDurationMs": 16.700000000000728
},
{
"name": "canvas-zoom-sweep",
"durationMs": 1723.0199999999627,
"styleRecalcs": 32,
"styleRecalcDurationMs": 16.622,
"layouts": 6,
"layoutDurationMs": 0.51,
"taskDurationMs": 365.092,
"heapDeltaBytes": 7267296,
"heapUsedBytes": 75147720,
"domNodes": 78,
"jsHeapTotalBytes": 20054016,
"scriptDurationMs": 18.022999999999996,
"eventListeners": 19,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.66333333333335,
"p95FrameDurationMs": 16.700000000000728
},
{
"name": "canvas-zoom-sweep",
"durationMs": 1736.6949999999406,
"styleRecalcs": 33,
"styleRecalcDurationMs": 18.887,
"layouts": 6,
"layoutDurationMs": 0.6449999999999999,
"taskDurationMs": 385.299,
"heapDeltaBytes": 7346128,
"heapUsedBytes": 75258196,
"domNodes": 78,
"jsHeapTotalBytes": 20054016,
"scriptDurationMs": 20.666,
"eventListeners": 19,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.670000000000012,
"p95FrameDurationMs": 16.800000000000182
},
{
"name": "dom-widget-clipping",
"durationMs": 590.0669999999764,
"styleRecalcs": 9,
"styleRecalcDurationMs": 7.797,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 365.36400000000003,
"heapDeltaBytes": -12385096,
"heapUsedBytes": 55545340,
"domNodes": 14,
"jsHeapTotalBytes": 21889024,
"scriptDurationMs": 57.434,
"eventListeners": 0,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.66333333333332,
"p95FrameDurationMs": 16.700000000000728
},
{
"name": "dom-widget-clipping",
"durationMs": 591.611999999941,
"styleRecalcs": 12,
"styleRecalcDurationMs": 8.062999999999999,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 369.551,
"heapDeltaBytes": -12422988,
"heapUsedBytes": 55530080,
"domNodes": 20,
"jsHeapTotalBytes": 21626880,
"scriptDurationMs": 57.888999999999996,
"eventListeners": 0,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.666666666666668,
"p95FrameDurationMs": 16.700000000000728
},
{
"name": "large-graph-idle",
"durationMs": 2029.2200000000093,
"styleRecalcs": 8,
"styleRecalcDurationMs": 7.692000000000001,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 657.4680000000001,
"heapDeltaBytes": 6350124,
"heapUsedBytes": 65243752,
"domNodes": -276,
"jsHeapTotalBytes": 5308416,
"scriptDurationMs": 101.89199999999998,
"eventListeners": -144,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.666666666666668,
"p95FrameDurationMs": 16.799999999999272
},
{
"name": "large-graph-idle",
"durationMs": 2034.9630000000616,
"styleRecalcs": 10,
"styleRecalcDurationMs": 9.879999999999999,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 671.7299999999999,
"heapDeltaBytes": 7301184,
"heapUsedBytes": 68573720,
"domNodes": -272,
"jsHeapTotalBytes": 3997696,
"scriptDurationMs": 105.42500000000001,
"eventListeners": -142,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.666666666666668,
"p95FrameDurationMs": 16.700000000000728
},
{
"name": "large-graph-pan",
"durationMs": 2170.166999999992,
"styleRecalcs": 68,
"styleRecalcDurationMs": 15.983999999999998,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 1344.7779999999998,
"heapDeltaBytes": 3379500,
"heapUsedBytes": 63321880,
"domNodes": -279,
"jsHeapTotalBytes": 5251072,
"scriptDurationMs": 487.247,
"eventListeners": -142,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.66333333333335,
"p95FrameDurationMs": 16.699999999999818
},
{
"name": "large-graph-pan",
"durationMs": 2218.3560000000853,
"styleRecalcs": 68,
"styleRecalcDurationMs": 13.714000000000004,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 1308.344,
"heapDeltaBytes": -3767000,
"heapUsedBytes": 56387608,
"domNodes": -278,
"jsHeapTotalBytes": 5832704,
"scriptDurationMs": 451.87699999999995,
"eventListeners": -144,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.666666666666668,
"p95FrameDurationMs": 16.700000000000728
},
{
"name": "large-graph-zoom",
"durationMs": 3311.7599999999925,
"styleRecalcs": 63,
"styleRecalcDurationMs": 12.485999999999997,
"layouts": 60,
"layoutDurationMs": 7.375000000000002,
"taskDurationMs": 1603.7449999999997,
"heapDeltaBytes": 3136356,
"heapUsedBytes": 66299696,
"domNodes": -285,
"jsHeapTotalBytes": 8978432,
"scriptDurationMs": 599.733,
"eventListeners": -178,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.666666666666668,
"p95FrameDurationMs": 16.700000000000728
},
{
"name": "large-graph-zoom",
"durationMs": 3214.244000000008,
"styleRecalcs": 65,
"styleRecalcDurationMs": 14.199000000000003,
"layouts": 60,
"layoutDurationMs": 7.396999999999999,
"taskDurationMs": 1504.3999999999999,
"heapDeltaBytes": -1227956,
"heapUsedBytes": 60244928,
"domNodes": -281,
"jsHeapTotalBytes": 8192000,
"scriptDurationMs": 527.7610000000001,
"eventListeners": -148,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.66333333333332,
"p95FrameDurationMs": 16.800000000000182
},
{
"name": "minimap-idle",
"durationMs": 2072.710000000029,
"styleRecalcs": 8,
"styleRecalcDurationMs": 7.199000000000001,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 666.6080000000001,
"heapDeltaBytes": 7112292,
"heapUsedBytes": 67418700,
"domNodes": -276,
"jsHeapTotalBytes": 4784128,
"scriptDurationMs": 106.564,
"eventListeners": -144,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.666666666666668,
"p95FrameDurationMs": 16.700000000000728
},
{
"name": "minimap-idle",
"durationMs": 2039.158000000043,
"styleRecalcs": 9,
"styleRecalcDurationMs": 8.429000000000002,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 698.9159999999999,
"heapDeltaBytes": 6819300,
"heapUsedBytes": 67182576,
"domNodes": -276,
"jsHeapTotalBytes": 3997696,
"scriptDurationMs": 118.5,
"eventListeners": -142,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.666666666666668,
"p95FrameDurationMs": 16.800000000000182
},
{
"name": "subgraph-dom-widget-clipping",
"durationMs": 593.2739999999512,
"styleRecalcs": 47,
"styleRecalcDurationMs": 11.865,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 409.45699999999994,
"heapDeltaBytes": -12123340,
"heapUsedBytes": 55854396,
"domNodes": 20,
"jsHeapTotalBytes": 22151168,
"scriptDurationMs": 123.01400000000001,
"eventListeners": 6,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.666666666666668,
"p95FrameDurationMs": 16.700000000000728
},
{
"name": "subgraph-dom-widget-clipping",
"durationMs": 593.2669999999689,
"styleRecalcs": 47,
"styleRecalcDurationMs": 10.910000000000002,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 392.22999999999996,
"heapDeltaBytes": -12275756,
"heapUsedBytes": 55947376,
"domNodes": 20,
"jsHeapTotalBytes": 21889024,
"scriptDurationMs": 119.149,
"eventListeners": 6,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.666666666666668,
"p95FrameDurationMs": 16.799999999999272
},
{
"name": "subgraph-idle",
"durationMs": 2022.6669999999558,
"styleRecalcs": 9,
"styleRecalcDurationMs": 8.166999999999998,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 448.974,
"heapDeltaBytes": 3633260,
"heapUsedBytes": 71693036,
"domNodes": 18,
"jsHeapTotalBytes": 20054016,
"scriptDurationMs": 13.998999999999999,
"eventListeners": 4,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.666666666666668,
"p95FrameDurationMs": 16.700000000000728
},
{
"name": "subgraph-idle",
"durationMs": 2046.199999999999,
"styleRecalcs": 10,
"styleRecalcDurationMs": 8.972,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 506.4080000000001,
"heapDeltaBytes": -21635400,
"heapUsedBytes": 46519144,
"domNodes": -272,
"jsHeapTotalBytes": 19656704,
"scriptDurationMs": 15.921000000000001,
"eventListeners": -148,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.670000000000012,
"p95FrameDurationMs": 16.700000000000728
},
{
"name": "subgraph-mouse-sweep",
"durationMs": 1741.4509999999837,
"styleRecalcs": 76,
"styleRecalcDurationMs": 39.218999999999994,
"layouts": 16,
"layoutDurationMs": 4.836,
"taskDurationMs": 823.241,
"heapDeltaBytes": -19091064,
"heapUsedBytes": 49002068,
"domNodes": -272,
"jsHeapTotalBytes": 19918848,
"scriptDurationMs": 94.53,
"eventListeners": -148,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.66333333333335,
"p95FrameDurationMs": 16.700000000000728
},
{
"name": "subgraph-mouse-sweep",
"durationMs": 1714.5890000000463,
"styleRecalcs": 76,
"styleRecalcDurationMs": 37.166,
"layouts": 16,
"layoutDurationMs": 4.358,
"taskDurationMs": 796.922,
"heapDeltaBytes": -21557484,
"heapUsedBytes": 46574996,
"domNodes": -273,
"jsHeapTotalBytes": 20967424,
"scriptDurationMs": 92.31400000000001,
"eventListeners": -148,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.670000000000012,
"p95FrameDurationMs": 16.800000000000182
},
{
"name": "subgraph-transition-enter",
"durationMs": 1399.731000000088,
"styleRecalcs": 19,
"styleRecalcDurationMs": 31.982999999999997,
"layouts": 15,
"layoutDurationMs": 12.295999999999998,
"taskDurationMs": 926.237,
"heapDeltaBytes": 31391180,
"heapUsedBytes": 99516400,
"domNodes": 13673,
"jsHeapTotalBytes": 13631488,
"scriptDurationMs": 35.231,
"eventListeners": 2371,
"totalBlockingTimeMs": 130,
"frameDurationMs": 16.666666666666668,
"p95FrameDurationMs": 16.700000000000728
},
{
"name": "viewport-pan-sweep",
"durationMs": 8340.697000000035,
"styleRecalcs": 248,
"styleRecalcDurationMs": 36.058,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 4594.726000000001,
"heapDeltaBytes": 11150660,
"heapUsedBytes": 71281604,
"domNodes": -279,
"jsHeapTotalBytes": 9154560,
"scriptDurationMs": 1462.321,
"eventListeners": -128,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.660000000000036,
"p95FrameDurationMs": 16.80000000000109
},
{
"name": "viewport-pan-sweep",
"durationMs": 8233.745999999996,
"styleRecalcs": 248,
"styleRecalcDurationMs": 35.686,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 4442.717,
"heapDeltaBytes": 9841460,
"heapUsedBytes": 69480028,
"domNodes": -276,
"jsHeapTotalBytes": 6270976,
"scriptDurationMs": 1379.086,
"eventListeners": -128,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.666666666666668,
"p95FrameDurationMs": 16.799999999999272
},
{
"name": "vue-large-graph-idle",
"durationMs": 17522.040000000005,
"styleRecalcs": 0,
"styleRecalcDurationMs": 0,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 17495.047,
"heapDeltaBytes": -36527248,
"heapUsedBytes": 172324792,
"domNodes": -8312,
"jsHeapTotalBytes": -13307904,
"scriptDurationMs": 586.549,
"eventListeners": -16385,
"totalBlockingTimeMs": 0,
"frameDurationMs": 18.33666666666662,
"p95FrameDurationMs": 16.799999999999272
},
{
"name": "vue-large-graph-idle",
"durationMs": 17245.090000000004,
"styleRecalcs": 0,
"styleRecalcDurationMs": 0,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 17202.581000000002,
"heapDeltaBytes": -59289540,
"heapUsedBytes": 165720676,
"domNodes": -8312,
"jsHeapTotalBytes": -11735040,
"scriptDurationMs": 590.097,
"eventListeners": -16389,
"totalBlockingTimeMs": 0,
"frameDurationMs": 17.776666666666642,
"p95FrameDurationMs": 16.799999999999272
},
{
"name": "vue-large-graph-pan",
"durationMs": 20557.074999999997,
"styleRecalcs": 143,
"styleRecalcDurationMs": 16.878999999999976,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 20509.097,
"heapDeltaBytes": -68389584,
"heapUsedBytes": 164245380,
"domNodes": -8312,
"jsHeapTotalBytes": -15929344,
"scriptDurationMs": 863.0759999999999,
"eventListeners": -16381,
"totalBlockingTimeMs": 210,
"frameDurationMs": 17.776666666666642,
"p95FrameDurationMs": 16.799999999999272
},
{
"name": "vue-large-graph-pan",
"durationMs": 20760.50500000008,
"styleRecalcs": 148,
"styleRecalcDurationMs": 17.452999999999996,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 20691.108,
"heapDeltaBytes": -41246680,
"heapUsedBytes": 176849496,
"domNodes": -8312,
"jsHeapTotalBytes": -14442496,
"scriptDurationMs": 873.3850000000001,
"eventListeners": -16383,
"totalBlockingTimeMs": 149,
"frameDurationMs": 17.776666666666642,
"p95FrameDurationMs": 16.799999999999272
},
{
"name": "workflow-execution",
"durationMs": 462.270999999987,
"styleRecalcs": 13,
"styleRecalcDurationMs": 18.748,
"layouts": 2,
"layoutDurationMs": 0.43999999999999984,
"taskDurationMs": 112.64699999999999,
"heapDeltaBytes": -15952648,
"heapUsedBytes": 51180232,
"domNodes": 130,
"jsHeapTotalBytes": 7471104,
"scriptDurationMs": 9.72,
"eventListeners": 67,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.66333333333332,
"p95FrameDurationMs": 16.800000000000182
},
{
"name": "workflow-execution",
"durationMs": 465.70699999995213,
"styleRecalcs": 14,
"styleRecalcDurationMs": 21.125,
"layouts": 3,
"layoutDurationMs": 0.975,
"taskDurationMs": 116.479,
"heapDeltaBytes": -16237612,
"heapUsedBytes": 50736248,
"domNodes": 119,
"jsHeapTotalBytes": 8257536,
"scriptDurationMs": 9.607000000000001,
"eventListeners": 65,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.666666666666668,
"p95FrameDurationMs": 16.700000000000728
}
]
} |
|
Note Reviews pausedIt looks like this branch is under active development. To avoid overwhelming you with review comments due to an influx of new commits, CodeRabbit has automatically paused this review. You can configure this behavior by changing the Use the following commands to manage reviews:
Use the checkboxes below for quick actions:
📝 WalkthroughWalkthroughWorkflow queueing now derives and persists workflow context, propagates queue intent, and emits queued or submission-error telemetry. Telemetry contracts, registry dispatch, Datadog RUM reporting, execution outcomes, and local RUM proxy routing are updated. ChangesWorkflow telemetry
Datadog RUM proxy
Estimated code review effort: 4 (Complex) | ~45 minutes Sequence Diagram(s)sequenceDiagram
participant LegacyUI
participant ComfyApp
participant ExecutionStore
participant TelemetryRegistry
participant DatadogRumTelemetryProvider
LegacyUI->>ComfyApp: queuePrompt with workflowQueueIntent
ComfyApp->>ComfyApp: derive workflowContext
ComfyApp->>ExecutionStore: store workflowContext with queued job
ComfyApp->>TelemetryRegistry: trackWorkflowQueued or trackWorkflowError
TelemetryRegistry->>DatadogRumTelemetryProvider: dispatch metadata
ExecutionStore->>TelemetryRegistry: trackExecutionOutcome with workflowContext
Possibly related PRs
Suggested labels: Suggested reviewers: Important Pre-merge checks failedPlease resolve all errors before merging. Addressing warnings is optional. ❌ Failed checks (1 warning, 1 inconclusive)
✅ Passed checks (4 passed)
✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
Actionable comments posted: 4
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@src/platform/telemetry/utils/getExecutionContext.test.ts`:
- Line 5: The tests currently use graph-agnostic fixtures and do not verify
explicit graph selection. In
src/platform/telemetry/utils/getExecutionContext.test.ts:5, create distinct
graph fixtures and assert returned node metrics come from the supplied graph; in
src/composables/useRunButtonTelemetry.test.ts:35-37, make context resolution
depend on app.rootGraph and assert the emitted telemetry payload reflects that
graph. Ensure both workflow-context tests directly validate graph-sensitive
behavior rather than only validating mocks.
In `@src/platform/telemetry/utils/workflowExecutionContext.test.ts`:
- Around line 7-42: Expand the toWorkflowExecutionContext tests beyond the
single interior case: add boundary cases for total_node_count 20, 21, 50, 51,
100, and 101 with the expected complexity_bucket values, and cover
dependency_profile outputs core_only, custom_nodes, mixed, and partner_nodes
using representative execution contexts. Reuse shared base context/options and
assert only the derived fields needed to verify these boundary and profile
rules.
In `@src/scripts/app.test.ts`:
- Around line 361-386: Add a dedicated test beside the existing prompt
validation test in the app queuePrompt suite for an account-precondition
PromptExecutionError, using the sign_in_required error type. Reuse the telemetry
registry setup and cleanup, invoke app.queuePrompt, and assert
trackWorkflowError is not called.
In `@src/scripts/app.ts`:
- Around line 1741-1748: Sanitize the error before passing it to
trackWorkflowError in the workflow queue submission path. Within the existing
non-PromptExecutionError branch, replace the raw error value with a sanitized
error context that removes message and stack details while preserving the
telemetry event structure and workflowContext.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Path: .coderabbit.yaml
Review profile: ASSERTIVE
Plan: Pro Plus
Run ID: 4e896ff6-12f2-48ec-a222-279532297c67
📒 Files selected for processing (18)
src/composables/useCoreCommands.tssrc/composables/useRunButtonTelemetry.test.tssrc/composables/useRunButtonTelemetry.tssrc/platform/telemetry/TelemetryRegistry.tssrc/platform/telemetry/providers/cloud/DatadogRumTelemetryProvider.test.tssrc/platform/telemetry/providers/cloud/DatadogRumTelemetryProvider.tssrc/platform/telemetry/providers/cloud/GtmTelemetryProvider.test.tssrc/platform/telemetry/providers/cloud/MixpanelTelemetryProvider.test.tssrc/platform/telemetry/providers/host/HostTelemetrySink.test.tssrc/platform/telemetry/types.tssrc/platform/telemetry/utils/getExecutionContext.test.tssrc/platform/telemetry/utils/getExecutionContext.tssrc/platform/telemetry/utils/workflowExecutionContext.test.tssrc/platform/telemetry/utils/workflowExecutionContext.tssrc/scripts/app.test.tssrc/scripts/app.tssrc/stores/executionStore.test.tssrc/stores/executionStore.ts
Codecov Report❌ Patch coverage is @@ Coverage Diff @@
## main #14084 +/- ##
==========================================
+ Coverage 79.50% 79.52% +0.01%
==========================================
Files 1750 1751 +1
Lines 97739 97822 +83
Branches 32541 32584 +43
==========================================
+ Hits 77708 77790 +82
Misses 19653 19653
- Partials 378 379 +1
Flags with carried forward coverage won't be shown. Click here to find out more.
... and 3 files with indirect coverage changes 🚀 New features to boost your workflow:
|
There was a problem hiding this comment.
Actionable comments posted: 2
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@src/composables/useRunButtonTelemetry.test.ts`:
- Around line 98-100: Update the assertion around state.getExecutionContext in
the telemetry test to verify the expected rootGraph argument without requiring
an exact invocation count. Preserve the existing payload assertions that
validate app.rootGraph and focus the test on resulting telemetry behavior rather
than helper call frequency.
In `@src/scripts/app.ts`:
- Around line 1768-1775: In src/scripts/app.ts:1768-1775, replace the broad
PromptExecutionError exclusion with a check that ignores only prompt-validation
and account-precondition errors, while tracking the sanitized workflow error for
all other submission failures. In src/scripts/app.test.ts:360-394, add a
PromptExecutionError fixture outside those excluded categories and assert its
workflow-error payload is emitted, covering queue success with handled submit
errors versus ignored error types.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Path: .coderabbit.yaml
Review profile: ASSERTIVE
Plan: Pro Plus
Run ID: ce9e95cc-4e29-499a-bb93-4eb3419d6ba3
📒 Files selected for processing (13)
src/composables/useCoreCommands.tssrc/composables/useRunButtonTelemetry.test.tssrc/composables/useRunButtonTelemetry.tssrc/platform/telemetry/TelemetryRegistry.tssrc/platform/telemetry/providers/cloud/DatadogRumTelemetryProvider.test.tssrc/platform/telemetry/providers/cloud/DatadogRumTelemetryProvider.tssrc/platform/telemetry/types.tssrc/platform/telemetry/utils/getExecutionContext.test.tssrc/platform/telemetry/utils/workflowExecutionContext.test.tssrc/platform/telemetry/utils/workflowExecutionContext.tssrc/scripts/app.test.tssrc/scripts/app.tssrc/scripts/ui.ts
💤 Files with no reviewable changes (1)
- src/platform/telemetry/utils/workflowExecutionContext.ts
There was a problem hiding this comment.
Caution
Some comments are outside the diff and can’t be posted inline due to platform limitations.
⚠️ Outside diff range comments (1)
src/scripts/app.test.ts (1)
328-354: 📐 Maintainability & Code Quality | 🟡 Minor | ⚡ Quick winCover explicit run-button metadata.
This verifies only fallback metadata. Add a case with a valid
trigger_sourceand
subscribe_to_run: true, asserting both fields in the emitted queue payload;
the forwarding branch at Lines 1738-1741 is otherwise untested.As per path instructions, prefer observable emitted-telemetry payload assertions
and add targeted coverage for changed telemetry behavior.🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In `@src/scripts/app.test.ts` around lines 328 - 354, Extend the queue telemetry tests around app.queuePrompt with a case using valid trigger_source metadata and subscribe_to_run: true. Assert the emitted trackWorkflowQueued payload preserves both fields, covering the forwarding branch while continuing to verify the observable telemetry payload.Source: Path instructions
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Outside diff comments:
In `@src/scripts/app.test.ts`:
- Around line 328-354: Extend the queue telemetry tests around app.queuePrompt
with a case using valid trigger_source metadata and subscribe_to_run: true.
Assert the emitted trackWorkflowQueued payload preserves both fields, covering
the forwarding branch while continuing to verify the observable telemetry
payload.
ℹ️ Review info
⚙️ Run configuration
Configuration used: Path: .coderabbit.yaml
Review profile: ASSERTIVE
Plan: Pro Plus
Run ID: 4f63c10d-8cd6-4b3e-87fd-bd43af2a2f8e
📒 Files selected for processing (3)
src/composables/useRunButtonTelemetry.test.tssrc/scripts/app.test.tssrc/scripts/app.ts
💤 Files with no reviewable changes (1)
- src/composables/useRunButtonTelemetry.test.ts
There was a problem hiding this comment.
Actionable comments posted: 2
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@src/scripts/app.ts`:
- Around line 1643-1649: Update the enqueue flow around the queueItems push and
nextQueueRequestId to snapshot the workflow context inputs before the
authentication await, then use that snapshot when deriving queued telemetry so
tab switches cannot alter the queued graph context. Add a regression test
covering a tab switch while authentication is pending and verify telemetry
reflects the graph active at enqueue time.
In `@src/scripts/ui.ts`:
- Around line 493-495: Handle rejected promises from app.queuePrompt in both
src/scripts/ui.ts lines 493-495 and 602-609: attach the established user-facing
error handling to each legacy click handler so authentication or
prompt-construction failures are surfaced rather than becoming unhandled
rejections. Preserve the existing telemetry and queueing behavior for successful
calls.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Path: .coderabbit.yaml
Review profile: ASSERTIVE
Plan: Pro Plus
Run ID: cb1c354a-ae47-4008-b196-3f9286aa2092
📒 Files selected for processing (6)
src/composables/useCoreCommands.tssrc/composables/useRunButtonTelemetry.tssrc/platform/telemetry/types.tssrc/scripts/app.test.tssrc/scripts/app.tssrc/scripts/ui.ts
4467d6f to
0a6e557
Compare
There was a problem hiding this comment.
Actionable comments posted: 3
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@src/platform/telemetry/types.ts`:
- Around line 191-196: Constrain WorkflowErrorMetadata.error in
src/platform/telemetry/types.ts:191-196 and the trackWorkflowError handling in
src/platform/telemetry/providers/cloud/DatadogRumTelemetryProvider.ts:15-26 to a
fixed sanitized error payload rather than caller-controlled unknown values.
Update
src/platform/telemetry/providers/cloud/DatadogRumTelemetryProvider.test.ts:59-86
to assert only the sanitized error context is forwarded.
In `@src/scripts/app.test.ts`:
- Around line 284-336: Strengthen the test “keeps queue telemetry attached to
the graph selected at enqueue” so the queued and subsequent graphs have distinct
node counts, then assert telemetry reports the queued graph’s unique
total_node_count. Update the graph fixtures and expectation without changing the
test’s intended enqueue-time selection behavior.
In `@src/scripts/app.ts`:
- Around line 1646-1665: The queue item currently stores the shared rootGraph
reference before the asynchronous getAuthToken gap, allowing later configure()
calls to change the graph used for submission. Update the queue submission flow
around queuedGraph, queuedWorkflow, and executionContext to capture or process
an immutable graph/workflow payload after authentication resolves, ensuring
graphToPrompt and workflowContext use the same current submission state rather
than stale queued data.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Path: .coderabbit.yaml
Review profile: ASSERTIVE
Plan: Pro Plus
Run ID: 6845a638-792e-4484-8def-7f16a3341e16
📒 Files selected for processing (16)
src/composables/useCoreCommands.tssrc/composables/useRunButtonTelemetry.test.tssrc/composables/useRunButtonTelemetry.tssrc/platform/telemetry/TelemetryRegistry.tssrc/platform/telemetry/providers/cloud/DatadogRumTelemetryProvider.test.tssrc/platform/telemetry/providers/cloud/DatadogRumTelemetryProvider.tssrc/platform/telemetry/types.tssrc/platform/telemetry/utils/getExecutionContext.test.tssrc/platform/telemetry/utils/getExecutionContext.tssrc/platform/telemetry/utils/workflowExecutionContext.test.tssrc/platform/telemetry/utils/workflowExecutionContext.tssrc/scripts/app.test.tssrc/scripts/app.tssrc/scripts/ui.tssrc/stores/executionStore.test.tssrc/stores/executionStore.ts
0a6e557 to
27fbb98
Compare
33846e1 to
5a24a33
Compare
|
@coderabbitai full review |
✅ Action performedFull review finished. |
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@src/platform/telemetry/utils/workflowExecutionContext.test.ts`:
- Around line 27-42: Add coverage in the toWorkflowExecutionContext tests for a
template execution context by creating a fixture with is_template set to true
and asserting the returned workflow_type is 'template'. Keep the existing
custom-workflow assertions and validate the complete bounded context output for
the template case.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Path: .coderabbit.yaml
Review profile: ASSERTIVE
Plan: Pro Plus
Run ID: c76776ee-63d4-4a16-b6fd-493e1ba4106c
📒 Files selected for processing (12)
src/composables/useCoreCommands.tssrc/platform/telemetry/TelemetryRegistry.tssrc/platform/telemetry/providers/cloud/DatadogRumTelemetryProvider.test.tssrc/platform/telemetry/providers/cloud/DatadogRumTelemetryProvider.tssrc/platform/telemetry/types.tssrc/platform/telemetry/utils/workflowExecutionContext.test.tssrc/platform/telemetry/utils/workflowExecutionContext.tssrc/scripts/app.test.tssrc/scripts/app.tssrc/scripts/ui.tssrc/stores/executionStore.test.tssrc/stores/executionStore.ts
|
@CodeRabbit full review |
✅ Action performedFull review finished. |
There was a problem hiding this comment.
Actionable comments posted: 3
Caution
Some comments are outside the diff and can’t be posted inline due to platform limitations.
⚠️ Outside diff range comments (1)
src/composables/useCoreCommands.ts (1)
506-509: 📐 Maintainability & Code Quality | 🔵 Trivial | ⚡ Quick winDuplicated inline
metadatatype — reuseWorkflowQueueIntent.The same inline object type is repeated across three commands. Since
WorkflowQueueIntentalready models this exact shape, use it directly to avoid the types drifting apart.♻️ Suggested refactor
+import type { WorkflowQueueIntent } from '`@/platform/telemetry/types`' ... - function: async (metadata?: { - subscribe_to_run?: boolean - trigger_source?: ExecutionTriggerSource - }) => { + function: async (metadata?: WorkflowQueueIntent) => {(repeat for all three commands)
Also applies to: 529-532, 551-554
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In `@src/composables/useCoreCommands.ts` around lines 506 - 509, Replace the duplicated inline metadata object types in all three command callbacks with the existing WorkflowQueueIntent type. Update the callback parameter declarations around the three command functions while preserving their optional metadata behavior and fields.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@src/platform/telemetry/initDatadogRum.test.ts`:
- Around line 78-81: Update the proxy assertion in the initDatadogRum test to
compare the complete same-origin URL produced by new
URL(LOCAL_DATADOG_RUM_PROXY, window.location.origin).href, rather than matching
only the /api/datadog-rum suffix. Keep the conditional proxy assertion behavior
unchanged.
In `@src/platform/telemetry/providers/cloud/DatadogRumTelemetryProvider.test.ts`:
- Around line 55-82: Add a direct unit test alongside the existing
`trackWorkflowError` test in `DatadogRumTelemetryProvider` for a call without
`workflowContext`. Assert that `addError` receives the expected error name,
operation, phase, and product fields only, with no workflow context fields.
In `@vite.config.mts`:
- Line 279: Update the proxy configuration around DATADOG_RUM_PROXY_PATH so
localhost, 127.0.0.1, and [::1] route /api/datadog-rum through
datadogRumProxyConfig in the local proxy table, rather than the generic /api
backend proxy. Preserve the existing cloud proxy behavior and ensure the default
localhost distribution selects the RUM-specific route.
---
Outside diff comments:
In `@src/composables/useCoreCommands.ts`:
- Around line 506-509: Replace the duplicated inline metadata object types in
all three command callbacks with the existing WorkflowQueueIntent type. Update
the callback parameter declarations around the three command functions while
preserving their optional metadata behavior and fields.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Path: .coderabbit.yaml
Review profile: ASSERTIVE
Plan: Pro Plus
Run ID: 71a05b95-5071-4359-9010-fccccb71381b
📒 Files selected for processing (15)
src/composables/useCoreCommands.tssrc/platform/telemetry/TelemetryRegistry.tssrc/platform/telemetry/initDatadogRum.test.tssrc/platform/telemetry/initDatadogRum.tssrc/platform/telemetry/providers/cloud/DatadogRumTelemetryProvider.test.tssrc/platform/telemetry/providers/cloud/DatadogRumTelemetryProvider.tssrc/platform/telemetry/types.tssrc/platform/telemetry/utils/workflowExecutionContext.test.tssrc/platform/telemetry/utils/workflowExecutionContext.tssrc/scripts/app.test.tssrc/scripts/app.tssrc/scripts/ui.tssrc/stores/executionStore.test.tssrc/stores/executionStore.tsvite.config.mts
85ba35f to
10db7d0
Compare
87e3963 to
8c1bea3
Compare
d5faddd to
f918531
Compare
|
|
|
|
## Summary Backport #14084 to `cloud/1.47`, resolving the release-branch conflicts without importing unrelated newer-`main` billing or governance behavior. ## Changes - **What**: Adds bounded workflow context, queue-trigger attribution, submission/queue/execution timing, and one terminal `workflow_execution` vital per attempt. - **Dependencies**: Builds on the frontend observability stack already backported in #14211. ## Review Focus The conflict resolution keeps the 1.47 execution-error store API and Cloud-only free-tier run tracking while applying #14084's structured workflow status and timing metadata. Validation: - 4 focused Vitest files, 136 tests passed - `pnpm typecheck` - Commit hooks: oxfmt, Oxlint, ESLint - Pre-push `pnpm knip` - `git diff --check` Created by Codex Co-authored-by: huang47 <157390+huang47@users.noreply.github.com>
## Summary Backport #14084 to `core/1.47`, resolving the release-branch conflicts without importing unrelated newer-`main` billing or governance behavior. ## Changes - **What**: Adds bounded workflow context, queue-trigger attribution, submission/queue/execution timing, and one terminal `workflow_execution` vital per attempt. - **Dependencies**: Builds on the frontend observability stack already backported in #14210. ## Review Focus The conflict resolution keeps the 1.47 execution-error store API while applying #14084's structured workflow status and timing metadata. Validation: - 4 focused Vitest files, 136 tests passed - `pnpm typecheck` - Commit hooks: oxfmt, Oxlint, ESLint - Pre-push `pnpm knip` - `git diff --check` Created by Codex Co-authored-by: huang47 <157390+huang47@users.noreply.github.com>
Stack
Summary
Emit one
workflow_executionDatadog duration vital for every workflow attempt and remove the separateworkflow_queueaction. The vital excludes the redundantsubscribe_to_runand constantproductattributes.Verification
Datadog runtime evidence below was captured at pre-rebase commit
d5faddde2d, using localhost RUM support from #14105 only in a temporary checkout. The rebased headf9185311bfpreserves the same workflow telemetry tree and passes the focused regression suite. The two-nodeEmpty Latent Image -> Save Latentworkflow produced one failed execution and one successful execution in Datadog.Open the fixed Datadog Explorer window
Successful execution
success: true,failure_reasonis empty, andterminal_stage: execution.10.1 ms submission + 8.4 ms queue wait + 6.3 ms execution = 24.8 mstotal vital duration.subscribe_to_runnorproduct.Failed execution
success: false,failure_reason: execution_failed, andterminal_stage: executionare emitted on the same vital.7.4 ms submission + 7.9 ms queue wait + 29.0 ms execution = 44.3 mstotal vital duration.subscribe_to_runnorproduct.Focused unit coverage additionally verifies prompt-build failure, submission rejection, execution failure, interruption, successful completion, monotonic normalization, and one terminal vital per attempt. The live Datadog evidence above covers the successful and execution-failure boundaries; earlier failure stages are covered by those regression tests.
Created by Codex