Repository navigation
test(graph): cover the first-run tour's activation seam - #14674
Conversation
`GraphCanvas.vue` is the only place the first-run tour is connected to startup, through two calls in `onMounted`: `useFirstRunEntry().handleStartupOutcome(startupOutcome)` and `handleUrlWorkflow(startupOutcome, urlTemplateId, sharedStatus)`. There was no `GraphCanvas` test file, so deleting either call left the whole suite green — the feature could be disconnected in a refactor and CI would not notice. Both composables are well covered on their own; the line joining them was not. Mounts the component with its children stubbed and the startup dependencies faked, and asserts both hand-offs happen with the values startup produced. Verified by mutation: removing either call turns the matching test red. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
📄 Knowledge reviewDosu skipped reviewing this PR because your organization has used its |
|
Warning Review limit reachedYou’ve reached a temporary PR review limit under our Fair Usage Limits Policy. Next review available in: 46 minutes Enable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available. How can I continue?After more reviews become available, a review can be triggered using the To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews. How do review limits work?CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability. For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window. Please refer docs for additional details. Review details⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: ASSERTIVE Plan: Pro Plus Run ID: 📒 Files selected for processing (1)
📝 WalkthroughWalkthroughAdded a focused ChangesGraphCanvas startup integration
Estimated code review effort: 2 (Simple) | ~10 minutes Possibly related PRs
Suggested labels: Important Pre-merge checks failedPlease resolve all errors before merging. Addressing warnings is optional. ❌ Failed checks (1 inconclusive)
✅ Passed checks (5 passed)
✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Comment |
🎭 Playwright: ✅ 1784 passed, 0 failed · 3 flaky📊 Browser Reports
🎨 Storybook: ✅ Built — View Storybook📦 Bundle: 8.24 MB gzip ⚪ 0 BDetailsSummary
Category Glance App Entry Points — 3.64 kB (baseline 3.64 kB) • ⚪ 0 BMain entry bundles and manifests Status: 1 unchanged Graph Workspace — 1.35 MB (baseline 1.35 MB) • ⚪ 0 BGraph editor runtime, canvas, workflow orchestration Status: 2 unchanged Views & Navigation — 111 kB (baseline 111 kB) • ⚪ 0 BTop-level views, pages, and routed surfaces Status: 16 unchanged Panels & Settings — 551 kB (baseline 551 kB) • ⚪ 0 BConfiguration panels, inspectors, and settings screens Status: 26 unchanged User & Accounts — 28.7 kB (baseline 28.7 kB) • ⚪ 0 BAuthentication, profile, and account management bundles Status: 10 unchanged Editors & Dialogs — 124 kB (baseline 124 kB) • ⚪ 0 BModals, dialogs, drawers, and in-app editors Status: 7 unchanged UI Components — 70 kB (baseline 70 kB) • ⚪ 0 BReusable component library chunks Status: 15 unchanged Data & Services — 3.47 MB (baseline 3.47 MB) • ⚪ 0 BStores, services, APIs, and repositories Status: 17 unchanged Utilities & Hooks — 386 kB (baseline 386 kB) • ⚪ 0 BHelpers, composables, and utility bundles Status: 36 unchanged Vendor & Third-Party — 15.7 MB (baseline 15.7 MB) • ⚪ 0 BExternal libraries and shared vendor chunks Status: 16 unchanged Other — 12.8 MB (baseline 12.8 MB) • ⚪ 0 BBundles that do not match a named category Status: 281 unchanged ⚡ Performance Report
Show regressions
All metrics
Historical variance (last 15 runs)
Trend (last 15 commits on main)
Raw data{
"timestamp": "2026-08-04T06:53:15.432Z",
"gitSha": "7c2090327f992a4653a307044ffe290d3c8389ff",
"branch": "fix/14625-graphcanvas-firstrun-wiring",
"measurements": [
{
"name": "canvas-idle",
"durationMs": 2080.198000000024,
"styleRecalcs": 9,
"styleRecalcDurationMs": 7.481,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 502.96399999999994,
"heapDeltaBytes": 5612568,
"heapUsedBytes": 69852872,
"domNodes": 18,
"jsHeapTotalBytes": 24379392,
"scriptDurationMs": 17.683,
"eventListeners": 4,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.666666666666668,
"p95FrameDurationMs": 16.800000000000182
},
{
"name": "canvas-idle",
"durationMs": 2015.250999999978,
"styleRecalcs": 9,
"styleRecalcDurationMs": 7.4750000000000005,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 496.651,
"heapDeltaBytes": 5343656,
"heapUsedBytes": 69397872,
"domNodes": 18,
"jsHeapTotalBytes": 25165824,
"scriptDurationMs": 16.844,
"eventListeners": 4,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.666666666666668,
"p95FrameDurationMs": 16.700000000000728
},
{
"name": "canvas-mouse-sweep",
"durationMs": 2079.322000000019,
"styleRecalcs": 79,
"styleRecalcDurationMs": 46.725,
"layouts": 12,
"layoutDurationMs": 6.321000000000001,
"taskDurationMs": 1065.366,
"heapDeltaBytes": -11942956,
"heapUsedBytes": 52246080,
"domNodes": -279,
"jsHeapTotalBytes": 24104960,
"scriptDurationMs": 152.204,
"eventListeners": -151,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.66333333333332,
"p95FrameDurationMs": 16.700000000000728
},
{
"name": "canvas-mouse-sweep",
"durationMs": 1932.4849999999856,
"styleRecalcs": 76,
"styleRecalcDurationMs": 41.018,
"layouts": 12,
"layoutDurationMs": 3.608,
"taskDurationMs": 931.006,
"heapDeltaBytes": -17979460,
"heapUsedBytes": 46139604,
"domNodes": 24,
"jsHeapTotalBytes": 24367104,
"scriptDurationMs": 120.11,
"eventListeners": -153,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.666666666666668,
"p95FrameDurationMs": 16.699999999999818
},
{
"name": "canvas-zoom-sweep",
"durationMs": 1768.0159999999887,
"styleRecalcs": 30,
"styleRecalcDurationMs": 16.812,
"layouts": 6,
"layoutDurationMs": 0.6530000000000001,
"taskDurationMs": 387.012,
"heapDeltaBytes": 8610776,
"heapUsedBytes": 72804972,
"domNodes": 76,
"jsHeapTotalBytes": 24903680,
"scriptDurationMs": 19.402999999999995,
"eventListeners": 19,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.666666666666668,
"p95FrameDurationMs": 16.700000000000728
},
{
"name": "canvas-zoom-sweep",
"durationMs": 1771.8999999999596,
"styleRecalcs": 31,
"styleRecalcDurationMs": 16.717999999999996,
"layouts": 6,
"layoutDurationMs": 0.689,
"taskDurationMs": 392.243,
"heapDeltaBytes": 8384408,
"heapUsedBytes": 72418324,
"domNodes": 78,
"jsHeapTotalBytes": 24117248,
"scriptDurationMs": 20.072000000000003,
"eventListeners": 19,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.666666666666668,
"p95FrameDurationMs": 16.700000000000728
},
{
"name": "dom-widget-clipping",
"durationMs": 620.4360000000122,
"styleRecalcs": 12,
"styleRecalcDurationMs": 8.754000000000001,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 412.038,
"heapDeltaBytes": -11029208,
"heapUsedBytes": 53050264,
"domNodes": 20,
"jsHeapTotalBytes": 25427968,
"scriptDurationMs": 63.72899999999999,
"eventListeners": 0,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.66333333333335,
"p95FrameDurationMs": 16.700000000000728
},
{
"name": "dom-widget-clipping",
"durationMs": 584.4699999999534,
"styleRecalcs": 9,
"styleRecalcDurationMs": 6.070000000000001,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 371.14000000000004,
"heapDeltaBytes": -11195080,
"heapUsedBytes": 53065088,
"domNodes": 14,
"jsHeapTotalBytes": 24903680,
"scriptDurationMs": 57.232000000000006,
"eventListeners": 0,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.66333333333335,
"p95FrameDurationMs": 16.700000000000728
},
{
"name": "large-graph-idle",
"durationMs": 2020.5189999999789,
"styleRecalcs": 8,
"styleRecalcDurationMs": 6.905999999999999,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 674.3910000000001,
"heapDeltaBytes": 6067656,
"heapUsedBytes": 66203464,
"domNodes": -282,
"jsHeapTotalBytes": 3522560,
"scriptDurationMs": 97.53900000000002,
"eventListeners": -177,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.670000000000012,
"p95FrameDurationMs": 16.800000000000182
},
{
"name": "large-graph-idle",
"durationMs": 2030.277999999953,
"styleRecalcs": 10,
"styleRecalcDurationMs": 8.858999999999998,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 677.02,
"heapDeltaBytes": 6750816,
"heapUsedBytes": 65448204,
"domNodes": -279,
"jsHeapTotalBytes": 2998272,
"scriptDurationMs": 96.70799999999998,
"eventListeners": -149,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.666666666666668,
"p95FrameDurationMs": 16.700000000000728
},
{
"name": "large-graph-pan",
"durationMs": 2168.4020000000146,
"styleRecalcs": 69,
"styleRecalcDurationMs": 15.602999999999998,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 1302.686,
"heapDeltaBytes": 1798728,
"heapUsedBytes": 62181288,
"domNodes": -282,
"jsHeapTotalBytes": 4501504,
"scriptDurationMs": 419.133,
"eventListeners": -147,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.666666666666668,
"p95FrameDurationMs": 16.700000000000728
},
{
"name": "large-graph-pan",
"durationMs": 2185.4809999999816,
"styleRecalcs": 69,
"styleRecalcDurationMs": 15.100000000000001,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 1337.8830000000003,
"heapDeltaBytes": 6049860,
"heapUsedBytes": 66652776,
"domNodes": -282,
"jsHeapTotalBytes": 3452928,
"scriptDurationMs": 469.81300000000005,
"eventListeners": -149,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.66333333333332,
"p95FrameDurationMs": 16.800000000000182
},
{
"name": "large-graph-zoom",
"durationMs": 3181.927999999971,
"styleRecalcs": 65,
"styleRecalcDurationMs": 16.377999999999997,
"layouts": 60,
"layoutDurationMs": 8.59,
"taskDurationMs": 1552.0720000000001,
"heapDeltaBytes": -4216592,
"heapUsedBytes": 58069480,
"domNodes": -289,
"jsHeapTotalBytes": 6144000,
"scriptDurationMs": 533.068,
"eventListeners": -153,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.666666666666668,
"p95FrameDurationMs": 16.800000000000182
},
{
"name": "large-graph-zoom",
"durationMs": 3215.3190000000222,
"styleRecalcs": 65,
"styleRecalcDurationMs": 15.906,
"layouts": 60,
"layoutDurationMs": 8.403,
"taskDurationMs": 1523.363,
"heapDeltaBytes": -2205408,
"heapUsedBytes": 59989704,
"domNodes": -289,
"jsHeapTotalBytes": 6930432,
"scriptDurationMs": 531.123,
"eventListeners": -153,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.66333333333332,
"p95FrameDurationMs": 16.700000000000728
},
{
"name": "minimap-idle",
"durationMs": 2034.9329999999668,
"styleRecalcs": 7,
"styleRecalcDurationMs": 5.652999999999999,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 677.4839999999999,
"heapDeltaBytes": 7044744,
"heapUsedBytes": 68062256,
"domNodes": -286,
"jsHeapTotalBytes": 2998272,
"scriptDurationMs": 96.851,
"eventListeners": -149,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.666666666666668,
"p95FrameDurationMs": 16.799999999999272
},
{
"name": "minimap-idle",
"durationMs": 2032.338999999979,
"styleRecalcs": 8,
"styleRecalcDurationMs": 6.216000000000003,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 673.9170000000001,
"heapDeltaBytes": 6664496,
"heapUsedBytes": 67056392,
"domNodes": -284,
"jsHeapTotalBytes": 3784704,
"scriptDurationMs": 97.132,
"eventListeners": -147,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.666666666666668,
"p95FrameDurationMs": 16.700000000000728
},
{
"name": "subgraph-dom-widget-clipping",
"durationMs": 600.2120000000559,
"styleRecalcs": 47,
"styleRecalcDurationMs": 10.429999999999998,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 404.983,
"heapDeltaBytes": -10474912,
"heapUsedBytes": 53818624,
"domNodes": 20,
"jsHeapTotalBytes": 26214400,
"scriptDurationMs": 123.24700000000001,
"eventListeners": 6,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.666666666666668,
"p95FrameDurationMs": 16.699999999999818
},
{
"name": "subgraph-dom-widget-clipping",
"durationMs": 594.6899999999005,
"styleRecalcs": 47,
"styleRecalcDurationMs": 10.505000000000003,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 408.1699999999999,
"heapDeltaBytes": -10477484,
"heapUsedBytes": 53708800,
"domNodes": 20,
"jsHeapTotalBytes": 25952256,
"scriptDurationMs": 123.744,
"eventListeners": 6,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.66333333333332,
"p95FrameDurationMs": 16.799999999999272
},
{
"name": "subgraph-idle",
"durationMs": 2020.7270000000221,
"styleRecalcs": 10,
"styleRecalcDurationMs": 7.549,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 504.90299999999996,
"heapDeltaBytes": -16858696,
"heapUsedBytes": 47248032,
"domNodes": -278,
"jsHeapTotalBytes": 24629248,
"scriptDurationMs": 13.523000000000001,
"eventListeners": -153,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.666666666666668,
"p95FrameDurationMs": 16.799999999999272
},
{
"name": "subgraph-idle",
"durationMs": 1992.970000000014,
"styleRecalcs": 11,
"styleRecalcDurationMs": 9.18,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 458.378,
"heapDeltaBytes": 5165296,
"heapUsedBytes": 69467880,
"domNodes": 22,
"jsHeapTotalBytes": 24903680,
"scriptDurationMs": 13.418999999999999,
"eventListeners": 4,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.666666666666668,
"p95FrameDurationMs": 16.700000000000728
},
{
"name": "subgraph-mouse-sweep",
"durationMs": 1693.8049999999976,
"styleRecalcs": 76,
"styleRecalcDurationMs": 37.135999999999996,
"layouts": 16,
"layoutDurationMs": 4.4479999999999995,
"taskDurationMs": 769.981,
"heapDeltaBytes": -3696284,
"heapUsedBytes": 60614576,
"domNodes": 65,
"jsHeapTotalBytes": 25165824,
"scriptDurationMs": 93.278,
"eventListeners": 4,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.66333333333332,
"p95FrameDurationMs": 16.700000000000728
},
{
"name": "subgraph-mouse-sweep",
"durationMs": 1732.9760000000078,
"styleRecalcs": 78,
"styleRecalcDurationMs": 37.495999999999995,
"layouts": 16,
"layoutDurationMs": 4.688000000000001,
"taskDurationMs": 808.105,
"heapDeltaBytes": -3961984,
"heapUsedBytes": 60336564,
"domNodes": 62,
"jsHeapTotalBytes": 26214400,
"scriptDurationMs": 93.69000000000001,
"eventListeners": 4,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.66333333333332,
"p95FrameDurationMs": 16.700000000000728
},
{
"name": "subgraph-transition-enter",
"durationMs": 1400.9429999999838,
"styleRecalcs": 18,
"styleRecalcDurationMs": 29.781000000000002,
"layouts": 14,
"layoutDurationMs": 11.62,
"taskDurationMs": 930.507,
"heapDeltaBytes": 31019256,
"heapUsedBytes": 99333812,
"domNodes": 13673,
"jsHeapTotalBytes": 15204352,
"scriptDurationMs": 34.16800000000002,
"eventListeners": 2375,
"totalBlockingTimeMs": 125,
"frameDurationMs": 16.666666666666668,
"p95FrameDurationMs": 16.799999999999272
},
{
"name": "viewport-pan-sweep",
"durationMs": 8272.10199999996,
"styleRecalcs": 249,
"styleRecalcDurationMs": 42.236999999999995,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 4448.239999999999,
"heapDeltaBytes": 8522508,
"heapUsedBytes": 67973044,
"domNodes": -283,
"jsHeapTotalBytes": 5550080,
"scriptDurationMs": 1345.095,
"eventListeners": -133,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.666666666666668,
"p95FrameDurationMs": 16.700000000000728
},
{
"name": "viewport-pan-sweep",
"durationMs": 8340.769000000022,
"styleRecalcs": 251,
"styleRecalcDurationMs": 43.547000000000004,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 4521.664,
"heapDeltaBytes": 11042160,
"heapUsedBytes": 70929736,
"domNodes": -281,
"jsHeapTotalBytes": 5287936,
"scriptDurationMs": 1384.3029999999999,
"eventListeners": -133,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.666666666666668,
"p95FrameDurationMs": 16.799999999999272
},
{
"name": "vue-large-graph-idle",
"durationMs": 18256.21799999999,
"styleRecalcs": 0,
"styleRecalcDurationMs": 0,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 18229.286,
"heapDeltaBytes": -59236336,
"heapUsedBytes": 167471844,
"domNodes": -8312,
"jsHeapTotalBytes": -8069120,
"scriptDurationMs": 566.612,
"eventListeners": -16385,
"totalBlockingTimeMs": 0,
"frameDurationMs": 18.333333333333332,
"p95FrameDurationMs": 16.700000000000728
},
{
"name": "vue-large-graph-idle",
"durationMs": 18418.859999999993,
"styleRecalcs": 0,
"styleRecalcDurationMs": 0,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 18392.343999999997,
"heapDeltaBytes": -59124380,
"heapUsedBytes": 167541932,
"domNodes": -8312,
"jsHeapTotalBytes": -7282688,
"scriptDurationMs": 553.056,
"eventListeners": -16385,
"totalBlockingTimeMs": 0,
"frameDurationMs": 17.780000000000047,
"p95FrameDurationMs": 16.700000000000728
},
{
"name": "vue-large-graph-pan",
"durationMs": 22584.24099999996,
"styleRecalcs": 168,
"styleRecalcDurationMs": 24.768999999999984,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 22550.435,
"heapDeltaBytes": -41490120,
"heapUsedBytes": 176853696,
"domNodes": -8312,
"jsHeapTotalBytes": -8138752,
"scriptDurationMs": 932.2149999999999,
"eventListeners": -16381,
"totalBlockingTimeMs": 796,
"frameDurationMs": 17.776666666666642,
"p95FrameDurationMs": 16.799999999999272
},
{
"name": "vue-large-graph-pan",
"durationMs": 23205.198999999993,
"styleRecalcs": 179,
"styleRecalcDurationMs": 26.57799999999999,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 23166.066,
"heapDeltaBytes": -40147136,
"heapUsedBytes": 166581064,
"domNodes": -8312,
"jsHeapTotalBytes": -10952704,
"scriptDurationMs": 939.773,
"eventListeners": -16383,
"totalBlockingTimeMs": 818,
"frameDurationMs": 17.77333333333336,
"p95FrameDurationMs": 16.700000000000728
},
{
"name": "workflow-execution",
"durationMs": 109.17000000000598,
"styleRecalcs": 8,
"styleRecalcDurationMs": 13.811,
"layouts": 2,
"layoutDurationMs": 0.546,
"taskDurationMs": 84.474,
"heapDeltaBytes": 3241672,
"heapUsedBytes": 66692368,
"domNodes": 115,
"jsHeapTotalBytes": 3145728,
"scriptDurationMs": 8.183,
"eventListeners": 49,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.666666666666668,
"p95FrameDurationMs": 16.800000000000182
},
{
"name": "workflow-execution",
"durationMs": 112.29900000000725,
"styleRecalcs": 8,
"styleRecalcDurationMs": 16.041,
"layouts": 2,
"layoutDurationMs": 1.366,
"taskDurationMs": 75.295,
"heapDeltaBytes": 2956296,
"heapUsedBytes": 66248416,
"domNodes": 128,
"jsHeapTotalBytes": 2883584,
"scriptDurationMs": 4.653,
"eventListeners": 25,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.663333333333338,
"p95FrameDurationMs": 16.700000000000273
}
]
} |
Codecov Report✅ All modified and coverable lines are covered by tests. @@ Coverage Diff @@
## main #14674 +/- ##
==========================================
+ Coverage 78.46% 78.59% +0.13%
==========================================
Files 1790 1790
Lines 105382 105382
Branches 33052 33052
==========================================
+ Hits 82683 82827 +144
+ Misses 22264 22113 -151
- Partials 435 442 +7
Flags with carried forward coverage won't be shown. Click here to find out more. 🚀 New features to boost your workflow:
|
|
@coderabbitai review |
✅ Action performedReview finished.
|
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/components/graph/GraphCanvas.firstRunEntry.test.ts`:
- Around line 20-30: Reset the mutable workspaceStore fixture before each test
so GraphCanvas state cannot leak between tests. Update the test setup around
mocks.workspaceStore to restore spinner, focusMode, and sidebarTab to their
initial values in addition to clearing mock functions; keep the existing mock
behavior unchanged.
- Around line 145-158: Update mountGraphCanvas to create an isolated
createTestingPinia({ stubActions: false }) instance, set it active before
mutating isReady and isI18nReady, and include that same instance in
global.plugins alongside the existing i18n plugin.
🪄 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: 5668aba0-e221-47d3-866f-067675f11df6
📒 Files selected for processing (1)
src/components/graph/GraphCanvas.firstRunEntry.test.ts
Startup writes `spinner` on the hoisted mock object, and clearAllMocks does not undo writes to a plain object, so a startup that throws before the reset leaves the next test running against a spinning workspace. Addresses review feedback: #14674 (comment)
The readiness gates were set on the active Pinia and the component resolved it by fallback rather than by injection. Addresses review feedback: #14674 (comment)
|
@coderabbitai review |
✅ Action performedReview finished.
|
…Org#14625 (Comfy-Org#14676) Closes Comfy-Org#14625. Comfy-Org#14625 found three mutations of the first-run tour stack that leave the suite green. The first — the `GraphCanvas` activation seam — is already fixed in Comfy-Org#14674. This PR closes the other two, so **together with Comfy-Org#14674** the issue is complete. On its own this PR does not cover gap 1. Test-only: no source file is touched. ## Gap 2 — `hasPromptError` was asserted only in the negative The run-state watcher in `useFirstRunTourController` sources `hasNodeError || hasPromptError`. The positive case was covered for `hasNodeError` alone; the only test naming `hasPromptError` asserted that errors already on screen *before* the tour runs anything are ignored — which passes precisely when the term does nothing. Added `gives up on a run the validator refused before it reached a node`: a prompt-level refusal arriving while `runState` is `generating` must move the card to a terminal state. Without it, a prompt rejected whole never reaches a node and never gets a queue status, so the Result step spins forever. **Mutation evidence** — delete `|| executionErrorStore.hasPromptError` from the watcher source: | | before this PR | after | |---|---|---| | mutation applied | 39 passed, 0 failed (green — the gap) | 1 failed, 39 passed | | mutation reverted | 39 passed | 40 passed | ## Gap 3 — the nudge telemetry source was ungated `FirstRunTourNudge` calls `useWorkflowTemplateSelectorDialog().show('first_run_nudge')`. The existing test asserted only `toHaveBeenCalled()`, so the argument was free. Pinned it to `toHaveBeenCalledWith('first_run_nudge')`. Worth noting: `'command'` is also the *default* value of that parameter, so dropping the argument entirely regresses identically — the pinned assertion catches both. **Mutation evidence** — change the argument to `'command'`: | | before this PR | after | |---|---|---| | mutation applied | 8 passed, 0 failed (green — the gap) | 1 failed, 7 passed | | mutation reverted | 8 passed | 8 passed | ## Verification - `pnpm install --frozen-lockfile`, `pnpm format:check`, `pnpm lint`, `pnpm typecheck` — all exit 0. - `pnpm test:unit src/renderer/extensions/firstRunTour/` — 10 files, 174 passed. - Both mutations were applied and reverted individually; source files confirmed restored (`git status` shows only the two `.test.ts` files changed). ## Unverified - Gap 1 is out of scope here and is not re-verified in this branch — it is Comfy-Org#14674's. - Mutation testing was scoped to the two named mutations and the `firstRunTour` suites; this is not a full re-run of the 31-mutation sweep from Comfy-Org#14625. - No e2e/browser coverage was added; both gaps are unit-level assertions on existing behaviour. - CI note: `playwright-tests-chromium-sharded (2, 16)` failed on the first run in `changeTracker.spec.ts › Does not restore invalid navigation stack` (subgraph undo `expect.poll` assertions, one of which is already annotated `Currently bugged:`). Unrelated to this diff, which touches no source and no `browser_tests`. It passed on re-run; all 51 non-skipped checks now pass. Co-authored-by: Claude Opus 5 (1M context) <noreply@anthropic.com>
Partially addresses #14625
The gap
GraphCanvas.vueis the only place the first-run tour is connected to startup. ItsonMountedmakes two calls:There was no
GraphCanvastest file. Deleting either call left the entire suite green.useFirstRunEntryanduseFirstRunTourControllerare both well covered on their own — what was untested was the line joining them, so the whole feature could be disconnected in a refactor and CI would not notice.Nothing user-visible is broken today. This closes a hole that would let it break silently: no Getting Started screen and no template-browser fallback for new users (first call), or a template/share link that silently never offers the tour (second call).
What the test does
src/components/graph/GraphCanvas.firstRunEntry.test.tsmounts the real component and asserts both hand-offs happen with the values startup produced:handleStartupOutcomereceives the outcome frominitializeWorkflow().handleUrlWorkflowreceives that outcome, the template id fromloadTemplateFromUrlIfPresent(), and the status fromloadSharedWorkflowFromUrlIfPresent().Asserting the arguments, not just the calls, also pins the data flow — swapping the template id and the shared status, or passing a re-read outcome, fails.
On mounting a 630-line component
I looked at cheaper options first and rejected them. A source-text or AST assertion over
GraphCanvas.vuewould go red on the mutation, but it would also pass if the calls were in dead code, and it gates the spelling of the call rather than the behaviour. Mounting turned out to be practical, so that is what this does.The cost is a block of
vi.mockcalls, which is why it is a separate file rather than a generalGraphCanvas.test.ts: children are stubbed viashallow, the startup dependencies (@/scripts/app,useWorkflowPersistenceV2,ChangeTracker,useNewUserService, the canvas/lifecycle composables) are faked, and the two readiness gates the sequence waits on —settingStore.isReadyandbootstrapStore.isI18nReady— are set before mounting. The mocks are startup infrastructure only; the component's ownonMountedruns for real. Two notes for future readers:@/stores/workspaceStoreis mocked because instantiating the real one reaches the Firebase auth store.shallowis forwarded verbatim to Vue Test Utils'mount, which honours it;@testing-library/vuejust omits it from its own option type, hence the cast.Runtime is ~30 ms of test time (the rest is module import).
Verified
pnpm install --frozen-lockfile,pnpm format:check,pnpm lint,pnpm typecheck— all clean.pnpm test:unit src/components/graph/GraphCanvas.firstRunEntry.test.ts— 2 passed.pnpm test:unit— 14955 passed, 8 skipped, 1 failed:onboardingCloudRoutes.test.ts > lazily resolves the /oauth layout and consent view componentstimes out at 5 s. Confirmed flaky and unrelated: it fails the same way when run alone on a sibling worktree that does not contain this file, and it passed in a subsequent full run (1095/1095 files). It is a lazy dynamic-import timing flake in this environment, not something this PR touches.Mutation results
Each call was deleted in turn, the suite run, then restored:
await useFirstRunEntry().handleStartupOutcome(startupOutcome)hands the startup outcome to the first-run entry pointfails (1 failed, 1 passed)await useFirstRunEntry().handleUrlWorkflow(...)offers the tour over a workflow that arrived from the URLfails (1 failed, 1 passed)git diffonGraphCanvas.vueemptyEach mutation fails only its own test, so neither assertion is carrying the other.
Not covered
hasPromptErrorinuseFirstRunTourController(only the negative case is asserted) and the nudge'sshow('first_run_nudge')telemetry source. Both are single assertions in existing files and are worth a small follow-up; flagging them since this PR closes the issue that tracks them.handleUrlWorkflowis asserted with a template-id boot. The share-link path (sharedStatus === 'loaded') is covered byfirstRunEntry.test.ts, not here.hasPromptErroris asserted only in the negative, so the test passes precisely when the term does nothing. Remove the term and the suite stays green, yet a prompt-level validation refusal then leaves the Result step spinning — the defect that term exists to prevent.show('first_run_nudge')→show('command')stays green, so the telemetry source can silently regress back to filing every nudge conversion under the command palette.Reworded the close reference to
Partially addressesso the issue survives this merge.