Repository navigation
fix: isolate workflow state across auth transitions - #14266
Conversation
📄 Knowledge reviewDosu skipped reviewing this PR because your organization has used its |
🎨 Storybook: ✅ Built — View Storybook🎭 Playwright: ✅ 1759 passed, 0 failed📊 Browser Reports
📦 Bundle: 8.14 MB gzip 🔴 +138 BDetailsSummary
Category Glance App Entry Points — 3.63 kB (baseline 3.63 kB) • ⚪ 0 BMain entry bundles and manifests
Status: 1 added / 1 removed Graph Workspace — 1.28 MB (baseline 1.28 MB) • ⚪ 0 BGraph editor runtime, canvas, workflow orchestration
Status: 1 added / 1 removed / 1 unchanged Views & Navigation — 112 kB (baseline 112 kB) • ⚪ 0 BTop-level views, pages, and routed surfaces
Status: 12 added / 12 removed / 4 unchanged Panels & Settings — 551 kB (baseline 551 kB) • ⚪ 0 BConfiguration panels, inspectors, and settings screens
Status: 11 added / 11 removed / 15 unchanged User & Accounts — 29.1 kB (baseline 29.1 kB) • ⚪ 0 BAuthentication, profile, and account management bundles
Status: 7 added / 7 removed / 3 unchanged Editors & Dialogs — 121 kB (baseline 121 kB) • ⚪ 0 BModals, dialogs, drawers, and in-app editors
Status: 5 added / 5 removed / 1 unchanged UI Components — 64.8 kB (baseline 64.8 kB) • ⚪ 0 BReusable component library chunks
Status: 6 added / 6 removed / 8 unchanged Data & Services — 3.42 MB (baseline 3.42 MB) • 🔴 +315 BStores, services, APIs, and repositories
Status: 14 added / 14 removed / 3 unchanged Utilities & Hooks — 369 kB (baseline 369 kB) • ⚪ 0 BHelpers, composables, and utility bundles
Status: 15 added / 15 removed / 20 unchanged Vendor & Third-Party — 15.7 MB (baseline 15.7 MB) • ⚪ 0 BExternal libraries and shared vendor chunks Status: 16 unchanged Other — 12.5 MB (baseline 12.5 MB) • ⚪ 0 BBundles that do not match a named category
Status: 68 added / 68 removed / 207 unchanged ⚡ Performance Report
Show regressions
All metrics
Historical variance (last 15 runs)
Trend (last 15 commits on main)
Raw data{
"timestamp": "2026-07-29T16:56:24.008Z",
"gitSha": "bfda741dbfea58e69575247482a8a620fcf1ff48",
"branch": "fix/workspace-state-isolation",
"measurements": [
{
"name": "canvas-idle",
"durationMs": 2103.8800000000037,
"styleRecalcs": 9,
"styleRecalcDurationMs": 7.760000000000002,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 537.032,
"heapDeltaBytes": 3664836,
"heapUsedBytes": 71629296,
"domNodes": 18,
"jsHeapTotalBytes": 20578304,
"scriptDurationMs": 24.433999999999997,
"eventListeners": 4,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.666666666666668,
"p95FrameDurationMs": 16.700000000000728
},
{
"name": "canvas-idle",
"durationMs": 2057.1009999999887,
"styleRecalcs": 10,
"styleRecalcDurationMs": 8.968,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 467.75500000000005,
"heapDeltaBytes": 3875084,
"heapUsedBytes": 71978852,
"domNodes": 20,
"jsHeapTotalBytes": 20054016,
"scriptDurationMs": 17.892,
"eventListeners": 4,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.66333333333332,
"p95FrameDurationMs": 16.800000000000182
},
{
"name": "canvas-mouse-sweep",
"durationMs": 2162.9039999999977,
"styleRecalcs": 82,
"styleRecalcDurationMs": 56.690999999999995,
"layouts": 12,
"layoutDurationMs": 4.845999999999999,
"taskDurationMs": 1128.2,
"heapDeltaBytes": -17734100,
"heapUsedBytes": 50227768,
"domNodes": -275,
"jsHeapTotalBytes": 20967424,
"scriptDurationMs": 135.05299999999997,
"eventListeners": -146,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.666666666666668,
"p95FrameDurationMs": 16.800000000000182
},
{
"name": "canvas-mouse-sweep",
"durationMs": 1905.5809999999838,
"styleRecalcs": 77,
"styleRecalcDurationMs": 38.457,
"layouts": 12,
"layoutDurationMs": 3.4109999999999996,
"taskDurationMs": 907.3030000000001,
"heapDeltaBytes": -16319972,
"heapUsedBytes": 51506092,
"domNodes": -272,
"jsHeapTotalBytes": 21753856,
"scriptDurationMs": 119.18900000000001,
"eventListeners": -148,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.666666666666668,
"p95FrameDurationMs": 16.799999999999272
},
{
"name": "canvas-zoom-sweep",
"durationMs": 1730.6159999999977,
"styleRecalcs": 30,
"styleRecalcDurationMs": 15.590000000000002,
"layouts": 6,
"layoutDurationMs": 0.7229999999999999,
"taskDurationMs": 374.963,
"heapDeltaBytes": 7117492,
"heapUsedBytes": 75194112,
"domNodes": 76,
"jsHeapTotalBytes": 20316160,
"scriptDurationMs": 18.567000000000004,
"eventListeners": 19,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.666666666666668,
"p95FrameDurationMs": 16.800000000000182
},
{
"name": "canvas-zoom-sweep",
"durationMs": 1772.546000000034,
"styleRecalcs": 31,
"styleRecalcDurationMs": 16.947999999999997,
"layouts": 6,
"layoutDurationMs": 0.6380000000000001,
"taskDurationMs": 380.363,
"heapDeltaBytes": 7234352,
"heapUsedBytes": 75182764,
"domNodes": 77,
"jsHeapTotalBytes": 19791872,
"scriptDurationMs": 18.669,
"eventListeners": 19,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.66333333333332,
"p95FrameDurationMs": 16.699999999999818
},
{
"name": "dom-widget-clipping",
"durationMs": 607.6610000000073,
"styleRecalcs": 12,
"styleRecalcDurationMs": 8.442000000000002,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 376.139,
"heapDeltaBytes": -12388944,
"heapUsedBytes": 55505524,
"domNodes": 20,
"jsHeapTotalBytes": 21889024,
"scriptDurationMs": 56.717,
"eventListeners": 2,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.66333333333335,
"p95FrameDurationMs": 16.800000000000182
},
{
"name": "dom-widget-clipping",
"durationMs": 610.3650000000016,
"styleRecalcs": 12,
"styleRecalcDurationMs": 8.412,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 402.271,
"heapDeltaBytes": -12062868,
"heapUsedBytes": 55833280,
"domNodes": 20,
"jsHeapTotalBytes": 21102592,
"scriptDurationMs": 58.909000000000006,
"eventListeners": 0,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.66333333333335,
"p95FrameDurationMs": 16.700000000000728
},
{
"name": "large-graph-idle",
"durationMs": 2015.5300000000125,
"styleRecalcs": 8,
"styleRecalcDurationMs": 7.357000000000003,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 671.1209999999999,
"heapDeltaBytes": 6080416,
"heapUsedBytes": 65028640,
"domNodes": -277,
"jsHeapTotalBytes": 4784128,
"scriptDurationMs": 92.52700000000002,
"eventListeners": -144,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.66333333333335,
"p95FrameDurationMs": 16.800000000000182
},
{
"name": "large-graph-idle",
"durationMs": 2027.5329999999485,
"styleRecalcs": 11,
"styleRecalcDurationMs": 8.878,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 710.318,
"heapDeltaBytes": 6427480,
"heapUsedBytes": 65101548,
"domNodes": -274,
"jsHeapTotalBytes": 4784128,
"scriptDurationMs": 105.087,
"eventListeners": -144,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.666666666666668,
"p95FrameDurationMs": 16.800000000000182
},
{
"name": "large-graph-pan",
"durationMs": 2166.5909999999826,
"styleRecalcs": 68,
"styleRecalcDurationMs": 13.737000000000002,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 1244.3600000000001,
"heapDeltaBytes": 5240412,
"heapUsedBytes": 65579396,
"domNodes": -279,
"jsHeapTotalBytes": 5251072,
"scriptDurationMs": 420.936,
"eventListeners": -142,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.666666666666668,
"p95FrameDurationMs": 16.799999999999272
},
{
"name": "large-graph-pan",
"durationMs": 2136.2229999999727,
"styleRecalcs": 68,
"styleRecalcDurationMs": 13.836000000000004,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 1220.961,
"heapDeltaBytes": 2086436,
"heapUsedBytes": 62141028,
"domNodes": -279,
"jsHeapTotalBytes": 4988928,
"scriptDurationMs": 396.551,
"eventListeners": -144,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.666666666666668,
"p95FrameDurationMs": 16.700000000000728
},
{
"name": "large-graph-zoom",
"durationMs": 3166.043000000002,
"styleRecalcs": 64,
"styleRecalcDurationMs": 14.377999999999998,
"layouts": 60,
"layoutDurationMs": 7.966000000000001,
"taskDurationMs": 1464.823,
"heapDeltaBytes": -5311956,
"heapUsedBytes": 56854364,
"domNodes": -283,
"jsHeapTotalBytes": 7143424,
"scriptDurationMs": 514,
"eventListeners": -148,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.66333333333335,
"p95FrameDurationMs": 16.700000000000728
},
{
"name": "large-graph-zoom",
"durationMs": 3230.0690000000714,
"styleRecalcs": 66,
"styleRecalcDurationMs": 16.04,
"layouts": 60,
"layoutDurationMs": 8.32,
"taskDurationMs": 1507.0079999999998,
"heapDeltaBytes": -512520,
"heapUsedBytes": 61315608,
"domNodes": -281,
"jsHeapTotalBytes": 8454144,
"scriptDurationMs": 531.608,
"eventListeners": -148,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.66333333333335,
"p95FrameDurationMs": 16.800000000000182
},
{
"name": "minimap-idle",
"durationMs": 2010.9850000000051,
"styleRecalcs": 7,
"styleRecalcDurationMs": 5.649000000000001,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 663.5509999999999,
"heapDeltaBytes": 6001212,
"heapUsedBytes": 66489548,
"domNodes": -278,
"jsHeapTotalBytes": 4259840,
"scriptDurationMs": 91.77999999999999,
"eventListeners": -144,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.666666666666668,
"p95FrameDurationMs": 16.800000000000182
},
{
"name": "minimap-idle",
"durationMs": 2026.9899999999552,
"styleRecalcs": 9,
"styleRecalcDurationMs": 8.303999999999998,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 758.1519999999999,
"heapDeltaBytes": 5836976,
"heapUsedBytes": 66533784,
"domNodes": -276,
"jsHeapTotalBytes": 5832704,
"scriptDurationMs": 120.237,
"eventListeners": -144,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.66333333333335,
"p95FrameDurationMs": 16.699999999999818
},
{
"name": "subgraph-dom-widget-clipping",
"durationMs": 592.81900000002,
"styleRecalcs": 47,
"styleRecalcDurationMs": 11.081999999999999,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 400.618,
"heapDeltaBytes": -12198728,
"heapUsedBytes": 55937364,
"domNodes": 20,
"jsHeapTotalBytes": 22151168,
"scriptDurationMs": 123.533,
"eventListeners": 6,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.666666666666668,
"p95FrameDurationMs": 16.799999999999272
},
{
"name": "subgraph-dom-widget-clipping",
"durationMs": 627.7979999999843,
"styleRecalcs": 47,
"styleRecalcDurationMs": 11.13,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 418.67299999999994,
"heapDeltaBytes": -11695796,
"heapUsedBytes": 56217548,
"domNodes": 20,
"jsHeapTotalBytes": 22151168,
"scriptDurationMs": 123.36500000000001,
"eventListeners": 6,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.666666666666668,
"p95FrameDurationMs": 16.800000000000182
},
{
"name": "subgraph-idle",
"durationMs": 2011.2180000000421,
"styleRecalcs": 11,
"styleRecalcDurationMs": 8.028999999999998,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 463.416,
"heapDeltaBytes": 3492000,
"heapUsedBytes": 70934584,
"domNodes": 22,
"jsHeapTotalBytes": 20840448,
"scriptDurationMs": 13.731,
"eventListeners": 4,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.666666666666668,
"p95FrameDurationMs": 16.800000000000182
},
{
"name": "subgraph-idle",
"durationMs": 1996.6010000000551,
"styleRecalcs": 10,
"styleRecalcDurationMs": 7.752999999999999,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 449.16900000000004,
"heapDeltaBytes": 3908072,
"heapUsedBytes": 72039040,
"domNodes": 20,
"jsHeapTotalBytes": 20054016,
"scriptDurationMs": 12.654,
"eventListeners": 4,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.666666666666668,
"p95FrameDurationMs": 16.700000000000728
},
{
"name": "subgraph-mouse-sweep",
"durationMs": 1706.8090000000211,
"styleRecalcs": 75,
"styleRecalcDurationMs": 34.7,
"layouts": 16,
"layoutDurationMs": 4.583,
"taskDurationMs": 802.706,
"heapDeltaBytes": -20331900,
"heapUsedBytes": 47588884,
"domNodes": -274,
"jsHeapTotalBytes": 21491712,
"scriptDurationMs": 90.745,
"eventListeners": -148,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.66333333333332,
"p95FrameDurationMs": 16.699999999999818
},
{
"name": "subgraph-mouse-sweep",
"durationMs": 1759.9900000000162,
"styleRecalcs": 79,
"styleRecalcDurationMs": 42.88099999999999,
"layouts": 16,
"layoutDurationMs": 4.765000000000001,
"taskDurationMs": 823.533,
"heapDeltaBytes": -21060376,
"heapUsedBytes": 46811204,
"domNodes": -273,
"jsHeapTotalBytes": 21229568,
"scriptDurationMs": 91.74600000000001,
"eventListeners": -148,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.666666666666668,
"p95FrameDurationMs": 16.699999999999818
},
{
"name": "subgraph-transition-enter",
"durationMs": 1384.6580000000017,
"styleRecalcs": 19,
"styleRecalcDurationMs": 29.935000000000002,
"layouts": 15,
"layoutDurationMs": 11.591999999999999,
"taskDurationMs": 932.0099999999998,
"heapDeltaBytes": 29103408,
"heapUsedBytes": 98851176,
"domNodes": 13673,
"jsHeapTotalBytes": 15466496,
"scriptDurationMs": 33.837,
"eventListeners": 2371,
"totalBlockingTimeMs": 126,
"frameDurationMs": 16.666666666666668,
"p95FrameDurationMs": 16.700000000000728
},
{
"name": "viewport-pan-sweep",
"durationMs": 8199.55299999998,
"styleRecalcs": 250,
"styleRecalcDurationMs": 41.633,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 4304.748,
"heapDeltaBytes": 10017824,
"heapUsedBytes": 68682596,
"domNodes": -275,
"jsHeapTotalBytes": 5775360,
"scriptDurationMs": 1307.318,
"eventListeners": -128,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.66333333333332,
"p95FrameDurationMs": 16.700000000000728
},
{
"name": "viewport-pan-sweep",
"durationMs": 8232.683000000066,
"styleRecalcs": 249,
"styleRecalcDurationMs": 40.65,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 4392.05,
"heapDeltaBytes": 10967032,
"heapUsedBytes": 69651924,
"domNodes": -276,
"jsHeapTotalBytes": 6561792,
"scriptDurationMs": 1323.0980000000002,
"eventListeners": -128,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.66333333333332,
"p95FrameDurationMs": 16.700000000000728
},
{
"name": "vue-large-graph-idle",
"durationMs": 17743.371000000025,
"styleRecalcs": 0,
"styleRecalcDurationMs": 0,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 17713.703,
"heapDeltaBytes": -30842164,
"heapUsedBytes": 177414416,
"domNodes": -8313,
"jsHeapTotalBytes": -13832192,
"scriptDurationMs": 520.319,
"eventListeners": -16385,
"totalBlockingTimeMs": 0,
"frameDurationMs": 17.776666666666642,
"p95FrameDurationMs": 16.799999999999272
},
{
"name": "vue-large-graph-idle",
"durationMs": 18224.523999999976,
"styleRecalcs": 0,
"styleRecalcDurationMs": 0,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 18204.307,
"heapDeltaBytes": -52731316,
"heapUsedBytes": 169815316,
"domNodes": -8312,
"jsHeapTotalBytes": -13303808,
"scriptDurationMs": 549.652,
"eventListeners": -16385,
"totalBlockingTimeMs": 0,
"frameDurationMs": 17.780000000000047,
"p95FrameDurationMs": 16.700000000000728
},
{
"name": "vue-large-graph-pan",
"durationMs": 21378.826000000005,
"styleRecalcs": 149,
"styleRecalcDurationMs": 19.51900000000001,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 21340.071,
"heapDeltaBytes": -70944884,
"heapUsedBytes": 155731264,
"domNodes": -8312,
"jsHeapTotalBytes": -14614528,
"scriptDurationMs": 864.0949999999999,
"eventListeners": -16381,
"totalBlockingTimeMs": 268,
"frameDurationMs": 17.776666666666642,
"p95FrameDurationMs": 16.700000000000728
},
{
"name": "vue-large-graph-pan",
"durationMs": 22310.235000000033,
"styleRecalcs": 161,
"styleRecalcDurationMs": 22.704,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 22243.642,
"heapDeltaBytes": -45035480,
"heapUsedBytes": 164220716,
"domNodes": -8312,
"jsHeapTotalBytes": -13832192,
"scriptDurationMs": 883.6640000000001,
"eventListeners": -16379,
"totalBlockingTimeMs": 369,
"frameDurationMs": 17.776666666666642,
"p95FrameDurationMs": 16.799999999999272
},
{
"name": "workflow-execution",
"durationMs": 493.3730000000196,
"styleRecalcs": 14,
"styleRecalcDurationMs": 17.980999999999998,
"layouts": 2,
"layoutDurationMs": 0.41,
"taskDurationMs": 130.596,
"heapDeltaBytes": -15864352,
"heapUsedBytes": 51119920,
"domNodes": 132,
"jsHeapTotalBytes": 7471104,
"scriptDurationMs": 10.448999999999998,
"eventListeners": 67,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.66999999999998,
"p95FrameDurationMs": 16.799999999999272
},
{
"name": "workflow-execution",
"durationMs": 460.3020000000697,
"styleRecalcs": 13,
"styleRecalcDurationMs": 17.763,
"layouts": 3,
"layoutDurationMs": 0.5599999999999999,
"taskDurationMs": 107.55699999999999,
"heapDeltaBytes": -16016572,
"heapUsedBytes": 51010168,
"domNodes": 119,
"jsHeapTotalBytes": 7733248,
"scriptDurationMs": 8.723,
"eventListeners": 65,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.666666666666668,
"p95FrameDurationMs": 16.700000000000728
}
]
} |
📝 WalkthroughWalkthroughThe PR expands workflow persistence cleanup for cloud logout, renames the storage-clearing API, and changes workspace initialization to propagate token exchange failures through retry handling and error state transitions. ChangesWorkflow persistence and workspace initialization
Estimated code review effort: 3 (Moderate) | ~20 minutes Sequence Diagram(s)sequenceDiagram
participant useAuthActions
participant authStore
participant clearAllWorkflowStorage
participant window.location
useAuthActions->>authStore: logout()
authStore-->>useAuthActions: successful logout
useAuthActions->>clearAllWorkflowStorage: clear workflow storage with blockWrites
useAuthActions->>window.location: assign cloud redirect or reload
Possibly related PRs
Suggested reviewers: Caution Pre-merge checks failedPlease resolve all errors before merging. Addressing warnings is optional.
❌ Failed checks (1 error)
✅ Passed checks (5 passed)
✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@src/composables/auth/useAuthActions.test.ts`:
- Around line 156-165: Update the logout test around useAuthActions and
mockClearAllWorkflowStorage to record a minimal window.location.href setter
alongside the cleanup call, then assert the cleanup invocation occurs before the
navigation setter invocation while preserving the existing authStore.logout
ordering assertion.
🪄 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: 23441f96-ba6c-4d8d-a1d3-1f8e6da96fae
📒 Files selected for processing (7)
src/composables/auth/useAuthActions.test.tssrc/composables/auth/useAuthActions.tssrc/platform/workflow/persistence/base/storageIO.test.tssrc/platform/workflow/persistence/base/storageIO.tssrc/platform/workflow/persistence/composables/useWorkflowPersistenceV2.tssrc/platform/workspace/stores/teamWorkspaceStore.test.tssrc/platform/workspace/stores/teamWorkspaceStore.ts
Codecov Report❌ Patch coverage is
@@ Coverage Diff @@
## main #14266 +/- ##
==========================================
+ Coverage 79.32% 79.34% +0.02%
==========================================
Files 1754 1754
Lines 117525 112429 -5096
Branches 40117 37308 -2809
==========================================
- Hits 93221 89211 -4010
+ Misses 23727 22687 -1040
+ Partials 577 531 -46
Flags with carried forward coverage won't be shown. Click here to find out more.
... and 143 files with indirect coverage changes 🚀 New features to boost your workflow:
|
Fail workspace initialization when scoped token exchange fails, and clear persisted workflow state synchronously after Cloud logout before navigation. Amp-Thread-ID: https://ampcode.com/threads/T-019fae1e-903e-73a0-8db4-2882af512e35 Co-authored-by: Amp <amp@ampcode.com>
Amp-Thread-ID: https://ampcode.com/threads/T-019fae7d-4890-70f6-9124-9bd576fc2b3c Co-authored-by: Amp <amp@ampcode.com>
Amp-Thread-ID: https://ampcode.com/threads/T-019fae1e-903e-73a0-8db4-2882af512e35 Co-authored-by: Amp <amp@ampcode.com>
67cd76c to
b5c0d52
Compare
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@src/platform/workflow/persistence/base/storageIO.test.ts`:
- Around line 315-321: Update the test around the seeded legacy session keys to
assert that Comfy.PreviousWorkflow:client-1, Comfy.OpenWorkflowsPaths:client-1,
and Comfy.ActiveWorkflowIndex:client-1 are removed after the cleanup flow, each
returning null or leaving only the unrelated key. Ensure the assertions exercise
the newly added legacy-key matching behavior rather than only verifying setup.
🪄 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: 126e30b8-b9c5-4449-9776-96c7c27ab5d3
📒 Files selected for processing (4)
src/composables/auth/useAuthActions.test.tssrc/composables/auth/useAuthActions.tssrc/platform/workflow/persistence/base/storageIO.test.tssrc/platform/workflow/persistence/base/storageIO.ts
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@src/platform/workflow/persistence/base/storageIO.test.ts`:
- Around line 337-363: The test “blocks workflow writes after cleanup starts”
leaves the module-scoped workflowWritesBlocked state enabled and contaminates
later tests. Isolate this assertion in a separate module/test context or
explicitly reset storageIO after it runs, ensuring the already imported
writeIndex and writePayload bindings are not relied on after vi.resetModules().
🪄 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: e5aa774d-c2d6-4af9-88d5-39c7ed0c29f4
📒 Files selected for processing (7)
src/composables/auth/useAuthActions.test.tssrc/composables/auth/useAuthActions.tssrc/platform/workflow/persistence/base/storageIO.test.tssrc/platform/workflow/persistence/base/storageIO.tssrc/platform/workflow/persistence/composables/useWorkflowPersistenceV2.tssrc/platform/workspace/stores/teamWorkspaceStore.test.tssrc/platform/workspace/stores/teamWorkspaceStore.ts
41d1632 to
404a5e5
Compare
Amp-Thread-ID: https://ampcode.com/threads/T-019fae7d-4890-70f6-9124-9bd576fc2b3c Co-authored-by: Amp <amp@ampcode.com>
404a5e5 to
ee186df
Compare
|
@coderabbitai approve |
✅ Action performedComments resolved and changes approved. |
|
@dante01yoon Successfully backported to #14287 |
|
@dante01yoon Successfully backported to #14288 |
…n-out A second window that merely boots rewrites the shared `firebase:authUser:*` record, and Firebase's browserLocalPersistence syncs that across windows over `storage` events. The first window therefore observes its user drop to null without anyone having signed out. `useWorkflowPersistenceV2` reacted to that observed drop by running the sign-out cleanup: `clearAllWorkspaceStorage()` wiped every draft, tab pointer and agent key in the browser, and `prepareWorkflowLogoutTransition()` fenced writes with nothing left to release them, because the release waits on a teamWorkspaceStore init that only a full boot re-runs. Result: drafts gone, "Failed to save workflow draft" on every later edit, and the agent blocked until a refresh with no other windows open. The sign-out command already does both steps synchronously before it navigates (useAuthActions.logout, added in #14266 because this watcher lost the race with navigation), so the watcher was a second, intent-free copy that only fired where it was wrong. Drop it; keep the fence release for the command-site fence. Flips the expected-failure pin from #17275 to a real pass.
…n-out A second window that merely boots rewrites the shared `firebase:authUser:*` record, and Firebase's browserLocalPersistence syncs that across windows over `storage` events. The first window therefore observes its user drop to null without anyone having signed out. `useWorkflowPersistenceV2` reacted to that observed drop by running the sign-out cleanup: `clearAllWorkspaceStorage()` wiped every draft, tab pointer and agent key in the browser, and `prepareWorkflowLogoutTransition()` fenced writes with nothing left to release them, because the release waits on a teamWorkspaceStore init that only a full boot re-runs. Result: drafts gone, "Failed to save workflow draft" on every later edit, and the agent blocked until a refresh with no other windows open. The sign-out command already does both steps synchronously before it navigates (useAuthActions.logout, added in #14266 because this watcher lost the race with navigation), so the watcher was a second, intent-free copy that only fired where it was wrong. Drop it; keep the fence release for the command-site fence. Flips the expected-failure pin from #17275 to a real pass.
Summary
Fixes QA report items CF148-005 and CF148-006 by failing workspace initialization closed and synchronously clearing workflow persistence before Cloud logout navigation.
Reported in the Cloud 1.48 QA thread.
Changes
readyafter scoped-token exchange fails, so stale canvas/draft state cannot render under another selected workspace.When these issues were introduced
66e6f2498). Global app gating later became fail-open in PR Feat/workspaces 5 auth gate check #8350. PR fix: gate cloud startup on workspace auth #14183 fixed the app-level startup gate; this PR adds the store-level defense.40aa7c5974), when workflow cleanup became a Vue watcher callback while Cloud logout already hard-navigated immediately (hard navigation was introduced by PR Mainification: Bring Onboarding in fromrh-test#6564).Review Focus
Confirm failed workspace authentication never reaches
ready, and that only terminal Cloud logout blocks later workflow writes.Screenshots
The captures use deterministic mocked Cloud transitions to make both failure modes reproducible.
CF148-005 — AS IS
Workspace B is selected while a Workspace A-only dirty draft remains visible.
CF148-005 — TO BE
Failed workspace authentication keeps the app gated; no previous workspace canvas or draft renders.
CF148-006 — AS IS
A closed workflow returns after logout and the next login because cleanup can lose the race with navigation.
CF148-006 — TO BE
Workflow storage is cleared synchronously before redirect and terminal late writes are rejected, so no stale workflow restores after login.
Verification
pnpm test:unit src/composables/auth/useAuthActions.test.ts src/platform/workspace/stores/teamWorkspaceStore.test.ts src/platform/workflow/persistence/base/storageIO.test.ts— 119 passedpnpm typecheckpnpm lint:unstagedpnpm knipgit diff --check