Repository navigation
fix(onboarding): pick the first-run nudge's copy from how the tour ended - #14677
Conversation
The nudge chose between its two copies on `tourWasShown`, which was assigned from the return of `engine.startTour()` — that a tour *began*, not that the user finished one. A tour skipped on step 1, and one abandoned when a target never mounted, both read as "You just made your first". The abandoned case put that congratulation on screen beside the `loadError` toast for the same event. `finish()` already knows how the tour ended, so the store now hands that ending on as `lastEnding` and the nudge reserves `ran` for `completed`. Visibility is deliberately unchanged: every ending still arms the nudge, including the endings that now read as `noTour`. A user who saw no tour is the one who most needs somewhere to go next (#14144), and #14672 was closed for suppressing it. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: ASSERTIVE Plan: Pro Plus Run ID: 📒 Files selected for processing (6)
📝 WalkthroughWalkthroughThe onboarding tour store now records the last tour outcome. The first-run controller derives completion from that outcome. The nudge displays completion-specific copy only for completed tours. Tests cover completed, skipped, timed-out, lost-trigger, and normal-ending states. ChangesOnboarding tour outcomes
Estimated code review effort: 3 (Moderate) | ~20 minutes Sequence Diagram(s)sequenceDiagram
participant OnboardingTourStore
participant FirstRunTourController
participant FirstRunTourNudge
OnboardingTourStore-->>FirstRunTourController: provide lastEnding
FirstRunTourController->>FirstRunTourController: derive tourWasCompleted
FirstRunTourController-->>FirstRunTourNudge: provide completion state
FirstRunTourNudge->>FirstRunTourNudge: select nudge copy
Possibly related issues
Possibly related PRs
Suggested reviewers: 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 |
📄 Knowledge reviewDosu skipped reviewing this PR because your organization has used its |
🎨 Storybook: ✅ Built — View Storybook🎭 Playwright: ✅ 1786 passed, 0 failed · 2 flaky📊 Browser Reports
📦 Bundle: 8.24 MB gzip 🔴 +88 BDetailsSummary
Category Glance App Entry Points — 3.64 kB (baseline 3.64 kB) • ⚪ 0 BMain entry bundles and manifests
Status: 1 added / 1 removed Graph Workspace — 1.35 MB (baseline 1.35 MB) • 🔴 +342 BGraph editor runtime, canvas, workflow orchestration
Status: 1 added / 1 removed / 1 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: 1 added / 1 removed / 280 unchanged ⚡ Performance Report
Show regressions
All metrics
Historical variance (last 15 runs)
Trend (last 15 commits on main)
Raw data{
"timestamp": "2026-08-04T06:32:53.431Z",
"gitSha": "6eaad6bb4085c7fba4c7d2530447018c856956af",
"branch": "fix/tour-nudge-copy",
"measurements": [
{
"name": "canvas-idle",
"durationMs": 2041.8140000000449,
"styleRecalcs": 8,
"styleRecalcDurationMs": 7.821,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 571.2609999999999,
"heapDeltaBytes": 5415036,
"heapUsedBytes": 69393932,
"domNodes": 16,
"jsHeapTotalBytes": 25427968,
"scriptDurationMs": 23.400000000000006,
"eventListeners": 4,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.666666666666668,
"p95FrameDurationMs": 16.799999999999272
},
{
"name": "canvas-idle",
"durationMs": 2058.275999999978,
"styleRecalcs": 10,
"styleRecalcDurationMs": 8.671000000000001,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 473.541,
"heapDeltaBytes": 5390576,
"heapUsedBytes": 69456260,
"domNodes": 20,
"jsHeapTotalBytes": 25165824,
"scriptDurationMs": 18.719000000000005,
"eventListeners": 4,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.666666666666668,
"p95FrameDurationMs": 16.800000000000182
},
{
"name": "canvas-mouse-sweep",
"durationMs": 2075.7690000000366,
"styleRecalcs": 77,
"styleRecalcDurationMs": 49.07900000000001,
"layouts": 12,
"layoutDurationMs": 3.725,
"taskDurationMs": 1079.0049999999999,
"heapDeltaBytes": -16058296,
"heapUsedBytes": 47988296,
"domNodes": -284,
"jsHeapTotalBytes": 23580672,
"scriptDurationMs": 145.11599999999999,
"eventListeners": -153,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.66333333333335,
"p95FrameDurationMs": 16.699999999999818
},
{
"name": "canvas-mouse-sweep",
"durationMs": 1908.9030000000093,
"styleRecalcs": 76,
"styleRecalcDurationMs": 40.459999999999994,
"layouts": 12,
"layoutDurationMs": 3.702,
"taskDurationMs": 974.34,
"heapDeltaBytes": -12797304,
"heapUsedBytes": 51130968,
"domNodes": -281,
"jsHeapTotalBytes": 24367104,
"scriptDurationMs": 131.165,
"eventListeners": -153,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.66333333333332,
"p95FrameDurationMs": 16.700000000000728
},
{
"name": "canvas-zoom-sweep",
"durationMs": 1749.2320000000063,
"styleRecalcs": 31,
"styleRecalcDurationMs": 19.022,
"layouts": 6,
"layoutDurationMs": 0.6859999999999999,
"taskDurationMs": 431.80600000000004,
"heapDeltaBytes": 8635112,
"heapUsedBytes": 72606412,
"domNodes": 76,
"jsHeapTotalBytes": 24379392,
"scriptDurationMs": 26.406,
"eventListeners": 19,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.666666666666668,
"p95FrameDurationMs": 16.700000000000728
},
{
"name": "canvas-zoom-sweep",
"durationMs": 1710.6850000000122,
"styleRecalcs": 31,
"styleRecalcDurationMs": 15.678999999999998,
"layouts": 6,
"layoutDurationMs": 0.5690000000000001,
"taskDurationMs": 365.072,
"heapDeltaBytes": 8596956,
"heapUsedBytes": 72724464,
"domNodes": 75,
"jsHeapTotalBytes": 24641536,
"scriptDurationMs": 18.229000000000003,
"eventListeners": 19,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.670000000000012,
"p95FrameDurationMs": 16.800000000000182
},
{
"name": "dom-widget-clipping",
"durationMs": 599.0580000000136,
"styleRecalcs": 11,
"styleRecalcDurationMs": 8.283,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 410.345,
"heapDeltaBytes": -11000528,
"heapUsedBytes": 53102020,
"domNodes": 18,
"jsHeapTotalBytes": 25427968,
"scriptDurationMs": 61.208,
"eventListeners": 2,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.666666666666668,
"p95FrameDurationMs": 16.699999999999818
},
{
"name": "dom-widget-clipping",
"durationMs": 589.5239999999831,
"styleRecalcs": 11,
"styleRecalcDurationMs": 7.505000000000002,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 380.441,
"heapDeltaBytes": -11058856,
"heapUsedBytes": 53031028,
"domNodes": 18,
"jsHeapTotalBytes": 25165824,
"scriptDurationMs": 59.273,
"eventListeners": 2,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.666666666666668,
"p95FrameDurationMs": 16.700000000000728
},
{
"name": "large-graph-idle",
"durationMs": 2059.0250000000196,
"styleRecalcs": 8,
"styleRecalcDurationMs": 8.541,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 842.643,
"heapDeltaBytes": 6555356,
"heapUsedBytes": 66103752,
"domNodes": -284,
"jsHeapTotalBytes": 2473984,
"scriptDurationMs": 135.491,
"eventListeners": -149,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.666666666666668,
"p95FrameDurationMs": 16.699999999999818
},
{
"name": "large-graph-idle",
"durationMs": 2057.4949999999035,
"styleRecalcs": 7,
"styleRecalcDurationMs": 6.701000000000002,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 810.217,
"heapDeltaBytes": 7523804,
"heapUsedBytes": 66832960,
"domNodes": -280,
"jsHeapTotalBytes": 2998272,
"scriptDurationMs": 133.035,
"eventListeners": -149,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.66333333333335,
"p95FrameDurationMs": 16.799999999999272
},
{
"name": "large-graph-pan",
"durationMs": 2330.812999999978,
"styleRecalcs": 69,
"styleRecalcDurationMs": 14.151999999999997,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 1366.7279999999998,
"heapDeltaBytes": 7860180,
"heapUsedBytes": 68155124,
"domNodes": -285,
"jsHeapTotalBytes": 4501504,
"scriptDurationMs": 460.75199999999995,
"eventListeners": -147,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.666666666666668,
"p95FrameDurationMs": 16.699999999999818
},
{
"name": "large-graph-pan",
"durationMs": 2370.0059999999894,
"styleRecalcs": 68,
"styleRecalcDurationMs": 13.919,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 1449.0510000000002,
"heapDeltaBytes": 6356748,
"heapUsedBytes": 66903496,
"domNodes": -285,
"jsHeapTotalBytes": 3715072,
"scriptDurationMs": 522.566,
"eventListeners": -149,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.666666666666668,
"p95FrameDurationMs": 16.799999999999272
},
{
"name": "large-graph-zoom",
"durationMs": 3425.637999999992,
"styleRecalcs": 64,
"styleRecalcDurationMs": 14.745000000000001,
"layouts": 60,
"layoutDurationMs": 7.514,
"taskDurationMs": 1599.511,
"heapDeltaBytes": 26352596,
"heapUsedBytes": 89017216,
"domNodes": 10,
"jsHeapTotalBytes": 7864320,
"scriptDurationMs": 569.84,
"eventListeners": 8,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.666666666666668,
"p95FrameDurationMs": 16.800000000000182
},
{
"name": "large-graph-zoom",
"durationMs": 3312.567999999942,
"styleRecalcs": 64,
"styleRecalcDurationMs": 14.425999999999998,
"layouts": 60,
"layoutDurationMs": 7.4190000000000005,
"taskDurationMs": 1593.099,
"heapDeltaBytes": 4903012,
"heapUsedBytes": 67059384,
"domNodes": -289,
"jsHeapTotalBytes": 6668288,
"scriptDurationMs": 545.203,
"eventListeners": -153,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.666666666666668,
"p95FrameDurationMs": 16.800000000000182
},
{
"name": "minimap-idle",
"durationMs": 2038.8609999999971,
"styleRecalcs": 8,
"styleRecalcDurationMs": 7.15,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 702.784,
"heapDeltaBytes": 6897140,
"heapUsedBytes": 67095816,
"domNodes": -283,
"jsHeapTotalBytes": 3784704,
"scriptDurationMs": 114.92099999999999,
"eventListeners": -179,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.666666666666668,
"p95FrameDurationMs": 16.699999999999818
},
{
"name": "minimap-idle",
"durationMs": 2031.9999999999254,
"styleRecalcs": 7,
"styleRecalcDurationMs": 6.575999999999999,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 708.92,
"heapDeltaBytes": 6665296,
"heapUsedBytes": 67383388,
"domNodes": -285,
"jsHeapTotalBytes": 4046848,
"scriptDurationMs": 116.65100000000001,
"eventListeners": -149,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.666666666666668,
"p95FrameDurationMs": 16.700000000000728
},
{
"name": "subgraph-dom-widget-clipping",
"durationMs": 610.6869999999844,
"styleRecalcs": 47,
"styleRecalcDurationMs": 10.665000000000001,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 414.33900000000006,
"heapDeltaBytes": -10477444,
"heapUsedBytes": 53746664,
"domNodes": 20,
"jsHeapTotalBytes": 25952256,
"scriptDurationMs": 118.524,
"eventListeners": 8,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.666666666666668,
"p95FrameDurationMs": 16.699999999999818
},
{
"name": "subgraph-dom-widget-clipping",
"durationMs": 606.8150000000969,
"styleRecalcs": 47,
"styleRecalcDurationMs": 11.093,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 413.027,
"heapDeltaBytes": -10703684,
"heapUsedBytes": 53369632,
"domNodes": 20,
"jsHeapTotalBytes": 26476544,
"scriptDurationMs": 124.23499999999999,
"eventListeners": 6,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.666666666666668,
"p95FrameDurationMs": 16.700000000000728
},
{
"name": "subgraph-idle",
"durationMs": 2021.158000000014,
"styleRecalcs": 9,
"styleRecalcDurationMs": 9.036999999999999,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 563.569,
"heapDeltaBytes": 5463728,
"heapUsedBytes": 69454924,
"domNodes": 18,
"jsHeapTotalBytes": 24903680,
"scriptDurationMs": 22.025,
"eventListeners": 4,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.66333333333332,
"p95FrameDurationMs": 16.700000000000728
},
{
"name": "subgraph-idle",
"durationMs": 2034.2679999999973,
"styleRecalcs": 10,
"styleRecalcDurationMs": 9.651000000000002,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 559.9569999999999,
"heapDeltaBytes": 5456860,
"heapUsedBytes": 69644244,
"domNodes": 20,
"jsHeapTotalBytes": 24903680,
"scriptDurationMs": 22.788000000000004,
"eventListeners": 4,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.66333333333335,
"p95FrameDurationMs": 16.800000000000182
},
{
"name": "subgraph-mouse-sweep",
"durationMs": 1783.3439999999996,
"styleRecalcs": 78,
"styleRecalcDurationMs": 40.118,
"layouts": 16,
"layoutDurationMs": 4.817,
"taskDurationMs": 930.7719999999999,
"heapDeltaBytes": -18764348,
"heapUsedBytes": 45622844,
"domNodes": 19,
"jsHeapTotalBytes": 23056384,
"scriptDurationMs": 105.04200000000002,
"eventListeners": 4,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.666666666666668,
"p95FrameDurationMs": 16.700000000000728
},
{
"name": "subgraph-mouse-sweep",
"durationMs": 1707.1859999999788,
"styleRecalcs": 75,
"styleRecalcDurationMs": 36.678,
"layouts": 16,
"layoutDurationMs": 4.746,
"taskDurationMs": 805.4169999999999,
"heapDeltaBytes": -3927728,
"heapUsedBytes": 60159424,
"domNodes": 61,
"jsHeapTotalBytes": 25165824,
"scriptDurationMs": 98.34100000000001,
"eventListeners": 4,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.66333333333335,
"p95FrameDurationMs": 16.799999999999272
},
{
"name": "subgraph-transition-enter",
"durationMs": 1435.7410000000073,
"styleRecalcs": 18,
"styleRecalcDurationMs": 32.08599999999999,
"layouts": 14,
"layoutDurationMs": 13.097000000000001,
"taskDurationMs": 1016.6240000000003,
"heapDeltaBytes": 3399712,
"heapUsedBytes": 74411468,
"domNodes": 13673,
"jsHeapTotalBytes": 15466496,
"scriptDurationMs": 38.498000000000005,
"eventListeners": 2375,
"totalBlockingTimeMs": 151,
"frameDurationMs": 16.66333333333332,
"p95FrameDurationMs": 16.700000000000728
},
{
"name": "viewport-pan-sweep",
"durationMs": 8475.940999999977,
"styleRecalcs": 249,
"styleRecalcDurationMs": 38.483999999999995,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 4836.147999999999,
"heapDeltaBytes": 11430572,
"heapUsedBytes": 70782136,
"domNodes": -284,
"jsHeapTotalBytes": 5287936,
"scriptDurationMs": 1478.5159999999998,
"eventListeners": -133,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.666666666666668,
"p95FrameDurationMs": 16.700000000000728
},
{
"name": "viewport-pan-sweep",
"durationMs": 8253.466000000004,
"styleRecalcs": 249,
"styleRecalcDurationMs": 34.812,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 4357.204,
"heapDeltaBytes": 11386636,
"heapUsedBytes": 71342800,
"domNodes": -283,
"jsHeapTotalBytes": 5550080,
"scriptDurationMs": 1360.1190000000001,
"eventListeners": -133,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.666666666666668,
"p95FrameDurationMs": 16.799999999999272
},
{
"name": "vue-large-graph-idle",
"durationMs": 17193.544999999973,
"styleRecalcs": 0,
"styleRecalcDurationMs": 0,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 17155.418,
"heapDeltaBytes": -58769732,
"heapUsedBytes": 166587484,
"domNodes": -8312,
"jsHeapTotalBytes": -7282688,
"scriptDurationMs": 577.191,
"eventListeners": -16385,
"totalBlockingTimeMs": 0,
"frameDurationMs": 17.776666666666642,
"p95FrameDurationMs": 16.80000000000291
},
{
"name": "vue-large-graph-idle",
"durationMs": 16817.25200000005,
"styleRecalcs": 0,
"styleRecalcDurationMs": 0,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 16794.277000000002,
"heapDeltaBytes": -58183740,
"heapUsedBytes": 167077464,
"domNodes": -8312,
"jsHeapTotalBytes": -9117696,
"scriptDurationMs": 528.789,
"eventListeners": -16385,
"totalBlockingTimeMs": 0,
"frameDurationMs": 17.776666666666642,
"p95FrameDurationMs": 16.700000000000728
},
{
"name": "vue-large-graph-pan",
"durationMs": 15914.593000000024,
"styleRecalcs": 83,
"styleRecalcDurationMs": 13.674000000000019,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 15890.122000000001,
"heapDeltaBytes": -47278948,
"heapUsedBytes": 174188276,
"domNodes": -8312,
"jsHeapTotalBytes": -6041600,
"scriptDurationMs": 889.984,
"eventListeners": -16385,
"totalBlockingTimeMs": 10,
"frameDurationMs": 17.223333333333237,
"p95FrameDurationMs": 16.799999999999272
},
{
"name": "vue-large-graph-pan",
"durationMs": 20551.746999999978,
"styleRecalcs": 143,
"styleRecalcDurationMs": 16.981000000000023,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 20511.152,
"heapDeltaBytes": -46683280,
"heapUsedBytes": 168307744,
"domNodes": -8314,
"jsHeapTotalBytes": -11476992,
"scriptDurationMs": 908.8320000000001,
"eventListeners": -16383,
"totalBlockingTimeMs": 149,
"frameDurationMs": 17.773333333333238,
"p95FrameDurationMs": 16.80000000000291
},
{
"name": "workflow-execution",
"durationMs": 119.19000000000324,
"styleRecalcs": 6,
"styleRecalcDurationMs": 13.111999999999998,
"layouts": 3,
"layoutDurationMs": 0.8190000000000001,
"taskDurationMs": 92.557,
"heapDeltaBytes": 3438404,
"heapUsedBytes": 66513952,
"domNodes": 119,
"jsHeapTotalBytes": 3407872,
"scriptDurationMs": 8.385,
"eventListeners": 49,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.66333333333332,
"p95FrameDurationMs": 16.800000000000182
},
{
"name": "workflow-execution",
"durationMs": 501.5489999999545,
"styleRecalcs": 10,
"styleRecalcDurationMs": 20.441,
"layouts": 2,
"layoutDurationMs": 0.39700000000000024,
"taskDurationMs": 133.13599999999997,
"heapDeltaBytes": 5083608,
"heapUsedBytes": 68295328,
"domNodes": 117,
"jsHeapTotalBytes": 5767168,
"scriptDurationMs": 17.281000000000002,
"eventListeners": 97,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.66333333333335,
"p95FrameDurationMs": 16.700000000000728
}
]
} |
|
@coderabbitai review |
✅ Action performedReview finished.
|
Codecov Report✅ All modified and coverable lines are covered by tests. @@ Coverage Diff @@
## main #14677 +/- ##
========================================
Coverage 78.46% 78.46%
========================================
Files 1790 1790
Lines 105382 105390 +8
Branches 32178 33057 +879
========================================
+ Hits 82683 82691 +8
Misses 22257 22257
Partials 442 442
Flags with carried forward coverage won't be shown. Click here to find out more.
🚀 New features to boost your workflow:
|
MaanilVerma
left a comment
There was a problem hiding this comment.
minor: the congratulates nobody when the tour never appeared test fakes the store's requested → resolvedEmpty → IDLE transition inside a mock rather than driving the real store. That's the same class of weakness that let my original bug through three review rounds. It's mitigated — the store suite covers lastEnding against the real store — but the controller-side assertion still rests on a hand-rolled mock. Worth a comment, not a block.
|
@christian-byrne Successfully backported to #15097 |
|
@christian-byrne Successfully backported to #15098 |
…15107) @MaanilVerma — **your call entirely; close it if you'd rather not.** I owe you context on why it's arriving as a PR eight days late rather than as a question. ## The gap `OnboardingTourNudgeMetadata` is `{ tour }` only, so `nudge_shown` and `explore_templates_clicked` cannot be split by how the tour ended. That matters more here than it would elsewhere, because **every ending arms the nudge** — deliberately, per your call in Comfy-Org#14144: *"a user who saw no tour is the one who most needs somewhere to go next."* So the nudge's audience is deliberately a mix of *finished the tour* and *never saw one*, and right now the funnel cannot tell those two apart. A conversion from someone who completed the walkthrough and one from someone the tour never started for land in the same bucket. ## The change `tourWasCompleted` is already in scope in the component — it picks the copy one line above the telemetry call. This carries the same value onto both events: ```ts telemetry?.trackOnboardingTour('nudge_shown', { tour: 'firstRun', tour_completed: tourWasCompleted.value }) ``` Optional field, no new event, **no visibility rule changed**, nothing added to any other event. ## Verification `FirstRunTourNudge.test.ts` **12/12**. The two existing assertions pinned the exact metadata shape, so they failed until updated — which is the suite working. Added one case asserting both events carry `false` when the tour did not complete. Mutation-checked: hard-coding `tour_completed: true` fails exactly that new case, 11 others still pass. `typecheck` and `format:check` clean. ## Why it's late I drafted this as part of a Slack reply to you on **2026-08-04** and never sent it, so you have never actually seen the offer. That's the failure, not the telemetry. It was the one item in that draft still worth acting on — the rest of it has since been overtaken (the nudge copy landed in Comfy-Org#14677, and you've since settled the OG image on Comfy-Org#14957). If you'd rather have the *full* ending instead of a boolean — `completed` vs `skipped` with its `skipReason` — say so and I'll rework it; the controller has `engine.lastEnding` and only exposes the boolean today. I went with the boolean because it needed no change to the controller's surface. Co-authored-by: t <t@t.t>
Summary
The first-run nudge picked its copy from whether a tour started, so a user who skipped on step 1 — or one whose tour was torn down by a target that never mounted — was congratulated for a first result they never made. This makes the copy follow how the tour actually ended. The nudge's visibility is unchanged: every ending still shows it.
The defect
FirstRunTourNudge.vuechose its copy with`…nudge.${tourWasShown ? 'ran' : 'noTour'}`, andtourWasShownwas assigned fromstarted— the return ofengine.startTour()inuseFirstRunTourController.ts— which means a tour began, not the user completed one:ranrannoTour✓noTourran— "You just made your first"noTourtarget_timeout)ran, shown alongside theloadErrortoastnoTourrannoTourtrigger_lostrannoTourThe abandoned case is the sharp one: the same event raises an error toast and a congratulation.
Changes
finish()inonboardingTourStore.tsalready computesoutcomeandskipReason; the store now hands that on aslastEnding(a discriminated union, cleared when a new run is requested so the previous ending cannot speak for it).useFirstRunTourControllerderivestourWasCompletedfrom it in place oftourWasShown, and the nudge reserves therancopy forcompleted. Every other ending getsnoTour, which reads as "here's where to go next" for a skipper or an abandoner.lastEndingis additive;tourWasShownhad exactly one consumer (the nudge).Visibility is deliberately unchanged
Every ending still arms the nudge, including the ones that now read as
noTour. That is @MaanilVerma's product decision in #14144: "a user who saw no tour is the one who most needs somewhere to go next, so suppressing it there removes the way forward." #14672 tried to suppress the nudge on the abandoned ending and was closed for exactly this reason — this PR treats the copy, not the visibility, as the defect.The regression guard for that is
still offers the nudge after a tour $namedinuseFirstRunTourController.test.ts, which assertsnudgeArmedfor all five endings, plus a sixth test for the never-started case and a component-level check that the nudge renders whether or not the tour finished.Tests
New coverage, 19 tests:
onboardingTourStore.test.ts(6) — the ending recorded for a user skip, atarget_timeoutteardown, atrigger_lostteardown, a walked-to-the-end tour; that a running tour has no ending; that a new run drops the last one.useFirstRunTourController.test.ts(10, plus an existing never-started test extended to assert visibility) —completed→ congratulation;user/target_timeout/postponed/trigger_lost→ none; all five endings still arm the nudge; never-started arms it too, with no congratulation.FirstRunTourNudge.test.ts(3) — completed →ran, unfinished →noTour, and the nudge appears either way.Mutation evidence
tourWasCompleted = ending?.tour === 'firstRun', i.e. "a tour ran"): 4 failed | 45 passed. The four are the skipped/abandoned/postponed/lost-context copy cases. The five visibility tests stayed green, confirming they are not coupled to the copy rule.ran: 1 failed | 10 passed. Pin it tonoTour: 1 failed | 10 passed.src/renderer/extensions/firstRunTourandsrc/platform/onboarding.pnpm install --frozen-lockfile,format:check,lint,typecheckandknipall clean.Review Focus
lastEndingcarriesskipReasonalthough no production code reads it today — the tests name each ending, so the reason has to be observable, and it is the shapefinish()already computes. Say the word if you would rather it be trimmed to{ tour, outcome }.tourWasCompletedwhen the nudge arms rather than deriving it live, so a later tour ending cannot rewrite the copy of a nudge already on screen.gettingStartedTour.spec.ts→ "leaves the nudge until the upgrade dialog closes" asserts visibility only (postponed still arms), and no e2e or unit test elsewhere asserts the nudge's copy strings — checked by grep, not by running Playwright.nudge_shownandexplore_templates_clickedstill report only{ tour: 'firstRun' }, so the funnel still cannot tell a toured user from a tour-less one. That is a real gap, and deliberately out of scope here.🤖 Generated with Claude Code