Repository navigation
test(router): drive the legacy /login redirect through the cloud-login guard - #15058
Conversation
…n guard The redirect tests added with the /login fix abort navigation in a global guard, so they prove the route table resolves the path but never enter the destination. The reported failure was a user completing that journey, so the part that was never exercised is the part that broke. Adds a navigation helper that stubs view components while leaving names, paths, meta, redirects and beforeEnter intact, and covers the signed-out, signed-in and switchAccount paths through the redirect. Also ports the repeated-query-key case from the parallel fix in #15022. Note that vue-router carries query and hash across a redirect on its own, so the explicit passthrough in the route record is belt and braces; what these cases actually pin is that nobody replaces the query with a hand-built one, which would flatten repeated keys. Co-Authored-By: dante01yoon <6510430+dante01yoon@users.noreply.github.com>
|
Warning Review limit reachedYou’ve reached a temporary PR review limit under our Fair Usage Limits Policy. Next review available in: 36 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)
Comment |
🎨 Storybook: ✅ Built — View Storybook🎭 Playwright: ✅ 1802 passed, 0 failed · 3 flaky📊 Browser Reports
📦 Bundle: 8.69 MB gzip ⚪ 0 BDetailsSummary
Category Glance App Entry Points — 3.67 kB (baseline 3.67 kB) • ⚪ 0 BMain entry bundles and manifests Status: 1 unchanged Graph Workspace — 1.36 MB (baseline 1.36 MB) • ⚪ 0 BGraph editor runtime, canvas, workflow orchestration Status: 3 unchanged Views & Navigation — 124 kB (baseline 124 kB) • ⚪ 0 BTop-level views, pages, and routed surfaces Status: 17 unchanged Panels & Settings — 565 kB (baseline 565 kB) • ⚪ 0 BConfiguration panels, inspectors, and settings screens Status: 26 unchanged User & Accounts — 27 kB (baseline 27 kB) • ⚪ 0 BAuthentication, profile, and account management bundles Status: 10 unchanged Editors & Dialogs — 125 kB (baseline 125 kB) • ⚪ 0 BModals, dialogs, drawers, and in-app editors Status: 8 unchanged UI Components — 67.1 kB (baseline 67.1 kB) • ⚪ 0 BReusable component library chunks Status: 14 unchanged Data & Services — 3.5 MB (baseline 3.5 MB) • ⚪ 0 BStores, services, APIs, and repositories Status: 17 unchanged Utilities & Hooks — 550 kB (baseline 550 kB) • ⚪ 0 BHelpers, composables, and utility bundles Status: 38 unchanged Vendor & Third-Party — 16.3 MB (baseline 16.3 MB) • ⚪ 0 BExternal libraries and shared vendor chunks Status: 17 unchanged Other — 14 MB (baseline 14 MB) • ⚪ 0 BBundles that do not match a named category Status: 285 unchanged ⚡ Performance Report
Show regressions
All metrics
Historical variance (last 15 runs)
Trend (last 15 commits on main)
Raw data{
"timestamp": "2026-08-12T00:29:51.138Z",
"gitSha": "6c00d644169aadd0ef8f3f335c0f3f40f19b1580",
"branch": "matt/login-redirect-test-coverage",
"measurements": [
{
"name": "canvas-idle",
"durationMs": 2042.2920000000317,
"styleRecalcs": 9,
"styleRecalcDurationMs": 8.531999999999998,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 495.48900000000003,
"heapDeltaBytes": 5785036,
"heapUsedBytes": 70305484,
"domNodes": 18,
"jsHeapTotalBytes": 25165824,
"scriptDurationMs": 20.038,
"eventListeners": 4,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.66333333333332,
"p95FrameDurationMs": 16.700000000000728
},
{
"name": "canvas-idle",
"durationMs": 2048.460000000091,
"styleRecalcs": 10,
"styleRecalcDurationMs": 9.302000000000001,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 498.431,
"heapDeltaBytes": 5886416,
"heapUsedBytes": 70327168,
"domNodes": 20,
"jsHeapTotalBytes": 24379392,
"scriptDurationMs": 21.041,
"eventListeners": 4,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.666666666666668,
"p95FrameDurationMs": 16.800000000000182
},
{
"name": "canvas-mouse-sweep",
"durationMs": 2020.8959999999934,
"styleRecalcs": 78,
"styleRecalcDurationMs": 43.202,
"layouts": 12,
"layoutDurationMs": 3.3400000000000003,
"taskDurationMs": 1027.5939999999998,
"heapDeltaBytes": -12848168,
"heapUsedBytes": 51535196,
"domNodes": -279,
"jsHeapTotalBytes": 24616960,
"scriptDurationMs": 138.026,
"eventListeners": -151,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.666666666666668,
"p95FrameDurationMs": 16.700000000000728
},
{
"name": "canvas-mouse-sweep",
"durationMs": 1857.5029999999515,
"styleRecalcs": 75,
"styleRecalcDurationMs": 34.982,
"layouts": 12,
"layoutDurationMs": 3.5439999999999996,
"taskDurationMs": 874.077,
"heapDeltaBytes": -12025908,
"heapUsedBytes": 52336524,
"domNodes": -281,
"jsHeapTotalBytes": 23044096,
"scriptDurationMs": 123.968,
"eventListeners": -153,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.670000000000012,
"p95FrameDurationMs": 16.800000000000182
},
{
"name": "canvas-zoom-sweep",
"durationMs": 1753.7120000000073,
"styleRecalcs": 33,
"styleRecalcDurationMs": 19.819999999999997,
"layouts": 6,
"layoutDurationMs": 0.5919999999999999,
"taskDurationMs": 404.48999999999995,
"heapDeltaBytes": 8769136,
"heapUsedBytes": 73172644,
"domNodes": 79,
"jsHeapTotalBytes": 24117248,
"scriptDurationMs": 22.714000000000002,
"eventListeners": 19,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.66333333333335,
"p95FrameDurationMs": 16.699999999999818
},
{
"name": "canvas-zoom-sweep",
"durationMs": 1754.4900000000325,
"styleRecalcs": 32,
"styleRecalcDurationMs": 18.049999999999997,
"layouts": 6,
"layoutDurationMs": 0.606,
"taskDurationMs": 392.93,
"heapDeltaBytes": 8749816,
"heapUsedBytes": 73179948,
"domNodes": 77,
"jsHeapTotalBytes": 24641536,
"scriptDurationMs": 20.770999999999997,
"eventListeners": 19,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.66333333333335,
"p95FrameDurationMs": 16.800000000000182
},
{
"name": "dom-widget-clipping",
"durationMs": 606.1799999999948,
"styleRecalcs": 10,
"styleRecalcDurationMs": 8.009,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 392.5710000000001,
"heapDeltaBytes": -11356396,
"heapUsedBytes": 53168584,
"domNodes": 16,
"jsHeapTotalBytes": 25690112,
"scriptDurationMs": 62.042,
"eventListeners": 2,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.666666666666668,
"p95FrameDurationMs": 16.699999999999818
},
{
"name": "dom-widget-clipping",
"durationMs": 584.7589999999627,
"styleRecalcs": 11,
"styleRecalcDurationMs": 7.061000000000002,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 386.69100000000003,
"heapDeltaBytes": -11116448,
"heapUsedBytes": 53226508,
"domNodes": 18,
"jsHeapTotalBytes": 25952256,
"scriptDurationMs": 61.24100000000001,
"eventListeners": 0,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.666666666666668,
"p95FrameDurationMs": 16.800000000000182
},
{
"name": "large-graph-idle",
"durationMs": 2021.5519999999856,
"styleRecalcs": 9,
"styleRecalcDurationMs": 9.034999999999998,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 685.7370000000001,
"heapDeltaBytes": 6695556,
"heapUsedBytes": 66287880,
"domNodes": -281,
"jsHeapTotalBytes": 3248128,
"scriptDurationMs": 107.31599999999999,
"eventListeners": -149,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.666666666666668,
"p95FrameDurationMs": 16.800000000000182
},
{
"name": "large-graph-idle",
"durationMs": 2012.5309999999672,
"styleRecalcs": 8,
"styleRecalcDurationMs": 7.882,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 686.9000000000001,
"heapDeltaBytes": 7077276,
"heapUsedBytes": 67527012,
"domNodes": -282,
"jsHeapTotalBytes": 2461696,
"scriptDurationMs": 108.89599999999999,
"eventListeners": -147,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.66333333333332,
"p95FrameDurationMs": 16.800000000000182
},
{
"name": "large-graph-pan",
"durationMs": 2245.2840000000265,
"styleRecalcs": 69,
"styleRecalcDurationMs": 15.075999999999995,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 1352.042,
"heapDeltaBytes": 1269360,
"heapUsedBytes": 61912984,
"domNodes": -285,
"jsHeapTotalBytes": 3964928,
"scriptDurationMs": 461.053,
"eventListeners": -177,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.66999999999998,
"p95FrameDurationMs": 16.800000000000182
},
{
"name": "large-graph-pan",
"durationMs": 2291.9749999999794,
"styleRecalcs": 68,
"styleRecalcDurationMs": 14.070999999999996,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 1395.464,
"heapDeltaBytes": 4870988,
"heapUsedBytes": 65326584,
"domNodes": -285,
"jsHeapTotalBytes": 3702784,
"scriptDurationMs": 457.92299999999994,
"eventListeners": -149,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.666666666666668,
"p95FrameDurationMs": 16.699999999999818
},
{
"name": "large-graph-zoom",
"durationMs": 3214.7559999999658,
"styleRecalcs": 64,
"styleRecalcDurationMs": 14.38,
"layouts": 60,
"layoutDurationMs": 7.385999999999999,
"taskDurationMs": 1555.416,
"heapDeltaBytes": -1868924,
"heapUsedBytes": 60214464,
"domNodes": -290,
"jsHeapTotalBytes": 6393856,
"scriptDurationMs": 548.4680000000001,
"eventListeners": -153,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.670000000000012,
"p95FrameDurationMs": 16.800000000000182
},
{
"name": "large-graph-zoom",
"durationMs": 3310.8819999999923,
"styleRecalcs": 64,
"styleRecalcDurationMs": 14.030000000000001,
"layouts": 60,
"layoutDurationMs": 7.481999999999999,
"taskDurationMs": 1598.8100000000004,
"heapDeltaBytes": 2291456,
"heapUsedBytes": 64601080,
"domNodes": -289,
"jsHeapTotalBytes": 6656000,
"scriptDurationMs": 562.523,
"eventListeners": -153,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.666666666666668,
"p95FrameDurationMs": 16.800000000000182
},
{
"name": "minimap-idle",
"durationMs": 2029.6880000000215,
"styleRecalcs": 7,
"styleRecalcDurationMs": 7.058999999999999,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 725.0239999999999,
"heapDeltaBytes": 6414076,
"heapUsedBytes": 67275136,
"domNodes": -285,
"jsHeapTotalBytes": 3510272,
"scriptDurationMs": 119.12,
"eventListeners": -179,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.666666666666668,
"p95FrameDurationMs": 16.800000000000182
},
{
"name": "minimap-idle",
"durationMs": 2028.735000000097,
"styleRecalcs": 7,
"styleRecalcDurationMs": 6.659000000000002,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 765.7019999999999,
"heapDeltaBytes": 6659004,
"heapUsedBytes": 67197400,
"domNodes": -285,
"jsHeapTotalBytes": 3510272,
"scriptDurationMs": 127.37200000000001,
"eventListeners": -147,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.66999999999998,
"p95FrameDurationMs": 16.699999999999818
},
{
"name": "subgraph-dom-widget-clipping",
"durationMs": 575.5419999999845,
"styleRecalcs": 46,
"styleRecalcDurationMs": 10,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 393.96600000000007,
"heapDeltaBytes": -10364700,
"heapUsedBytes": 53830892,
"domNodes": 18,
"jsHeapTotalBytes": 25952256,
"scriptDurationMs": 120.10399999999998,
"eventListeners": 6,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.666666666666668,
"p95FrameDurationMs": 16.700000000000728
},
{
"name": "subgraph-dom-widget-clipping",
"durationMs": 625.4950000000008,
"styleRecalcs": 48,
"styleRecalcDurationMs": 13.26,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 422.256,
"heapDeltaBytes": -10871968,
"heapUsedBytes": 53465452,
"domNodes": 22,
"jsHeapTotalBytes": 25952256,
"scriptDurationMs": 123.899,
"eventListeners": 6,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.66333333333332,
"p95FrameDurationMs": 16.700000000000728
},
{
"name": "subgraph-idle",
"durationMs": 2006.0459999999694,
"styleRecalcs": 9,
"styleRecalcDurationMs": 8.271,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 492.318,
"heapDeltaBytes": -17545808,
"heapUsedBytes": 47003312,
"domNodes": -282,
"jsHeapTotalBytes": 22519808,
"scriptDurationMs": 13.156,
"eventListeners": -153,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.666666666666668,
"p95FrameDurationMs": 16.700000000000728
},
{
"name": "subgraph-idle",
"durationMs": 2054.573000000005,
"styleRecalcs": 10,
"styleRecalcDurationMs": 9.087000000000002,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 529.438,
"heapDeltaBytes": -17764784,
"heapUsedBytes": 46711728,
"domNodes": -278,
"jsHeapTotalBytes": 23830528,
"scriptDurationMs": 17.467999999999996,
"eventListeners": -153,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.666666666666668,
"p95FrameDurationMs": 16.700000000000728
},
{
"name": "subgraph-mouse-sweep",
"durationMs": 1722.752000000014,
"styleRecalcs": 78,
"styleRecalcDurationMs": 36.946999999999996,
"layouts": 16,
"layoutDurationMs": 4.152,
"taskDurationMs": 829.711,
"heapDeltaBytes": -16386272,
"heapUsedBytes": 48054672,
"domNodes": -281,
"jsHeapTotalBytes": 22781952,
"scriptDurationMs": 95.241,
"eventListeners": -153,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.66333333333332,
"p95FrameDurationMs": 16.800000000000182
},
{
"name": "subgraph-mouse-sweep",
"durationMs": 1768.9080000000104,
"styleRecalcs": 78,
"styleRecalcDurationMs": 39.980000000000004,
"layouts": 16,
"layoutDurationMs": 4.6979999999999995,
"taskDurationMs": 846.114,
"heapDeltaBytes": -16952356,
"heapUsedBytes": 47389740,
"domNodes": -278,
"jsHeapTotalBytes": 23568384,
"scriptDurationMs": 97.07300000000001,
"eventListeners": -153,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.666666666666668,
"p95FrameDurationMs": 16.700000000000728
},
{
"name": "subgraph-transition-enter",
"durationMs": 1435.877000000005,
"styleRecalcs": 18,
"styleRecalcDurationMs": 30.787999999999997,
"layouts": 14,
"layoutDurationMs": 13.196000000000003,
"taskDurationMs": 1027.168,
"heapDeltaBytes": 3877652,
"heapUsedBytes": 76598244,
"domNodes": 13673,
"jsHeapTotalBytes": 15466496,
"scriptDurationMs": 43.848,
"eventListeners": 2375,
"totalBlockingTimeMs": 153,
"frameDurationMs": 16.66333333333335,
"p95FrameDurationMs": 16.700000000000728
},
{
"name": "viewport-pan-sweep",
"durationMs": 8354.959000000008,
"styleRecalcs": 249,
"styleRecalcDurationMs": 36.844,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 4571.015,
"heapDeltaBytes": 11643120,
"heapUsedBytes": 71176436,
"domNodes": -284,
"jsHeapTotalBytes": 5537792,
"scriptDurationMs": 1389.211,
"eventListeners": -131,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.666666666666668,
"p95FrameDurationMs": 16.700000000000728
},
{
"name": "viewport-pan-sweep",
"durationMs": 8450.263999999948,
"styleRecalcs": 251,
"styleRecalcDurationMs": 38.656,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 4734.557000000001,
"heapDeltaBytes": 14121548,
"heapUsedBytes": 72909148,
"domNodes": -280,
"jsHeapTotalBytes": 4751360,
"scriptDurationMs": 1441.02,
"eventListeners": -131,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.66333333333332,
"p95FrameDurationMs": 16.799999999999272
},
{
"name": "vue-large-graph-idle",
"durationMs": 17246.0870000001,
"styleRecalcs": 0,
"styleRecalcDurationMs": 0,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 17220.59,
"heapDeltaBytes": -60736832,
"heapUsedBytes": 167004504,
"domNodes": -8312,
"jsHeapTotalBytes": -10428416,
"scriptDurationMs": 539.784,
"eventListeners": -16385,
"totalBlockingTimeMs": 0,
"frameDurationMs": 17.776666666666763,
"p95FrameDurationMs": 16.799999999999272
},
{
"name": "vue-large-graph-idle",
"durationMs": 17179.07300000002,
"styleRecalcs": 0,
"styleRecalcDurationMs": 0,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 17159.600000000002,
"heapDeltaBytes": -46260356,
"heapUsedBytes": 170786604,
"domNodes": -8312,
"jsHeapTotalBytes": -3608576,
"scriptDurationMs": 604.871,
"eventListeners": -16389,
"totalBlockingTimeMs": 0,
"frameDurationMs": 17.77333333333336,
"p95FrameDurationMs": 16.700000000000728
},
{
"name": "vue-large-graph-pan",
"durationMs": 21688.42600000005,
"styleRecalcs": 152,
"styleRecalcDurationMs": 21.733999999999977,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 21660.385000000002,
"heapDeltaBytes": -29539436,
"heapUsedBytes": 176495736,
"domNodes": -8312,
"jsHeapTotalBytes": -8921088,
"scriptDurationMs": 920.9239999999999,
"eventListeners": -16381,
"totalBlockingTimeMs": 364,
"frameDurationMs": 17.776666666666642,
"p95FrameDurationMs": 16.80000000000291
},
{
"name": "vue-large-graph-pan",
"durationMs": 21012.620000000083,
"styleRecalcs": 145,
"styleRecalcDurationMs": 18.674000000000024,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 20953.773,
"heapDeltaBytes": -43498912,
"heapUsedBytes": 179016488,
"domNodes": -8312,
"jsHeapTotalBytes": -7876608,
"scriptDurationMs": 954.531,
"eventListeners": -16381,
"totalBlockingTimeMs": 306,
"frameDurationMs": 18.333333333333332,
"p95FrameDurationMs": 16.799999999999272
},
{
"name": "workflow-execution",
"durationMs": 452.7100000000246,
"styleRecalcs": 14,
"styleRecalcDurationMs": 19.831,
"layouts": 3,
"layoutDurationMs": 0.6930000000000001,
"taskDurationMs": 118.249,
"heapDeltaBytes": 5059164,
"heapUsedBytes": 68547360,
"domNodes": 128,
"jsHeapTotalBytes": 4718592,
"scriptDurationMs": 10.181000000000001,
"eventListeners": 99,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.66333333333332,
"p95FrameDurationMs": 16.800000000000182
},
{
"name": "workflow-execution",
"durationMs": 488.8740000000098,
"styleRecalcs": 18,
"styleRecalcDurationMs": 24.34,
"layouts": 3,
"layoutDurationMs": 1.6170000000000002,
"taskDurationMs": 132.349,
"heapDeltaBytes": 5168028,
"heapUsedBytes": 68672284,
"domNodes": 147,
"jsHeapTotalBytes": 4980736,
"scriptDurationMs": 11.459999999999999,
"eventListeners": 97,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.66999999999998,
"p95FrameDurationMs": 16.699999999999818
}
]
} |
Codecov Report✅ All modified and coverable lines are covered by tests. @@ Coverage Diff @@
## main #15058 +/- ##
==========================================
- Coverage 80.85% 80.79% -0.07%
==========================================
Files 1873 1873
Lines 121884 122030 +146
Branches 37442 37974 +532
==========================================
+ Hits 98551 98593 +42
- Misses 22800 22892 +92
- Partials 533 545 +12
Flags with carried forward coverage won't be shown. Click here to find out more. 🚀 New features to boost your workflow:
|
There was a problem hiding this comment.
🔍 Cursor Review — Consolidated panel
Triggered by @mattmillerai.
Found 4 finding(s).
| Severity | Count |
|---|---|
| 🟢 Low | 2 |
| ⚪ Nit | 2 |
Panel: 8/8 reviewers contributed findings.
Review follow-ups on the /login guard coverage. `router.push` resolves with a NavigationFailure rather than throwing, and completeNavigation discarded it, so a guard that aborted would have surfaced as a confusing currentRoute mismatch. Assert it instead, and drop the isReady() call, which was a no-op after an awaited push. stubViews substituted only the singular `component` key, so a route using named views would have compiled its real loaders inside the test body, the cost the helper exists to avoid. isLoggedIn is module-scope state reset only in the describe that flips it, and the last test left it true. Reset it file-wide instead.
Summary
Follow-up test coverage for the legacy
/loginredirect landed in #15026, driving the redirect through the realcloud-loginguard instead of stopping at route resolution.Changes
completeNavigation, a helper that runs navigation to completion against the real route table with view components swapped for render-null stubs, so names, paths, meta, redirects andbeforeEnterall stay intact. Covers three journeys through/login: signed-out lands on the login view, signed-in is forwarded past it, andswitchAccountleaves the guard inert. Also ports the repeated-query-key case from the parallel fix in Fix legacy Cloud login route #15022, contributed by @dante01yoon.Review Focus
The existing
attemptNavigationhelper aborts in a globalbeforeEach, which is what keeps it cheap, but it means navigation never reaches a per-routebeforeEnter. Every redirect assertion we had stopped one step short of the destination actually being entered. The reported failure was someone completing that journey, so the untested step was the interesting one.Worth knowing for anyone reading the route record: vue-router carries query and hash across a redirect by default. The explicit
query: to.query, hash: to.hashin the record restates the default rather than providing it. I verified this by mutation, stripping the passthrough entirely leaves every existing assertion passing. I have deliberately left the code as-is, since it is harmless and reads as intent, but it should not be mistaken for load-bearing.That does mean the query assertions are narrower than they look. What they genuinely catch is someone replacing the redirect with a hand-built query, which flattens repeated keys. Substituting an explicit
query: { only: 'this' }fails three of these tests immediately, so the guard is real, just narrower than "preserves the query" suggests.Mutation results for the whole file, since tests that cannot fail are decoration:
/loginrecordquery/hashfrom the redirectELI5
Opening
cloud.comfy.org/loginused to hang forever, because the app had no/loginpage registered and just sat there looking for one. That was fixed by pointing/loginat the real sign-in page.The tests that shipped with that fix checked that the signpost points the right way. They did not check that you can actually walk through the door it points at, because they stopped the moment the direction was known. The original bug was someone walking through the door, so this adds tests that make the whole trip.
There are three trips worth making: a logged-out visitor should arrive at the sign-in page, a logged-in visitor should be sent onward rather than asked to sign in again, and someone deliberately switching accounts should be left alone at the sign-in page even though they are already logged in. All three now have tests.
While writing them I checked whether the tests could actually fail, by deliberately breaking the redirect in three different ways and confirming the right tests complained each time. One of those experiments turned up something worth recording: part of the original fix is redundant, because the router already does that work by default. It is harmless and I have left it alone, but the note above means the next person will not assume it is doing something it is not.