Repository navigation
spike: hidden Comfy.EmulateNewUser setting for re-testing first-run onboarding - #14678
christian-byrne wants to merge 1 commit into
Conversation
Adds a per-user hidden setting that makes first-run onboarding treat the account as brand new, so testers can re-run it without hand-clearing localStorage. Emulation relaxes the `restored` and `TutorialCompleted` bails in handleStartupOutcome, and deliberately skips the Comfy.InstalledVersion write in initializeIfNewUser. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
📄 Knowledge reviewDosu skipped reviewing this PR because your organization has used its |
|
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)
📝 WalkthroughWalkthroughAdds the hidden ChangesNew User Emulation
Estimated code review effort: 3 (Moderate) | ~20 minutes Possibly related PRs
Suggested reviewers: Sequence Diagram(s)sequenceDiagram
participant Startup as Startup flow
participant Service as useNewUserService
participant Setting as Comfy.EmulateNewUser
participant Tour as handleStartupOutcome
Startup->>Service: Check new-user state
Service->>Setting: Read per-user setting
Setting-->>Service: Enabled or disabled
Service-->>Tour: Return new-user result
Tour->>Tour: Apply or bypass startup guards
Tour-->>Startup: Open or skip Getting Started
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: ✅ 1782 passed, 0 failed · 4 flaky📊 Browser Reports
🎨 Storybook: ✅ Built — View Storybook📦 Bundle: 8.24 MB gzip 🔴 +428 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) • 🔴 +559 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: 12 added / 12 removed / 4 unchanged Panels & Settings — 551 kB (baseline 551 kB) • ⚪ 0 BConfiguration panels, inspectors, and settings screens
Status: 11 added / 11 removed / 15 unchanged User & Accounts — 28.7 kB (baseline 28.7 kB) • ⚪ 0 BAuthentication, profile, and account management bundles
Status: 7 added / 7 removed / 3 unchanged Editors & Dialogs — 124 kB (baseline 124 kB) • ⚪ 0 BModals, dialogs, drawers, and in-app editors
Status: 6 added / 6 removed / 1 unchanged UI Components — 70 kB (baseline 70 kB) • ⚪ 0 BReusable component library chunks
Status: 6 added / 6 removed / 9 unchanged Data & Services — 3.47 MB (baseline 3.47 MB) • 🔴 +513 BStores, services, APIs, and repositories
Status: 14 added / 14 removed / 3 unchanged Utilities & Hooks — 386 kB (baseline 386 kB) • ⚪ 0 BHelpers, composables, and utility bundles
Status: 16 added / 16 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.8 MB (baseline 12.8 MB) • ⚪ 0 BBundles that do not match a named category
Status: 70 added / 70 removed / 211 unchanged ⚡ Performance Report
Show regressions
All metrics
Historical variance (last 15 runs)
Trend (last 15 commits on main)
Raw data{
"timestamp": "2026-08-04T07:08:48.617Z",
"gitSha": "b8d672b5b71ed1aaabcbeec1575f9bcc7025cd40",
"branch": "spike/emulate-new-user",
"measurements": [
{
"name": "canvas-idle",
"durationMs": 2140.352000000007,
"styleRecalcs": 9,
"styleRecalcDurationMs": 10.331999999999999,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 664.206,
"heapDeltaBytes": 5631384,
"heapUsedBytes": 69652628,
"domNodes": 18,
"jsHeapTotalBytes": 24903680,
"scriptDurationMs": 26.294,
"eventListeners": 4,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.666666666666668,
"p95FrameDurationMs": 16.800000000000182
},
{
"name": "canvas-idle",
"durationMs": 2020.5290000000105,
"styleRecalcs": 9,
"styleRecalcDurationMs": 7.997999999999998,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 486.87800000000004,
"heapDeltaBytes": 5582512,
"heapUsedBytes": 69610640,
"domNodes": 18,
"jsHeapTotalBytes": 24641536,
"scriptDurationMs": 19.481999999999996,
"eventListeners": 4,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.666666666666668,
"p95FrameDurationMs": 16.700000000000728
},
{
"name": "canvas-mouse-sweep",
"durationMs": 1886.3769999999818,
"styleRecalcs": 74,
"styleRecalcDurationMs": 37.87799999999999,
"layouts": 12,
"layoutDurationMs": 3.835,
"taskDurationMs": 940.0529999999999,
"heapDeltaBytes": -13318008,
"heapUsedBytes": 50785216,
"domNodes": -283,
"jsHeapTotalBytes": 23842816,
"scriptDurationMs": 121.62700000000001,
"eventListeners": -153,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.666666666666668,
"p95FrameDurationMs": 16.800000000000182
},
{
"name": "canvas-mouse-sweep",
"durationMs": 1921.950000000038,
"styleRecalcs": 76,
"styleRecalcDurationMs": 47.577999999999996,
"layouts": 12,
"layoutDurationMs": 4.061,
"taskDurationMs": 963.496,
"heapDeltaBytes": -11721028,
"heapUsedBytes": 52179468,
"domNodes": -278,
"jsHeapTotalBytes": 23842816,
"scriptDurationMs": 124.18,
"eventListeners": -153,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.666666666666668,
"p95FrameDurationMs": 16.800000000000182
},
{
"name": "canvas-zoom-sweep",
"durationMs": 1755.9000000000538,
"styleRecalcs": 31,
"styleRecalcDurationMs": 18.403000000000002,
"layouts": 6,
"layoutDurationMs": 0.6220000000000001,
"taskDurationMs": 439.249,
"heapDeltaBytes": 8612100,
"heapUsedBytes": 72611140,
"domNodes": 77,
"jsHeapTotalBytes": 25427968,
"scriptDurationMs": 25.607,
"eventListeners": 19,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.666666666666668,
"p95FrameDurationMs": 16.700000000000728
},
{
"name": "canvas-zoom-sweep",
"durationMs": 1754.8419999999396,
"styleRecalcs": 33,
"styleRecalcDurationMs": 18.529,
"layouts": 6,
"layoutDurationMs": 0.691,
"taskDurationMs": 389.69399999999996,
"heapDeltaBytes": 8337416,
"heapUsedBytes": 72429688,
"domNodes": 79,
"jsHeapTotalBytes": 24379392,
"scriptDurationMs": 21.946,
"eventListeners": 19,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.666666666666668,
"p95FrameDurationMs": 16.800000000000182
},
{
"name": "dom-widget-clipping",
"durationMs": 630.3670000000352,
"styleRecalcs": 12,
"styleRecalcDurationMs": 7.823000000000002,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 395.14700000000005,
"heapDeltaBytes": -11050916,
"heapUsedBytes": 52954436,
"domNodes": 20,
"jsHeapTotalBytes": 25952256,
"scriptDurationMs": 60.376999999999995,
"eventListeners": 0,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.666666666666668,
"p95FrameDurationMs": 16.800000000000182
},
{
"name": "dom-widget-clipping",
"durationMs": 607.4639999999363,
"styleRecalcs": 11,
"styleRecalcDurationMs": 6.868000000000001,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 382.95099999999996,
"heapDeltaBytes": -11133124,
"heapUsedBytes": 52967544,
"domNodes": 18,
"jsHeapTotalBytes": 25427968,
"scriptDurationMs": 57.806000000000004,
"eventListeners": 0,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.666666666666668,
"p95FrameDurationMs": 16.700000000000728
},
{
"name": "large-graph-idle",
"durationMs": 2028.6649999999895,
"styleRecalcs": 10,
"styleRecalcDurationMs": 8.558,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 791.328,
"heapDeltaBytes": 7305520,
"heapUsedBytes": 65954248,
"domNodes": -279,
"jsHeapTotalBytes": 2736128,
"scriptDurationMs": 120.07199999999999,
"eventListeners": -149,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.666666666666668,
"p95FrameDurationMs": 16.800000000000182
},
{
"name": "large-graph-idle",
"durationMs": 2043.5489999999845,
"styleRecalcs": 9,
"styleRecalcDurationMs": 7.703999999999999,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 696.0000000000001,
"heapDeltaBytes": 7127148,
"heapUsedBytes": 66342896,
"domNodes": -281,
"jsHeapTotalBytes": 3260416,
"scriptDurationMs": 103.22099999999999,
"eventListeners": -149,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.666666666666668,
"p95FrameDurationMs": 16.700000000000728
},
{
"name": "large-graph-pan",
"durationMs": 2198.6609999999587,
"styleRecalcs": 69,
"styleRecalcDurationMs": 15.623999999999999,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 1352.142,
"heapDeltaBytes": 1667096,
"heapUsedBytes": 62045848,
"domNodes": -282,
"jsHeapTotalBytes": 5025792,
"scriptDurationMs": 420.301,
"eventListeners": -147,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.666666666666668,
"p95FrameDurationMs": 16.800000000000182
},
{
"name": "large-graph-pan",
"durationMs": 2206.4799999999423,
"styleRecalcs": 68,
"styleRecalcDurationMs": 14.613000000000001,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 1355.842,
"heapDeltaBytes": -5023060,
"heapUsedBytes": 56113316,
"domNodes": -285,
"jsHeapTotalBytes": 7192576,
"scriptDurationMs": 455.315,
"eventListeners": -181,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.666666666666668,
"p95FrameDurationMs": 16.699999999999818
},
{
"name": "large-graph-zoom",
"durationMs": 3264.8530000000164,
"styleRecalcs": 64,
"styleRecalcDurationMs": 15.488999999999999,
"layouts": 60,
"layoutDurationMs": 8.562999999999999,
"taskDurationMs": 1583.4109999999998,
"heapDeltaBytes": 24122160,
"heapUsedBytes": 86248908,
"domNodes": 10,
"jsHeapTotalBytes": 7602176,
"scriptDurationMs": 554.5799999999999,
"eventListeners": 8,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.666666666666668,
"p95FrameDurationMs": 16.800000000000182
},
{
"name": "large-graph-zoom",
"durationMs": 3196.1840000000166,
"styleRecalcs": 66,
"styleRecalcDurationMs": 16.226999999999997,
"layouts": 60,
"layoutDurationMs": 8.364,
"taskDurationMs": 1564.545,
"heapDeltaBytes": -1955076,
"heapUsedBytes": 59767236,
"domNodes": -285,
"jsHeapTotalBytes": 5881856,
"scriptDurationMs": 532.071,
"eventListeners": -153,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.666666666666668,
"p95FrameDurationMs": 16.800000000000182
},
{
"name": "minimap-idle",
"durationMs": 2061.1180000000218,
"styleRecalcs": 7,
"styleRecalcDurationMs": 7.0969999999999995,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 829.585,
"heapDeltaBytes": 6887808,
"heapUsedBytes": 67335244,
"domNodes": -283,
"jsHeapTotalBytes": 2736128,
"scriptDurationMs": 126.91400000000003,
"eventListeners": -151,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.666666666666668,
"p95FrameDurationMs": 16.700000000000728
},
{
"name": "minimap-idle",
"durationMs": 2039.790000000039,
"styleRecalcs": 7,
"styleRecalcDurationMs": 6.152000000000001,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 711.689,
"heapDeltaBytes": 4091252,
"heapUsedBytes": 66122008,
"domNodes": -284,
"jsHeapTotalBytes": 3784704,
"scriptDurationMs": 109.35300000000001,
"eventListeners": -179,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.66333333333332,
"p95FrameDurationMs": 16.700000000000728
},
{
"name": "subgraph-dom-widget-clipping",
"durationMs": 605.6370000000015,
"styleRecalcs": 46,
"styleRecalcDurationMs": 10.299000000000001,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 423.04,
"heapDeltaBytes": -10707896,
"heapUsedBytes": 53602428,
"domNodes": 18,
"jsHeapTotalBytes": 25952256,
"scriptDurationMs": 126.95499999999998,
"eventListeners": 8,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.66333333333335,
"p95FrameDurationMs": 16.699999999999818
},
{
"name": "subgraph-dom-widget-clipping",
"durationMs": 589.2840000000206,
"styleRecalcs": 46,
"styleRecalcDurationMs": 9.673999999999998,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 399.96099999999996,
"heapDeltaBytes": -10933972,
"heapUsedBytes": 53314336,
"domNodes": 18,
"jsHeapTotalBytes": 26214400,
"scriptDurationMs": 121.77399999999999,
"eventListeners": 6,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.666666666666668,
"p95FrameDurationMs": 16.700000000000728
},
{
"name": "subgraph-idle",
"durationMs": 2006.6790000000196,
"styleRecalcs": 9,
"styleRecalcDurationMs": 8.771,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 518.751,
"heapDeltaBytes": 5261080,
"heapUsedBytes": 69580164,
"domNodes": 18,
"jsHeapTotalBytes": 25165824,
"scriptDurationMs": 19.130000000000003,
"eventListeners": 4,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.666666666666668,
"p95FrameDurationMs": 16.699999999999818
},
{
"name": "subgraph-idle",
"durationMs": 2013.8980000000402,
"styleRecalcs": 10,
"styleRecalcDurationMs": 8.985,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 492.603,
"heapDeltaBytes": 5447184,
"heapUsedBytes": 69798844,
"domNodes": 20,
"jsHeapTotalBytes": 24641536,
"scriptDurationMs": 15.435,
"eventListeners": 4,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.666666666666668,
"p95FrameDurationMs": 16.800000000000182
},
{
"name": "subgraph-mouse-sweep",
"durationMs": 1747.2799999999893,
"styleRecalcs": 76,
"styleRecalcDurationMs": 40.347,
"layouts": 16,
"layoutDurationMs": 4.882,
"taskDurationMs": 831.274,
"heapDeltaBytes": -3999012,
"heapUsedBytes": 60160516,
"domNodes": 63,
"jsHeapTotalBytes": 24641536,
"scriptDurationMs": 97.238,
"eventListeners": 4,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.666666666666668,
"p95FrameDurationMs": 16.700000000000728
},
{
"name": "subgraph-mouse-sweep",
"durationMs": 1789.3679999999677,
"styleRecalcs": 78,
"styleRecalcDurationMs": 43.547999999999995,
"layouts": 16,
"layoutDurationMs": 5.083,
"taskDurationMs": 875.023,
"heapDeltaBytes": -17563824,
"heapUsedBytes": 46596480,
"domNodes": -279,
"jsHeapTotalBytes": 22532096,
"scriptDurationMs": 98.288,
"eventListeners": -153,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.666666666666668,
"p95FrameDurationMs": 16.800000000000182
},
{
"name": "subgraph-transition-enter",
"durationMs": 1417.9399999999873,
"styleRecalcs": 18,
"styleRecalcDurationMs": 31.910999999999994,
"layouts": 14,
"layoutDurationMs": 12.533,
"taskDurationMs": 1033.8100000000002,
"heapDeltaBytes": 32921972,
"heapUsedBytes": 99405052,
"domNodes": 13673,
"jsHeapTotalBytes": 13369344,
"scriptDurationMs": 39.62900000000001,
"eventListeners": 2375,
"totalBlockingTimeMs": 129,
"frameDurationMs": 16.666666666666668,
"p95FrameDurationMs": 16.700000000000728
},
{
"name": "viewport-pan-sweep",
"durationMs": 8368.191999999965,
"styleRecalcs": 250,
"styleRecalcDurationMs": 43.105000000000004,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 4786.344,
"heapDeltaBytes": -11849444,
"heapUsedBytes": 69819180,
"domNodes": -281,
"jsHeapTotalBytes": 8278016,
"scriptDurationMs": 1370.211,
"eventListeners": -133,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.66333333333332,
"p95FrameDurationMs": 16.700000000000728
},
{
"name": "viewport-pan-sweep",
"durationMs": 8266.441999999985,
"styleRecalcs": 248,
"styleRecalcDurationMs": 40.524,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 4471.298,
"heapDeltaBytes": 11116532,
"heapUsedBytes": 70982584,
"domNodes": -282,
"jsHeapTotalBytes": 5025792,
"scriptDurationMs": 1322.312,
"eventListeners": -133,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.666666666666668,
"p95FrameDurationMs": 16.700000000000728
},
{
"name": "vue-large-graph-idle",
"durationMs": 18195.734000000015,
"styleRecalcs": 0,
"styleRecalcDurationMs": 0,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 18163.695999999996,
"heapDeltaBytes": -40069872,
"heapUsedBytes": 165505372,
"domNodes": -8312,
"jsHeapTotalBytes": -9375744,
"scriptDurationMs": 592.7099999999999,
"eventListeners": -16387,
"totalBlockingTimeMs": 7,
"frameDurationMs": 18.890000000000025,
"p95FrameDurationMs": 16.799999999999272
},
{
"name": "vue-large-graph-idle",
"durationMs": 18104.550000000017,
"styleRecalcs": 0,
"styleRecalcDurationMs": 0,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 18083.780000000002,
"heapDeltaBytes": -39078024,
"heapUsedBytes": 167552180,
"domNodes": -8312,
"jsHeapTotalBytes": -10428416,
"scriptDurationMs": 574.3119999999999,
"eventListeners": -16385,
"totalBlockingTimeMs": 0,
"frameDurationMs": 18.333333333333332,
"p95FrameDurationMs": 16.799999999999272
},
{
"name": "vue-large-graph-pan",
"durationMs": 22770.47600000003,
"styleRecalcs": 166,
"styleRecalcDurationMs": 26.48499999999998,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 22734.662,
"heapDeltaBytes": -45364728,
"heapUsedBytes": 153811756,
"domNodes": -8312,
"jsHeapTotalBytes": -9084928,
"scriptDurationMs": 949.7750000000001,
"eventListeners": -16377,
"totalBlockingTimeMs": 774,
"frameDurationMs": 18.886666666666617,
"p95FrameDurationMs": 16.700000000000728
},
{
"name": "vue-large-graph-pan",
"durationMs": 22364.11900000007,
"styleRecalcs": 161,
"styleRecalcDurationMs": 23.708000000000006,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 22338.647999999997,
"heapDeltaBytes": -37804240,
"heapUsedBytes": 168382100,
"domNodes": -8312,
"jsHeapTotalBytes": -7020544,
"scriptDurationMs": 908.933,
"eventListeners": -16383,
"totalBlockingTimeMs": 710,
"frameDurationMs": 18.330000000000048,
"p95FrameDurationMs": 16.799999999999272
},
{
"name": "workflow-execution",
"durationMs": 466.32300000004534,
"styleRecalcs": 13,
"styleRecalcDurationMs": 21.169999999999998,
"layouts": 3,
"layoutDurationMs": 0.678,
"taskDurationMs": 126.27199999999999,
"heapDeltaBytes": 5309676,
"heapUsedBytes": 68333648,
"domNodes": 132,
"jsHeapTotalBytes": 5242880,
"scriptDurationMs": 10.887999999999998,
"eventListeners": 99,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.66333333333332,
"p95FrameDurationMs": 16.700000000000728
},
{
"name": "workflow-execution",
"durationMs": 452.3379999999406,
"styleRecalcs": 13,
"styleRecalcDurationMs": 18.348000000000003,
"layouts": 2,
"layoutDurationMs": 0.402,
"taskDurationMs": 102.75099999999999,
"heapDeltaBytes": 5069088,
"heapUsedBytes": 68067260,
"domNodes": 123,
"jsHeapTotalBytes": 5767168,
"scriptDurationMs": 9.225000000000001,
"eventListeners": 97,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.666666666666668,
"p95FrameDurationMs": 16.799999999999272
}
]
} |
Codecov Report✅ All modified and coverable lines are covered by tests. @@ Coverage Diff @@
## main #14678 +/- ##
========================================
Coverage 78.46% 78.46%
========================================
Files 1790 1790
Lines 105382 105387 +5
Branches 32178 33055 +877
========================================
+ Hits 82683 82688 +5
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:
|
|
Recording why this is closed, since it went out without a note and @MaanilVerma was the assignee. The need was real: That need is covered by a documented reset instead of a shipped setting — the dev-console snippet in First-run tour — reset to new-user state. It clears both server-side gates ( So the tradeoff is deliberate: a documented reset costs nothing in shipped surface area, and a hidden production setting whose only purpose is to re-trigger onboarding is a setting we would have to keep working forever. What is genuinely lost: the reset is cloud-only and manual. |
Summary
Adds a hidden per-user setting
Comfy.EmulateNewUserthat makes the app treat the account as brand new, so first-run onboarding can be re-tested without hand-clearing state.The problem
Re-testing onboarding today means pasting a console snippet to clear
Comfy.TutorialCompleted, the legacyworkflow/Comfy.PreviousWorkflowkeys, the V1 draft keys andComfy.Workflow.DraftIndex.v2:personal, then reloading. Because the setting write and the localStorage clear race the persist layer, testers typically have to reload twice before it takes. Everyone rediscovers the incantation, and everyone gets it slightly wrong.Why a setting, and not the two obvious alternatives
src/utils/devFeatureFlagOverride.tsopens withif (!import.meta.env.DEV) return undefinedand is stripped from production builds — it is inert on testcloud and staging, which is exactly where onboarding gets tested.FrontendFeatureFlagsis per-environment and shared; ephemeral envs share the dynamicconfig row, so flipping it would put every testcloud user into emulation at once.type: 'hidden'is established incoreSettings.ts(Comfy.TutorialCompleteditself is one), andComfy.DevModeis precedent for a tester-facing toggle.Changes
Comfy.EmulateNewUser(defaultfalse);checkIsNewUser()returnstruewhen it is on;handleStartupOutcomerelaxes its two early bails when it is on;initializeIfNewUser()skips theComfy.InstalledVersionwrite when it is on.Review focus — the two decisions
The
restoredinteraction: relaxed, deliberatelyForcing
checkIsNewUser()to returntrueis not sufficient on its own.handleStartupOutcomebails twice before candidacy is ever consulted:Every tester who has already run onboarding once has both a draft to restore and
TutorialCompleted === true. Under a candidacy-only implementation they would flip the setting, reload, get a blank canvas, and conclude the feature is broken — the exact confusing half-state this is meant to remove.So emulation short-circuits both guards rather than one. The alternative — document it as "requires clean draft state" — was rejected because it puts the manual state-clearing back in, which is the thing being replaced.
Consequence worth arguing about: with
restoredrelaxed, a tester who is not a first-run candidate (not cloud, below themdbreakpoint, subscription disabled, tour flag off) now falls through tomarkTutorialCompleted()+Comfy.BrowseTemplatesover their restored workflow. That is defensible for an opt-in per-user setting — you asked to be treated as new — but it is a real behaviour change for the person who flips it, and it is the part I'd most like a second opinion on.Comfy.InstalledVersion: not written during emulationinitializeIfNewUser()writesComfy.InstalledVersionfor genuine new users. Emulation skips that write.InstalledVersionis a one-way marker that feedsdefaultsByInstallVersioninsettingStore.getVersionedDefaultValue— including the Nodes 2.0 gate,defaultsByInstallVersion: { '1.41.0': isCloud || isDesktop }onComfy.VueNodes.Enabled. Overwriting a real account's recorded install version would outlive the emulation: turning the setting back off would not restore it, and the account's versioned defaults would have silently changed.The cost of that choice: emulation does not reproduce the version-gated defaults a genuinely new account receives. If testing those matters, it should be a separate, explicit action rather than a side effect of this toggle.
Not verified
initializeIfNewUser()runs is unconfirmed on testcloud.checkIsNewUser()'s verdict is cached (isNewUserDetermined/isNewUserCached), so the setting is read once per load — flipping it requires a reload. That matches every other input to that function and seems right, but it is a deliberate limitation, not an oversight.dismissGettingStarted()still writesComfy.TutorialCompleted = truewhile emulating. Harmless (emulation ignores it next load, so re-testing stays repeatable) but it does mean emulation is not perfectly read-only.type: 'hidden'implies — testers set it through the settings API or the hidden-settings path, same asComfy.TutorialCompleted.Tests
src/services/useNewUserService.test.ts— emulation on makes an account with a completed tutorial and existing drafts read as new;InstalledVersionis left alone; init callbacks still run; emulation off changes nothing.src/renderer/extensions/firstRunTour/gettingStarted/firstRunEntry.test.ts— emulation onboards over arestoredstartup; with it off therestoredguard still holds.The three emulation-on assertions were confirmed to fail against unmodified source before the implementation was applied; the emulation-off assertions pass either way by design, as regression guards.
Quality gates
Pre-commit hooks were bypassed (they fail on node 25 in this environment), so the gates were run manually instead:
pnpm format:check,pnpm lint,pnpm typecheckall pass, andpnpm test:unitoversrc/services/useNewUserService.test.ts,src/renderer/extensions/firstRunTour/gettingStarted/firstRunEntry.test.tsandsrc/platform/settingspasses (153 tests).pnpm knipwas not run; this change adds no new exports.