Skip to content

build(account,ingest-types): compile to dist for publish - #17840

Closed
MaanilVerma wants to merge 19 commits into
maanil/fe-2196-d2-consumabilityfrom
maanil/fe-2196-d2-build
Closed

MaanilVerma wants to merge 19 commits into
maanil/fe-2196-d2-consumabilityfrom
maanil/fe-2196-d2-build

Conversation

@MaanilVerma

@MaanilVerma MaanilVerma commented Sep 16, 2026 •

Copy link
Copy Markdown
Collaborator

Summary

@comfyorg/account and @comfyorg/ingest-types publish a compiled dist (ESM plus declarations) instead of raw TypeScript. platform.comfy.org is a separate repo that will npm install these packages, and raw .ts under node_modules does not resolve for Node or for a tsc consumer on nodenext resolution; the org hit exactly that in the shared-frontend-utils publish attempt (#14456), whose template this follows. Packaging only; private stays true and nothing is published.

Part of FE-2196 (publishability)

Changes

  • Each package gets a tsconfig.build.json (declarations on, no maps, noEmitOnError, types: [], tests and fixtures excluded), build and clean scripts, files: ["dist"], and publishConfig.exports that point every entry at dist with types and import conditions. The dev exports keep pointing at src, so the workspace and the cloud build are unchanged.
  • Account builds with vue-tsc so the Vue composables compile and the three single-file components get .vue.d.ts declarations; the .vue files themselves are copied into dist/vue as source, for bundler consumers (option A: any Vue host has a bundler; a Vite library build is the Vue-layer split territory). The post-build step deletes the stray .vue.js that vue-tsc emits for SFCs.
  • Five relative imports gained .js extensions (turnstileScript.ts, regionGate.ts, PasswordRules.vue, TurnstileWidget.vue, ingest-types/src/index.ts) and the OpenAPI generator config emits them from now on. Emitted ESM cannot load extensionless relative imports under Node, and .vue.d.ts files cannot resolve them under nodenext. No behavior change; the rest of the package already used them.
  • smokePack.ts now proves consumability rather than assuming it: after installing the packed tarballs into a clean project, plain node imports every non-Vue entry and constructs a client, and tsc --noEmit --module nodenext --moduleResolution nodenext --strict type-checks a consumer that imports a type and a value from every entry and from ingest-types. The three SFC entries are checked for a resolvable declaration, one real prop each (password, siteKey, googleLabel, so a swapped declaration fails), and a shipped source file.
  • ci-account-pack.yaml mirrors the feat: publish @comfyorg/shared-frontend-utils to npm #14456 pack check for both packages: typecheck, build, tarball contains only dist, the packed manifest's exports resolve into dist with no unrewritten specifiers, then the smoke test.
  • eslint.config.ts adds the OpenAPI generator config to the default-project list, since no tsconfig covers it.
  • ingest-types gets private: true as the same publish gate account has; pnpm pack and the CI check work on private packages. The Vue source copy after the build lives in scripts/copyVueSources.ts instead of a JSON-escaped one-liner.
  • Both packages build on prepack, so a bare pnpm pack or pnpm publish can no longer ship an empty or stale dist. The eventual publish workflow still has to run the build as its own step, because --ignore-scripts skips prepack.
  • Each package ships its own MIT LICENSE. Without one, pnpm was injecting the repository's GPL-3.0 license file into tarballs whose manifest says MIT. design-system, already published, has the same exposure and is a follow-up outside this stack.
  • The typed consumer also reads a nonexistent property under @ts-expect-error on the session snapshot and on each SFC, so an any-typed declaration fails the proof with an unused-directive error rather than passing.

Review Focus

  • The smoke test's negative proofs: a types condition pointing at a missing file fails before install; one pointing at the wrong existing file fails only in the tsc step with a missing-export error, which is the case a raw-source package would have hidden.
  • The smoke-test rewrite landed inside the ingest-types .js-extension commit rather than its own, after a pre-commit failure left the index staged. History was left as is rather than amended.
  • Deleting vue-tsc's emitted .vue.js files after the build is deliberate: the SFCs ship as source, and a compiled render function would need the Vite library build that the Vue-layer split owns.

QA

  • Builds: both packages compile with noEmitOnError; account pack lists 114 files (only dist, the package's MIT LICENSE, package.json), ingest-types 8; the smoke run from a deleted dist builds through prepack
  • pnpm --filter @comfyorg/account smoke:pack: every non-Vue entry imported under plain Node, client pending to signed-out, tsc nodenext consumer passes, SFC declarations resolve with a real prop each; four negative proofs fail as intended (missing types file, wrong existing types file, swapped SFC declaration, any-typed SFC declaration)
  • Unit: account 46 files / 747 tests, unchanged; pnpm typecheck, pnpm lint, oxfmt --check, pnpm knip clean; pnpm build:cloud succeeds through the dev exports
  • git ls-files shows no dist tracked; the root ignore already covers it
  • Not covered: the publish itself and the provenance workflow (the next publishability PRs); the Vue subpath is proven for types and shipped files, not built by a bundler in the smoke test.

What this PR does not do

This PR makes @comfyorg/account publish-ready, not published.

Deliberately not done here; each is gated on an explicit publish decision, none blocks merging:

  • private: true stays on. It is the latch that prevents any accidental publish and is removed only at the first publish.
  • The publish itself: a separate owner-triggered workflow_dispatch on the alpha dist-tag, the same path as @comfyorg/design-system, ingest-types first, then account.
  • The OIDC provenance publish workflow for account.
📚 Stack of 11 · merge bottom-up · this PR is step 11
  1. refactor(account): decompose the session client into one typed commit boundary #17830 decompose the session client into one typed commit boundary
  2. feat(account): construct the session client with identity and add dispose #17831 construct the session client with identity + dispose()
  3. refactor(cloud): construct the session client with identity in the workspace auth store #17832 cloud store binds identity at construction; flag gates minting only
  4. refactor(website): construct the workshop session client with a lazy identity #17833 website binds identity through a lazily activated port
  5. refactor(cloud): initialize Firebase through the account package, dropping vuefire #17834 package initializes the cloud app's Firebase; drop vuefire
  6. refactor(account): delete the attachIdentity seam #17835 delete the transitional attachIdentity seam (ADR-0033)
  7. refactor(cloud): move the legacy workspace-token rail into its own module #17836 isolate the legacy workspace-token rail into its own module
  8. chore: drop the dead vuefire dependency and its test mocks #17837 drop the dead vuefire dependency + inert test mocks
  9. chore(account): publish files allowlist and packed-tarball smoke test #17838 files allowlist + packed-tarball smoke test
  10. refactor(account): cut the private utility dependencies and prep ingest-types for publish #17839 cut private util deps; prep ingest-types (MIT) for publish
  11. build(account,ingest-types): compile to dist for publish #17840 compile both packages to dist (ESM + d.ts) for publish ← this PR

Base: #17643 (hosts own the auth copy)

This PR stacks on #17839 and merges after it.

Linear: FE-2196

@coderabbitai

coderabbitai Bot commented Sep 16, 2026 •

Copy link
Copy Markdown
Contributor

Important

Review skipped

Auto reviews are disabled on base/target branches other than the default branch.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: ASSERTIVE

Plan: Advanced

Run ID: c42179c4-b4e9-4fe2-80a7-544b311f483b

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review

Comment @coderabbitai help to get the list of available commands.

@github-actions

github-actions Bot commented Sep 16, 2026 •

Copy link
Copy Markdown
Contributor

🎭 Playwright: ✅ 2024 passed, 0 failed · 1 flaky

📊 Browser Reports
  • chromium: View Report (✅ 2003 / ❌ 0 / ⚠️ 1 / ⏭️ 13)
  • chromium-2x: View Report (✅ 2 / ❌ 0 / ⚠️ 0 / ⏭️ 0)
  • chromium-0.5x: View Report (✅ 1 / ❌ 0 / ⚠️ 0 / ⏭️ 0)
  • mobile-chrome: View Report (✅ 18 / ❌ 0 / ⚠️ 0 / ⏭️ 0)

🌐 Website E2E

Tip

All tests passed.

Status ✅ Passed
Report View Report

🎨 Storybook: ✅ Built — View Storybook

Details

⏰ Completed at: 09/16/2026, 05:20:17 PM UTC

Links

📦 Bundle Size

⏳ Size data collection in progress…

⚡ Performance Report

canvas-idle: · 60.0 avg FPS · 59.7 P5 FPS ✅ (target: ≥52) · 0ms TBT · 62.9 MB heap
canvas-mouse-sweep: · 60.0 avg FPS · 59.7 P5 FPS ✅ (target: ≥52) · 0ms TBT · 68.9 MB heap
canvas-zoom-sweep: · 60.0 avg FPS · 59.9 P5 FPS ✅ (target: ≥52) · 0ms TBT · 61.0 MB heap
dom-widget-clipping: · 60.0 avg FPS · 59.7 P5 FPS ✅ (target: ≥52) · 0ms TBT · 75.6 MB heap
large-graph-idle: · 60.0 avg FPS · 59.5 P5 FPS ✅ (target: ≥52) · 0ms TBT · 78.2 MB heap
large-graph-pan: · 60.0 avg FPS · 59.9 P5 FPS ✅ (target: ≥52) · 0ms TBT · 75.5 MB heap
large-graph-zoom: · 60.0 avg FPS · 59.7 P5 FPS ✅ (target: ≥52) · 0ms TBT · 70.8 MB heap
legacy-node-drag: · 60.0 avg FPS · 59.5 P5 FPS ✅ (target: ≥52) · 0ms TBT · 76.3 MB heap
minimap-idle: · 60.0 avg FPS · 59.7 P5 FPS ✅ (target: ≥52) · 0ms TBT · 79.4 MB heap
subgraph-dom-widget-clipping: · 60.0 avg FPS · 59.7 P5 FPS ✅ (target: ≥52) · 0ms TBT · 73.0 MB heap
subgraph-idle: · 60.0 avg FPS · 59.7 P5 FPS ✅ (target: ≥52) · 0ms TBT · 67.6 MB heap
subgraph-mouse-sweep: · 60.0 avg FPS · 59.9 P5 FPS ✅ (target: ≥52) · 0ms TBT · 68.9 MB heap
subgraph-transition-enter: · 60.0 avg FPS · 59.9 P5 FPS ✅ (target: ≥52) · 146ms TBT · 98.0 MB heap
viewport-pan-sweep: · 60.0 avg FPS · 59.9 P5 FPS ✅ (target: ≥52) · 0ms TBT · 67.0 MB heap
vue-large-graph-idle: · 56.2 avg FPS · 59.5 P5 FPS ✅ (target: ≥52) · 0ms TBT · 168.3 MB heap
vue-large-graph-pan: · 56.3 avg FPS · 59.5 P5 FPS ✅ (target: ≥52) · 70ms TBT · 170.7 MB heap
vue-node-resize-workload: · 56.2 avg FPS · 59.7 P5 FPS ✅ (target: ≥52) · 432ms TBT · 169.8 MB heap
vue-zoom-out-idle: · 56.3 avg FPS · 59.5 P5 FPS ✅ (target: ≥52) · 0ms TBT · 182.8 MB heap
workflow-execution: · 60.0 avg FPS · 59.7 P5 FPS ✅ (target: ≥52) · 0ms TBT · 62.2 MB heap

ℹ️ No baseline found — significance unavailable.

Absolute values
Metric Value
canvas-idle: avg frame time 17ms
canvas-idle: p95 frame time 17ms
canvas-idle: layout duration 0ms
canvas-idle: style recalc duration 8ms
canvas-idle: layout count 0
canvas-idle: style recalc count 9
canvas-idle: task duration 452ms
canvas-idle: script duration 8ms
canvas-idle: TBT 0ms
canvas-idle: heap used 62.9 MB
canvas-idle: DOM nodes -264
canvas-idle: event listeners -163
canvas-mouse-sweep: avg frame time 17ms
canvas-mouse-sweep: p95 frame time 17ms
canvas-mouse-sweep: layout duration 4ms
canvas-mouse-sweep: style recalc duration 30ms
canvas-mouse-sweep: layout count 14
canvas-mouse-sweep: style recalc count 76
canvas-mouse-sweep: task duration 911ms
canvas-mouse-sweep: script duration 172ms
canvas-mouse-sweep: TBT 0ms
canvas-mouse-sweep: heap used 68.9 MB
canvas-mouse-sweep: DOM nodes -264
canvas-mouse-sweep: event listeners -163
canvas-zoom-sweep: avg frame time 17ms
canvas-zoom-sweep: p95 frame time 17ms
canvas-zoom-sweep: layout duration 1ms
canvas-zoom-sweep: style recalc duration 16ms
canvas-zoom-sweep: layout count 6
canvas-zoom-sweep: style recalc count 32
canvas-zoom-sweep: task duration 328ms
canvas-zoom-sweep: script duration 11ms
canvas-zoom-sweep: TBT 0ms
canvas-zoom-sweep: heap used 61.0 MB
canvas-zoom-sweep: DOM nodes 76
canvas-zoom-sweep: event listeners 15
dom-widget-clipping: avg frame time 17ms
dom-widget-clipping: p95 frame time 17ms
dom-widget-clipping: layout duration 0ms
dom-widget-clipping: style recalc duration 9ms
dom-widget-clipping: layout count 0
dom-widget-clipping: style recalc count 12
dom-widget-clipping: task duration 448ms
dom-widget-clipping: script duration 165ms
dom-widget-clipping: TBT 0ms
dom-widget-clipping: heap used 75.6 MB
dom-widget-clipping: DOM nodes 19
dom-widget-clipping: event listeners 0
large-graph-idle: avg frame time 17ms
large-graph-idle: p95 frame time 17ms
large-graph-idle: layout duration 0ms
large-graph-idle: style recalc duration 5ms
large-graph-idle: layout count 0
large-graph-idle: style recalc count 6
large-graph-idle: task duration 582ms
large-graph-idle: script duration 33ms
large-graph-idle: TBT 0ms
large-graph-idle: heap used 78.2 MB
large-graph-idle: DOM nodes -250
large-graph-idle: event listeners -174
large-graph-pan: avg frame time 17ms
large-graph-pan: p95 frame time 17ms
large-graph-pan: layout duration 0ms
large-graph-pan: style recalc duration 12ms
large-graph-pan: layout count 0
large-graph-pan: style recalc count 66
large-graph-pan: task duration 1649ms
large-graph-pan: script duration 849ms
large-graph-pan: TBT 0ms
large-graph-pan: heap used 75.5 MB
large-graph-pan: DOM nodes -252
large-graph-pan: event listeners -163
large-graph-zoom: avg frame time 17ms
large-graph-zoom: p95 frame time 17ms
large-graph-zoom: layout duration 12ms
large-graph-zoom: style recalc duration 10ms
large-graph-zoom: layout count 60
large-graph-zoom: style recalc count 62
large-graph-zoom: task duration 1663ms
large-graph-zoom: script duration 791ms
large-graph-zoom: TBT 0ms
large-graph-zoom: heap used 70.8 MB
large-graph-zoom: DOM nodes 3
large-graph-zoom: event listeners 0
legacy-node-drag: avg frame time 17ms
legacy-node-drag: p95 frame time 17ms
legacy-node-drag: layout duration 0ms
legacy-node-drag: style recalc duration 6ms
legacy-node-drag: layout count 0
legacy-node-drag: style recalc count 41
legacy-node-drag: task duration 1791ms
legacy-node-drag: script duration 963ms
legacy-node-drag: TBT 0ms
legacy-node-drag: heap used 76.3 MB
legacy-node-drag: DOM nodes 2
legacy-node-drag: event listeners 180
minimap-idle: avg frame time 17ms
minimap-idle: p95 frame time 17ms
minimap-idle: layout duration 0ms
minimap-idle: style recalc duration 6ms
minimap-idle: layout count 0
minimap-idle: style recalc count 6
minimap-idle: task duration 565ms
minimap-idle: script duration 36ms
minimap-idle: TBT 0ms
minimap-idle: heap used 79.4 MB
minimap-idle: DOM nodes -250
minimap-idle: event listeners -163
subgraph-dom-widget-clipping: avg frame time 17ms
subgraph-dom-widget-clipping: p95 frame time 17ms
subgraph-dom-widget-clipping: layout duration 0ms
subgraph-dom-widget-clipping: style recalc duration 10ms
subgraph-dom-widget-clipping: layout count 0
subgraph-dom-widget-clipping: style recalc count 47
subgraph-dom-widget-clipping: task duration 394ms
subgraph-dom-widget-clipping: script duration 140ms
subgraph-dom-widget-clipping: TBT 0ms
subgraph-dom-widget-clipping: heap used 73.0 MB
subgraph-dom-widget-clipping: DOM nodes 19
subgraph-dom-widget-clipping: event listeners 6
subgraph-idle: avg frame time 17ms
subgraph-idle: p95 frame time 17ms
subgraph-idle: layout duration 0ms
subgraph-idle: style recalc duration 8ms
subgraph-idle: layout count 0
subgraph-idle: style recalc count 10
subgraph-idle: task duration 399ms
subgraph-idle: script duration 7ms
subgraph-idle: TBT 0ms
subgraph-idle: heap used 67.6 MB
subgraph-idle: DOM nodes -276
subgraph-idle: event listeners -209
subgraph-mouse-sweep: avg frame time 17ms
subgraph-mouse-sweep: p95 frame time 17ms
subgraph-mouse-sweep: layout duration 5ms
subgraph-mouse-sweep: style recalc duration 26ms
subgraph-mouse-sweep: layout count 18
subgraph-mouse-sweep: style recalc count 77
subgraph-mouse-sweep: task duration 790ms
subgraph-mouse-sweep: script duration 111ms
subgraph-mouse-sweep: TBT 0ms
subgraph-mouse-sweep: heap used 68.9 MB
subgraph-mouse-sweep: DOM nodes -276
subgraph-mouse-sweep: event listeners -209
subgraph-transition-enter: avg frame time 17ms
subgraph-transition-enter: p95 frame time 17ms
subgraph-transition-enter: layout duration 13ms
subgraph-transition-enter: style recalc duration 29ms
subgraph-transition-enter: layout count 5
subgraph-transition-enter: style recalc count 17
subgraph-transition-enter: task duration 882ms
subgraph-transition-enter: script duration 31ms
subgraph-transition-enter: TBT 146ms
subgraph-transition-enter: heap used 98.0 MB
subgraph-transition-enter: DOM nodes 13587
subgraph-transition-enter: event listeners 2383
viewport-pan-sweep: avg frame time 17ms
viewport-pan-sweep: p95 frame time 17ms
viewport-pan-sweep: layout duration 0ms
viewport-pan-sweep: style recalc duration 34ms
viewport-pan-sweep: layout count 0
viewport-pan-sweep: style recalc count 248
viewport-pan-sweep: task duration 5716ms
viewport-pan-sweep: script duration 2733ms
viewport-pan-sweep: TBT 0ms
viewport-pan-sweep: heap used 67.0 MB
viewport-pan-sweep: DOM nodes -247
viewport-pan-sweep: event listeners -163
vue-large-graph-idle: avg frame time 18ms
vue-large-graph-idle: p95 frame time 17ms
vue-large-graph-idle: layout duration 0ms
vue-large-graph-idle: style recalc duration 0ms
vue-large-graph-idle: layout count 0
vue-large-graph-idle: style recalc count 0
vue-large-graph-idle: task duration 16383ms
vue-large-graph-idle: script duration 286ms
vue-large-graph-idle: TBT 0ms
vue-large-graph-idle: heap used 168.3 MB
vue-large-graph-idle: DOM nodes -8061
vue-large-graph-idle: event listeners -14928
vue-large-graph-pan: avg frame time 18ms
vue-large-graph-pan: p95 frame time 17ms
vue-large-graph-pan: layout duration 0ms
vue-large-graph-pan: style recalc duration 17ms
vue-large-graph-pan: layout count 0
vue-large-graph-pan: style recalc count 170
vue-large-graph-pan: task duration 20146ms
vue-large-graph-pan: script duration 893ms
vue-large-graph-pan: TBT 70ms
vue-large-graph-pan: heap used 170.7 MB
vue-large-graph-pan: DOM nodes -8063
vue-large-graph-pan: event listeners -14928
vue-node-resize-workload: avg frame time 18ms
vue-node-resize-workload: p95 frame time 17ms
vue-node-resize-workload: layout duration 23ms
vue-node-resize-workload: style recalc duration 81ms
vue-node-resize-workload: layout count 20
vue-node-resize-workload: style recalc count 20
vue-node-resize-workload: task duration 6025ms
vue-node-resize-workload: script duration 111ms
vue-node-resize-workload: TBT 432ms
vue-node-resize-workload: heap used 169.8 MB
vue-node-resize-workload: DOM nodes -8061
vue-node-resize-workload: event listeners -14928
vue-zoom-out-idle: avg frame time 18ms
vue-zoom-out-idle: p95 frame time 17ms
vue-zoom-out-idle: layout duration 0ms
vue-zoom-out-idle: style recalc duration 0ms
vue-zoom-out-idle: layout count 0
vue-zoom-out-idle: style recalc count 0
vue-zoom-out-idle: task duration 8256ms
vue-zoom-out-idle: script duration 136ms
vue-zoom-out-idle: TBT 0ms
vue-zoom-out-idle: heap used 182.8 MB
vue-zoom-out-idle: DOM nodes 0
vue-zoom-out-idle: event listeners 0
workflow-execution: avg frame time 17ms
workflow-execution: p95 frame time 17ms
workflow-execution: layout duration 1ms
workflow-execution: style recalc duration 20ms
workflow-execution: layout count 3
workflow-execution: style recalc count 11
workflow-execution: task duration 99ms
workflow-execution: script duration 11ms
workflow-execution: TBT 0ms
workflow-execution: heap used 62.2 MB
workflow-execution: DOM nodes 126
workflow-execution: event listeners 49
Raw data
{
  "timestamp": "2026-09-16T17:29:54.449Z",
  "gitSha": "f696dce39b8b39f7a4f22cf2de47f4ccea40537f",
  "branch": "maanil/fe-2196-d2-build",
  "measurements": [
    {
      "name": "canvas-idle",
      "durationMs": 1991.92800000003,
      "styleRecalcs": 8,
      "styleRecalcDurationMs": 7.651999999999999,
      "layouts": 0,
      "layoutDurationMs": 0,
      "taskDurationMs": 452.083,
      "heapDeltaBytes": 14121976,
      "heapUsedBytes": 74794528,
      "domNodes": -264,
      "jsHeapTotalBytes": 4186112,
      "scriptDurationMs": 8.201999999999998,
      "eventListeners": -152,
      "totalBlockingTimeMs": 0,
      "frameDurationMs": 16.666666666666668,
      "p95FrameDurationMs": 16.700000000000728
    },
    {
      "name": "canvas-idle",
      "durationMs": 2015.705999999966,
      "styleRecalcs": 9,
      "styleRecalcDurationMs": 8.139000000000001,
      "layouts": 0,
      "layoutDurationMs": 0,
      "taskDurationMs": 451.5830000000001,
      "heapDeltaBytes": -4480664,
      "heapUsedBytes": 57071080,
      "domNodes": -263,
      "jsHeapTotalBytes": 3923968,
      "scriptDurationMs": 8.289000000000001,
      "eventListeners": -174,
      "totalBlockingTimeMs": 0,
      "frameDurationMs": 16.666666666666668,
      "p95FrameDurationMs": 16.800000000000182
    },
    {
      "name": "canvas-mouse-sweep",
      "durationMs": 1983.1649999999854,
      "styleRecalcs": 78,
      "styleRecalcDurationMs": 34.153999999999996,
      "layouts": 14,
      "layoutDurationMs": 4.894,
      "taskDurationMs": 993.677,
      "heapDeltaBytes": 19333368,
      "heapUsedBytes": 80243272,
      "domNodes": -265,
      "jsHeapTotalBytes": 5234688,
      "scriptDurationMs": 181.909,
      "eventListeners": -152,
      "totalBlockingTimeMs": 0,
      "frameDurationMs": 16.66333333333332,
      "p95FrameDurationMs": 16.700000000000728
    },
    {
      "name": "canvas-mouse-sweep",
      "durationMs": 1824.3680000000495,
      "styleRecalcs": 73,
      "styleRecalcDurationMs": 26.038999999999998,
      "layouts": 14,
      "layoutDurationMs": 4.082,
      "taskDurationMs": 827.3349999999999,
      "heapDeltaBytes": 2485952,
      "heapUsedBytes": 64338808,
      "domNodes": -263,
      "jsHeapTotalBytes": 6021120,
      "scriptDurationMs": 162.427,
      "eventListeners": -174,
      "totalBlockingTimeMs": 0,
      "frameDurationMs": 16.66333333333335,
      "p95FrameDurationMs": 16.800000000000182
    },
    {
      "name": "canvas-zoom-sweep",
      "durationMs": 1736.6079999999897,
      "styleRecalcs": 33,
      "styleRecalcDurationMs": 17.34,
      "layouts": 6,
      "layoutDurationMs": 1.0710000000000002,
      "taskDurationMs": 328.85200000000003,
      "heapDeltaBytes": 2128360,
      "heapUsedBytes": 63958564,
      "domNodes": 77,
      "jsHeapTotalBytes": 4980736,
      "scriptDurationMs": 11.033999999999999,
      "eventListeners": 15,
      "totalBlockingTimeMs": 0,
      "frameDurationMs": 16.666666666666668,
      "p95FrameDurationMs": 16.700000000000728
    },
    {
      "name": "canvas-zoom-sweep",
      "durationMs": 1680.2400000000262,
      "styleRecalcs": 31,
      "styleRecalcDurationMs": 15.414,
      "layouts": 6,
      "layoutDurationMs": 1.186,
      "taskDurationMs": 327.66499999999996,
      "heapDeltaBytes": 2180104,
      "heapUsedBytes": 63895592,
      "domNodes": 75,
      "jsHeapTotalBytes": 4980736,
      "scriptDurationMs": 10.048000000000002,
      "eventListeners": 15,
      "totalBlockingTimeMs": 0,
      "frameDurationMs": 16.666666666666668,
      "p95FrameDurationMs": 16.700000000000728
    },
    {
      "name": "dom-widget-clipping",
      "durationMs": 628.4770000000321,
      "styleRecalcs": 11,
      "styleRecalcDurationMs": 8.4,
      "layouts": 0,
      "layoutDurationMs": 0,
      "taskDurationMs": 445.74100000000004,
      "heapDeltaBytes": 18151568,
      "heapUsedBytes": 78737232,
      "domNodes": 18,
      "jsHeapTotalBytes": 5767168,
      "scriptDurationMs": 164.099,
      "eventListeners": 0,
      "totalBlockingTimeMs": 0,
      "frameDurationMs": 16.666666666666668,
      "p95FrameDurationMs": 16.700000000000728
    },
    {
      "name": "dom-widget-clipping",
      "durationMs": 649.3259999999736,
      "styleRecalcs": 12,
      "styleRecalcDurationMs": 8.841000000000001,
      "layouts": 0,
      "layoutDurationMs": 0,
      "taskDurationMs": 450.55600000000004,
      "heapDeltaBytes": 17897336,
      "heapUsedBytes": 79814016,
      "domNodes": 20,
      "jsHeapTotalBytes": 4718592,
      "scriptDurationMs": 165.822,
      "eventListeners": 0,
      "totalBlockingTimeMs": 0,
      "frameDurationMs": 16.666666666666668,
      "p95FrameDurationMs": 16.800000000000182
    },
    {
      "name": "large-graph-idle",
      "durationMs": 2023.2579999999984,
      "styleRecalcs": 4,
      "styleRecalcDurationMs": 3.8060000000000005,
      "layouts": 0,
      "layoutDurationMs": 0,
      "taskDurationMs": 560.4780000000002,
      "heapDeltaBytes": 3075480,
      "heapUsedBytes": 82365284,
      "domNodes": -250,
      "jsHeapTotalBytes": -1318912,
      "scriptDurationMs": 31.514,
      "eventListeners": -174,
      "totalBlockingTimeMs": 0,
      "frameDurationMs": 16.666666666666668,
      "p95FrameDurationMs": 16.800000000000182
    },
    {
      "name": "large-graph-idle",
      "durationMs": 2049.8549999999796,
      "styleRecalcs": 7,
      "styleRecalcDurationMs": 6.998000000000001,
      "layouts": 0,
      "layoutDurationMs": 0,
      "taskDurationMs": 603.3609999999999,
      "heapDeltaBytes": 3639704,
      "heapUsedBytes": 81613564,
      "domNodes": -249,
      "jsHeapTotalBytes": -8192,
      "scriptDurationMs": 34.894999999999996,
      "eventListeners": -174,
      "totalBlockingTimeMs": 0,
      "frameDurationMs": 16.666666666666668,
      "p95FrameDurationMs": 16.800000000000182
    },
    {
      "name": "large-graph-pan",
      "durationMs": 2277.520999999979,
      "styleRecalcs": 66,
      "styleRecalcDurationMs": 10.685999999999998,
      "layouts": 0,
      "layoutDurationMs": 0,
      "taskDurationMs": 1666.264,
      "heapDeltaBytes": 176692,
      "heapUsedBytes": 79123624,
      "domNodes": -253,
      "jsHeapTotalBytes": 479232,
      "scriptDurationMs": 857.15,
      "eventListeners": -174,
      "totalBlockingTimeMs": 0,
      "frameDurationMs": 16.66333333333332,
      "p95FrameDurationMs": 16.700000000000728
    },
    {
      "name": "large-graph-pan",
      "durationMs": 2188.395000000014,
      "styleRecalcs": 66,
      "styleRecalcDurationMs": 12.844000000000001,
      "layouts": 0,
      "layoutDurationMs": 0,
      "taskDurationMs": 1631.949,
      "heapDeltaBytes": -710148,
      "heapUsedBytes": 79264196,
      "domNodes": -250,
      "jsHeapTotalBytes": 1003520,
      "scriptDurationMs": 841.5269999999999,
      "eventListeners": -152,
      "totalBlockingTimeMs": 0,
      "frameDurationMs": 16.666666666666668,
      "p95FrameDurationMs": 16.699999999999818
    },
    {
      "name": "large-graph-zoom",
      "durationMs": 3554.9179999999865,
      "styleRecalcs": 61,
      "styleRecalcDurationMs": 10.052999999999999,
      "layouts": 60,
      "layoutDurationMs": 12.472000000000001,
      "taskDurationMs": 1677.3880000000001,
      "heapDeltaBytes": 9128520,
      "heapUsedBytes": 74480340,
      "domNodes": 2,
      "jsHeapTotalBytes": 0,
      "scriptDurationMs": 802.37,
      "eventListeners": 0,
      "totalBlockingTimeMs": 0,
      "frameDurationMs": 16.666666666666668,
      "p95FrameDurationMs": 16.700000000000728
    },
    {
      "name": "large-graph-zoom",
      "durationMs": 3528.9940000000115,
      "styleRecalcs": 62,
      "styleRecalcDurationMs": 10.938999999999997,
      "layouts": 60,
      "layoutDurationMs": 12.357,
      "taskDurationMs": 1649.55,
      "heapDeltaBytes": 8689256,
      "heapUsedBytes": 74027096,
      "domNodes": 4,
      "jsHeapTotalBytes": 262144,
      "scriptDurationMs": 779.964,
      "eventListeners": 0,
      "totalBlockingTimeMs": 0,
      "frameDurationMs": 16.666666666666668,
      "p95FrameDurationMs": 16.799999999999272
    },
    {
      "name": "legacy-node-drag",
      "durationMs": 2970.6240000000435,
      "styleRecalcs": 42,
      "styleRecalcDurationMs": 6.759000000000001,
      "layouts": 0,
      "layoutDurationMs": 0,
      "taskDurationMs": 1730.1019999999999,
      "heapDeltaBytes": 14821824,
      "heapUsedBytes": 80114724,
      "domNodes": 4,
      "jsHeapTotalBytes": 1466368,
      "scriptDurationMs": 971.322,
      "eventListeners": 180,
      "totalBlockingTimeMs": 0,
      "frameDurationMs": 16.670000000000012,
      "p95FrameDurationMs": 16.800000000000182
    },
    {
      "name": "legacy-node-drag",
      "durationMs": 3080.340999999976,
      "styleRecalcs": 40,
      "styleRecalcDurationMs": 4.823999999999998,
      "layouts": 0,
      "layoutDurationMs": 0,
      "taskDurationMs": 1852.3670000000002,
      "heapDeltaBytes": 14115480,
      "heapUsedBytes": 79877856,
      "domNodes": 0,
      "jsHeapTotalBytes": 942080,
      "scriptDurationMs": 954.548,
      "eventListeners": 180,
      "totalBlockingTimeMs": 0,
      "frameDurationMs": 16.666666666666668,
      "p95FrameDurationMs": 16.799999999999272
    },
    {
      "name": "minimap-idle",
      "durationMs": 2026.6829999999914,
      "styleRecalcs": 7,
      "styleRecalcDurationMs": 6.575000000000001,
      "layouts": 0,
      "layoutDurationMs": 0,
      "taskDurationMs": 564.7729999999999,
      "heapDeltaBytes": -3031752,
      "heapUsedBytes": 83628496,
      "domNodes": -248,
      "jsHeapTotalBytes": -495616,
      "scriptDurationMs": 39.396,
      "eventListeners": -152,
      "totalBlockingTimeMs": 0,
      "frameDurationMs": 16.666666666666668,
      "p95FrameDurationMs": 16.700000000000728
    },
    {
      "name": "minimap-idle",
      "durationMs": 2036.6539999999986,
      "styleRecalcs": 5,
      "styleRecalcDurationMs": 5.223000000000002,
      "layouts": 0,
      "layoutDurationMs": 0,
      "taskDurationMs": 565.7880000000001,
      "heapDeltaBytes": -4355692,
      "heapUsedBytes": 82805892,
      "domNodes": -251,
      "jsHeapTotalBytes": -495616,
      "scriptDurationMs": 33.123,
      "eventListeners": -174,
      "totalBlockingTimeMs": 0,
      "frameDurationMs": 16.666666666666668,
      "p95FrameDurationMs": 16.800000000000182
    },
    {
      "name": "subgraph-dom-widget-clipping",
      "durationMs": 588.6270000000309,
      "styleRecalcs": 47,
      "styleRecalcDurationMs": 10.406,
      "layouts": 0,
      "layoutDurationMs": 0,
      "taskDurationMs": 395.154,
      "heapDeltaBytes": 13451484,
      "heapUsedBytes": 76569868,
      "domNodes": 20,
      "jsHeapTotalBytes": 5242880,
      "scriptDurationMs": 138.06799999999998,
      "eventListeners": 6,
      "totalBlockingTimeMs": 0,
      "frameDurationMs": 16.666666666666668,
      "p95FrameDurationMs": 16.799999999999272
    },
    {
      "name": "subgraph-dom-widget-clipping",
      "durationMs": 572.0949999999903,
      "styleRecalcs": 46,
      "styleRecalcDurationMs": 10.462,
      "layouts": 0,
      "layoutDurationMs": 0,
      "taskDurationMs": 393.45699999999994,
      "heapDeltaBytes": 13728784,
      "heapUsedBytes": 76624072,
      "domNodes": 18,
      "jsHeapTotalBytes": 5505024,
      "scriptDurationMs": 141.464,
      "eventListeners": 6,
      "totalBlockingTimeMs": 0,
      "frameDurationMs": 16.666666666666668,
      "p95FrameDurationMs": 16.700000000000728
    },
    {
      "name": "subgraph-idle",
      "durationMs": 2005.4430000000139,
      "styleRecalcs": 10,
      "styleRecalcDurationMs": 8.963,
      "layouts": 0,
      "layoutDurationMs": 0,
      "taskDurationMs": 357.21400000000006,
      "heapDeltaBytes": 6500228,
      "heapUsedBytes": 69605012,
      "domNodes": -274,
      "jsHeapTotalBytes": 3923968,
      "scriptDurationMs": 7.533999999999999,
      "eventListeners": -220,
      "totalBlockingTimeMs": 0,
      "frameDurationMs": 16.666666666666668,
      "p95FrameDurationMs": 16.800000000000182
    },
    {
      "name": "subgraph-idle",
      "durationMs": 2001.408999999967,
      "styleRecalcs": 9,
      "styleRecalcDurationMs": 7.511,
      "layouts": 0,
      "layoutDurationMs": 0,
      "taskDurationMs": 440.426,
      "heapDeltaBytes": 9013852,
      "heapUsedBytes": 72080492,
      "domNodes": -277,
      "jsHeapTotalBytes": 4448256,
      "scriptDurationMs": 7.052,
      "eventListeners": -198,
      "totalBlockingTimeMs": 0,
      "frameDurationMs": 16.666666666666668,
      "p95FrameDurationMs": 16.700000000000728
    },
    {
      "name": "subgraph-mouse-sweep",
      "durationMs": 1724.4539999999802,
      "styleRecalcs": 77,
      "styleRecalcDurationMs": 26.879,
      "layouts": 18,
      "layoutDurationMs": 5.803,
      "taskDurationMs": 807.0330000000001,
      "heapDeltaBytes": 11644588,
      "heapUsedBytes": 73736472,
      "domNodes": -277,
      "jsHeapTotalBytes": 4448256,
      "scriptDurationMs": 116.32900000000002,
      "eventListeners": -198,
      "totalBlockingTimeMs": 0,
      "frameDurationMs": 16.666666666666668,
      "p95FrameDurationMs": 16.699999999999818
    },
    {
      "name": "subgraph-mouse-sweep",
      "durationMs": 1691.440000000057,
      "styleRecalcs": 77,
      "styleRecalcDurationMs": 25.770999999999994,
      "layouts": 18,
      "layoutDurationMs": 5.074000000000001,
      "taskDurationMs": 772.678,
      "heapDeltaBytes": 7713132,
      "heapUsedBytes": 70814380,
      "domNodes": -274,
      "jsHeapTotalBytes": 5758976,
      "scriptDurationMs": 106.63,
      "eventListeners": -220,
      "totalBlockingTimeMs": 0,
      "frameDurationMs": 16.666666666666668,
      "p95FrameDurationMs": 16.700000000000728
    },
    {
      "name": "subgraph-transition-enter",
      "durationMs": 1402.003000000036,
      "styleRecalcs": 17,
      "styleRecalcDurationMs": 29.380999999999997,
      "layouts": 5,
      "layoutDurationMs": 13.232999999999999,
      "taskDurationMs": 882.1169999999998,
      "heapDeltaBytes": 20114896,
      "heapUsedBytes": 102794412,
      "domNodes": 13587,
      "jsHeapTotalBytes": 10747904,
      "scriptDurationMs": 31.08099999999999,
      "eventListeners": 2383,
      "totalBlockingTimeMs": 146,
      "frameDurationMs": 16.666666666666668,
      "p95FrameDurationMs": 16.700000000000728
    },
    {
      "name": "viewport-pan-sweep",
      "durationMs": 8241.814000000033,
      "styleRecalcs": 248,
      "styleRecalcDurationMs": 34.285000000000004,
      "layouts": 0,
      "layoutDurationMs": 0,
      "taskDurationMs": 5679.89,
      "heapDeltaBytes": -14379248,
      "heapUsedBytes": 65256952,
      "domNodes": -246,
      "jsHeapTotalBytes": 253952,
      "scriptDurationMs": 2731.065,
      "eventListeners": -152,
      "totalBlockingTimeMs": 0,
      "frameDurationMs": 16.666666666666668,
      "p95FrameDurationMs": 16.700000000000728
    },
    {
      "name": "viewport-pan-sweep",
      "durationMs": 8291.289000000006,
      "styleRecalcs": 248,
      "styleRecalcDurationMs": 34.619,
      "layouts": 0,
      "layoutDurationMs": 0,
      "taskDurationMs": 5752.731000000001,
      "heapDeltaBytes": -4088420,
      "heapUsedBytes": 75180380,
      "domNodes": -248,
      "jsHeapTotalBytes": 184320,
      "scriptDurationMs": 2734.7219999999998,
      "eventListeners": -174,
      "totalBlockingTimeMs": 0,
      "frameDurationMs": 16.666666666666668,
      "p95FrameDurationMs": 16.700000000000728
    },
    {
      "name": "vue-large-graph-idle",
      "durationMs": 16790.51500000003,
      "styleRecalcs": 0,
      "styleRecalcDurationMs": 0,
      "layouts": 0,
      "layoutDurationMs": 0,
      "taskDurationMs": 16411.614,
      "heapDeltaBytes": -45900740,
      "heapUsedBytes": 175807996,
      "domNodes": -8061,
      "jsHeapTotalBytes": -18550784,
      "scriptDurationMs": 302.257,
      "eventListeners": -14928,
      "totalBlockingTimeMs": 0,
      "frameDurationMs": 17.780000000000047,
      "p95FrameDurationMs": 16.799999999999272
    },
    {
      "name": "vue-large-graph-idle",
      "durationMs": 16877.405000000068,
      "styleRecalcs": 0,
      "styleRecalcDurationMs": 0,
      "layouts": 0,
      "layoutDurationMs": 0,
      "taskDurationMs": 16354.954,
      "heapDeltaBytes": -32271020,
      "heapUsedBytes": 177243080,
      "domNodes": -8061,
      "jsHeapTotalBytes": -10018816,
      "scriptDurationMs": 269.206,
      "eventListeners": -14928,
      "totalBlockingTimeMs": 0,
      "frameDurationMs": 17.776666666666642,
      "p95FrameDurationMs": 16.799999999999272
    },
    {
      "name": "vue-large-graph-pan",
      "durationMs": 20308.81499999998,
      "styleRecalcs": 174,
      "styleRecalcDurationMs": 16.78500000000002,
      "layouts": 0,
      "layoutDurationMs": 0,
      "taskDurationMs": 20021.82,
      "heapDeltaBytes": -41665328,
      "heapUsedBytes": 167813348,
      "domNodes": -8065,
      "jsHeapTotalBytes": -14487552,
      "scriptDurationMs": 890.018,
      "eventListeners": -14928,
      "totalBlockingTimeMs": 64,
      "frameDurationMs": 17.776666666666763,
      "p95FrameDurationMs": 16.799999999999272
    },
    {
      "name": "vue-large-graph-pan",
      "durationMs": 20535.82300000005,
      "styleRecalcs": 166,
      "styleRecalcDurationMs": 17.230999999999995,
      "layouts": 0,
      "layoutDurationMs": 0,
      "taskDurationMs": 20270.198,
      "heapDeltaBytes": -18777360,
      "heapUsedBytes": 190118956,
      "domNodes": -8061,
      "jsHeapTotalBytes": -11644928,
      "scriptDurationMs": 896.7360000000001,
      "eventListeners": -14928,
      "totalBlockingTimeMs": 75,
      "frameDurationMs": 17.776666666666763,
      "p95FrameDurationMs": 16.799999999999272
    },
    {
      "name": "vue-node-resize-workload",
      "durationMs": 6095.152999999982,
      "styleRecalcs": 20,
      "styleRecalcDurationMs": 79.798,
      "layouts": 20,
      "layoutDurationMs": 22.674,
      "taskDurationMs": 6013.352000000001,
      "heapDeltaBytes": -44032636,
      "heapUsedBytes": 175202208,
      "domNodes": -8061,
      "jsHeapTotalBytes": 7405568,
      "scriptDurationMs": 105.48,
      "eventListeners": -14928,
      "totalBlockingTimeMs": 348,
      "frameDurationMs": 17.779999999999987,
      "p95FrameDurationMs": 16.700000000000728
    },
    {
      "name": "vue-node-resize-workload",
      "durationMs": 6122.806999999966,
      "styleRecalcs": 20,
      "styleRecalcDurationMs": 81.60000000000001,
      "layouts": 20,
      "layoutDurationMs": 22.756999999999998,
      "taskDurationMs": 6035.879,
      "heapDeltaBytes": -34722140,
      "heapUsedBytes": 180816196,
      "domNodes": -8061,
      "jsHeapTotalBytes": 17260544,
      "scriptDurationMs": 115.52600000000001,
      "eventListeners": -14928,
      "totalBlockingTimeMs": 516,
      "frameDurationMs": 17.776666666666642,
      "p95FrameDurationMs": 16.799999999999272
    },
    {
      "name": "vue-zoom-out-idle",
      "durationMs": 8576.909,
      "styleRecalcs": 0,
      "styleRecalcDurationMs": 0,
      "layouts": 0,
      "layoutDurationMs": 0,
      "taskDurationMs": 8313.976999999999,
      "heapDeltaBytes": 16529092,
      "heapUsedBytes": 195209428,
      "domNodes": 0,
      "jsHeapTotalBytes": -25952256,
      "scriptDurationMs": 142.62599999999998,
      "eventListeners": 0,
      "totalBlockingTimeMs": 0,
      "frameDurationMs": 17.776666666666642,
      "p95FrameDurationMs": 16.799999999999272
    },
    {
      "name": "vue-zoom-out-idle",
      "durationMs": 8410.062000000038,
      "styleRecalcs": 0,
      "styleRecalcDurationMs": 0,
      "layouts": 0,
      "layoutDurationMs": 0,
      "taskDurationMs": 8197.027000000002,
      "heapDeltaBytes": -5302820,
      "heapUsedBytes": 188114436,
      "domNodes": 0,
      "jsHeapTotalBytes": -25427968,
      "scriptDurationMs": 130.02599999999998,
      "eventListeners": 0,
      "totalBlockingTimeMs": 0,
      "frameDurationMs": 17.776666666666642,
      "p95FrameDurationMs": 16.799999999999272
    },
    {
      "name": "workflow-execution",
      "durationMs": 127.77399999998806,
      "styleRecalcs": 9,
      "styleRecalcDurationMs": 18.127000000000002,
      "layouts": 2,
      "layoutDurationMs": 1.2109999999999999,
      "taskDurationMs": 93.754,
      "heapDeltaBytes": 3126056,
      "heapUsedBytes": 64318900,
      "domNodes": 133,
      "jsHeapTotalBytes": 0,
      "scriptDurationMs": 11.954,
      "eventListeners": 17,
      "totalBlockingTimeMs": 0,
      "frameDurationMs": 16.666666666666668,
      "p95FrameDurationMs": 16.700000000000728
    },
    {
      "name": "workflow-execution",
      "durationMs": 461.1939999999777,
      "styleRecalcs": 12,
      "styleRecalcDurationMs": 21.315000000000005,
      "layouts": 3,
      "layoutDurationMs": 0.941,
      "taskDurationMs": 104.65799999999997,
      "heapDeltaBytes": 4839612,
      "heapUsedBytes": 66209672,
      "domNodes": 119,
      "jsHeapTotalBytes": 262144,
      "scriptDurationMs": 9.080000000000002,
      "eventListeners": 81,
      "totalBlockingTimeMs": 0,
      "frameDurationMs": 16.670000000000012,
      "p95FrameDurationMs": 16.800000000000182
    }
  ]
}

🔬 E2E Coverage

Metric Covered Total Pct
Lines 51110 77445 66.0% 🟡
Functions 0 0 — —
Branches 0 0 — —
Top 10 files by uncovered lines
File Coverage Missed
src/LGraphCanvas.ts 67.7% 1159
src/LGraphNode.ts 69.9% 388
src/extensions/core/cameraInfo/CameraInfoViewport.ts 2.0% 343
src/renderer/extensions/layerEditor/composables/useLayerEditorSession.ts 40.1% 332
src/platform/workspace/stores/billingOperationStore.ts 7.9% 313
src/LGraph.ts 79.1% 263
src/platform/workspace/stores/teamWorkspaceStore.ts 38.9% 256
src/scripts/app.ts 71.7% 255
src/core/billing/operationLifecycle.ts 0.9% 226
src/scripts/pnginfo.ts 21.4% 221

@codecov

codecov Bot commented Sep 16, 2026 •

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.

@@                         Coverage Diff                         @@
##           maanil/fe-2196-d2-consumability   #17840      +/-   ##
===================================================================
+ Coverage                            82.60%   82.64%   +0.04%     
===================================================================
  Files                                 2859     2860       +1     
  Lines                               141907   142060     +153     
  Branches                             38317    38365      +48     
===================================================================
+ Hits                                117216   117402     +186     
+ Misses                               23490    23458      -32     
+ Partials                              1201     1200       -1     
Flag Coverage Δ
billing-web 100.00% <ø> (ø)
e2e 66.18% <ø> (+0.03%) ⬆️
unit 78.75% <ø> (+0.04%) ⬆️
website-unit 74.64% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

Files with missing lines Coverage Δ
packages/account/src/turnstileScript.ts 80.00% <ø> (ø)
packages/account/src/vue/PasswordRules.vue 87.50% <ø> (ø)
packages/account/src/vue/TurnstileWidget.vue 90.19% <ø> (ø)
packages/account/src/vue/regionGate.ts 100.00% <ø> (ø)

... and 19 files with indirect coverage changes

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@github-actions github-actions Bot added the risk:xhigh PR risk grade (advisory shadow check; grader-owned) label Sep 16, 2026
@vercel

vercel Bot commented Sep 16, 2026 •

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated
billing-web Ready Ready Preview Sep 16, 2026 5:18pm UTC

Request Review

@dante01yoon dante01yoon left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I reproduced this one end to end rather than reading it, because the failure mode it prevents (raw .ts under node_modules) is exactly the kind that only shows up at the consumer. In an isolated worktree at this head:

  • pnpm --filter @comfyorg/ingest-types build and pnpm --filter @comfyorg/account build both succeed under noEmitOnError.
  • Export parity is exact: 25 dev exports keys and 25 publishConfig.exports keys, identical key sets, every dev entry pointing into src and every publish entry into dist. That is the check I most wanted to make, since a subpath present in exports but missing from publishConfig.exports would resolve to a src path that the files: ["dist"] allowlist does not ship.
  • After the build, every publishConfig target file exists on disk (I resolved all types/import conditions) — no dangling condition.
  • find dist -name '*.vue.js' is empty, so the vue-tsc SFC artifacts really are cleaned up, and dist/vue/*.vue plus dist/vue/*.vue.d.ts are both present for the three components.
  • Both manifests keep private: true, carry license: MIT, and ship their own MIT LICENSE file.

The LICENSE-per-package fix is a real catch worth calling out separately: without it pnpm was injecting the repository's GPL-3.0 file into tarballs whose manifest says MIT. Agreed that design-system has the same exposure and is a follow-up.

Also agreed on the .js extensions and on deleting the emitted .vue.js — shipping the SFCs as source is the right call while the Vue-layer split owns the library build. The negative proofs in the smoke test (wrong-but-existing types target failing only in the tsc step, any-typed declarations failing via unused @ts-expect-error) are what make the consumability claim mean something.

Validation (head eb706544): both package builds as above; account package 46 files / 762 tests green; cloud auth-area suites 134 files / 2888 tests green; website src/config 79 files / 2464 tests green.

Not run: the publish itself and the provenance workflow, which you scoped out; and I did not bundle the Vue subpath through a real bundler, which your QA notes already list as uncovered.

@dante01yoon dante01yoon left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Requesting one design change before this lands; everything else in the compile step is what the plan asks for and I would approve it as-is with that change.

The published core must not carry the Vue layer. This PR compiles src/vue/** with vue-tsc, copies the three SFCs into dist/vue, emits .vue.d.ts declarations, and publishes seven ./vue/* entries. That bakes the opposite of the plan's first decision into the artifact Platform will install:

  • Billing SDK implementation plan V2, "Two decisions that change the TDD": the Vue layer leaves @comfyorg/account; composables and unstyled components ship from @comfyorg/account-ui, and the core keeps zero Vue coupling by construction rather than by an import-guard test.
  • Same doc, "Where these phases stop", prerequisite (2) of the npm-publish decision: the physical account-core / account-ui split precedes the first publish, so the public artifact is the final boundary, not the transitional packages/account.
  • The PR body already names this: "a Vite library build is the Vue-layer split territory". Agreed, and that territory is not this package.

Where the split stands: #17851 renames the package to @comfyorg/account-core (mechanical, replay script), and #17854 on top of it moves src/vue/** to packages/account-ui/src/auth/** (./auth/* exports, tests along, a vueBoundary test proving no vue import, no Vue dependency in any manifest field, no .vue behind any export). After that the core's typecheck is tsc --noEmit and vue, @vueuse/core, vue-tsc, @vitejs/plugin-vue are gone from its manifest.

Sequencing so nobody re-does work: your stack (#17830 → #17840) lands first; I regenerate #17851 and #17854 on top of it. So the ask here is only to not ship Vue from dist:

  1. Build with tsc -p tsconfig.build.json instead of vue-tsc, and drop scripts/copyVueSources.ts and the tsx post-step.
  2. Remove src/vue/*.ts and src/vue/*.vue from tsconfig.build.json's include.
  3. Remove the seven ./vue/* entries from publishConfig.exports (keep the dev exports that point at src so nothing in the monorepo changes today; #17854 removes those).
  4. Drop the "Vue SFC, needs a bundler" branch from smokePack.ts; with (3) no published entry resolves to a .vue.

vue-tsc can stay as a devDependency for the workspace typecheck until #17854 removes it. If you would rather keep this PR exactly as it is and have #17854 undo the Vue build afterwards, say so and I will re-approve, but then the first publish has to wait for #17854 either way, and the plan's prerequisite is easier to honour by not adding the step now.

"types": "./dist/web/crossTabRefresh.d.ts",
"import": "./dist/web/crossTabRefresh.js"
},
"./vue/PasswordRules": {

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

These seven ./vue/* published entries are the Vue layer the plan keeps out of the core artifact. Remove them from publishConfig.exports; keep the src-pointing dev exports so the monorepo is unchanged until #17854 moves the files to @comfyorg/account-ui (./auth/*).

"access": "public"
},
"scripts": {
"build": "pnpm run clean && vue-tsc -p tsconfig.build.json && tsx scripts/copyVueSources.ts",

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

tsc -p tsconfig.build.json is enough once src/vue is out of the build include; no vue-tsc emit and no copy post-step. vue-tsc --noEmit for the workspace typecheck can stay until #17854 drops the Vue dependency.

@@ -0,0 +1,18 @@
/**
* The Vue SFCs ship as source for the consumer's bundler: vue-tsc emits their

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Delete: the SFCs are not part of the published core. They ship from @comfyorg/account-ui after #17854, where a library build for .vue sources belongs if one is ever needed.

"src/firebase/index.ts",
"src/web/crossTabRefresh.ts",
"src/vue/*.ts",
"src/vue/*.vue",

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Drop src/vue/*.ts and src/vue/*.vue from the build include (the two lines above and here); everything else in this list is framework-free and stays.

@@ -202,23 +221,145 @@ for (const subpath of Object.keys(manifest.exports)) {
const target = fileURLToPath(import.meta.resolve(specifier))
if (!existsSync(target)) throw new Error(\`\${specifier} resolves to a missing file\`)
if (target.endsWith('.vue')) {

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

With the ./vue/* entries gone from publishConfig.exports no target ends in .vue, so this branch goes; the loop then proves that every published entry is importable under plain Node, which is the property Platform needs.

@dante01yoon dante01yoon left a comment •

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

According to the plan (Notion V2) and Christian’s TDD decision, “the Vue layer will be separated from the core,” and the prerequisites for the npm release also state that “the physical split must occur before the first release.” Since this PR includes Vue in the release, it contradicts these prerequisites.

@dante01yoon

Copy link
Copy Markdown
Collaborator

Sequencing update: the billing-track PRs are landing first rather than waiting — #17852 (reader skeleton), #17851 (packages/account → packages/account-core, package @comfyorg/account-core) and #17854 (the Vue pieces move to @comfyorg/account-ui/auth/*; the core has no vue dependency and no ./vue/* entry afterwards). When you rebase this stack onto that main, please leave these parts out of this PR, since they build or publish files that no longer exist in the core:

  • scripts/copyVueSources.ts and the tsx scripts/copyVueSources.ts post-step
  • the vue-tsc build (tsc -p tsconfig.build.json is enough) and the src/vue/*.ts / src/vue/*.vue entries in tsconfig.build.json
  • the seven ./vue/* entries in publishConfig.exports
  • the "Vue SFC, needs a bundler" branch in smokePack.ts
  • the .js-extension edits to PasswordRules.vue, TurnstileWidget.vue, regionGate.ts (those files now live in packages/account-ui/src/auth/); the one on turnstileScript.ts stays, it is still in the core.

Everything else here (the dist compile for the core and ingest-types, publishConfig.exports for the framework-free entries, the smoke test) is what the plan asks for and I will re-approve once the rebase drops the Vue parts. Paths become packages/account-core/... throughout.

@dante01yoon

Copy link
Copy Markdown
Collaborator

Change of plan so nobody does this twice: the billing track is taking the publish preparation — files allowlist + pack smoke test (#17838), the private-dependency cut and ingest-types prep (#17839), and the compiled dist build with declarations (#17840) — into its own PR on top of the account-core rename and the Vue move, together with the release workflows and an ADR on versioning. Please do not continue these three; when you rebase the stack, keep #17830–#17837 (session state machine, identity at construction, Firebase init, attachIdentity removal, legacy rail, vuefire drop) and drop this one — or leave it as a reference and I will close it once ours is up. Your approach here is what we are reproducing (same allowlist, same smoke test shape, tsc/vue-tsc-free build for the core), credited in the PR body. Thanks for getting it this far.

@dante01yoon

Copy link
Copy Markdown
Collaborator

Follow-up: the dist build, publishConfig.exports, .js import extensions and the pack CI are on the billing track as #17882, built on the renamed tree where the core has no Vue by construction, so there is no ./vue/* export and no vue-tsc in the build. The typed nodenext consumer step from here is kept; it is the one that catches a missing .js extension (TS2835) that plain Node does not.

@MaanilVerma
MaanilVerma marked this pull request as draft September 17, 2026 03:23
@MaanilVerma

Copy link
Copy Markdown
Collaborator Author

Superseded by #17882, which carries this work on the renamed, Vue-free tree. Kept open as a draft for reference.

pull Bot pushed a commit to Mu-L/ComfyUI_frontend that referenced this pull request Sep 17, 2026
…contract and ingest-types (Comfy-Org#17882)

## Why

`@comfyorg/account-core`, `@comfyorg/billing-contract` and
`@comfyorg/ingest-types` are about to be installed by Platform from the
public registry, and today none of them can be packed: `exports` point
at `src/*.ts`, there is no `files` allowlist, no build, and the core
still reaches into a private workspace utility. The release workflows on
Comfy-Org#17881 assume `build` and `smoke:pack` exist; this PR is the part that
makes a tarball installable in plain Node.

Built on Comfy-Org#17854 (auth Vue surface → `account-ui`, now merged) so the
core builds from a Vue-free tree, and it reproduces Maanil's Comfy-Org#17838 /
Comfy-Org#17839 / Comfy-Org#17840 on the renamed tree as agreed in the review thread
there. Base is `main`.

## How

- **Private-utility cut** — the one remaining reach out of the core was
`turnstileScript.ts` →
`@comfyorg/shared-frontend-utils/loadExternalScript`. The loader is now
package-owned (`packages/account-core/src/loadExternalScript.ts`,
byte-identical) and `@comfyorg/shared-frontend-utils` leaves the core's
dependencies. `publishBoundary.test.ts` fails on any future `workspace:`
dependency that is not itself published (`@comfyorg/ingest-types` is the
only allowed one).
- **Manifests** — `files: ["dist"]`, `sideEffects: false`,
`repository`/`homepage`/`author`, MIT `LICENSE` per package,
`publishConfig.exports` mapping every dev `exports` entry to `dist/*.js`
+ `.d.ts`, `./package.json` export, `access: public`.
`@comfyorg/ingest-types` moves `zod` to a peer so a consumer never gets
two zod copies. `private: true` stays on all three (`ingest-types` had
no `private` at all; it now has the latch). Flipping `private` is a
one-line change per manifest in a later reviewed PR.
- **Build** — `tsconfig.build.json` per package (`declaration`,
`noEmitOnError`, `types: []`, tests and fixtures excluded), `build` =
`clean` + `tsc -p`, `prepack` runs it. Relative imports carry `.js` so
the emitted ESM resolves under `nodenext`; `openapi-ts.config.ts` sets
`importFileExtension: '.js'` so regeneration keeps it.
- **Smoke pack** — `scripts/smokePack.ts` (run as `pnpm --filter
@comfyorg/account-core smoke:pack`) packs all three, checks each tarball
(no source/test/fixture files, every export target present, no
unrewritten `catalog:`/`workspace:`), installs them into a throwaway npm
project, imports all 21 entries from plain Node ESM, and type-checks a
`nodenext` consumer. Dropping one `.js` extension makes the typed step
fail with `TS2835`, which the plain-Node step alone would not catch.
- **CI** — `ci-packages-pack.yaml` on `pull_request` for the three
package paths: matrix job per package (typecheck → build → `check:pack`)
plus one `smoke-consumer` job. The tarball rules live in one pure
module, `publishableTarball.ts`, with its own test file; the CLI and the
smoke test are two entry points onto it, so CI and the smoke test cannot
drift.

Deliberate divergences from Comfy-Org#17839: no `region` export and no deletion
in `shared-frontend-utils/networkUtil.ts` (the region gate moved to
`account-ui` with the Vue surface and three app suites still import it);
`createScriptLoader` stays in the shared package for its three
`src/platform` callers.

Open point: the root `LICENSE` is GPL-3.0 while all three manifests
already declare MIT (as `@comfyorg/design-system` publishes). Without a
per-package file pnpm would inject the GPL text into a tarball whose
manifest says MIT, so the MIT files fix the actual defect; whether the
SDK packages should be MIT at all is a call for the reviewer to confirm.

## AS-IS / TO-BE

No UI change; packages, scripts and CI only.

- AS-IS: `pnpm pack` on any of the three ships `src/*.ts` (or nothing)
with `exports` a consumer cannot resolve, and the core depends on a
private workspace package.
- TO-BE: `smoke:pack` proves the three tarballs install and import from
plain Node with types, and CI runs that proof on every change to the
packages.

## Testing

| Check | Result |
| --- | --- |
| `build` account-core / billing-contract / ingest-types | 92 / 18 / 6
dist files |
| `smoke:pack` | 3 packed, 21 entries imported under Node ESM,
`nodenext` tsc clean |
| vitest account-core / account-ui / billing-contract / billing-web |
675 / 79 / 62 / 90 pass |
| `pnpm typecheck`, `pnpm lint`, `pnpm format:check`, `pnpm knip` (with
`dist` on disk) | exit 0 |
| `yamllint` on the new workflow | clean |

## Where this sits in the plan

Billing SDK track FE-2210 ([implementation plan
V2](https://app.notion.com/p/3d86d73d36508152b92cdbdfdfe83ac8)). Hybrid
model: top-up in-app, subscription management / invoices / payment
methods on the hosted billing app.

| Phase | Item | Ticket | Status |
| --- | --- | --- | --- |
| 1-2 | Session core, transport, readers | FE-2211/2212/2213 | merged |
| 3 | Operation lifecycle, commands, eight-state projection |
FE-2227/2214/2223 | merged (Comfy-Org#17655) |
| 4 | `@comfyorg/account-ui` composables + `CheckoutSteps` | FE-2215 |
merged (Comfy-Org#17662, Comfy-Org#17663) |
| 5 slice 1 | Top-up through the SDK behind `billing_sdk_topup_enabled`
| FE-2216 | merged (Comfy-Org#17665) |
| rollout C | `hosted_billing_destination` server flag read by the host
| FE-2218 | merged (Comfy-Org#17716) |
| rollout C | `hostedDestination` port on the lifecycle, value on
operation state | FE-2210/2218 | Comfy-Org#17783 (review, carries slice 2a) |
| 7 prep | Scope-source port + credentialed transport (BFF / cookie
hosts) | FE-2218 | merged (Comfy-Org#17782) |
| 7 prep | `@comfyorg/account` → `@comfyorg/account-core` rename |
FE-2218 | merged (Comfy-Org#17851) |
| 7 prep | Auth Vue surface → `account-ui`; core Vue-free by
construction | FE-2215 | merged (Comfy-Org#17854) |
| 7 prep | `billing-contract` route builder + `return_to` registry |
FE-2218 | merged (Comfy-Org#17795) |
| 3A-3 | Workshop adapter over `createHostedTopupCheckout` | FE-2214 |
merged (Comfy-Org#17793) |
| 8 core | `previewSubscribe` command | FE-2331 | merged (Comfy-Org#17797) |
| 8 core | Plans + saved payment-methods readers | FE-2331 | merged
(Comfy-Org#17798) |
| 8 ui | account-ui composables (`usePlans`, `usePaymentMethods`,
`usePreviewSubscribe`) | FE-2331 | merged (Comfy-Org#17798) |
| 7 | billing-web own-origin session, sign-in, SDK composition | FE-2218
| merged (Comfy-Org#17798) |
| 7 | billing-web unit tests in CI (`ci-billing-web-unit.yaml`) |
FE-2218 | merged (Comfy-Org#17827, Comfy-Org#17844) |
| 7 | ingest CORS + top-up return hosts for billing.comfy.org and its
previews (Comfy-Org/cloud) | FE-2218 | merged (Comfy-Org/cloud#9512) |
| 8 ui | billing-web `/v1` entry routing + subscription / payment-method
surfaces | FE-2331 | merged (Comfy-Org#17798) |
| 7 | Package release workflows + versioning ADR (bump PR → publish on
merge, snapshots) | FE-2218 | Comfy-Org#17881 (review) |
| 7 | Publish readiness: dist build, files allowlist, pack smoke test,
private-utility cut | FE-2218 | **this PR** |
| 7 | First publish (`private` off), Platform install, billing-web live
top-up | FE-2218 | todo |
| 6 | Contract tests per generated schema (package layer) | FE-2217 |
Comfy-Org#17829 (review) |
| 6 | Live E2E per flow × consumer + evidence table | FE-2217 | todo
(needs staging flags) |
| 5 slice 2 | Subscription flows through the SDK | FE-2216 | Comfy-Org#17856 /
Comfy-Org#17860 (review) |
| follow-up | One `needsCustomerAttention` predicate (from the Comfy-Org#17665
review) | FE-2216 | merged (Comfy-Org#17792) |
| follow-up | Opaque `BillingServerCode` (from the Comfy-Org#17656 review) |
FE-2227 | merged (Comfy-Org#17794) |
| follow-up | `useCredits` clears on `SUPERSEDED` (from the Comfy-Org#17799
review) | FE-2215 | merged (Comfy-Org#17824) |
| follow-up | credits / status / capabilities readers fence a late
failure as `SUPERSEDED` (from the Comfy-Org#17798 review) | FE-2331 | merged
(Comfy-Org#17828) |

```mermaid
flowchart LR
  P3["Phase 3 core lifecycle (merged)"]
  P4["Phase 4 account-ui (merged)"]
  P5["Phase 5 slice 1 top-up flag (merged)"]
  FC["PR 17716 hosted_billing_destination flag (merged)"]
  HD["PR 17783 hostedDestination port"]
  SS["PR 17782 scope-source port + credentialed transport"]
  RN["account-core rename (merged)"]
  AV["auth Vue surface to account-ui (merged)"]
  RB["billing-contract route builder + return_to"]
  WS["Workshop adapter"]
  P8PV["previewSubscribe command"]
  P8RD["plans + payment-methods readers"]
  P8["account-ui hosted composables"]
  BWS["billing-web session + sign-in"]
  BWV["billing-web /v1 surfaces"]
  CORS["cloud PR 9512 ingest CORS + return hosts"]
  RW["PR 17881 release workflows + ADR"]
  PR["publish readiness: dist, files, smoke pack"]
  PUB["first publish account-core / billing-contract / ingest-types"]
  P7["Phase 7 host proof: Platform + billing-web live"]
  P6C["Phase 6 contract tests"]
  P6["Phase 6 live evidence"]
  S2["Phase 5 slice 2 subscription"]
  FU9["customer-attention predicate"]
  FU11["opaque BillingServerCode"]
  FU12["useCredits clears on SUPERSEDED"]
  FU13["reader late-failure fence"]
  P3 --> HD
  FC --> HD
  HD --> RB
  P3 --> SS
  SS --> P7
  RB --> P7
  P3 --> RN
  RN --> AV
  AV --> PR
  RW --> PUB
  PR --> PUB
  RB --> PUB
  PUB --> P7
  P3 --> P8PV
  P3 --> P8RD
  P8PV --> P8
  P8RD --> P8
  P4 --> P8
  P8 --> S2
  P8 --> BWS
  BWS --> BWV
  RB --> BWV
  BWV --> P7
  CORS --> P7
  P5 --> P6
  P3 --> P6C
  P5 --> WS
  P5 --> FU9
  P3 --> FU11
  P4 --> FU12
  P3 --> FU13
  style P3 fill:#d4edda,stroke:#155724
  style P4 fill:#d4edda,stroke:#155724
  style P5 fill:#d4edda,stroke:#155724
  style FC fill:#d4edda,stroke:#155724
  style SS fill:#d4edda,stroke:#155724
  style RB fill:#d4edda,stroke:#155724
  style WS fill:#d4edda,stroke:#155724
  style FU9 fill:#d4edda,stroke:#155724
  style BWV fill:#d4edda,stroke:#155724
  style BWS fill:#d4edda,stroke:#155724
  style P8 fill:#d4edda,stroke:#155724
  style P8RD fill:#d4edda,stroke:#155724
  style CORS fill:#d4edda,stroke:#155724
  style FU13 fill:#d4edda,stroke:#155724
  style FU12 fill:#d4edda,stroke:#155724
  style FU11 fill:#d4edda,stroke:#155724
  style P8PV fill:#d4edda,stroke:#155724
  style RN fill:#d4edda,stroke:#155724
  style AV fill:#d4edda,stroke:#155724
  style PR stroke:#0366d6,stroke-width:4px
```
pull Bot pushed a commit to Mu-L/ComfyUI_frontend that referenced this pull request Sep 17, 2026
… boundary (Comfy-Org#17830)

## Summary
The session client's state now changes in exactly one place, and the
closure no longer owns the credential cache or single-flight minting. A
pure `transition(state, event)` in the new `core/sessionState.ts` owns
every commit, `createSessionClient` only runs the ordered effects it
hands back, and the storage codec and in-flight dedup live in
`credentialCache.ts` and `mintCoordinator.ts`. This is the decomposition
DrJKL asked for before the client becomes the shared auth foundation,
and it changes no behavior except the two tightenings called out under
Review Focus.

Fixes FE-2191

## Changes
- `packages/account-core/src/core/sessionState.ts` is new. It holds one
`SessionState` record, a `SessionEvent` union (identity changed or
detached, invalidated, mint started, mint committed or rejected by
caller or scheduler, credential adopted or expired), and `transition`,
which returns the next state plus an ordered list of effects (`persist`,
`armScheduler`, `clearStorage`, `stopScheduler`, `abandonInFlight`,
`publish`). Effects carry their own payload, so the runner never reads
state after the fact.
- The same module has `arbitrateMint`, which is `refreshWith`'s old
guard ladder (invalidation epoch, mint sequence, popup path,
settled-null block, joiner reuse) lifted out as a pure verdict, and
`scheduledMintHolds`, the old inline `guardsHold`. The guards inside
`arbitrateMint` are named by the verdict they return
(`userMismatchBlocksCommit`, `popupSettled`, `lostRace`), not by the
situation they detect.
- `createSessionClient` in `session.ts` keeps one `let state` and one
`commit(event)`. The eleven places that used to set `credential`,
`credentialTarget`, `failure`, `committedMint` and the epochs by hand
are gone; the scheduler's `RefreshHost` callbacks call `commit` with the
matching event. `session.ts` goes from 742 lines to 541, and the closure
body from 512 to 330.
- `credentialCache.ts` owns the cached-credential schema, the pure
encode and decode (uid-filtered for the cache, unfiltered for a
cross-tab message), `createCredentialCache`, which wraps the host's
`CredentialStorage` with the same swallowed read, write and clear
failures as before, and the freshness policy: `isCredentialFresh` and
`selectFreshCredential`, the memory-then-storage, exact-target,
first-fresh-wins rule that `ensureCore` used to inline.
`CredentialStorage` and `isCredentialFresh` are re-exported from
`session.ts`, so nothing a host imports moved.
- `mintCoordinator.ts` owns only the in-flight mint: `canJoin` and the
`.finally` that clears it while it is still the same promise.
- `RefreshHost.commitRefreshed` now takes the `mintId` the scheduler
minted with, so the recorded `committedMint` names an explicit id
instead of reading the sequence at commit time.
- `identity.ts` imports `AccountUser` from `sessionContracts` instead of
`session`, which removes a type cycle.
- `core/__fixtures__/sessionFakes.ts` holds the storage, user,
credential, identity and exchange fakes the session suites share. The
three new suites and the two existing ones import from it instead of
carrying their own copies; no assertion changed.
- `sessionState.test.ts` is a table over state × event, including the
pairs that must be no-ops (a preserved transient failure, expiry of a
credential that is no longer live even when value-equal) and the
reference-identity cases that `arbitrateMint` and `credential-expired`
depend on. `credentialCache.test.ts` and `mintCoordinator.test.ts` cover
the codec rejects, the join-versus-start matrix and the candidate order.

## Review Focus
- The claim that nothing changed rests on `session.test.ts` and
`session.scheduler.test.ts` passing with their assertions untouched; the
only edits to those two files swap their local helpers for the shared
fixture imports. If you want to spot-check one site, the asymmetries are
the ones worth a look: a caller-side permanent failure stops the
scheduler and clears the target, a scheduler-side one only clears
storage (`sessionState.ts`, the `mint-rejected` case). Those match the
old code on purpose.
- `commitExpired` in `session.ts` commits only when the expiring
credential is still the live one, by reference, and returns the failure
the transition produced. The value-equal clone row in the table pins
that a stale copy is a no-op.
- `mint-started` is a separate event solely so `mintSequence` lives in
the one state record. It has no effects.
- Tightening one: the popup mint now requires exactly one identity event
since it started. `popupSettled` in `sessionState.ts` checks
`identityEpoch === startEpoch + 1`; the old code accepted any number of
events as long as the uid matched. The `sessionState.test.ts` row "a
popup mint that crossed two identity events is superseded even when the
uid matches again" pins it.
- Tightening two: the stored-credential read is lazy.
`selectFreshCredential` takes thunks (`credentialCache.ts`), so storage
is not touched when the in-memory credential is fresh; the old inline
code read storage every time. `session.test.ts` "serves a fresh
in-memory credential without touching storage" pins it.
- `selectFreshCredential` checks the uid on both candidates where the
old inline code checked only the in-memory one. The stored candidate is
already uid-filtered by `decodeCached`, so no outcome changes; flagging
it because it reads like a tightening.

## QA
- [x] Unit: `pnpm --filter @comfyorg/account-core test` 39 files, 716
tests
- [x] Test diff against the base (`git diff --numstat
origin/maanil/fe-2188-localization-sso...HEAD -- '**/*.test.ts'`):
`credentialCache.test.ts` +210/-0, `mintCoordinator.test.ts` +157/-0,
`sessionState.test.ts` +541/-0 (new files), `session.test.ts` +31/-70
and `session.scheduler.test.ts` +43/-91 (helper definitions replaced by
fixture imports, plus one new test in `session.test.ts`); the shared
fixture `__fixtures__/sessionFakes.ts` is +110/-0. No assertion was
removed from an existing test.
- [x] Consumers: `src/platform/workspace/stores` 326 tests, website
`src/config` 2459 tests, all green
- [x] Coverage: the two new modules are fully covered; `session.ts`
keeps the same three pre-existing uncovered items (the fetch fallback
chain, the expiry no-op return, the no-user early return) and nothing
new
- [x] fallow cyclomatic on `session.ts`: `refreshWith` 38 → 10,
`ensureCore` 12 → 7
- [x] `pnpm typecheck` (root and package), `pnpm lint`, `oxfmt --check`,
`pnpm knip` all clean
- Not covered: no e2e run. This change is package-internal and
flag-independent; the cloud store's delegation call sites are unchanged.

This PR stacks on Comfy-Org#17643 and merges after it.

Resolves review comment from @DrJKL on Comfy-Org#17283:
[r3976008869](Comfy-Org#17283 (comment)).

Linear:
[FE-2191](https://linear.app/comfyorg/issue/FE-2191/refactor-centralize-account-session-commit-ownership)

<details>
<summary>Stack (merge bottom-up; each PR targets the one below
it)</summary>

Base: Comfy-Org#17643 hosts own the auth copy. The package is
`@comfyorg/account-core` since the rename on main (Comfy-Org#17851); the Vue
pieces live in `@comfyorg/account-ui` (Comfy-Org#17854). Publish preparation
(files allowlist, dependency cut, `dist` build) now ships from the
billing track in Comfy-Org#17882; the earlier Comfy-Org#17838, Comfy-Org#17839 and Comfy-Org#17840 are
drafts kept for reference.

1. Comfy-Org#17830 the session client's state changes in one pure transition;
cache and in-flight mint become their own modules ← this PR
2. Comfy-Org#17831 identity is passed to `createSessionClient` at construction;
`dispose()` tears it down
3. Comfy-Org#17832 the cloud store binds identity at construction; the flag gates
minting only
4. Comfy-Org#17833 the website binds identity through a lazily activated port so
Firebase stays a lazy chunk
5. Comfy-Org#17834 the package initializes the cloud app's Firebase; vuefire no
longer does
6. Comfy-Org#17835 the transitional `attachIdentity` seam is deleted; ADR-0033
records the outcome
7. Comfy-Org#17836 the legacy workspace-token rail moves into its own removable
module and its hot paths are split into named steps
8. Comfy-Org#17837 the dead `vuefire` dependency and its inert test mocks go
</details>
pull Bot pushed a commit to Penguinjanator/ComfyUI_frontend that referenced this pull request Sep 17, 2026
…pose (Comfy-Org#17831)

## Summary
`createSessionClient` can now take the identity as its second argument
and subscribe to it at construction, with a `dispose()` to tear that
down. `attachIdentity` still works and is still deprecated; this PR adds
the shape the two hosts migrate onto next, and changes nothing for them
yet.

Part of FE-2196

## Changes
- `createSessionClient(options, identity?)` in `session.ts` subscribes
at construction when an identity is passed. It runs the same closure
function `attachIdentity` now delegates to, so the brand gate, the
identity-changed commit and the auto-mint are one code path.
- `SessionClientOptions.autoMint` (default true) controls the
constructed identity only. `AttachIdentityOptions.autoMint` keeps
governing `attachIdentity`, unchanged.
- `SessionClient.dispose()` detaches whichever identity is current,
constructed or attached, with today's detach semantics (epoch bump,
scheduler stopped, snapshot back to pending). It's idempotent and a
no-op when nothing is attached; the client stays attachable afterwards,
as after a detach today.
- `attachIdentity`'s deprecation note now points at the constructor
argument, and the brand-guard error no longer names `attachIdentity`,
since the constructor path throws it too. The one existing test that
asserted the old text was updated to the new string.
- `session.identity.test.ts` covers construction-with-identity and
dispose. Its fakes live in `src/core/__fixtures__/sessionFakes.ts`, the
same shared fixture the PR below introduces, so the merge-down
reconciles onto one file; `session.test.ts` and
`session.scheduler.test.ts` move onto it in that PR. One fixture in
`packages/account-ui` grew a `dispose` stub because the interface member
is required.
- The subscription re-checks that it is still the current one after the
identity-changed publish and before the auto-mint. A subscriber that
disposes the client during that publish no longer gets an auto-mint
fired at a disposed client. This is a deliberate tightening, covered by
a new test in `session.test.ts`.
- `dispose()` keeps the non-terminal detach semantics for explicit-user
mints: `ensureFresh(user)` after dispose still resolves from the stored
credential without publishing it, exactly as after a detach today, and
that stays the contract until Comfy-Org#17835 retires `attachIdentity`.
- The package is now `@comfyorg/account-core`.

## Review Focus
- Construction subscribes after the scheduler is created (`session.ts`,
just before the return). A port that fires synchronously during
construction commits through the scheduler, so the order matters; a
listener registered later gets the current snapshot from `subscribe` as
before.
- `dispose` is required on the interface rather than optional. Optional
would let a host forget it; the only hand-built client in the repo is
the account-ui billing fixture, updated here.
- No telemetry hook was added to the options. Hosts keep deriving
refresh telemetry from the snapshot and scheduler outcome, which is the
current model.

## QA
- [x] Red first: the new test file failed 9/9 against the base before
the implementation (verbatim run saved with the PR notes; the red could
not be committed separately because the pre-commit typecheck rejects
references to members that do not exist yet)
- [x] Unit: `pnpm --filter @comfyorg/account-core test` 40 files, 728
tests
- [x] Mutation check: hardcoding the constructed identity to always
auto-mint fails the `autoMint: false` row (the row settles time and
asserts the full phase array plus the fetch count)
- [x] `session.scheduler.test.ts` unmodified; `session.test.ts` +32/-2
(the guard-message substring plus the dispose-during-first-delivery
test); `session.identity.test.ts` +208 new
- [x] Consumers: `src/platform/workspace/stores` 326 tests, website
`src/config` 2459 tests
- [x] `pnpm typecheck` (root and package), `pnpm lint`, `oxfmt --check`,
`pnpm knip` clean
- Not covered: no host uses the new constructor argument yet; that is
the cloud store PR and the website PR after it.

This PR stacks on Comfy-Org#17830 and merges after it.

Linear:
[FE-2196](https://linear.app/comfyorg/issue/FE-2196/remove-the-pinia-identity-adapter-package-owned-identity)

<details>
<summary>Stack (merge bottom-up; each PR targets the one below
it)</summary>

Base: Comfy-Org#17643 hosts own the auth copy. The package is
`@comfyorg/account-core` since the rename on main (Comfy-Org#17851); the Vue
pieces live in `@comfyorg/account-ui` (Comfy-Org#17854). Publish preparation
(files allowlist, dependency cut, `dist` build) now ships from the
billing track in Comfy-Org#17882; the earlier Comfy-Org#17838, Comfy-Org#17839 and Comfy-Org#17840 are
drafts kept for reference.

1. Comfy-Org#17830 the session client's state changes in one pure transition;
cache and in-flight mint become their own modules
2. Comfy-Org#17831 identity is passed to `createSessionClient` at construction;
`dispose()` tears it down ← this PR
3. Comfy-Org#17832 the cloud store binds identity at construction; the flag gates
minting only
4. Comfy-Org#17833 the website binds identity through a lazily activated port so
Firebase stays a lazy chunk
5. Comfy-Org#17834 the package initializes the cloud app's Firebase; vuefire no
longer does
6. Comfy-Org#17835 the transitional `attachIdentity` seam is deleted; ADR-0033
records the outcome
7. Comfy-Org#17836 the legacy workspace-token rail moves into its own removable
module and its hot paths are split into named steps
8. Comfy-Org#17837 the dead `vuefire` dependency and its inert test mocks go
</details>
pull Bot pushed a commit to Penguinjanator/ComfyUI_frontend that referenced this pull request Sep 18, 2026
…rkspace auth store (Comfy-Org#17832)

## Summary
The cloud workspace auth store now hands its identity to the session
client at construction and stops attaching and detaching it by hand. The
`unified_cloud_auth` flag gates minting only; identity is bound for the
store's lifetime. This deletes the host side of the transitional adapter
that ADR-0028 marked for removal, and the ADR is amended in the same
change.

Part of FE-2196

## Changes
- `workspaceAuthStore.ts` constructs the client as
`createSessionClient({ ..., autoMint: false },
useAuthStore().identity)`. `ensureUnifiedIdentityAttached`,
`detachUnifiedIdentity` and the attach call inside `unifiedUser()` are
gone.
- The flag watch keeps its two jobs but not the attach half: on turns
the rail on by minting the current target, off calls
`clearUnifiedContext()`, whose `invalidate()` drops the credential,
stops the scheduler and releases the cross-tab lease. The port stays
subscribed but inert, because the store drives every mint itself.
- The three flag-gated helpers (`mintAtLogin`, `remintUnifiedOnce`,
`switchUnifiedWorkspace`) re-check `unified_cloud_auth` after awaiting
`unifiedUser()`, not only before. A mint parked on the identity when a
rollback flips the flag off now fails closed instead of committing a
token, since `invalidate()` alone preserves the user.
- `destroy()` calls `dispose()` on the client in place of the stored
detach handle. Ordering is unchanged.
- `docs/adr/AUTH-IDENTITY-0028` rules 1 and 4 are amended: identity is
passed at construction, and with the flag off the port is subscribed but
no token, network call or timer exists.
- `src/utils/__tests__/stubAccountIdentityPort.ts` holds the two test
seams for this binding: `stubAccountIdentityPort()` keeps a suite's
construction-time subscription off Firebase (six suites use it), and
`replayIdentityPort()` fakes the auth-state registration and replays the
user on a microtask by default, the way the SDK does, or synchronously
on request. Both `authStore.test.ts` blocks and
`useWorkspaceAuth.test.ts` drive their identity events through it, so
the first delivery is modelled one way.
- `useWorkspaceAuth.test.ts` rewrites the four lifecycle cases to the
new contract.
- New tests:
- `authStore.test.ts`, store construction order: building the workspace
store first subscribes its port and mints once Firebase delivers on its
microtask.
- `authStore.test.ts`, unified identity source: now pins that both the
store listener and the port registered at construction.
- `useWorkspaceAuth.test.ts`: a port that delivers synchronously inside
`onUserChanged` still leaves the store subscribed and minting for that
user.
- `useWorkspaceAuth.test.ts`, destroy: a mint after `destroy()` waits
the settle ceiling and resolves false.

## Review Focus
- Fail-closed on rollback: the flag-gated helpers re-check
`unified_cloud_auth` after `await unifiedUser()`, so a mint that parked
on the identity before the flip commits nothing. Pinned by
`useWorkspaceAuth.test.ts` "refuses a mint that parked on the identity
before the flag went off" (red without the re-check).
- The flag-off contract changed on purpose: the port used to be
detached, now it stays subscribed and the client is invalidated. The
test at "turning the flag OFF keeps the identity subscribed..." pins the
gate in `mintAtLogin`; removing that guard fails it.
- Construction-order coupling: `workspaceAuthStore` reads
`useAuthStore().identity` during its own setup while `authStore`'s
listener calls back into `workspaceAuthStore`. This holds because
Firebase delivers a new observer's first callback on a microtask, after
persistence resolves, so each store finishes setup before the other can
re-enter it. A synchronous identity source in that seat would re-enter a
half-built store and leave the client unsubscribed, with every mint
waiting its ceiling. The two-store failure is reproduced by the `store
construction order` test in `authStore.test.ts` (which drives the real
pair with `replayIdentityPort(..., 'sync')`); the
`useWorkspaceAuth.test.ts` sync case pins only the session-client half,
since its `onAuthStateChanged` is a no-op so `authStore`'s listener
never re-enters. The comment at the call site and ADR-0028 rule 3 name
the dependency. Comfy-Org#17834 removes the coupling by importing the identity
module directly instead of reading it off `authStore`.
- Under flag off with a signed-in user the client's snapshot reads
`minting` instead of `pending`. The only phase reader outside the store
is the billing transport, which runs only under a flag that requires
unified auth.
- `dispose()` is not terminal: a disposed client would still honor an
explicit-user mint. Nothing calls the store after `destroy()` today, so
this stays as it was; noted for the legacy-rail retirement.

## QA
- [x] Unit: `pnpm exec vitest run src/platform/workspace src/stores
src/platform/auth` 132 files, 2869 passed, 1 expected fail, 1 skipped;
the one failure is `checkoutJourney.test.ts`, a known local-only failure
unrelated to this change
- [x] Mutation check: removing the `unifiedCloudAuthEnabled` guard in
`mintAtLogin` fails the flag-off lifecycle test
- [x] Package untouched: `pnpm --filter @comfyorg/account-core test` 42
files, 661 tests, no diff under `packages/` (the package is
`@comfyorg/account-core`)
- [x] Website consumers unaffected: `apps/website` `src/config` 2459
tests
- [x] `pnpm typecheck`, `pnpm lint` (0 errors), `oxfmt --check`, `pnpm
knip`, `fallow audit --changed-since` the parent branch: clean
- [ ] Manual, cloud build with `unified_cloud_auth` on: sign in, switch
workspace, wait past the refresh buffer, sign out; confirm the header
keeps a token through the refresh and clears on sign-out
- [ ] Manual, cloud build with the flag off: sign in and confirm no
`/auth/token` request is issued
- Not covered: no e2e in this PR; the auth e2e set is the gate for the
Firebase-init PR that follows.

This PR stacks on Comfy-Org#17831 and merges after it.

Resolves review comment from @DrJKL on Comfy-Org#17283:
[r3976008872](Comfy-Org#17283 (comment)).

Linear:
[FE-2196](https://linear.app/comfyorg/issue/FE-2196/remove-the-pinia-identity-adapter-package-owned-identity)

<details>
<summary>Stack (merge bottom-up; each PR targets the one below
it)</summary>

Base: Comfy-Org#17643 hosts own the auth copy. The package is
`@comfyorg/account-core` since the rename on main (Comfy-Org#17851); the Vue
pieces live in `@comfyorg/account-ui` (Comfy-Org#17854). Publish preparation
(files allowlist, dependency cut, `dist` build) now ships from the
billing track in Comfy-Org#17882; the earlier Comfy-Org#17838, Comfy-Org#17839 and Comfy-Org#17840 are
drafts kept for reference.

1. Comfy-Org#17830 the session client's state changes in one pure transition;
cache and in-flight mint become their own modules
2. Comfy-Org#17831 identity is passed to `createSessionClient` at construction;
`dispose()` tears it down
3. Comfy-Org#17832 the cloud store binds identity at construction; the flag gates
minting only ← this PR
4. Comfy-Org#17833 the website binds identity through a lazily activated port so
Firebase stays a lazy chunk
5. Comfy-Org#17834 the package initializes the cloud app's Firebase; vuefire no
longer does
6. Comfy-Org#17835 the transitional `attachIdentity` seam is deleted; ADR-0033
records the outcome
7. Comfy-Org#17836 the legacy workspace-token rail moves into its own removable
module and its hot paths are split into named steps
8. Comfy-Org#17837 the dead `vuefire` dependency and its inert test mocks go
</details>
kashish00208 pushed a commit to kashish00208/ComfyUI_frontend that referenced this pull request Sep 18, 2026
…identity (Comfy-Org#17833)

## Summary
The website's workshop session client is now constructed with its
identity, like the cloud store, and the last `attachIdentity` caller is
gone. Because the website loads Firebase lazily and its flag can turn
off and on again, the package gains a small lazily activated identity
port; the website activates it when the flag settles on and deactivates
it when the flag turns off.

Part of FE-2196

## Changes
- `packages/account-core/src/core/lazyIdentity.ts` adds
`createLazyIdentity(load)`. It returns a branded identity port whose
`activate()` loads the real identity once, subscribes it, and resolves
after that identity has delivered its current user. `deactivate()`
unsubscribes and delivers null once. Repeated activation shares one
load; a loader failure leaves a retry possible. Exported as
`@comfyorg/account-core/lazyIdentity`.
- `workshop-account.ts` builds the port with a dynamic import of
`workshop-firebase` and passes it to `createSessionClient`. The Firebase
chunk is still only reached through dynamic imports (verified in the
build output).
- `workshop-session-state.ts`: `begin()` awaits `activate()` before
subscribing to the client, so the snapshot it replays is real
post-delivery state, and `stopListeners()` deactivates after
unsubscribing, so the host never observes the null. The flag-off path
keeps clearing the stored credential. The `detachIdentity` handle is
gone.
- Five website suites replace the `attachIdentity` fake with
`activate`/`deactivate` fakes; the Firebase-laziness proof moves to
`workshop-account.test.ts`, which drives the real client through the
port with `workshop-firebase` mocked.
- `workshop-session-state.integration.test.ts` is new and drives the
host over the real lazy port and real session client with only Firebase
stubbed. It pins that flag off then on never shows a signed-out frame,
that the stored credential is cleared on off, that a mint in flight
across off cannot commit, that a flag turned off before the first
Firebase answer installs nothing, and that a begin step failing after a
signed-in delivery clears the stored credential.
- The website session suites share one fakes module
(`config/__fixtures__/workshopSessionFakes.ts`) for the test user and
the token-exchange response, and read the storage keys from the modules
that own them.

## Review Focus
- After `deactivate()` the client's own snapshot is `signed-out` where
the old detach left it `pending`. The host overrides its published
snapshot to pending itself, and the three direct client consumers gate
on `authenticated` only, so nothing observable changes; the OFF→ON test
is the guard.
- `activate()` resolving on first delivery means a Firebase that never
answers leaves the page pending, which is today's behavior for an
unanswered identity.
- One effects change is deliberate: when a begin step fails after a
signed-in delivery, the failed attempt now signs the client out and
clears the stored credential, so the next attempt mints again instead of
reviving the old credential. The old detach kept it. The new integration
case pins the cleared storage.
- This is the only new package surface in the stack. The alternative, a
non-terminal detach on the session client, would have kept a host-driven
attach lifecycle alive, which is what FE-2196 removes.

## QA
- [x] Unit: `pnpm --filter @comfyorg/account-core test` 754 tests;
website `src/config` 79 files, 2562 tests
- [x] Security review fixes, each mutant-proven: the inner delivery
callback drops events from a stale generation (a port that keeps
emitting after unsubscribe, or the previous subscription after
re-activation), and deactivate re-delivers null only after a signed-in
user
- [x] Mutation check: moving `deactivate()` above the snapshot
unsubscribe in `stopListeners` fails the integration case (the host
would publish signed-out on flag off)
- [x] Mutation check: deleting the liveness guard after `activate()` in
`begin` fails the new flag-off case (the host would publish signed-out);
deleting the `deactivate()` call in `stopListeners` fails the new
storage case (the cached credential survives the failed attempt)
- [x] New tests: `lazyIdentity.test.ts` re-activation case now waits on
the second inner subscription instead of bare microtask turns;
integration suite gains the flag-off-before-first-answer case and the
storage-cleared-after-failed-begin case; the abandoned-mint case awaits
the released fetch before asserting on storage; the failure suite pins
that the failed attempt reaches `deactivate()`
- [x] `pnpm exec vitest run src/platform/workspace/stores` 326 tests,
unchanged
- [x] `pnpm --filter @comfyorg/website build` clean; `workshop-firebase`
is a separate chunk with dynamic importers only
- [x] `pnpm typecheck` (root and website), `pnpm lint`, `oxfmt --check`,
`pnpm knip` clean
- [x] `attachIdentity` has zero callers outside `packages/account-core`
- [ ] Manual, website with `workshop-auth` on: load a Workshop page
signed out, confirm no Firebase request until sign-in; sign in, reload,
confirm the session and credits return; toggle the flag off and back on
in a session and confirm the header never flashes the signed-out state
- Not covered: no website e2e in this PR.

This PR stacks on Comfy-Org#17832 and merges after it.

Linear:
[FE-2196](https://linear.app/comfyorg/issue/FE-2196/remove-the-pinia-identity-adapter-package-owned-identity)

<details>
<summary>Stack (merge bottom-up; each PR targets the one below
it)</summary>

Base: Comfy-Org#17643 hosts own the auth copy. The package is
`@comfyorg/account-core` since the rename on main (Comfy-Org#17851); the Vue
pieces live in `@comfyorg/account-ui` (Comfy-Org#17854). Publish preparation
(files allowlist, dependency cut, `dist` build) now ships from the
billing track in Comfy-Org#17882; the earlier Comfy-Org#17838, Comfy-Org#17839 and Comfy-Org#17840 are
drafts kept for reference.

1. Comfy-Org#17830 the session client's state changes in one pure transition;
cache and in-flight mint become their own modules
2. Comfy-Org#17831 identity is passed to `createSessionClient` at construction;
`dispose()` tears it down
3. Comfy-Org#17832 the cloud store binds identity at construction; the flag gates
minting only
4. Comfy-Org#17833 the website binds identity through a lazily activated port so
Firebase stays a lazy chunk ← this PR
5. Comfy-Org#17834 the package initializes the cloud app's Firebase; vuefire no
longer does
6. Comfy-Org#17835 the transitional `attachIdentity` seam is deleted; ADR-0033
records the outcome
7. Comfy-Org#17836 the legacy workspace-token rail moves into its own removable
module and its hot paths are split into named steps
8. Comfy-Org#17837 the dead `vuefire` dependency and its inert test mocks go
</details>
pull Bot pushed a commit to Penguinjanator/ComfyUI_frontend that referenced this pull request Sep 18, 2026
…pping vuefire (Comfy-Org#17834)

## Summary
The `@comfyorg/account-core` package now initializes Firebase for the
cloud app. `main.ts` no longer creates the app or installs VueFire; one
module builds the package identity from the runtime config under the
default app name with an ordered persistence hierarchy, and `authStore`
subscribes to it. This lifts ADR-0028 rule 5 and is the last piece of
"the package owns identity" before the transitional seam is deleted.

Part of FE-2196

## Changes
- `src/platform/auth/firebaseIdentity.ts` is the cloud app's one
Firebase entry: `createFirebaseIdentity` with `appName: '[DEFAULT]'`,
the config as a thunk, and an ordered persistence hierarchy:
localStorage, then the IndexedDB store vuefire persisted sessions in,
then session storage, with the popup resolver. Firebase restores a user
from the first store that holds one and migrates it into localStorage,
which is what keeps existing sign-ins alive. The package reads the
config thunk once, at first resolution, so the read lands after
`main.ts` has awaited remote config even though this module is evaluated
earlier through the static import graph. Resolving before remote config
has loaded throws in every environment: booting on build-time config
could point auth at the wrong Firebase project, so the module fails
closed instead of falling back.
- The identity is no longer routed through `authStore`:
`workspaceAuthStore` and the shared test stub import the module
directly, which also removes the store's eager `useAuthStore()` at
setup.
- `authStore.ts` drops `useFirebaseAuth`, `setPersistence` and the
direct `onAuthStateChanged`/`onIdTokenChanged` calls in favor of the
identity's `onUserChanged` and `onTokenChanged`. Listener bodies are
unchanged; `authStore` no longer holds or exports an identity, and
`workspaceAuthStore` and the shared test stub import the module
directly.
- `main.ts` removes `initializeApp` and the VueFire plugin; the
`startup/firebase-init` tracer phase now wraps an explicit
`firebaseIdentity.initialize()` in a `try`/`finally`, so the phase is
recorded even when initialization throws.
- `sessionFeatureFlagOverride.ts` reads the current user from the
identity instead of vuefire, keeping its no-`authStore` import rule.
`currentUser()` never initializes Firebase, so a `?ff=` read before
remote config cannot boot the app on build-time config; a test pins
that.
- The package entry passes `popupRedirectResolver` when it initializes
with a persistence (otherwise popup sign-in would throw on the
package-created `Auth`), accepts the options as a thunk, and exposes
`initialize`, `onTokenChanged` and a non-initializing `currentUser`.
- ADR-0028 rule 5 is replaced: the package initializes the cloud app's
Firebase; nothing in `src` creates an app or `Auth`.
- Tests: `firebaseIdentity.test.ts` pins the app name, the persistence
order by identity (localStorage, IndexedDB, session storage) on both the
fresh-app and the `[DEFAULT]` reuse path, the popup resolver, the
deferred config read, and the unloaded guard as one table over DEV on
and off. `useWorkspaceAuth.test.ts` adds a case that constructs the
workspace store before `authStore` exists and shows `mintAtLogin()`
still mints for the port's user, so port-first registration cannot
strand the identity wait. `stubFirebaseAuthHarness()` in
`src/utils/__tests__/stubAccountIdentityPort.ts` performs the three
Firebase stubs (`initializeAuth`, `onAuthStateChanged`,
`onIdTokenChanged`) once; the twelve suites that needed them because
`initializeAuth` now really runs at store creation call it from
`beforeEach`, with no assertion weakened, and the persistence assertion
moved from `authStore.test.ts` to `firebaseIdentity.test.ts`. The
`firebase/auth` automock drops `setPersistence` (no readers left) and
mirrors every `AuthErrorCodes` key `src` reads;
`TopbarSubscribeButton.test.ts` drops its hand-rolled Firebase factories
since nothing under test imports Firebase. `vitest.setup.ts` defaults
`remoteConfigState` to `anonymous` beside the runtime config it already
installs, since the real `authStore` now resolves the identity at
construction; suites that test the unloaded state set it explicitly.

## Review Focus
- The config thunk and guard. An eager `options: getFirebaseConfig()`
would have booted cloud on build-time config; `firebaseIdentity.test.ts`
goes red on that form. A first resolution before remote config has
loaded throws in every environment rather than booting on build-time
config, which could point auth at the wrong Firebase project; the
`main.ts` ordering (remote config awaited before `initialize()`) is the
invariant and the cloud e2e set is what proves it.
- The app name `[DEFAULT]` is load-bearing: persisted sign-ins and the
e2e seed live under `firebase:authUser:<apiKey>:[DEFAULT]`. The package
default would have been `comfy-account`.
- `vuefire` stays in `package.json` for now: 28 suites still mock it.
Dropping the dependency and those inert mocks is a follow-up sweep, not
this PR.
- The cloud auth e2e set (`authAccountSwitch`, `cloudOnboardingAuth*`,
`workspaceAuthRefresh`, `wsReconnectAccountSwitch`,
`workflowDraftForeignWindowSignIn`, `signInDialogAuthErrors`) is the
real gate for this change and runs in CI only.

## QA
- [x] Unit: account 43 files / 692 tests; scoped cloud suites (auth,
workspace, stores, views, topbar, utils) 197 files / 3875 tests, with
only the pre-existing local-only `checkoutJourney.test.ts` failure; full
`pnpm test:unit` fails only the two pre-existing `scripts/cicd` shell
suites
- [x] Mutation checks: the eager config form fails three
`firebaseIdentity.test.ts` cases; an initializing `currentUser` fails
the feature-flag override test in a full-file run; removing the
remote-config guard fails its test
- [x] Error-state fallback pinned: with remote config in `error` (the
fetch ran and failed), the app boots on the build-time config without
asserting, as before; only the unloaded state throws
- [x] `pnpm build:cloud` clean; one `initializeApp` call site outside
the SDK, no vuefire strings in any chunk
- [x] `grep` over non-test `src`: no `initializeApp`, `useFirebaseAuth`,
`VueFire`
- [x] `pnpm typecheck`, `pnpm lint`, `oxfmt --check`, `pnpm knip` clean
- [x] CI: the seven cloud auth e2e specs above pass; the five `@cloud`
specs in the `cloud` project, `wsReconnectAccountSwitch` and
`signInDialogAuthErrors` in the `chromium` shards
- [x] Manual, cloud build: sign in with Google (popup), reload and
confirm the session persists, sign out, sign in with email, switch
workspace, wait past the refresh buffer with the flag on and confirm the
session cookie rotates
- Not covered: no local e2e; Electron/desktop persistence path not
exercised beyond the unit test.

This PR stacks on Comfy-Org#17833 and merges after it.

Linear:
[FE-2196](https://linear.app/comfyorg/issue/FE-2196/remove-the-pinia-identity-adapter-package-owned-identity)

<details>
<summary>Stack (merge bottom-up; each PR targets the one below
it)</summary>

Base: Comfy-Org#17643 hosts own the auth copy. The package is
`@comfyorg/account-core` since the rename on main (Comfy-Org#17851); the Vue
pieces live in `@comfyorg/account-ui` (Comfy-Org#17854). Publish preparation
(files allowlist, dependency cut, `dist` build) now ships from the
billing track in Comfy-Org#17882; the earlier Comfy-Org#17838, Comfy-Org#17839 and Comfy-Org#17840 are
drafts kept for reference.

1. Comfy-Org#17830 the session client's state changes in one pure transition;
cache and in-flight mint become their own modules
2. Comfy-Org#17831 identity is passed to `createSessionClient` at construction;
`dispose()` tears it down
3. Comfy-Org#17832 the cloud store binds identity at construction; the flag gates
minting only
4. Comfy-Org#17833 the website binds identity through a lazily activated port so
Firebase stays a lazy chunk
5. Comfy-Org#17834 the package initializes the cloud app's Firebase; vuefire no
longer does ← this PR
6. Comfy-Org#17835 the transitional `attachIdentity` seam is deleted; ADR-0033
records the outcome
7. Comfy-Org#17836 the legacy workspace-token rail moves into its own removable
module and its hot paths are split into named steps
8. Comfy-Org#17837 the dead `vuefire` dependency and its inert test mocks go
</details>
pull Bot pushed a commit to Mu-L/ComfyUI_frontend that referenced this pull request Sep 18, 2026
## Summary
The transitional identity seam is gone from `@comfyorg/account-core`:
`attachIdentity`, `AttachIdentityOptions`, and the runtime brand gate.
Identity reaches the session client only at construction, which is what
ADR-0028 called the transitional adapter's removal. ADR-0033 records the
outcome of the whole stack. Along the way it fixes a real gap in the
construction path: a listener that disposed the client during the first
identity publish still started a mint. This closes FE-2196.

Fixes FE-2196

## Changes
- `session.ts` loses `attachIdentity`, `AttachIdentityOptions`, the
`isAccountIdentity` runtime throw and the replace-on-reattach slot.
`subscribeIdentity` runs once at construction, reads `autoMint` from the
client options, and `dispose()` stays idempotent. 557 lines to 533.
- Regression fix: a listener that disposes the client during the
identity publish no longer triggers a mint or re-arms the scheduler.
Before, the identity callback checked for disposal only before
committing the user, so a `dispose()` from inside that publish still
started a post-dispose `getIdToken()` and exchange call, persisted a
credential for a user the client no longer tracked, and re-armed the
refresh timer. The callback now mints only when the delivered user is
still the client's user after the publish. Pinned by `does not mint when
a listener disposes the client during the identity publish` in
`session.identity.test.ts`, written red first.
- `identity.ts` loses `isAccountIdentity`; the brand type stays, so an
unbranded port is a compile error rather than a runtime one. The
`/testing` seam and the two production entries
(`createFirebaseIdentity`, `createLazyIdentity`) still brand at runtime.
`identity.test.ts` now also constructs `createSessionClient` with a
plain port under `@ts-expect-error`, so widening the parameter fails the
typecheck.
- The package suites move their attach call sites (37 in
`session.test.ts`, 34 in `session.scheduler.test.ts`, 2 in
`session.identity.test.ts`) onto construction with the same identity
fakes; `detach()` becomes `dispose()`. No mint, refresh or arbitration
assertion value changed.
- Test tally against the base branch, by name: 12 deleted, 1 added, 3
renamed, plus the regression test above. Deleted: the five
`isAccountIdentity` cases in `identity.test.ts`, replaced by one
compile-time brand case; in `session.identity.test.ts`, re-attach after
dispose, replace-on-attach, and the runtime brand refusal; in
`session.test.ts`, dispose-inside-first-delivery, callback-after-detach,
stale detach from a superseded attach, and the runtime brand refusal
again. Eleven pinned behavior the client no longer has. The twelfth,
dispose-inside-first-delivery, also asserted that no mint follows such a
dispose; dropping it is what let the regression in, and the regression
test above restores that assertion on the construction path. Renamed:
the three `session.test.ts` cases that said detach now say dispose.
- `docs/adr/AUTH-IDENTITY-0033` (Accepted) supersedes ADR-0028's
transitional rules and records the decomposition PR through the
seam-deletion PR as shipped, the preserved credential invariants, and
the rejected alternatives. It names the cloud app's ordered persistence
hierarchy (localStorage, then the IndexedDB store vuefire persisted
into, then session storage) and the popup resolver, and says the brand
is a compile-time gate that the `testing` seam deliberately exposes; the
`identity.ts` docblock says the same. ADR-0028's status block points at
ADR-0033. Index updated.
- The account-ui billing fixture drops its `attachIdentity` stub, and
`billing-web` passes its identity at construction. The Firebase entry
now mints its brand through `brandIdentity` like the lazy port, so there
is one way to mint it.
- The session suites and `credentialCache.test.ts` share their fakes
through `core/__fixtures__/sessionFakes.ts` (memory storage, the
exchange URL and ninety-minute constants, `testUser`, mint body and
response builders, a manual identity with an unsubscribe spy) instead of
drifting copies. The manual identity's `fire` now throws when no client
has subscribed instead of silently doing nothing.

## Review Focus
- The deleted-test tally above is the thing to check: each name says
removed-behavior or covered-elsewhere.
- The regression guard reads the post-publish state rather than the
`active` flag because the type-aware lint narrows that flag to true
across the commit call; the two are equivalent, and the state form also
covers a re-entrant identity change.
- ADR-0033 is `Accepted`, not `Proposed` like its AUTH neighbours,
because the work it records has shipped across this stack; say so if you
want the convention kept instead.
- No runtime defense remains against a JavaScript consumer passing an
unbranded port. The package is private and both consumers are in this
repo; the ADR records the tradeoff for the day it is published.
- Construction subscribes before a test registers its own `subscribe`
listener; the migrated cases rely on `subscribe`'s replay of the current
snapshot, which is the same contract hosts use.

## QA
- [x] Unit: `@comfyorg/account-core` 41 files / 757 tests (base 767;
twelve deleted, two added, three renamed); cloud auth-area suites 132
files / 2824; website config 79 / 2463; account-ui billing 23
- [x] The regression test fails on the base code (post-dispose
`getIdToken()` and exchange call both fire once) and passes with the fix
- [x] `grep` for the three deleted names across `packages`, `src`,
`apps`: none
- [x] `pnpm typecheck`, `pnpm lint`, `oxfmt --check`, `pnpm knip`, `pnpm
adr:check`, `fallow audit` clean
- Not covered: no e2e; nothing user-facing changes in this PR.

This PR stacks on Comfy-Org#17834 and merges after it.

Linear:
[FE-2196](https://linear.app/comfyorg/issue/FE-2196/remove-the-pinia-identity-adapter-package-owned-identity)

<details>
<summary>Stack (merge bottom-up; each PR targets the one below
it)</summary>

Base: Comfy-Org#17643 hosts own the auth copy. The package is
`@comfyorg/account-core` since the rename on main (Comfy-Org#17851); the Vue
pieces live in `@comfyorg/account-ui` (Comfy-Org#17854). Publish preparation
(files allowlist, dependency cut, `dist` build) now ships from the
billing track in Comfy-Org#17882; the earlier Comfy-Org#17838, Comfy-Org#17839 and Comfy-Org#17840 are
drafts kept for reference.

1. Comfy-Org#17830 the session client's state changes in one pure transition;
cache and in-flight mint become their own modules
2. Comfy-Org#17831 identity is passed to `createSessionClient` at construction;
`dispose()` tears it down
3. Comfy-Org#17832 the cloud store binds identity at construction; the flag gates
minting only
4. Comfy-Org#17833 the website binds identity through a lazily activated port so
Firebase stays a lazy chunk
5. Comfy-Org#17834 the package initializes the cloud app's Firebase; vuefire no
longer does
6. Comfy-Org#17835 the transitional `attachIdentity` seam is deleted; ADR-0033
records the outcome ← this PR
7. Comfy-Org#17836 the legacy workspace-token rail moves into its own removable
module and its hot paths are split into named steps
8. Comfy-Org#17837 the dead `vuefire` dependency and its inert test mocks go
</details>
AlexRAV pushed a commit to AlexRAV/ComfyUI_frontend that referenced this pull request Sep 18, 2026
…dule (Comfy-Org#17836)

## Summary
The legacy workspace-token rail moves out of `workspaceAuthStore` into
its own module. The store keeps the flag dispatcher and host projection;
`legacyWorkspaceTokenRail.ts` holds the pre-unified mint, refresh timer,
recovery and token getters as one removable unit. Nothing is deleted:
`unified_cloud_auth` is a PostHog percentage rollout that defaults off,
so this rail still serves production users. When the cut-over completes,
retiring it becomes a file deletion plus a handful of store lines.

The PR has two review surfaces. The first is a verbatim move. The second
splits the rail's two long functions into named steps and, in this
revision, restores the original guard order and exit points that the
split had drifted from.

Part of FE-951 (the cut-over ticket; this PR isolates, it does not
delete)

## Commits
1. `c130ee50` refactor: move the legacy workspace-token rail into its
own module. The code moves verbatim; review with `--color-moved`.
2. `ea210e34` refactor: construct the legacy rail before the computed
that reads it.
3. `bdb1c152` test: pin the legacy rail seam (five cases in
`useWorkspaceAuth.test.ts`).
4. `c0944e6b` test: cover the rail at the factory seam
(`legacyWorkspaceTokenRail.test.ts`).
5. `35b68dae` test: cover the rail's mint, refresh and recovery branches
directly (`legacyWorkspaceTokenRail.lifecycle.test.ts`).
6. `e0bbd162` refactor: split the rail's mint and refresh flows into
named steps.
7. `def7dfa4` test: pin the post-mint owner guard and the foreign-token
refresh exit.
8. `dff474cd` test: drive the seam through the shared feature flag mock.
9. `f0136ca7` refactor: keep the rail's guard order and return after an
exhausted refresh.
10. `c4f7f3c5` test: run the rail suites on a stepped fake clock.

## Review surface 1: the move (`c130ee50`, `ea210e34`)
- `legacyWorkspaceTokenRail.ts` is new:
`createLegacyWorkspaceTokenRail(deps)` returns the legacy surface the
store used to define inline (`workspaceToken`, `initializeFromSession`,
the legacy `switchWorkspace` branch, `refreshToken`,
`ensureWorkspaceToken`, `ensureWorkspaceAuthHeader`, the token getters,
`retireLegacyToken`, `stopRefreshTimer`, `clearLegacyContext`).
- The dependency interface is explicit: the shared refs
(`currentWorkspace`, `isLoading`, `error`), the uid helpers, lazy
`getIdToken`/`hasSignedInUser`/`activeWorkspaceId` closures,
`endWorkspaceSession`, `persistWorkspaceIdentity`,
`clearSessionStorage`, `surfacePermanentAuthError`, and the store's
`switchWorkspace`. That last one matters: the rail's timer-driven
refresh still routes through the flag dispatcher, so with the flag on it
reaches the unified switch exactly as before.
- `workspaceAuthStore.ts` drops from 1179 to 590 lines. Its returned
names and module exports are unchanged; `switchWorkspace` is now only
the flag dispatcher; `clearWorkspaceContext` calls
`clearLegacyContext()` and then its own lines in the original order.
- `WorkspaceAuthError` lives in `workspaceAuthError.ts` (both rails
throw it) and is re-exported from the store.
`MAX_SCHEDULED_REFRESH_RETRIES` moves to `workspaceConstants.ts` since
both rails read it.
- Only five lines inside the moved block differ from the original: three
store reads become injected closures, the flag branch leaves the legacy
switch, and one docblock clause that claimed the unified path reuses
`requestToken` is gone.
- The second commit only moves the rail construction above the
`isAuthenticated` computed that reads it.

## Review surface 2: the named-steps split (`e0bbd162`, then `f0136ca7`)
Why: the repo's complexity gate flagged the moved file.
`performSwitchWorkspace` and `refreshToken` each carried the original
store's two largest bodies, and `ensureWorkspaceToken` was close behind.
The split extracts the steps those functions were already doing in
sequence, with the names the log lines and comments were already using:
`requestToken` (network plus parse, no store writes),
`readStoredSession` and `isUnexpiredSession` under
`initializeFromSession`, `canRecheckAfterInFlightSwitch`,
`canStartRecoveryMint` and `recoverWorkspaceToken` under
`ensureWorkspaceToken`, and `endRefreshOnPermanentError`,
`waitForRefreshBackoff`, `preserveTokenAfterExhaustedRefresh` and
`settleExhaustedRefresh` under `refreshToken`. The rail's highest
per-function cyclomatic goes from 20 to 9.

Behavior is meant to be preserved, and the two suites added in this PR
were written against the original semantics. Review found three places
where the first split drifted; `f0136ca7` puts them back:
- Guard order on restore. `readStoredSession` parsed and
schema-validated the stored workspace before checking who owned the
session; the original short-circuited on the owner check first. The
owner check is back in front of the parse, so a foreign user's blob is
never parsed. Same outcomes in every row of the restore table.
- Exit after an exhausted refresh. `settleExhaustedRefresh` was the last
statement of the catch, so control fell back into the loop and
termination depended on the transient guard. The original returned after
the preserve branch; the `return` is back.
- The recovery target. A one-line helper sat under the docblock that
belongs to `ensureWorkspaceToken`; the expression is inlined, the helper
is gone, and the docblock is back on the function. To keep the
complexity gate green after the inline, the cooldown and
active-workspace gate now opens `recoverWorkspaceToken` instead of
sitting one line above its call, which is the same check in the same
order.
- Two smaller readability points from the same review:
`REFRESH_MAX_RETRIES` is renamed `REFRESH_ATTEMPT_MAX_RETRIES` (it
bounds in-loop attempts; `MAX_SCHEDULED_REFRESH_RETRIES` is the
scheduled budget), and the hand-rolled promise-over-`setTimeout` in
`waitForRefreshBackoff` is `delay` from es-toolkit.

## Review Focus
- Read the move commit with `--color-moved`; every test file is
untouched in it.
- Read `e0bbd162` and `f0136ca7` together against the parent's
`workspaceAuthStore.ts`, checking that every early return and guard
lands in the same order.
- The seam cases in `useWorkspaceAuth.test.ts` drive the rail through
the real store: the legacy refresh deadline and an expired-token
recovery route through the flag dispatcher when unified auth is on (a
rail calling its own legacy switch fails both), the fail-closed return
in `ensureWorkspaceToken` (returning the other workspace's token fails
it), and the injected identity and active-workspace closures resolving
at call time. The other store suites stub the rail's actions.
- This exceeds the usual 300-line guideline on purpose. It is one
verbatim move; a split would have added seven throwaway members to keep
each half green and doubled the review.
- The true boundary today: `WorkspaceTokenResponse` is re-exported from
the store because four Playwright files import it from there
(`browser_tests/tests/authAccountSwitch.spec.ts`,
`browser_tests/tests/currentUserPopoverCredits.spec.ts`,
`browser_tests/fixtures/workspaceSwitcherFixture.ts`,
`browser_tests/fixtures/data/workspaceAuthFixtures.ts`).
`WorkspaceAuthError` is re-exported because `useWorkspaceAuth.test.ts`
imports it from the store; pointing that test at `workspaceAuthError.ts`
would have edited a test file inside the move commit.
- What the eventual deletion looks like, so the boundary can be judged
(this list belongs on FE-951): delete the rail file; remove the twelve
rail-originated names the store destructures (`workspaceToken`,
`initializeFromSession`, `switchLegacyWorkspace`, `refreshToken`,
`ensureWorkspaceToken`, `ensureWorkspaceAuthHeader`,
`getWorkspaceAuthHeader`, `getWorkspaceToken`, `hasValidWorkspaceToken`,
`retireLegacyToken`, `stopRefreshTimer`, `clearLegacyContext`), seven of
which the store also returns; drop the `retireLegacyToken()` call in the
unified snapshot subscriber; drop the three token keys in
`clearSessionStorage`; re-add `currentWorkspace = null` in
`clearWorkspaceContext` (it sits inside `clearLegacyContext` today to
keep the clear order identical); collapse `switchWorkspace` to its
unified branch; drop `initializeFromSession` from `init` and
`stopRefreshTimer` from `destroy`; retarget the four Playwright imports
of `WorkspaceTokenResponse` or drop the type with them, and drop
`WorkspaceTokenResponseSchema` with the file rather than retargeting it
(the generated `zExchangeTokenResponse` already covers this endpoint,
and the unified rail consumes it); and decide what `isLoading` means
once nothing writes it.

## QA
Test files added or changed against the parent branch (`git diff
--numstat <parent>...HEAD -- '**/*.test.ts'`):

| file | added | removed |
| --- | --- | --- |
|
`src/platform/workspace/stores/legacyWorkspaceTokenRail.lifecycle.test.ts`
(new) | 657 | 0 |
| `src/platform/workspace/stores/legacyWorkspaceTokenRail.test.ts` (new)
| 123 | 0 |
| `src/platform/workspace/stores/useWorkspaceAuth.test.ts` | 143 | 1 |

- [x] Move commit: no test file changed in it; the suites are green on
it
- [x] `legacyWorkspaceTokenRail.test.ts`: 6 cases at the factory seam
(mint, owner-scoped validity, clear, refresh timer armed and stopped)
- [x] `legacyWorkspaceTokenRail.lifecycle.test.ts`: 46 cases covering
the mint failure table, session restore, `ensureWorkspaceToken`
(cooldown, coalescing, fail-closed, in-flight join, recovery
classification) and `refreshToken` (permanent-error exit, the doubling
backoff stepped at 999/1, 1999/1 and 3999/1 ms with a fetch count after
each step, pre-exchange failure, expired and foreign held tokens,
abandoned chain, scheduled retry cap). A halved base delay fails the
backoff case at the first step
- [x] `useWorkspaceAuth.test.ts`: five additive seam cases, each proven
against a mutant (flag-dispatch bypass in `refreshToken` and in
`ensureWorkspaceToken`, the downgrade return, eager capture of
`getIdToken`, eager capture of `activeWorkspaceId`); the
refresh-deadline advance now subtracts `TOKEN_REFRESH_BUFFER_MS` rather
than a literal
- [x] Both rail suites and the store suite opt out of the auto-advancing
fake clock (`shouldAdvanceTime: false`), so the 1 ms margins in the
timing rows are real
- [x] `src/platform/workspace`, `src/stores`, `src/platform/auth`: 134
files, 2928 tests green at the tip (the one red case,
`checkoutJourney.test.ts`, is a known local-only failure in a file this
PR does not touch)
- [x] Complexity audit against the parent: pass, nothing newly
introduced; the rail's highest per-function cyclomatic is 9
- [x] `pnpm typecheck`, `pnpm lint` (0 errors), `oxfmt --check`, `pnpm
knip` clean
- Not covered: no e2e; the flag-off production path is exercised only by
the unit suites above. A cloud build with the flag off (sign in, switch
workspace, wait past the refresh buffer) is the manual check if you want
one.

This PR stacks on Comfy-Org#17835 and merges after it.

Addresses the isolate half of
[r3976008872](Comfy-Org#17283 (comment));
the shared exchange contract stays on FE-951.

Linear:
[FE-951](https://linear.app/comfyorg/issue/FE-951/unified-cloud-auth-phase-2-cut-over-to-single-cloud-jwt-remove-legacy)

<details>
<summary>Stack (merge bottom-up; each PR targets the one below
it)</summary>

Base: Comfy-Org#17643 hosts own the auth copy. The package is
`@comfyorg/account-core` since the rename on main (Comfy-Org#17851); the Vue
pieces live in `@comfyorg/account-ui` (Comfy-Org#17854). Publish preparation
(files allowlist, dependency cut, `dist` build) now ships from the
billing track in Comfy-Org#17882; the earlier Comfy-Org#17838, Comfy-Org#17839 and Comfy-Org#17840 are
drafts kept for reference.

1. Comfy-Org#17830 the session client's state changes in one pure transition;
cache and in-flight mint become their own modules
2. Comfy-Org#17831 identity is passed to `createSessionClient` at construction;
`dispose()` tears it down
3. Comfy-Org#17832 the cloud store binds identity at construction; the flag gates
minting only
4. Comfy-Org#17833 the website binds identity through a lazily activated port so
Firebase stays a lazy chunk
5. Comfy-Org#17834 the package initializes the cloud app's Firebase; vuefire no
longer does
6. Comfy-Org#17835 the transitional `attachIdentity` seam is deleted; ADR-0033
records the outcome
7. Comfy-Org#17836 the legacy workspace-token rail moves into its own removable
module and its hot paths are split into named steps ← this PR
8. Comfy-Org#17837 the dead `vuefire` dependency and its inert test mocks go
</details>
AlexRAV pushed a commit to AlexRAV/ComfyUI_frontend that referenced this pull request Sep 18, 2026
…#17837)

## Summary
`vuefire` is gone. After the package-initialized Firebase change nothing
in `src` imports it, so this removes the dependency and the 28 test
mocks that stubbed a module nothing under test loads. Deletion only, no
assertion changes.

Part of FE-2196

## Changes
- `package.json` and the pnpm catalog drop `vuefire`; the lockfile loses
`vuefire` and its optional peer `consola@3.4.2` (the older
`consola@2.15.3` stays, other packages use it).
- 26 suites lose the identical one-line `vi.mock(import('vuefire'),
...)`; two more (`authTokenPriority.test.ts`,
`apiKeyAuthStore.integration.test.ts`) also lose the
`mockReturnValue(... as unknown as ...)` blocks that only existed to
feed that mock, taking one pre-existing double assertion (`as unknown
as`) and one single `as` assertion with them.

## Review Focus
- The diff is deletions only, lockfile included. If a removed mock had
been load-bearing, the suite would import `vuefire` somewhere; none
does.

## QA
- [x] No `vuefire` imports in `src` (two prose mentions remain, in
`firebaseIdentity.ts` and its test, describing where the old default
persisted sessions); nothing in the manifests or the lockfile
- [x] Unit: `src/stores src/platform src/utils src/composables` 597
files / 9785 tests; the 21 touched suites outside those directories 427
tests; all green
- [x] `pnpm typecheck`, `pnpm lint`, `oxfmt --check`, `pnpm knip`, `pnpm
build:cloud` clean

This PR stacks on Comfy-Org#17836 and merges after it.

Linear:
[FE-2196](https://linear.app/comfyorg/issue/FE-2196/remove-the-pinia-identity-adapter-package-owned-identity)

<details>
<summary>Stack (merge bottom-up; each PR targets the one below
it)</summary>

Base: Comfy-Org#17643 hosts own the auth copy. The package is
`@comfyorg/account-core` since the rename on main (Comfy-Org#17851); the Vue
pieces live in `@comfyorg/account-ui` (Comfy-Org#17854). Publish preparation
(files allowlist, dependency cut, `dist` build) now ships from the
billing track in Comfy-Org#17882; the earlier Comfy-Org#17838, Comfy-Org#17839 and Comfy-Org#17840 are
drafts kept for reference.

1. Comfy-Org#17830 the session client's state changes in one pure transition;
cache and in-flight mint become their own modules
2. Comfy-Org#17831 identity is passed to `createSessionClient` at construction;
`dispose()` tears it down
3. Comfy-Org#17832 the cloud store binds identity at construction; the flag gates
minting only
4. Comfy-Org#17833 the website binds identity through a lazily activated port so
Firebase stays a lazy chunk
5. Comfy-Org#17834 the package initializes the cloud app's Firebase; vuefire no
longer does
6. Comfy-Org#17835 the transitional `attachIdentity` seam is deleted; ADR-0033
records the outcome
7. Comfy-Org#17836 the legacy workspace-token rail moves into its own removable
module and its hot paths are split into named steps
8. Comfy-Org#17837 the dead `vuefire` dependency and its inert test mocks go ←
this PR
</details>

This branch was successfully deployed

1 active deployment
Preview – billing-web — eb706544 Deployed Sep 16, 2026 by vercel[bot]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

risk:xhigh PR risk grade (advisory shadow check; grader-owned)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants