Repository navigation
[backport cloud/1.52] fix(workspace): establish workspace context for API-key sessions - #15953
Conversation
) API-key login sessions on Local never established workspace context, so every billing surface fell back to the legacy user-scoped `/customers/*` rail and showed a different customer's data than the one actually being charged. Reported in 1.51 QA by Denys (Slack QA thread, Aug 25): empty workspace name on Plan & Credits, balance always 0, wrong workspace in Manage billing, credits 0 in the profile menu, Credits opening the old combined view, purchase failing with `workspace_billing_required`, and the Activity tab showing another workspace's events. Two gates kept an API-key session off the workspace rail: 1. `WorkspaceAuthGate` (Local branch) only initialized `teamWorkspaceStore` inside `watch(currentUser)`, where `currentUser` is the **Firebase** user. API-key login never sets it, so `initState` stayed `uninitialized` forever. 2. Even if initialization ran, `workspaceApi` auth (`getWorkspaceAuthHeader`) fell back to `getFirebaseAuthHeader()` when no workspace was active — `null` for API-key sessions, so every workspace call threw `User not authenticated`. There was no `X-API-KEY` fallback anywhere in the workspace client. With `activeWorkspace` empty, `useBillingRouting` returned `legacy`, so balance came from `GET /customers/balance` (the user's legacy customer — zeros or a different account's credits), activity from `GET /customers/events` (resolved by *user identity* to the canonical migrated workspace, not the key's workspace), and top-up hit `POST /customers/credit`, which the backend deterministically rejects with 409 `workspace_billing_required` for accounts on workspace billing (`billing_legacy_topup.go`). Meanwhile generation charges were always correct, because the backend binds every API key to exactly one workspace (`workspace_api_keys`) — only the frontend was reading the wrong rail. The server already knows the key's workspace; the frontend now asks instead of guessing. No backend changes — verified against staging with real keys (`GET /api/workspaces/current` returns the bound workspace incl. name/type/role for both personal and team keys, and all `/api/billing/*` reads accept `X-API-KEY`, scoped to that workspace). - `authStore.getWorkspaceAuthHeader` sends the stored API key when there is no Firebase session; the key **is** the workspace credential, so no token minting. `getWorkspaceAuthToken` returns `undefined` for key sessions (unchanged behavior — no JWT exists to mint). - `teamWorkspaceStore` bootstraps an API-key session from `GET /api/workspaces/current`: seeds the single bound workspace, skips session-cookie restore, discovery, and token exchange. An omitted `role` fails closed to `member` so owner-only actions stay hidden instead of 403ing. - `WorkspaceAuthGate` keys Local initialization off the session identity (Firebase uid **or** validated API key) and resets workspace state when that identity changes, so key→email transitions can't reuse stale context. - `CurrentUserPopoverWorkspace` renders a static workspace row for key sessions — no switcher, matching the test-plan contract that API-key auth exposes no workspace discovery/switching. Once `initState` is `ready`, billing routing flips to the workspace rail and all seven findings resolve together (name, balance ×2, portal, Plan & Credits routing, top-up, activity). - Regression (Vitest): `teamWorkspaceStore` API-key bootstrap (seeding, no discovery/token-exchange, role fail-closed, retry-then-error), `authStore` workspace-header priority (API key sent for key sessions, Firebase session still wins when both exist), `WorkspaceAuthGate` (init on key sign-in, cancel on key sign-out, reset on identity change). - E2E user story (Playwright, `apiKeyLoginBilling.spec.ts` + `apiKeyAuthFixture`): boots a key-only session, asserts the popover shows the key's workspace and balance with no switcher, Plan & Credits shows the workspace name/balance, Activity lists the workspace-rail events, and **zero requests hit the legacy `/customers/balance` / `/customers/events` rail**. - Auth priority: the API-key fallback only applies when `currentUser === null`, so Firebase sessions (Local and Cloud) are untouched; unified-cloud-auth branch is untouched. - `resetForIdentityChange` on Local identity swaps is new — previously only Firebase A→B triggered it (via authStore); now key⇄email transitions do too. Captured on a real Local app (`--comfy-api-base https://stagingapi.comfy.org`, build with `VITE_STAGING_CLOUD_BASE_URL=https://stagingcloud.comfy.org`), logged in with a staging **team-workspace** API key (`team2`). | Profile menu (legacy popover, user-scoped balance, no workspace) | Credits → old combined view, personal account's balance & activity | Plan & Credits: empty workspace name | | --- | --- | --- | | <img src="https://raw.githubusercontent.com/dante01yoon/ComfyUI_frontend/assets/pr-15917-screenshots/docs-assets/pr-15917/asis-popover.png" width="280" /> | <img src="https://raw.githubusercontent.com/dante01yoon/ComfyUI_frontend/assets/pr-15917-screenshots/docs-assets/pr-15917/asis-credits-panel.png" width="280" /> | <img src="https://raw.githubusercontent.com/dante01yoon/ComfyUI_frontend/assets/pr-15917-screenshots/docs-assets/pr-15917/asis-plan-credits.png" width="280" /> | | Profile menu: `team2` row, workspace balance, no switcher | Plan & Credits: `team2` header + workspace balance | Activity: `team2` workspace events only | | --- | --- | --- | | <img src="https://raw.githubusercontent.com/dante01yoon/ComfyUI_frontend/assets/pr-15917-screenshots/docs-assets/pr-15917/tobe-popover.png" width="280" /> | <img src="https://raw.githubusercontent.com/dante01yoon/ComfyUI_frontend/assets/pr-15917-screenshots/docs-assets/pr-15917/tobe-plan-credits.png" width="280" /> | <img src="https://raw.githubusercontent.com/dante01yoon/ComfyUI_frontend/assets/pr-15917-screenshots/docs-assets/pr-15917/tobe-activity.png" width="280" /> |
|
Important Review skippedIgnore keyword(s) in the title. ⛔ Ignored keywords (2)
Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: ASSERTIVE Plan: Pro Plus Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
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 |
🎭 Playwright: ✅ 1981 passed, 0 failed · 3 flaky📊 Browser Reports
🎨 Storybook: ✅ Built — View Storybook🌐 Website E2ETip All tests passed.
📦 Bundle Size
⚡ Performance Report
Absolute values
Raw data{
"timestamp": "2026-08-26T00:50:13.679Z",
"gitSha": "8418b5c14a0326cd6541576005b5e056da781b03",
"branch": "backport-15917-to-cloud-1.52",
"measurements": [
{
"name": "canvas-idle",
"durationMs": 2014.7339999999758,
"styleRecalcs": 9,
"styleRecalcDurationMs": 4.766000000000001,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 423.027,
"heapDeltaBytes": -1887540,
"heapUsedBytes": 60420808,
"domNodes": -281,
"jsHeapTotalBytes": 4448256,
"scriptDurationMs": 6.453000000000002,
"eventListeners": -183,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.666666666666668,
"p95FrameDurationMs": 16.700000000000728
},
{
"name": "canvas-idle",
"durationMs": 2022.7469999999812,
"styleRecalcs": 10,
"styleRecalcDurationMs": 6.243,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 428.358,
"heapDeltaBytes": 2438652,
"heapUsedBytes": 63906236,
"domNodes": -280,
"jsHeapTotalBytes": 3661824,
"scriptDurationMs": 6.460000000000003,
"eventListeners": -183,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.670000000000012,
"p95FrameDurationMs": 16.700000000000728
},
{
"name": "canvas-mouse-sweep",
"durationMs": 1710.36399999997,
"styleRecalcs": 71,
"styleRecalcDurationMs": 24.329000000000004,
"layouts": 12,
"layoutDurationMs": 2.8960000000000004,
"taskDurationMs": 670.8779999999999,
"heapDeltaBytes": 2451528,
"heapUsedBytes": 65260436,
"domNodes": -282,
"jsHeapTotalBytes": 5234688,
"scriptDurationMs": 76.169,
"eventListeners": -181,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.66333333333335,
"p95FrameDurationMs": 16.700000000000728
},
{
"name": "canvas-mouse-sweep",
"durationMs": 1706.6970000000197,
"styleRecalcs": 71,
"styleRecalcDurationMs": 23.503000000000004,
"layouts": 12,
"layoutDurationMs": 2.407,
"taskDurationMs": 675.8149999999999,
"heapDeltaBytes": 6414268,
"heapUsedBytes": 69002748,
"domNodes": -280,
"jsHeapTotalBytes": 5234688,
"scriptDurationMs": 73.56,
"eventListeners": -181,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.66333333333335,
"p95FrameDurationMs": 16.699999999999818
},
{
"name": "canvas-zoom-sweep",
"durationMs": 1670.9140000000389,
"styleRecalcs": 30,
"styleRecalcDurationMs": 12.212,
"layouts": 6,
"layoutDurationMs": 0.5939999999999999,
"taskDurationMs": 290.99300000000005,
"heapDeltaBytes": 3255628,
"heapUsedBytes": 66025456,
"domNodes": 79,
"jsHeapTotalBytes": 4194304,
"scriptDurationMs": 8.083,
"eventListeners": 19,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.66333333333332,
"p95FrameDurationMs": 16.800000000000182
},
{
"name": "canvas-zoom-sweep",
"durationMs": 1658.800000000042,
"styleRecalcs": 29,
"styleRecalcDurationMs": 13.139,
"layouts": 6,
"layoutDurationMs": 0.5980000000000001,
"taskDurationMs": 292.41499999999996,
"heapDeltaBytes": 3361860,
"heapUsedBytes": 65649260,
"domNodes": 77,
"jsHeapTotalBytes": 5505024,
"scriptDurationMs": 7.884,
"eventListeners": 19,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.666666666666668,
"p95FrameDurationMs": 16.800000000000182
},
{
"name": "dom-widget-clipping",
"durationMs": 460.5150000000435,
"styleRecalcs": 12,
"styleRecalcDurationMs": 6.057999999999999,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 279.02,
"heapDeltaBytes": 9694072,
"heapUsedBytes": 72298388,
"domNodes": 20,
"jsHeapTotalBytes": 4456448,
"scriptDurationMs": 39.482000000000006,
"eventListeners": 2,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.666666666666668,
"p95FrameDurationMs": 16.799999999999272
},
{
"name": "dom-widget-clipping",
"durationMs": 458.1630000000132,
"styleRecalcs": 12,
"styleRecalcDurationMs": 5.5329999999999995,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 265.081,
"heapDeltaBytes": 10864948,
"heapUsedBytes": 73575708,
"domNodes": 20,
"jsHeapTotalBytes": 4980736,
"scriptDurationMs": 36.94199999999999,
"eventListeners": 0,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.666666666666668,
"p95FrameDurationMs": 16.700000000000273
},
{
"name": "large-graph-idle",
"durationMs": 2034.5759999999586,
"styleRecalcs": 9,
"styleRecalcDurationMs": 5.252999999999999,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 501.846,
"heapDeltaBytes": -12719564,
"heapUsedBytes": 63581008,
"domNodes": -281,
"jsHeapTotalBytes": 2617344,
"scriptDurationMs": 11.521,
"eventListeners": -179,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.666666666666668,
"p95FrameDurationMs": 16.799999999999272
},
{
"name": "large-graph-idle",
"durationMs": 2004.9840000000358,
"styleRecalcs": 10,
"styleRecalcDurationMs": 5.607999999999999,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 508.71500000000003,
"heapDeltaBytes": -13539220,
"heapUsedBytes": 62923352,
"domNodes": -280,
"jsHeapTotalBytes": 3928064,
"scriptDurationMs": 14.052999999999999,
"eventListeners": -179,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.666666666666668,
"p95FrameDurationMs": 16.699999999999818
},
{
"name": "large-graph-pan",
"durationMs": 2091.542000000004,
"styleRecalcs": 68,
"styleRecalcDurationMs": 12.088,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 932.904,
"heapDeltaBytes": 13031940,
"heapUsedBytes": 89502720,
"domNodes": -284,
"jsHeapTotalBytes": 3891200,
"scriptDurationMs": 244.11799999999997,
"eventListeners": -179,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.666666666666668,
"p95FrameDurationMs": 16.800000000000182
},
{
"name": "large-graph-pan",
"durationMs": 2109.2519999999695,
"styleRecalcs": 70,
"styleRecalcDurationMs": 12.673000000000002,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 943.0970000000001,
"heapDeltaBytes": -2920556,
"heapUsedBytes": 75089320,
"domNodes": -237,
"jsHeapTotalBytes": 221184,
"scriptDurationMs": 247.38999999999996,
"eventListeners": -147,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.666666666666668,
"p95FrameDurationMs": 16.799999999999272
},
{
"name": "large-graph-zoom",
"durationMs": 3121.6870000000085,
"styleRecalcs": 66,
"styleRecalcDurationMs": 13.73,
"layouts": 60,
"layoutDurationMs": 7.823,
"taskDurationMs": 1105.985,
"heapDeltaBytes": -9397016,
"heapUsedBytes": 69950104,
"domNodes": 14,
"jsHeapTotalBytes": 6066176,
"scriptDurationMs": 298.37,
"eventListeners": 8,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.666666666666668,
"p95FrameDurationMs": 16.700000000000728
},
{
"name": "large-graph-zoom",
"durationMs": 3050.8910000000924,
"styleRecalcs": 66,
"styleRecalcDurationMs": 14.190999999999999,
"layouts": 60,
"layoutDurationMs": 7.675,
"taskDurationMs": 1098.6180000000002,
"heapDeltaBytes": 17363792,
"heapUsedBytes": 96770972,
"domNodes": 16,
"jsHeapTotalBytes": 6066176,
"scriptDurationMs": 290.32800000000003,
"eventListeners": 8,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.666666666666668,
"p95FrameDurationMs": 16.800000000000182
},
{
"name": "legacy-node-drag",
"durationMs": 2120.4309999999964,
"styleRecalcs": 48,
"styleRecalcDurationMs": 8.631,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 1107.241,
"heapDeltaBytes": 11702852,
"heapUsedBytes": 96694976,
"domNodes": 16,
"jsHeapTotalBytes": 8318976,
"scriptDurationMs": 334.03,
"eventListeners": 186,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.66333333333332,
"p95FrameDurationMs": 16.700000000000728
},
{
"name": "legacy-node-drag",
"durationMs": 2120.7600000000184,
"styleRecalcs": 48,
"styleRecalcDurationMs": 8.329999999999997,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 1068.2240000000002,
"heapDeltaBytes": -17046896,
"heapUsedBytes": 69935700,
"domNodes": 16,
"jsHeapTotalBytes": 8425472,
"scriptDurationMs": 329.56800000000004,
"eventListeners": 186,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.666666666666668,
"p95FrameDurationMs": 16.800000000000182
},
{
"name": "minimap-idle",
"durationMs": 2026.6889999999762,
"styleRecalcs": 9,
"styleRecalcDurationMs": 6.142999999999999,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 514.5740000000001,
"heapDeltaBytes": -11265976,
"heapUsedBytes": 74248944,
"domNodes": -271,
"jsHeapTotalBytes": 4452352,
"scriptDurationMs": 15.474000000000002,
"eventListeners": -149,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.666666666666668,
"p95FrameDurationMs": 16.700000000000728
},
{
"name": "minimap-idle",
"durationMs": 2063.972000000035,
"styleRecalcs": 7,
"styleRecalcDurationMs": 4.778999999999998,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 549.337,
"heapDeltaBytes": -11093204,
"heapUsedBytes": 74063004,
"domNodes": -277,
"jsHeapTotalBytes": 2355200,
"scriptDurationMs": 14.402000000000001,
"eventListeners": -149,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.666666666666668,
"p95FrameDurationMs": 16.700000000000728
},
{
"name": "subgraph-dom-widget-clipping",
"durationMs": 496.6829999999618,
"styleRecalcs": 46,
"styleRecalcDurationMs": 6.968999999999999,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 291.651,
"heapDeltaBytes": 11524404,
"heapUsedBytes": 74714352,
"domNodes": 18,
"jsHeapTotalBytes": 5242880,
"scriptDurationMs": 86.00099999999999,
"eventListeners": 6,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.66333333333332,
"p95FrameDurationMs": 16.700000000000728
},
{
"name": "subgraph-dom-widget-clipping",
"durationMs": 497.3380000000134,
"styleRecalcs": 46,
"styleRecalcDurationMs": 6.860999999999999,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 299.022,
"heapDeltaBytes": 11610196,
"heapUsedBytes": 74593632,
"domNodes": 18,
"jsHeapTotalBytes": 4456448,
"scriptDurationMs": 86.90299999999999,
"eventListeners": 8,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.66666666666665,
"p95FrameDurationMs": 16.700000000000728
},
{
"name": "subgraph-idle",
"durationMs": 2008.9439999999854,
"styleRecalcs": 9,
"styleRecalcDurationMs": 5.871000000000001,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 410.48500000000007,
"heapDeltaBytes": 5480960,
"heapUsedBytes": 68411740,
"domNodes": -283,
"jsHeapTotalBytes": 4710400,
"scriptDurationMs": 5.72,
"eventListeners": -183,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.66333333333335,
"p95FrameDurationMs": 16.700000000000728
},
{
"name": "subgraph-idle",
"durationMs": 2025.4130000000146,
"styleRecalcs": 9,
"styleRecalcDurationMs": 5.177,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 416.36199999999997,
"heapDeltaBytes": 5048920,
"heapUsedBytes": 67936492,
"domNodes": -282,
"jsHeapTotalBytes": 4186112,
"scriptDurationMs": 5.611999999999999,
"eventListeners": -183,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.670000000000012,
"p95FrameDurationMs": 16.700000000000728
},
{
"name": "subgraph-mouse-sweep",
"durationMs": 1692.604000000017,
"styleRecalcs": 75,
"styleRecalcDurationMs": 26.965999999999998,
"layouts": 16,
"layoutDurationMs": 3.6090000000000004,
"taskDurationMs": 666.082,
"heapDeltaBytes": 12987936,
"heapUsedBytes": 76020596,
"domNodes": -281,
"jsHeapTotalBytes": 5234688,
"scriptDurationMs": 65.134,
"eventListeners": -151,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.66999999999998,
"p95FrameDurationMs": 16.800000000000182
},
{
"name": "subgraph-mouse-sweep",
"durationMs": 1709.3479999999772,
"styleRecalcs": 76,
"styleRecalcDurationMs": 26.331,
"layouts": 16,
"layoutDurationMs": 3.461,
"taskDurationMs": 634.2800000000001,
"heapDeltaBytes": -4851564,
"heapUsedBytes": 57359152,
"domNodes": -282,
"jsHeapTotalBytes": 5496832,
"scriptDurationMs": 60.275,
"eventListeners": -151,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.666666666666668,
"p95FrameDurationMs": 16.699999999999818
},
{
"name": "subgraph-transition-enter",
"durationMs": 916.4139999999747,
"styleRecalcs": 19,
"styleRecalcDurationMs": 25.647000000000002,
"layouts": 14,
"layoutDurationMs": 9.535,
"taskDurationMs": 733.403,
"heapDeltaBytes": -341556,
"heapUsedBytes": 97966524,
"domNodes": 13673,
"jsHeapTotalBytes": 12058624,
"scriptDurationMs": 13.164000000000001,
"eventListeners": 2373,
"totalBlockingTimeMs": 113,
"frameDurationMs": 16.666666666666668,
"p95FrameDurationMs": 16.800000000000182
},
{
"name": "viewport-pan-sweep",
"durationMs": 8136.686999999994,
"styleRecalcs": 252,
"styleRecalcDurationMs": 36.085,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 3276.218,
"heapDeltaBytes": 5591516,
"heapUsedBytes": 82646296,
"domNodes": -237,
"jsHeapTotalBytes": -40960,
"scriptDurationMs": 799.431,
"eventListeners": -133,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.666666666666668,
"p95FrameDurationMs": 16.700000000000728
},
{
"name": "viewport-pan-sweep",
"durationMs": 8122.075999999993,
"styleRecalcs": 250,
"styleRecalcDurationMs": 30.175999999999995,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 3193.0379999999996,
"heapDeltaBytes": -4972412,
"heapUsedBytes": 72542516,
"domNodes": -277,
"jsHeapTotalBytes": 4939776,
"scriptDurationMs": 764.9180000000001,
"eventListeners": -133,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.666666666666668,
"p95FrameDurationMs": 16.799999999999272
},
{
"name": "vue-large-graph-idle",
"durationMs": 12974.63799999997,
"styleRecalcs": 0,
"styleRecalcDurationMs": 0,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 12437.731,
"heapDeltaBytes": -35521588,
"heapUsedBytes": 182923256,
"domNodes": -8312,
"jsHeapTotalBytes": -14884864,
"scriptDurationMs": 79.62399999999998,
"eventListeners": -16391,
"totalBlockingTimeMs": 0,
"frameDurationMs": 17.220000000000073,
"p95FrameDurationMs": 16.799999999999272
},
{
"name": "vue-large-graph-idle",
"durationMs": 12735.288999999966,
"styleRecalcs": 0,
"styleRecalcDurationMs": 0,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 12094.313999999998,
"heapDeltaBytes": -40268584,
"heapUsedBytes": 176072564,
"domNodes": -8312,
"jsHeapTotalBytes": -22306816,
"scriptDurationMs": 85.66999999999999,
"eventListeners": -16393,
"totalBlockingTimeMs": 0,
"frameDurationMs": 17.219999999999953,
"p95FrameDurationMs": 16.799999999999272
},
{
"name": "vue-large-graph-pan",
"durationMs": 15927.077999999994,
"styleRecalcs": 92,
"styleRecalcDurationMs": 14.019000000000004,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 15171.075000000003,
"heapDeltaBytes": -20014660,
"heapUsedBytes": 192764776,
"domNodes": -8311,
"jsHeapTotalBytes": -17936384,
"scriptDurationMs": 346.221,
"eventListeners": -16389,
"totalBlockingTimeMs": 0,
"frameDurationMs": 17.223333333333237,
"p95FrameDurationMs": 16.799999999999272
},
{
"name": "vue-large-graph-pan",
"durationMs": 15674.354999999992,
"styleRecalcs": 86,
"styleRecalcDurationMs": 13.770000000000005,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 15028.841,
"heapDeltaBytes": -18663668,
"heapUsedBytes": 194095376,
"domNodes": -8312,
"jsHeapTotalBytes": -17936384,
"scriptDurationMs": 408.659,
"eventListeners": -16387,
"totalBlockingTimeMs": 0,
"frameDurationMs": 17.219999999999953,
"p95FrameDurationMs": 16.799999999999272
},
{
"name": "workflow-execution",
"durationMs": 93.56800000000476,
"styleRecalcs": 7,
"styleRecalcDurationMs": 12.068000000000001,
"layouts": 2,
"layoutDurationMs": 1.245,
"taskDurationMs": 67.865,
"heapDeltaBytes": 3143100,
"heapUsedBytes": 65628524,
"domNodes": 129,
"jsHeapTotalBytes": 0,
"scriptDurationMs": 5.495,
"eventListeners": 25,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.666666666666668,
"p95FrameDurationMs": 16.700000000000273
},
{
"name": "workflow-execution",
"durationMs": 81.55099999999038,
"styleRecalcs": 7,
"styleRecalcDurationMs": 10.065000000000001,
"layouts": 2,
"layoutDurationMs": 0.93,
"taskDurationMs": 55.97600000000001,
"heapDeltaBytes": 3061776,
"heapUsedBytes": 65587424,
"domNodes": 124,
"jsHeapTotalBytes": 0,
"scriptDurationMs": 3.5820000000000003,
"eventListeners": 25,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.666666666666668,
"p95FrameDurationMs": 16.700000000000273
}
]
} |
Codecov Report❌ Patch coverage is
@@ Coverage Diff @@
## cloud/1.52 #15953 +/- ##
=============================================
Coverage ? 79.56%
=============================================
Files ? 2235
Lines ? 113800
Branches ? 31796
=============================================
Hits ? 90547
Misses ? 22774
Partials ? 479
Flags with carried forward coverage won't be shown. Click here to find out more.
🚀 New features to boost your workflow:
|
…#16085) `cloud/1.52` does not typecheck. Every PR opened against it is red on a diff it does not own. ``` packages/ingest-types/src/index.ts(237,3): error TS2300: Duplicate identifier 'CurrentWorkspaceResponse'. packages/ingest-types/src/index.ts(240,3): error TS2300: Duplicate identifier 'CurrentWorkspaceResponse'. packages/ingest-types/src/types.gen.ts(3263,13): error TS2300: Duplicate identifier 'CurrentWorkspaceResponse'. packages/ingest-types/src/types.gen.ts(3280,13): error TS2300: Duplicate identifier 'CurrentWorkspaceResponse'. ``` Confirmed blocked: #16080 and #16084 are both red solely on this. ## Root cause A semantic conflict between two backports — clean for git, broken for TypeScript. | commit | PR | merged (UTC) | `CurrentWorkspaceResponse` declarations after | | --- | --- | --- | --- | | `c143e62b5` | #15953 — establish workspace context for API-key sessions | 8/26 04:43 | 1 | | `d9e00f921` | #15939 — ENTERPRISE tier + `ingest-types` regeneration | 8/26 23:36 | **2** | #15953 introduced the type. #15939 regenerated the package from the cloud OpenAPI spec and added it again. Neither touched the same lines, so git reported no conflict and the duplicate landed silently. CI did not catch it because **#15939's checks last ran 8/25 23:33 — roughly 24 hours before it merged, and before #15953 was on the branch.** It was green against a merge ref that no longer described reality. The second block also swallowed the JSDoc belonging to `CreateWorkspaceRequest`, leaving that type undocumented: ```ts /** * Request body for creating a new workspace. */ export type CurrentWorkspaceResponse = { // <- stray ``` In `index.ts` the stray re-export is visible as a break in the otherwise alphabetical list (`CreateWorkspaceResponse, CurrentWorkspaceResponse, CreateWorkspaceResponses`). ## Changes Pure deletion, 15 lines, no additions: - `types.gen.ts` — remove the duplicated `CurrentWorkspaceResponse` block; the `Request body for creating a new workspace.` JSDoc returns to `CreateWorkspaceRequest` - `index.ts` — remove the duplicated re-export Both files are generated, so the target was not a judgement call: **both edited regions are now byte-identical to `main`**, which carries exactly one declaration. This restores the generator's real output rather than hand-authoring it. Re-running `pnpm --filter @comfyorg/ingest-types generate` against the spec is the alternative and should produce the same result — happy to swap to that if the team prefers a regeneration commit, though it would pull in unrelated spec drift on a release branch. ## Verification `tsc` on the package, before and after: ``` ### BASE (cloud/1.52) exit=2 TS2300 x4 <- reproduces the CI failure exactly ### THIS PR exit=0 TS2300 x0 total errors 0 ``` Also verified `CurrentWorkspaceResponse` is the only duplicated identifier in either file, so this is the whole breakage and not the first of several. ## Follow-ups (not in this PR) 1. **The stale-merge-base gap.** A PR merging on day-old checks is how this shipped. Requiring branches be up to date before merge on `cloud/*`, or re-running checks on merge, would close it. 2. **`pr-backport.yaml` discards partial success.** Separately, one failing target aborts the whole step, so succeeding targets never get a PR and their pushed branches are deleted in cleanup. That is why #16032 never reached `cloud/1.52` and why #16084 had to be made by hand. ## Merge order This → #16084 (backport of #16032, *Run silently does nothing on Local at 0 credits*) → #16059 (its E2E regression test).
Backport of #15917 to
cloud/1.52Auto-backport failed on cherry-pick conflicts; backported manually. Conflict resolution: dropped the
useBillingCapabilitiesimport and test mock (#15803 is main-only) and ported theCurrentWorkspaceResponseblock into this branch's generated ingest-types (absent from its older generation). Affected unit suites andpnpm typecheckpass on this branch.