Skip to content

FE-2897 feat(account-core): session lifecycle, create on sign-in, delete on sign-out, heartbeat - #18719

Merged
dante01yoon merged 31 commits into
mainfrom
dante01yoon/fe-2897-web-session-lifecycle
Sep 26, 2026
Merged

dante01yoon merged 31 commits into
mainfrom
dante01yoon/fe-2897-web-session-lifecycle

Conversation

@dante01yoon

@dante01yoon dante01yoon commented Sep 24, 2026 •

Copy link
Copy Markdown
Collaborator

Stacked on #18715 (FE-2894) → #18710 (FE-2892). Do not merge until those merge and BE-17061 (C1) and BE-17063 (C3) are on testcloud (the web session backend is not on staging yet). The base of this PR is the FE-2894 branch.

Why

With one shared session, signing in or out on one site has to reach every open tab on every other site, and a tab must never finish Alice's action as Bob. TDD §7, §12 and A8 define how: create the session only on a real sign-in, delete it on sign-out, and run a heartbeat that notices a remote sign-out or an account change and tells the app to reset.

How

This extends the FE-2894 state machine rather than adding a second module, so there is still one state and one pure transition.

  • signedIn(getProof): the host calls it only after an interactive sign-in. A token refresh never creates a session.
  • signOut(): signs the tab out at once, sends DELETE /api/auth/session (which works on a dead session), and tells sibling tabs.
  • Heartbeat: GET /session every 10 minutes while the tab is visible, and once when it becomes visible. The GET never extends the idle timer.
    • A new CSRF token is adopted silently.
    • session_revoked → signed out.
    • no_session/session_expired → restore in place from the remembered login, without bumping the epoch.
    • SESSION_UNAVAILABLE and other ambiguous answers keep the user signed in; the next beat tries again.
  • Cross-tab: within one site, only a visible, signed-in tab holds the lead and beats. Siblings adopt ok and revoked answers over the existing broadcast port and validate each message with a schema before adopting it.
    • CrossTabRefreshPort gains a message type parameter (<Message = AccountCredential>). The change is type-only, and the cloud app's existing createWebCrossTabRefreshPort() call keeps the same runtime behaviour.
    • createWebVisibilityPort() joins ./web, so the core still touches no browser global.
  • Account change: onAccountChanged fires on a remote sign-out, a different user in any answer, and the host's own sign-out. getEpoch() goes up on each change, and an answer started under an older epoch is discarded. The host tags requests with the epoch and clears its own caches, workspace selection and socket (FE-2903). onSignedOutRemotely is the session_signed_out_remotely event (revoked only).
  • Inert until boot(): nothing watches visibility or the channel before then; the inert-import test now covers ./web.
  • Size: about 358 net non-test lines, over the ~300 guideline. If you want it smaller, the split is cross-tab adoption + the visibility port + the generic port type (~70 lines) into a follow-up, or the pure transition into its own module.

AS IS / TO BE

No UI; the evidence is tests with injected time, fake visibility and a fake cross-tab port, no sleeps.

  • AS IS: no session lifecycle or heartbeat.
  • TO BE: webSessionIdentity.lifecycle.test.ts covers:
    • a sign-out on another site reaching this tab at its next beat or on focus;
    • a different user in a heartbeat resetting state, with a pending answer from the old epoch dropped;
    • a hidden tab never beating;
    • followers adopting instead of reading;
    • a token refresh never creating a session;
    • SESSION_UNAVAILABLE never signing out.
pnpm --filter @comfyorg/account-core test   Tests 1094 passed
pnpm --filter @comfyorg/account-core typecheck / lint   clean
pnpm typecheck   clean
pnpm knip        clean
pnpm fallow audit --base <FE-2894 branch>   No issues in 6 changed files

Mutation checks (each reverted):

Mutation Result
hidden tab beats 2 red
followers read too 1 red
heartbeat creates a session 5 red
SESSION_UNAVAILABLE signs out 1 red
old-epoch answer applied after an account change 1 red

For review:

  • The CSRF token travels on the same-origin broadcast channel, the same trust boundary the port already documents for the workspace token.
  • signOut() calls RememberedLogin.signOutLocally itself, which may overlap the host's own Firebase sign-out.

Links

Where this PR sits in the plan

Ticket Scope Blocked by State
FE-2891 unified_web_session client flag, off by default BE-17135 to turn on; C11 for website/billing-web readers #18708
FE-2892 account-core web session client + error codes C1, C3 (BE-17063 generated types) #18710, do not merge
FE-2893 ADR for the shared web session none #18707
FE-2901 non-web clients stay on tokens (baseline) FE-2895 for authorize() rows #18711
FE-2894 session-backed identity + boot rules (stacked on #18710) FE-2892, C3 #18715, do not merge
FE-2895 authorize() for cookie requests (stacked on #18710) FE-2892, C5 #18716, do not merge
FE-2897 (this PR) session lifecycle, heartbeat (stacked on #18715) FE-2894, C1, C3 #18719, do not merge
FE-2906 cross-origin E2E harness + §17 test ids C3/C5/C6/C7 on staging for the rows #18718 (harness only)
FE-2896, 2898–2900, 2902–2905, 2907, 2908 apps, token mint, rollout, cleanup C5/C6/C7/C8/C11 contracts not started
flowchart LR
  subgraph BE["BE · cloud ingest and infra"]
    C0["BE-17071 C0 preview CORS gate"]
    C1["BE-17061 C1 sessions table + revocable cookie"]
    C3["BE-17063 C3 GET /session, trusted origins, flag"]
    C4["BE-17062 C4 shared workspace resolution"]
    C5["BE-17066 C5 cookie on API: CSRF, Origin, workspace header"]
    C2["BE-17064 C2 revoke-all, purge, caps"]
    C6["BE-17067 C6 WebSocket on session"]
    C7["BE-17068 C7 scoped media"]
    C8["BE-17069 C8 token mint from session"]
    C9["BE-17065 C9 Redis cache + load test"]
    C10["BE-17072 C10 prod config, cleanup"]
    C11["C11 flag before sign-in (OQ17)"]
    B135["BE-17135 serve unified_web_session (server AND)"]
    I2["BE-17070 I2 edge limit, log + DNS audit"]
  end
  subgraph SDK["FE · account-core"]
    F2891["FE-2891 flag"]
    F2892["FE-2892 web session client"]
    F2894["FE-2894 identity + boot rules"]
    F2897["FE-2897 lifecycle, heartbeat"]
    F2895["FE-2895 authorize()"]
    F2900["FE-2900 lazy token mint"]
    F2901["FE-2901 non-web stay on tokens"]
  end
  subgraph APPS["FE · apps"]
    F2896["FE-2896 website header"]
    F2903["FE-2903 cloud lifecycle"]
    F2899["FE-2899 website credits"]
    F2904["FE-2904 cloud API client"]
    F2905["FE-2905 socket + media"]
    F2898["FE-2898 billing-web joins session"]
    F2902["FE-2902 platform"]
  end
  subgraph QA["QA · rollout · docs"]
    F2906["FE-2906 cross-origin E2E"]
    F2893["FE-2893 ADR + docs"]
    F2907["FE-2907 ramp + rollback"]
    F2908["FE-2908 cleanup"]
  end
  C0 --> C1 --> C3 --> C5
  C3 --> C11 --> F2891
  B135 --> F2891
  C4 --> C5
  C1 --> C2
  C1 --> C9
  C5 --> C6 & C7 & C8
  C3 --> F2892
  C1 --> F2892
  F2891 --> F2894
  C3 --> F2894
  F2892 --> F2894 --> F2896
  F2894 --> F2897 --> F2903
  C1 --> F2897
  F2892 --> F2895
  C5 --> F2895
  F2895 --> F2899 & F2904 & F2900 & F2901 & F2902
  C5 --> F2899 & F2904
  F2903 --> F2904 --> F2905
  C6 --> F2905
  C7 --> F2905
  C8 --> F2900
  F2894 --> F2898
  F2895 --> F2898
  C3 --> F2898
  C5 --> F2898
  F2903 & F2904 & F2905 & F2898 --> F2906
  C3 & C2 --> F2906
  F2906 --> F2907
  C9 & C10 & I2 --> F2907
  F2907 --> F2908
  C10 --> F2908
  classDef thisPr fill:#ffe08a,stroke:#b8860b,stroke-width:4px,color:#000
  class F2897 thisPr
Loading

readWebSession, createWebSession, deleteWebSession and revokeAllWebSessions
for the shared __Host-comfy_session cookie on ingest. Every call sends
credentials, failures are coded (six session codes plus a transient and a
refused bucket), and 429/5xx/network never read as a sign-out. Nothing
imports it yet; importing it starts no timer, listener or request.
Boots a site from GET /auth/session and follows the server's answer:
signed in on 200 (signing out a different remembered login), local
sign-out on session_revoked with no restore, one silent restore from a
remembered login on no_session/session_expired, and pending with
backoff on a network error. An API-key principal never touches the
session. Reports session_bootstrap through an injected callback.
A restore that gets no answer, or whose proof throws, waits and retries
from a fresh read instead of spending the restore, so a network blip
never signs the user out. getProof returns null when the provider has
no usable login, which settles signed out without a local sign-out.
Create the session only on an interactive sign-in, delete it on sign-out,
and read it every 10 minutes from the one visible leader tab per site so a
sign-out or account change elsewhere reaches every open tab. Account
changes bump an epoch the host tags requests with, so answers started under
the old account are discarded.
@coderabbitai

coderabbitai Bot commented Sep 24, 2026 •

Copy link
Copy Markdown
Contributor

Review in Change Stack →

Navigate logical layers of code changes, visualize relationships, and explore their blast radius.

📝 Walkthrough

Walkthrough

The web-session identity now handles account changes, interactive sign-in and sign-out, and session observations. It coordinates visible-tab heartbeats through cross-tab leadership and shares eligible session results with sibling tabs.

Changes

Web session identity lifecycle

Layer / File(s) Summary
Identity transitions and operations
packages/account-core/src/core/webSessionIdentity.ts, packages/account-core/src/core/webSessionIdentity.lifecycle.test.ts
The identity adds account-change and session-observation transitions, exposes sign-in and sign-out operations, and tests heartbeat-related state outcomes such as revocation, restoration, and user changes.
Visibility and cross-tab ports
packages/account-core/src/core/sessionContracts.ts, packages/account-core/src/web/crossTabRefresh.ts, packages/account-core/src/web/crossTabRefresh.test.ts, packages/account-core/src/webSessionInertImport.test.ts
The cross-tab port accepts generic message types. The web adapter adds visibility reporting and tests its listener behavior and inert imports.
Heartbeat and cross-tab coordination
packages/account-core/src/core/webSessionIdentity.ts, packages/account-core/src/core/webSessionIdentity.lifecycle.test.ts
The identity uses visibility and cross-tab leadership for session reads, publishes eligible results, adopts sibling updates, and rejects stale answers. Lifecycle tests cover heartbeat timing, leadership handoff, sign-in and sign-out propagation, and stale answers.

Priority: ➖ Normal

Estimated code review effort: 4 (Complex) | ~45 minutes

Change: Feature

Sequence Diagram(s)

sequenceDiagram
  participant WebSessionIdentity
  participant VisibilityPort
  participant CrossTabRefreshPort
  participant SessionEndpoint
  participant SiblingWebSessionIdentity
  VisibilityPort->>WebSessionIdentity: Report visibility changes
  WebSessionIdentity->>CrossTabRefreshPort: Check heartbeat leadership
  WebSessionIdentity->>SessionEndpoint: Leader reads session
  SessionEndpoint-->>WebSessionIdentity: Return session result
  WebSessionIdentity->>CrossTabRefreshPort: Publish eligible session result
  CrossTabRefreshPort-->>SiblingWebSessionIdentity: Deliver session result
Loading

Merge Risk: 🟡 Moderate · up to 8f31e

If a user signs in or out while the tab is still restoring its session at load time, a leftover background request can undo that action. The user can end up signed out, switched back to a previous account, or signed back in after signing out. This should be fixed before merge. The earlier issues are resolved: sign-outs being reversed by other tabs, and remote sign-outs being reported once per open tab.

Security Architecture Review

Security architecture risk: 🟡 Moderate · up to 8f31e

A late sign-in can be applied after sign-out or sent to other tabs after disposal. That creates a meaningful session-lifecycle risk, although its production exposure depends on how applications enable these interfaces.

Retained concerns

  • Medium · security · inferred: A sign-in result can arrive after a newer sign-out, account change, or disposal and still be published; a signed-out sibling can adopt a delayed successful sign-in message. The transition lacks a shared generation check to establish that the result remains current.
Security review details

Security Blast Radius

  • inferred — A stale successful sign-in can affect this tab's identity state and, when cross-tab coordination is enabled, sibling tabs on the same site. The inspected contract does not establish propagation across different sites without a subsequent server observation.

Security Findings and Attack Paths

  • inferred — If an earlier sign-in completes after a newer sign-out or disposal, its successful result is not rejected as stale. Publication can also cause a signed-out sibling to adopt that result; whether backend ordering permits a usable session remains unverified.

Trust Boundaries and Controls

  • observed — Direct sign-in and sign-out use server session operations; malformed sibling messages are rejected, and guarded reads discard older-epoch answers. These controls do not order successful interactive sign-in against later lifecycle transitions.

Resilience and Maintainability Implications

  • observed — Sign-out takes effect locally before DELETE completes and only broadcasts revocation after a successful deletion. This avoids asserting server revocation on an ambiguous failure, but leaves other tabs dependent on their own observation when deletion fails.

Hardening Proposals

  • proposed — Bind interactive sign-in completion to its starting identity generation and disposal state. Give cross-tab sign-in and revocation messages a comparable generation or require a fresh authoritative read before a signed-out tab adopts a delayed sign-in.
🚥 Pre-merge checks | ✅ 7
✅ Passed checks (7 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly identifies the session lifecycle and heartbeat changes, which are the main objectives of the pull request.
Description check ✅ Passed The description provides a detailed summary, implementation details, review focus, testing results, dependencies, rollout context, and related links. It does not use the template headings exactly, and…
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
End-To-End Regression Coverage For Fixes ✅ Passed The PR includes bug-fix signals in multiple commit subjects, and it changes packages/ files without changing browser_tests/. However, the description gives a concrete reason for not adding an end-…
Website End-To-End Regression Coverage ✅ Passed The changed files are confined to packages/account-core/. The PR does not change files under apps/website/src/ or apps/website/public/, so this website-specific check does not apply.
Adr Compliance For Entity/Litegraph Changes ✅ Passed The changed-file list contains only account-core session files and web-session tests. It contains no files under src/lib/litegraph/, src/ecs/, or files related to graph entities. The ADR complianc…
✨ Finishing Touches
📝 Generate docstrings
  • Commit to this branch
  • Create a new PR
🧪 Generate unit tests (beta)
  • Commit to this branch
  • Create a new PR

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

@github-actions

github-actions Bot commented Sep 24, 2026 •

Copy link
Copy Markdown
Contributor

🌐 Website E2E

Tip

All tests passed.

Status ✅ Passed
Report View Report

🎭 Playwright: ✅ 2132 passed, 0 failed

📊 Browser Reports
  • chromium: View Report (✅ 2111 / ❌ 0 / ⚠️ 0 / ⏭️ 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)

🎨 Storybook: ✅ Built — View Storybook

Details

⏰ Completed at: 09/25/2026, 08:24:22 PM UTC

Links

🌾 Fallow: ✅ Passed

Fallow audits the diff for duplication, complexity and dead code. It gates on new findings only, so when the audit completes, a red is something this PR introduced or moved — never inherited backlog. A red can also mean the audit itself did not finish; the details below say which happened.

No new findings in the changed files.

Reproduce locally
# the base the gate compared against
npx fallow audit --root . --quiet --format json \
  --changed-since 6596737b4394aca867ae2ccb6ad957dfb8435658

Full docs: ADR-DEVEX-LINT-0015

🧩 Custom Nodes Ecosystem Matrix: ✅ Passed

Executes the frontend JS of every registry pack that ships any, against this change, in both renderers. The eight ecosystem-matrix shard checks are a harness self-test; the pack verdict is matrix-verdict.

Stage Result What a failure here means
pin-status success Informational. It never fails the build; it warns when the corpus snapshot is over 30 days old.
corpus success Infrastructure: the pack mirror could not be fetched, validated or cached. Not your diff.
shards success Harness integrity, not pack breakage. A shard only checks that every built spec wrote its row; vitest's own exit code is deliberately ignored because pack code leaks unhandled rejections.
verdicts success The population verdict per renderer. This is the stage that judges packs. Exit 1 is FAIL; exit 2 is withheld — rows were missing, so nothing was measured, which is not the same as your change breaking packs.
detection-proofs success The instrument self-test: the matrix must FAIL on a deliberately poisoned corpus. A failure here means the gate cannot be trusted this run, in either direction.

On a pin-bump PR, a red gate means the ecosystem moved — not that your diff broke something. That is what the bump PR is for. Outside a pin bump or a cold rebuild of the unpinned tail, a red means the diff.

Note the corpus size and the executed count are different numbers, and the verdict is against the executed count: roughly 3,100 of ~5,100 packs ship no extension-shaped JS and are skipped.

Reproduce locally
# build one shard's fixture, then run it
python3 scripts/registry-census/build_matrix.py --shard 1/4
MATRIX_RENDERER=vue MATRIX_VUE=1 \
  npx vitest run --config vitest.matrix.config.mts

Full docs: scripts/registry-census/README.md

📦 Bundle: 10 MB gzip ⚪ 0 B

Details

Summary

  • Raw size: 42.4 MB baseline 42.4 MB — ⚪ 0 B
  • Gzip: 10 MB baseline 10 MB — ⚪ 0 B
  • Brotli: 7.04 MB baseline 7.04 MB — ⚪ 0 B
  • Bundles: 455 current • 455 baseline

Category Glance
Other ⚪ 0 B (17.9 MB) · Vendor & Third-Party ⚪ 0 B (17.4 MB) · Data & Services ⚪ 0 B (3.98 MB) · Graph Workspace ⚪ 0 B (1.45 MB) · Panels & Settings ⚪ 0 B (639 kB) · Utilities & Hooks ⚪ 0 B (576 kB) · + 5 more

App Entry Points — 3.77 kB (baseline 3.77 kB) • ⚪ 0 B

Main entry bundles and manifests

Status: 1 unchanged

Graph Workspace — 1.45 MB (baseline 1.45 MB) • ⚪ 0 B

Graph editor runtime, canvas, workflow orchestration

Status: 3 unchanged

Views & Navigation — 134 kB (baseline 134 kB) • ⚪ 0 B

Top-level views, pages, and routed surfaces

Status: 18 unchanged

Panels & Settings — 639 kB (baseline 639 kB) • ⚪ 0 B

Configuration panels, inspectors, and settings screens

Status: 28 unchanged

User & Accounts — 39.4 kB (baseline 39.4 kB) • ⚪ 0 B

Authentication, profile, and account management bundles

Status: 11 unchanged

Editors & Dialogs — 126 kB (baseline 126 kB) • ⚪ 0 B

Modals, dialogs, drawers, and in-app editors

Status: 8 unchanged

UI Components — 125 kB (baseline 125 kB) • ⚪ 0 B

Reusable component library chunks

Status: 16 unchanged

Data & Services — 3.98 MB (baseline 3.98 MB) • ⚪ 0 B

Stores, services, APIs, and repositories

Status: 15 unchanged

Utilities & Hooks — 576 kB (baseline 576 kB) • ⚪ 0 B

Helpers, composables, and utility bundles

Status: 36 unchanged

Vendor & Third-Party — 17.4 MB (baseline 17.4 MB) • ⚪ 0 B

External libraries and shared vendor chunks

Status: 18 unchanged

Other — 17.9 MB (baseline 17.9 MB) • ⚪ 0 B

Bundles that do not match a named category

Status: 301 unchanged

⚡ Performance Report

canvas-idle: · 60.0 avg FPS · 59.5 P5 FPS ✅ (target: ≥52) · 0ms TBT · 71.2 MB heap
canvas-mouse-sweep: · 60.0 avg FPS · 59.9 P5 FPS ✅ (target: ≥52) · 0ms TBT · 63.9 MB heap
canvas-zoom-sweep: · 60.0 avg FPS · 59.7 P5 FPS ✅ (target: ≥52) · 0ms TBT · 61.6 MB heap
dom-widget-clipping: · 60.0 avg FPS · 59.5 P5 FPS ✅ (target: ≥52) · 0ms TBT · 76.8 MB heap
dom-widget-order-dense-n200-w200-i120: · 60.0 avg FPS · 59.7 P5 FPS ✅ (target: ≥52) · 392ms TBT · 68.8 MB heap
dom-widget-order-sparse-n1000-w20-i120: · 60.0 avg FPS · 59.5 P5 FPS ✅ (target: ≥52) · 158ms TBT · 86.2 MB heap
extension-clean-combined-draw: · 54.5 avg FPS · 29.9 P5 FPS ❌ (target: ≥52) · 54ms TBT · 75.8 MB heap
extension-rgthree-prototype-draw: · 56.2 avg FPS · 30.0 P5 FPS ❌ (target: ≥52) · 48ms TBT · 83.6 MB heap
large-graph-idle: · 60.0 avg FPS · 59.9 P5 FPS ✅ (target: ≥52) · 0ms TBT · 74.2 MB heap
large-graph-pan: · 60.0 avg FPS · 59.7 P5 FPS ✅ (target: ≥52) · 0ms TBT · 71.1 MB heap
large-graph-zoom: · 60.0 avg FPS · 59.7 P5 FPS ✅ (target: ≥52) · 0ms TBT · 70.4 MB heap
legacy-node-drag: · 60.0 avg FPS · 59.5 P5 FPS ✅ (target: ≥52) · 0ms TBT · 76.2 MB heap
minimap-idle: · 60.0 avg FPS · 59.9 P5 FPS ✅ (target: ≥52) · 0ms TBT · 76.1 MB heap
subgraph-dom-widget-clipping: · 60.0 avg FPS · 59.9 P5 FPS ✅ (target: ≥52) · 0ms TBT · 73.4 MB heap
subgraph-idle: · 60.0 avg FPS · 59.7 P5 FPS ✅ (target: ≥52) · 0ms TBT · 54.2 MB heap
subgraph-mouse-sweep: · 60.0 avg FPS · 59.7 P5 FPS ✅ (target: ≥52) · 0ms TBT · 59.2 MB heap
subgraph-transition-enter: · 60.0 avg FPS · 59.9 P5 FPS ✅ (target: ≥52) · 87ms TBT · 77.3 MB heap
viewport-pan-sweep: · 60.0 avg FPS · 59.7 P5 FPS ✅ (target: ≥52) · 0ms TBT · 88.1 MB heap
vue-large-graph-idle: · 58.1 avg FPS · 59.5 P5 FPS ✅ (target: ≥52) · 0ms TBT · 181.0 MB heap
vue-large-graph-pan: · 58.1 avg FPS · 59.7 P5 FPS ✅ (target: ≥52) · 10ms TBT · 183.3 MB heap
vue-node-resize-workload: · 58.1 avg FPS · 59.5 P5 FPS ✅ (target: ≥52) · 190ms TBT · 172.7 MB heap
vue-zoom-out-idle: · 57.1 avg FPS · 59.5 P5 FPS ✅ (target: ≥52) · 0ms TBT · 178.2 MB heap
workflow-execution: · 60.0 avg FPS · 59.7 P5 FPS ✅ (target: ≥52) · 0ms TBT · 63.1 MB heap

⚠️ 6 regressions detected

Show regressions
Metric Baseline PR (median) Δ Sig
canvas-idle: DOM nodes -228 0 -100% ⚠️ z=2.2
canvas-idle: event listeners -142 0 -100% ⚠️ z=2.6
legacy-node-drag: avg frame time 17ms 17ms +0% ⚠️ z=3.7
legacy-node-drag: p95 frame time 17ms 17ms +1% ⚠️ z=2.5
viewport-pan-sweep: heap used 80.8 MB 88.1 MB +9% ⚠️ z=3.0
vue-large-graph-pan: heap used 172.5 MB 183.3 MB +6% ⚠️ z=2.2
All metrics
Metric Baseline PR (median) Δ Sig
canvas-idle: avg frame time 17ms 17ms +0% z=0.9
canvas-idle: p95 frame time 17ms 17ms +0% z=1.5
canvas-idle: layout duration 0ms 0ms +0% —
canvas-idle: style recalc duration 5ms 3ms -27% z=-1.6
canvas-idle: layout count 0 0 +0% —
canvas-idle: style recalc count 10 11 +10% z=1.0
canvas-idle: task duration 520ms 326ms -37% z=-1.3
canvas-idle: script duration 12ms 8ms -36% z=-0.9
canvas-idle: TBT 0ms 0ms +0% —
canvas-idle: heap used 68.5 MB 71.2 MB +4% z=1.9
canvas-idle: DOM nodes -228 0 -100% ⚠️ z=2.2
canvas-idle: event listeners -142 0 -100% ⚠️ z=2.6
canvas-mouse-sweep: avg frame time 17ms 17ms -0% z=-2.2
canvas-mouse-sweep: p95 frame time 17ms 17ms -0% z=-1.8
canvas-mouse-sweep: layout duration 5ms 4ms -16% z=-1.9
canvas-mouse-sweep: style recalc duration 19ms 15ms -20% z=-1.7
canvas-mouse-sweep: layout count 12 12 +0% —
canvas-mouse-sweep: style recalc count 71 71 +0% z=-0.5
canvas-mouse-sweep: task duration 908ms 661ms -27% z=-1.2
canvas-mouse-sweep: script duration 180ms 126ms -30% z=-1.3
canvas-mouse-sweep: TBT 0ms 0ms +0% —
canvas-mouse-sweep: heap used 57.5 MB 63.9 MB +11% z=-0.1
canvas-mouse-sweep: DOM nodes -228 -228 +0% z=-0.3
canvas-mouse-sweep: event listeners -164 -153 -7% z=-0.4
canvas-zoom-sweep: avg frame time 17ms 17ms +0% z=0.1
canvas-zoom-sweep: p95 frame time 17ms 17ms +0% z=0.4
canvas-zoom-sweep: layout duration 1ms 1ms -27% z=-2.3
canvas-zoom-sweep: style recalc duration 11ms 8ms -24% z=-2.2
canvas-zoom-sweep: layout count 6 6 +0% —
canvas-zoom-sweep: style recalc count 32 29 -9% z=-1.6
canvas-zoom-sweep: task duration 367ms 261ms -29% z=-1.1
canvas-zoom-sweep: script duration 14ms 10ms -30% z=-1.2
canvas-zoom-sweep: TBT 0ms 0ms +0% —
canvas-zoom-sweep: heap used 61.6 MB 61.6 MB -0% z=-0.3
canvas-zoom-sweep: DOM nodes 53 53 +0% —
canvas-zoom-sweep: event listeners 15 15 +0% —
dom-widget-clipping: avg frame time 17ms 17ms -0% z=-0.8
dom-widget-clipping: p95 frame time 17ms 17ms +1% z=2.0
dom-widget-clipping: layout duration 0ms 0ms +0% —
dom-widget-clipping: style recalc duration 4ms 4ms -7% z=-0.4
dom-widget-clipping: layout count 0 0 +0% —
dom-widget-clipping: style recalc count 12 14 +13% z=2.2
dom-widget-clipping: task duration 484ms 349ms -28% z=-1.4
dom-widget-clipping: script duration 180ms 134ms -25% z=-1.1
dom-widget-clipping: TBT 0ms 0ms +0% —
dom-widget-clipping: heap used 77.2 MB 76.8 MB -0% z=-0.9
dom-widget-clipping: DOM nodes 0 0 +0% —
dom-widget-clipping: event listeners 0 0 +0% —
dom-widget-order-dense-n200-w200-i120: avg frame time 17ms 17ms +0% z=0.5
dom-widget-order-dense-n200-w200-i120: p95 frame time 17ms 17ms +0% z=0.2
dom-widget-order-dense-n200-w200-i120: layout duration 0ms 0ms +0% —
dom-widget-order-dense-n200-w200-i120: style recalc duration 0ms 0ms +0% —
dom-widget-order-dense-n200-w200-i120: layout count 0 0 +0% —
dom-widget-order-dense-n200-w200-i120: style recalc count 0 0 +0% —
dom-widget-order-dense-n200-w200-i120: task duration 955ms 691ms -28% z=-1.2
dom-widget-order-dense-n200-w200-i120: script duration 75ms 49ms -35% z=-1.3
dom-widget-order-dense-n200-w200-i120: TBT 601ms 392ms -35% z=-1.2
dom-widget-order-dense-n200-w200-i120: heap used 69.4 MB 68.8 MB -1% z=-1.4
dom-widget-order-dense-n200-w200-i120: DOM nodes -259 -259 +0% z=-0.6
dom-widget-order-dense-n200-w200-i120: event listeners -185 -207 +12% z=-0.9
dom-widget-order-sparse-n1000-w20-i120: avg frame time 17ms 17ms +0% z=0.3
dom-widget-order-sparse-n1000-w20-i120: p95 frame time 17ms 17ms +1% z=1.2
dom-widget-order-sparse-n1000-w20-i120: layout duration 0ms 0ms +0% —
dom-widget-order-sparse-n1000-w20-i120: style recalc duration 0ms 0ms +0% —
dom-widget-order-sparse-n1000-w20-i120: layout count 0 0 +0% —
dom-widget-order-sparse-n1000-w20-i120: style recalc count 0 0 +0% —
dom-widget-order-sparse-n1000-w20-i120: task duration 503ms 370ms -26% z=-0.8
dom-widget-order-sparse-n1000-w20-i120: script duration 179ms 117ms -35% z=-1.1
dom-widget-order-sparse-n1000-w20-i120: TBT 240ms 158ms -34% z=-0.8
dom-widget-order-sparse-n1000-w20-i120: heap used 87.4 MB 86.2 MB -1% z=-1.9
dom-widget-order-sparse-n1000-w20-i120: DOM nodes 0 0 +0% —
dom-widget-order-sparse-n1000-w20-i120: event listeners 0 0 +0% —
extension-clean-combined-draw: avg frame time 19ms 18ms -3% z=-0.3
extension-clean-combined-draw: p95 frame time 50ms 33ms -33% z=-0.6
extension-clean-combined-draw: layout duration 0ms 0ms +0% —
extension-clean-combined-draw: style recalc duration 0ms 0ms — variance too high
extension-clean-combined-draw: layout count 0 0 +0% —
extension-clean-combined-draw: style recalc count 0 1 — variance too high
extension-clean-combined-draw: task duration 9833ms 6436ms -35% z=-1.1
extension-clean-combined-draw: script duration 8070ms 5219ms -35% z=-1.0
extension-clean-combined-draw: TBT 1422ms 54ms -96% variance too high
extension-clean-combined-draw: heap used 80.4 MB 75.8 MB -6% z=-0.5
extension-clean-combined-draw: DOM nodes 0 0 +0% z=0.9
extension-clean-combined-draw: event listeners 0 0 +0% z=0.9
extension-rgthree-prototype-draw: avg frame time 20ms 18ms -11% z=-1.0
extension-rgthree-prototype-draw: p95 frame time 50ms 33ms -33% z=-0.6
extension-rgthree-prototype-draw: layout duration 0ms 0ms +0% —
extension-rgthree-prototype-draw: style recalc duration 0ms 0ms — variance too high
extension-rgthree-prototype-draw: layout count 0 0 +0% —
extension-rgthree-prototype-draw: style recalc count 0 2 — variance too high
extension-rgthree-prototype-draw: task duration 10627ms 6269ms -41% z=-1.3
extension-rgthree-prototype-draw: script duration 8802ms 5099ms -42% z=-1.2
extension-rgthree-prototype-draw: TBT 1617ms 48ms -97% variance too high
extension-rgthree-prototype-draw: heap used 78.2 MB 83.6 MB +7% z=0.9
extension-rgthree-prototype-draw: DOM nodes -228 -228 +0% z=-2.0
extension-rgthree-prototype-draw: event listeners -164 -164 +0% z=-2.4
large-graph-idle: avg frame time 17ms 17ms -0% z=-1.0
large-graph-idle: p95 frame time 17ms 17ms -1% z=-2.4
large-graph-idle: layout duration 0ms 0ms +0% —
large-graph-idle: style recalc duration 4ms 3ms -35% z=-1.5
large-graph-idle: layout count 0 0 +0% —
large-graph-idle: style recalc count 9 9 -6% z=-0.1
large-graph-idle: task duration 658ms 452ms -31% z=-1.2
large-graph-idle: script duration 39ms 28ms -29% z=-1.2
large-graph-idle: TBT 0ms 0ms +0% —
large-graph-idle: heap used 79.4 MB 74.2 MB -7% z=-0.7
large-graph-idle: DOM nodes -228 -228 +0% z=0.3
large-graph-idle: event listeners -142 -153 +8% z=-0.3
large-graph-pan: avg frame time 17ms 17ms -0% z=-0.9
large-graph-pan: p95 frame time 17ms 17ms -0% z=0.3
large-graph-pan: layout duration 0ms 0ms +0% —
large-graph-pan: style recalc duration 11ms 10ms -2% z=-0.5
large-graph-pan: layout count 0 0 +0% —
large-graph-pan: style recalc count 69 70 +1% z=1.2
large-graph-pan: task duration 1786ms 1368ms -23% z=-1.0
large-graph-pan: script duration 923ms 696ms -25% z=-1.0
large-graph-pan: TBT 0ms 0ms +0% —
large-graph-pan: heap used 88.0 MB 71.1 MB -19% z=-1.1
large-graph-pan: DOM nodes -228 -228 +0% z=-0.8
large-graph-pan: event listeners -142 -153 +8% z=-0.8
large-graph-zoom: avg frame time 17ms 17ms -0% z=-1.2
large-graph-zoom: p95 frame time 17ms 17ms +0% z=0.1
large-graph-zoom: layout duration 15ms 15ms +4% z=0.3
large-graph-zoom: style recalc duration 11ms 12ms +3% z=-0.4
large-graph-zoom: layout count 60 60 +0% —
large-graph-zoom: style recalc count 62 66 +6% z=0.7
large-graph-zoom: task duration 1814ms 1418ms -22% z=-1.2
large-graph-zoom: script duration 846ms 628ms -26% z=-1.3
large-graph-zoom: TBT 0ms 0ms +0% —
large-graph-zoom: heap used 71.4 MB 70.4 MB -1% z=-0.5
large-graph-zoom: DOM nodes 0 -228 — z=-1.5
large-graph-zoom: event listeners 0 -164 — z=-1.4
legacy-node-drag: avg frame time 17ms 17ms +0% ⚠️ z=3.7
legacy-node-drag: p95 frame time 17ms 17ms +1% ⚠️ z=2.5
legacy-node-drag: layout duration 0ms 0ms +0% —
legacy-node-drag: style recalc duration 6ms 7ms +9% z=-0.6
legacy-node-drag: layout count 0 0 +0% —
legacy-node-drag: style recalc count 42 46 +10% z=0.6
legacy-node-drag: task duration 2020ms 1573ms -22% z=-1.1
legacy-node-drag: script duration 1041ms 800ms -23% z=-1.1
legacy-node-drag: TBT 0ms 0ms +0% variance too high
legacy-node-drag: heap used 88.0 MB 76.2 MB -13% z=-0.8
legacy-node-drag: DOM nodes 0 0 +0% z=0.8
legacy-node-drag: event listeners 180 180 +0% variance too high
minimap-idle: avg frame time 17ms 17ms -0% z=-0.9
minimap-idle: p95 frame time 17ms 17ms -1% z=-1.5
minimap-idle: layout duration 0ms 0ms +0% —
minimap-idle: style recalc duration 4ms 3ms -28% z=-0.5
minimap-idle: layout count 0 0 +0% —
minimap-idle: style recalc count 7 8 +14% z=0.6
minimap-idle: task duration 660ms 462ms -30% z=-0.9
minimap-idle: script duration 40ms 30ms -25% z=-0.8
minimap-idle: TBT 0ms 0ms +0% —
minimap-idle: heap used 77.8 MB 76.1 MB -2% z=-0.3
minimap-idle: DOM nodes -228 -228 +0% z=-0.6
minimap-idle: event listeners -164 -153 -7% z=-0.6
subgraph-dom-widget-clipping: avg frame time 17ms 17ms +0% z=0.6
subgraph-dom-widget-clipping: p95 frame time 17ms 17ms -1% z=-1.1
subgraph-dom-widget-clipping: layout duration 0ms 0ms +0% —
subgraph-dom-widget-clipping: style recalc duration 7ms 6ms -12% z=-0.7
subgraph-dom-widget-clipping: layout count 0 0 +0% —
subgraph-dom-widget-clipping: style recalc count 48 48 +0% z=0.3
subgraph-dom-widget-clipping: task duration 423ms 319ms -25% z=-1.2
subgraph-dom-widget-clipping: script duration 152ms 118ms -22% z=-1.2
subgraph-dom-widget-clipping: TBT 0ms 0ms +0% —
subgraph-dom-widget-clipping: heap used 73.3 MB 73.4 MB +0% z=-0.2
subgraph-dom-widget-clipping: DOM nodes 0 0 +0% —
subgraph-dom-widget-clipping: event listeners 6 6 +0% —
subgraph-idle: avg frame time 17ms 17ms +0% z=-1.0
subgraph-idle: p95 frame time 17ms 17ms -0% z=0.2
subgraph-idle: layout duration 0ms 0ms +0% —
subgraph-idle: style recalc duration 5ms 3ms -33% z=-1.5
subgraph-idle: layout count 0 0 +0% —
subgraph-idle: style recalc count 11 11 -5% z=-0.6
subgraph-idle: task duration 498ms 356ms -28% z=-1.0
subgraph-idle: script duration 10ms 7ms -36% z=-1.1
subgraph-idle: TBT 0ms 0ms +0% —
subgraph-idle: heap used 67.9 MB 54.2 MB -20% z=-1.9
subgraph-idle: DOM nodes -244 -244 +0% z=-0.5
subgraph-idle: event listeners -188 -210 +12% z=-1.0
subgraph-mouse-sweep: avg frame time 17ms 17ms +0% z=-0.7
subgraph-mouse-sweep: p95 frame time 17ms 17ms +0% z=0.5
subgraph-mouse-sweep: layout duration 7ms 5ms -21% z=-1.8
subgraph-mouse-sweep: style recalc duration 19ms 16ms -16% z=-1.5
subgraph-mouse-sweep: layout count 16 16 +0% —
subgraph-mouse-sweep: style recalc count 73 76 +4% z=1.2
subgraph-mouse-sweep: task duration 852ms 633ms -26% z=-1.2
subgraph-mouse-sweep: script duration 122ms 90ms -26% z=-1.4
subgraph-mouse-sweep: TBT 0ms 0ms +0% —
subgraph-mouse-sweep: heap used 61.1 MB 59.2 MB -3% z=-0.9
subgraph-mouse-sweep: DOM nodes -244 -244 +0% z=-0.3
subgraph-mouse-sweep: event listeners -210 -199 -5% z=-0.2
subgraph-transition-enter: avg frame time 17ms 17ms -0% z=-1.0
subgraph-transition-enter: p95 frame time 17ms 17ms -1% z=-0.8
subgraph-transition-enter: layout duration 13ms 9ms -31% z=-1.1
subgraph-transition-enter: style recalc duration 31ms 22ms -29% z=-1.2
subgraph-transition-enter: layout count 5 5 +0% —
subgraph-transition-enter: style recalc count 18 18 +0% z=0.6
subgraph-transition-enter: task duration 971ms 691ms -29% z=-1.1
subgraph-transition-enter: script duration 33ms 22ms -32% z=-1.2
subgraph-transition-enter: TBT 145ms 87ms -40% z=-1.2
subgraph-transition-enter: heap used 79.3 MB 77.3 MB -3% z=-1.0
subgraph-transition-enter: DOM nodes 13667 13667 +0% —
subgraph-transition-enter: event listeners 2383 2383 +0% —
viewport-pan-sweep: avg frame time 17ms 17ms -0% z=-0.9
viewport-pan-sweep: p95 frame time 17ms 17ms +0% z=-0.2
viewport-pan-sweep: layout duration 0ms 0ms +0% —
viewport-pan-sweep: style recalc duration 35ms 35ms -0% z=-0.6
viewport-pan-sweep: layout count 0 0 +0% —
viewport-pan-sweep: style recalc count 250 251 +0% z=1.1
viewport-pan-sweep: task duration 6311ms 4693ms -26% z=-1.2
viewport-pan-sweep: script duration 2991ms 2228ms -26% z=-1.2
viewport-pan-sweep: TBT 0ms 0ms +0% variance too high
viewport-pan-sweep: heap used 80.8 MB 88.1 MB +9% ⚠️ z=3.0
viewport-pan-sweep: DOM nodes -228 -228 +0% z=-0.4
viewport-pan-sweep: event listeners -142 -164 +15% z=-1.1
vue-large-graph-idle: avg frame time 18ms 17ms -3% z=-1.1
vue-large-graph-idle: p95 frame time 17ms 17ms -0% z=0.8
vue-large-graph-idle: layout duration 0ms 0ms +0% —
vue-large-graph-idle: style recalc duration 0ms 0ms +0% —
vue-large-graph-idle: layout count 0 0 +0% —
vue-large-graph-idle: style recalc count 0 0 +0% —
vue-large-graph-idle: task duration 17067ms 12497ms -27% z=-1.4
vue-large-graph-idle: script duration 284ms 190ms -33% z=-1.4
vue-large-graph-idle: TBT 0ms 0ms +0% variance too high
vue-large-graph-idle: heap used 177.9 MB 181.0 MB +2% z=1.4
vue-large-graph-idle: DOM nodes -8049 -8050 +0% z=-0.4
vue-large-graph-idle: event listeners -14923 -14923 +0% —
vue-large-graph-pan: avg frame time 19ms 17ms -9% z=-1.1
vue-large-graph-pan: p95 frame time 17ms 17ms -0% z=-0.8
vue-large-graph-pan: layout duration 0ms 0ms +0% —
vue-large-graph-pan: style recalc duration 19ms 15ms -22% z=-1.0
vue-large-graph-pan: layout count 0 0 +0% —
vue-large-graph-pan: style recalc count 151 120 -21% z=-0.6
vue-large-graph-pan: task duration 21109ms 17048ms -19% z=-0.8
vue-large-graph-pan: script duration 950ms 703ms -26% z=-1.3
vue-large-graph-pan: TBT 45ms 10ms -79% variance too high
vue-large-graph-pan: heap used 172.5 MB 183.3 MB +6% ⚠️ z=2.2
vue-large-graph-pan: DOM nodes -8049 -8049 +0% z=0.3
vue-large-graph-pan: event listeners -14923 -14923 +0% —
vue-node-resize-workload: avg frame time 18ms 17ms -3% z=-1.0
vue-node-resize-workload: p95 frame time 17ms 17ms +0% z=1.5
vue-node-resize-workload: layout duration 24ms 21ms -14% z=-1.5
vue-node-resize-workload: style recalc duration 78ms 58ms -25% z=-1.3
vue-node-resize-workload: layout count 20 20 +0% —
vue-node-resize-workload: style recalc count 20 20 +0% —
vue-node-resize-workload: task duration 6304ms 5114ms -19% z=-0.7
vue-node-resize-workload: script duration 121ms 85ms -30% z=-1.2
vue-node-resize-workload: TBT 422ms 190ms -55% variance too high
vue-node-resize-workload: heap used 175.3 MB 172.7 MB -1% z=-0.1
vue-node-resize-workload: DOM nodes -8049 -8050 +0% z=-0.3
vue-node-resize-workload: event listeners -14923 -14923 +0% z=0.2
vue-zoom-out-idle: avg frame time 18ms 18ms -2% z=-0.2
vue-zoom-out-idle: p95 frame time 17ms 17ms +0% z=1.1
vue-zoom-out-idle: layout duration 0ms 0ms +0% —
vue-zoom-out-idle: style recalc duration 0ms 0ms +0% —
vue-zoom-out-idle: layout count 0 0 +0% —
vue-zoom-out-idle: style recalc count 0 0 +0% —
vue-zoom-out-idle: task duration 8550ms 7153ms -16% z=-0.6
vue-zoom-out-idle: script duration 139ms 104ms -25% z=-1.2
vue-zoom-out-idle: TBT 0ms 0ms +0% variance too high
vue-zoom-out-idle: heap used 180.6 MB 178.2 MB -1% z=1.0
vue-zoom-out-idle: DOM nodes 0 0 +0% z=0.4
vue-zoom-out-idle: event listeners 0 0 +0% z=0.3
workflow-execution: avg frame time 17ms 17ms -0% z=-2.0
workflow-execution: p95 frame time 17ms 17ms -0% z=0.1
workflow-execution: layout duration 2ms 2ms -18% z=-0.5
workflow-execution: style recalc duration 20ms 13ms -35% z=-0.9
workflow-execution: layout count 3 4 +17% z=-0.2
workflow-execution: style recalc count 19 12 -39% z=-0.5
workflow-execution: task duration 130ms 84ms -35% z=-0.8
workflow-execution: script duration 13ms 9ms -35% z=-0.7
workflow-execution: TBT 0ms 0ms +0% —
workflow-execution: heap used 63.9 MB 63.1 MB -1% z=-0.1
workflow-execution: DOM nodes 126 122 -3% z=0.9
workflow-execution: event listeners 81 49 -40% z=-0.2
Historical variance (last 15 runs)
Metric μ σ CV
canvas-idle: avg frame time 17ms 0ms 0.0%
canvas-idle: p95 frame time 17ms 0ms 0.2%
canvas-idle: layout duration 0ms 0ms 0.0%
canvas-idle: style recalc duration 4ms 0ms 11.2%
canvas-idle: layout count 0 0 0.0%
canvas-idle: style recalc count 10 1 7.7%
canvas-idle: task duration 441ms 89ms 20.1%
canvas-idle: script duration 10ms 3ms 26.6%
canvas-idle: TBT 0ms 0ms 0.0%
canvas-idle: heap used 63.2 MB 4.3 MB 6.8%
canvas-idle: DOM nodes -162 75 0.0%
canvas-idle: event listeners -115 44 0.0%
canvas-mouse-sweep: avg frame time 17ms 0ms 0.0%
canvas-mouse-sweep: p95 frame time 17ms 0ms 0.1%
canvas-mouse-sweep: layout duration 5ms 0ms 7.9%
canvas-mouse-sweep: style recalc duration 18ms 2ms 9.7%
canvas-mouse-sweep: layout count 12 0 0.0%
canvas-mouse-sweep: style recalc count 72 1 2.1%
canvas-mouse-sweep: task duration 814ms 130ms 16.0%
canvas-mouse-sweep: script duration 159ms 25ms 16.0%
canvas-mouse-sweep: TBT 0ms 0ms 0.0%
canvas-mouse-sweep: heap used 64.5 MB 4.3 MB 6.7%
canvas-mouse-sweep: DOM nodes -223 20 0.0%
canvas-mouse-sweep: event listeners -147 14 0.0%
canvas-zoom-sweep: avg frame time 17ms 0ms 0.0%
canvas-zoom-sweep: p95 frame time 17ms 0ms 0.2%
canvas-zoom-sweep: layout duration 1ms 0ms 9.9%
canvas-zoom-sweep: style recalc duration 10ms 1ms 8.8%
canvas-zoom-sweep: layout count 6 0 0.0%
canvas-zoom-sweep: style recalc count 31 1 3.4%
canvas-zoom-sweep: task duration 329ms 59ms 18.0%
canvas-zoom-sweep: script duration 13ms 2ms 18.0%
canvas-zoom-sweep: TBT 0ms 0ms 0.0%
canvas-zoom-sweep: heap used 61.8 MB 924.5 KB 1.5%
canvas-zoom-sweep: DOM nodes 53 0 0.0%
canvas-zoom-sweep: event listeners 15 0 0.0%
dom-widget-clipping: avg frame time 17ms 0ms 0.0%
dom-widget-clipping: p95 frame time 17ms 0ms 0.2%
dom-widget-clipping: layout duration 0ms 0ms 0.0%
dom-widget-clipping: style recalc duration 4ms 0ms 6.7%
dom-widget-clipping: layout count 0 0 0.0%
dom-widget-clipping: style recalc count 12 1 5.9%
dom-widget-clipping: task duration 436ms 65ms 14.8%
dom-widget-clipping: script duration 161ms 24ms 14.9%
dom-widget-clipping: TBT 0ms 0ms 0.0%
dom-widget-clipping: heap used 77.9 MB 1.2 MB 1.5%
dom-widget-clipping: DOM nodes 0 0 0.0%
dom-widget-clipping: event listeners 0 0 0.0%
dom-widget-order-dense-n200-w200-i120: avg frame time 17ms 0ms 0.0%
dom-widget-order-dense-n200-w200-i120: p95 frame time 17ms 0ms 0.2%
dom-widget-order-dense-n200-w200-i120: layout duration 0ms 0ms 0.0%
dom-widget-order-dense-n200-w200-i120: style recalc duration 0ms 0ms 0.0%
dom-widget-order-dense-n200-w200-i120: layout count 0 0 0.0%
dom-widget-order-dense-n200-w200-i120: style recalc count 0 0 0.0%
dom-widget-order-dense-n200-w200-i120: task duration 856ms 141ms 16.5%
dom-widget-order-dense-n200-w200-i120: script duration 65ms 12ms 18.6%
dom-widget-order-dense-n200-w200-i120: TBT 527ms 109ms 20.7%
dom-widget-order-dense-n200-w200-i120: heap used 76.5 MB 5.6 MB 7.3%
dom-widget-order-dense-n200-w200-i120: DOM nodes -235 41 0.0%
dom-widget-order-dense-n200-w200-i120: event listeners -180 30 0.0%
dom-widget-order-sparse-n1000-w20-i120: avg frame time 17ms 0ms 0.0%
dom-widget-order-sparse-n1000-w20-i120: p95 frame time 17ms 0ms 0.2%
dom-widget-order-sparse-n1000-w20-i120: layout duration 0ms 0ms 0.0%
dom-widget-order-sparse-n1000-w20-i120: style recalc duration 0ms 0ms 0.0%
dom-widget-order-sparse-n1000-w20-i120: layout count 0 0 0.0%
dom-widget-order-sparse-n1000-w20-i120: style recalc count 0 0 0.0%
dom-widget-order-sparse-n1000-w20-i120: task duration 437ms 82ms 18.7%
dom-widget-order-sparse-n1000-w20-i120: script duration 149ms 30ms 20.1%
dom-widget-order-sparse-n1000-w20-i120: TBT 201ms 53ms 26.4%
dom-widget-order-sparse-n1000-w20-i120: heap used 87.0 MB 439.0 KB 0.5%
dom-widget-order-sparse-n1000-w20-i120: DOM nodes 0 0 0.0%
dom-widget-order-sparse-n1000-w20-i120: event listeners 0 0 0.0%
extension-clean-combined-draw: avg frame time 19ms 1ms 5.3%
extension-clean-combined-draw: p95 frame time 40ms 11ms 27.7%
extension-clean-combined-draw: layout duration 0ms 0ms 0.0%
extension-clean-combined-draw: style recalc duration 0ms 0ms 199.5%
extension-clean-combined-draw: layout count 0 0 0.0%
extension-clean-combined-draw: style recalc count 0 1 192.1%
extension-clean-combined-draw: task duration 8505ms 1891ms 22.2%
extension-clean-combined-draw: script duration 6965ms 1679ms 24.1%
extension-clean-combined-draw: TBT 876ms 777ms 88.7%
extension-clean-combined-draw: heap used 78.3 MB 4.9 MB 6.2%
extension-clean-combined-draw: DOM nodes -56 61 0.0%
extension-clean-combined-draw: event listeners -40 44 0.0%
extension-rgthree-prototype-draw: avg frame time 19ms 1ms 4.8%
extension-rgthree-prototype-draw: p95 frame time 41ms 12ms 29.4%
extension-rgthree-prototype-draw: layout duration 0ms 0ms 0.0%
extension-rgthree-prototype-draw: style recalc duration 0ms 0ms 167.5%
extension-rgthree-prototype-draw: layout count 0 0 0.0%
extension-rgthree-prototype-draw: style recalc count 1 1 147.0%
extension-rgthree-prototype-draw: task duration 8772ms 1932ms 22.0%
extension-rgthree-prototype-draw: script duration 7157ms 1708ms 23.9%
extension-rgthree-prototype-draw: TBT 905ms 761ms 84.1%
extension-rgthree-prototype-draw: heap used 79.4 MB 4.9 MB 6.1%
extension-rgthree-prototype-draw: DOM nodes -81 73 0.0%
extension-rgthree-prototype-draw: event listeners -55 46 0.0%
large-graph-idle: avg frame time 17ms 0ms 0.0%
large-graph-idle: p95 frame time 17ms 0ms 0.1%
large-graph-idle: layout duration 0ms 0ms 0.0%
large-graph-idle: style recalc duration 4ms 1ms 16.3%
large-graph-idle: layout count 0 0 0.0%
large-graph-idle: style recalc count 9 1 12.0%
large-graph-idle: task duration 573ms 102ms 17.9%
large-graph-idle: script duration 35ms 6ms 17.9%
large-graph-idle: TBT 0ms 0ms 0.0%
large-graph-idle: heap used 76.0 MB 2.8 MB 3.6%
large-graph-idle: DOM nodes -228 0 0.0%
large-graph-idle: event listeners -148 15 0.0%
large-graph-pan: avg frame time 17ms 0ms 0.0%
large-graph-pan: p95 frame time 17ms 0ms 0.2%
large-graph-pan: layout duration 0ms 0ms 0.0%
large-graph-pan: style recalc duration 11ms 1ms 10.8%
large-graph-pan: layout count 0 0 0.0%
large-graph-pan: style recalc count 68 1 1.3%
large-graph-pan: task duration 1618ms 249ms 15.4%
large-graph-pan: script duration 829ms 129ms 15.6%
large-graph-pan: TBT 0ms 0ms 0.0%
large-graph-pan: heap used 77.2 MB 5.8 MB 7.5%
large-graph-pan: DOM nodes -196 39 0.0%
large-graph-pan: event listeners -118 43 0.0%
large-graph-zoom: avg frame time 17ms 0ms 0.0%
large-graph-zoom: p95 frame time 17ms 0ms 0.2%
large-graph-zoom: layout duration 15ms 1ms 6.4%
large-graph-zoom: style recalc duration 12ms 1ms 8.0%
large-graph-zoom: layout count 60 0 0.0%
large-graph-zoom: style recalc count 64 2 2.9%
large-graph-zoom: task duration 1682ms 223ms 13.2%
large-graph-zoom: script duration 767ms 110ms 14.3%
large-graph-zoom: TBT 0ms 0ms 0.0%
large-graph-zoom: heap used 72.6 MB 4.2 MB 5.8%
large-graph-zoom: DOM nodes -117 75 0.0%
large-graph-zoom: event listeners -76 61 0.0%
legacy-node-drag: avg frame time 17ms 0ms 0.0%
legacy-node-drag: p95 frame time 17ms 0ms 0.1%
legacy-node-drag: layout duration 0ms 0ms 0.0%
legacy-node-drag: style recalc duration 7ms 1ms 10.6%
legacy-node-drag: layout count 0 0 0.0%
legacy-node-drag: style recalc count 45 2 3.9%
legacy-node-drag: task duration 1886ms 274ms 14.6%
legacy-node-drag: script duration 960ms 145ms 15.1%
legacy-node-drag: TBT 3ms 6ms 212.9%
legacy-node-drag: heap used 80.6 MB 5.3 MB 6.6%
legacy-node-drag: DOM nodes -55 71 0.0%
legacy-node-drag: event listeners 93 91 97.3%
minimap-idle: avg frame time 17ms 0ms 0.0%
minimap-idle: p95 frame time 17ms 0ms 0.2%
minimap-idle: layout duration 0ms 0ms 0.0%
minimap-idle: style recalc duration 3ms 1ms 24.0%
minimap-idle: layout count 0 0 0.0%
minimap-idle: style recalc count 7 1 12.9%
minimap-idle: task duration 560ms 108ms 19.3%
minimap-idle: script duration 35ms 6ms 16.3%
minimap-idle: TBT 0ms 0ms 0.0%
minimap-idle: heap used 76.8 MB 2.5 MB 3.3%
minimap-idle: DOM nodes -208 35 0.0%
minimap-idle: event listeners -132 34 0.0%
subgraph-dom-widget-clipping: avg frame time 17ms 0ms 0.0%
subgraph-dom-widget-clipping: p95 frame time 17ms 0ms 0.2%
subgraph-dom-widget-clipping: layout duration 0ms 0ms 0.0%
subgraph-dom-widget-clipping: style recalc duration 7ms 1ms 7.6%
subgraph-dom-widget-clipping: layout count 0 0 0.0%
subgraph-dom-widget-clipping: style recalc count 48 1 1.4%
subgraph-dom-widget-clipping: task duration 385ms 55ms 14.3%
subgraph-dom-widget-clipping: script duration 140ms 19ms 13.8%
subgraph-dom-widget-clipping: TBT 0ms 0ms 0.0%
subgraph-dom-widget-clipping: heap used 73.5 MB 675.5 KB 0.9%
subgraph-dom-widget-clipping: DOM nodes 0 0 0.0%
subgraph-dom-widget-clipping: event listeners 6 0 0.0%
subgraph-idle: avg frame time 17ms 0ms 0.0%
subgraph-idle: p95 frame time 17ms 0ms 0.2%
subgraph-idle: layout duration 0ms 0ms 0.0%
subgraph-idle: style recalc duration 4ms 1ms 14.6%
subgraph-idle: layout count 0 0 0.0%
subgraph-idle: style recalc count 11 1 6.1%
subgraph-idle: task duration 452ms 94ms 20.9%
subgraph-idle: script duration 9ms 2ms 25.4%
subgraph-idle: TBT 0ms 0ms 0.0%
subgraph-idle: heap used 63.9 MB 5.2 MB 8.2%
subgraph-idle: DOM nodes -228 34 0.0%
subgraph-idle: event listeners -182 28 0.0%
subgraph-mouse-sweep: avg frame time 17ms 0ms 0.0%
subgraph-mouse-sweep: p95 frame time 17ms 0ms 0.2%
subgraph-mouse-sweep: layout duration 6ms 0ms 7.9%
subgraph-mouse-sweep: style recalc duration 18ms 1ms 8.0%
subgraph-mouse-sweep: layout count 16 0 0.0%
subgraph-mouse-sweep: style recalc count 71 4 5.5%
subgraph-mouse-sweep: task duration 762ms 110ms 14.4%
subgraph-mouse-sweep: script duration 111ms 14ms 13.1%
subgraph-mouse-sweep: TBT 0ms 0ms 0.0%
subgraph-mouse-sweep: heap used 63.2 MB 4.2 MB 6.6%
subgraph-mouse-sweep: DOM nodes -239 21 0.0%
subgraph-mouse-sweep: event listeners -195 21 0.0%
subgraph-transition-enter: avg frame time 17ms 0ms 0.0%
subgraph-transition-enter: p95 frame time 17ms 0ms 0.3%
subgraph-transition-enter: layout duration 12ms 2ms 19.0%
subgraph-transition-enter: style recalc duration 27ms 4ms 16.3%
subgraph-transition-enter: layout count 5 0 0.0%
subgraph-transition-enter: style recalc count 17 1 6.7%
subgraph-transition-enter: task duration 869ms 168ms 19.3%
subgraph-transition-enter: script duration 29ms 5ms 18.8%
subgraph-transition-enter: TBT 127ms 33ms 25.8%
subgraph-transition-enter: heap used 87.7 MB 10.7 MB 12.3%
subgraph-transition-enter: DOM nodes 13667 0 0.0%
subgraph-transition-enter: event listeners 2383 0 0.0%
viewport-pan-sweep: avg frame time 17ms 0ms 0.0%
viewport-pan-sweep: p95 frame time 17ms 0ms 0.1%
viewport-pan-sweep: layout duration 0ms 0ms 0.0%
viewport-pan-sweep: style recalc duration 36ms 3ms 8.9%
viewport-pan-sweep: layout count 0 0 0.0%
viewport-pan-sweep: style recalc count 250 1 0.3%
viewport-pan-sweep: task duration 5670ms 824ms 14.5%
viewport-pan-sweep: script duration 2700ms 379ms 14.0%
viewport-pan-sweep: TBT 0ms 0ms 387.3%
viewport-pan-sweep: heap used 75.4 MB 4.3 MB 5.7%
viewport-pan-sweep: DOM nodes -227 4 0.0%
viewport-pan-sweep: event listeners -150 14 0.0%
vue-large-graph-idle: avg frame time 18ms 0ms 1.9%
vue-large-graph-idle: p95 frame time 17ms 0ms 0.1%
vue-large-graph-idle: layout duration 0ms 0ms 0.0%
vue-large-graph-idle: style recalc duration 0ms 0ms 0.0%
vue-large-graph-idle: layout count 0 0 0.0%
vue-large-graph-idle: style recalc count 0 0 0.0%
vue-large-graph-idle: task duration 15563ms 2133ms 13.7%
vue-large-graph-idle: script duration 257ms 49ms 19.0%
vue-large-graph-idle: TBT 0ms 0ms 387.3%
vue-large-graph-idle: heap used 173.1 MB 5.6 MB 3.3%
vue-large-graph-idle: DOM nodes -8049 1 0.0%
vue-large-graph-idle: event listeners -14923 0 0.0%
vue-large-graph-pan: avg frame time 18ms 1ms 2.9%
vue-large-graph-pan: p95 frame time 17ms 0ms 0.2%
vue-large-graph-pan: layout duration 0ms 0ms 0.0%
vue-large-graph-pan: style recalc duration 18ms 3ms 18.8%
vue-large-graph-pan: layout count 0 0 0.0%
vue-large-graph-pan: style recalc count 139 30 21.6%
vue-large-graph-pan: task duration 19402ms 2863ms 14.8%
vue-large-graph-pan: script duration 861ms 120ms 13.9%
vue-large-graph-pan: TBT 74ms 46ms 62.2%
vue-large-graph-pan: heap used 170.2 MB 5.9 MB 3.5%
vue-large-graph-pan: DOM nodes -8049 0 0.0%
vue-large-graph-pan: event listeners -14923 0 0.0%
vue-node-resize-workload: avg frame time 18ms 0ms 2.3%
vue-node-resize-workload: p95 frame time 17ms 0ms 0.1%
vue-node-resize-workload: layout duration 25ms 3ms 11.8%
vue-node-resize-workload: style recalc duration 74ms 12ms 16.5%
vue-node-resize-workload: layout count 20 0 0.0%
vue-node-resize-workload: style recalc count 20 0 0.0%
vue-node-resize-workload: task duration 5701ms 865ms 15.2%
vue-node-resize-workload: script duration 109ms 21ms 18.9%
vue-node-resize-workload: TBT 332ms 168ms 50.6%
vue-node-resize-workload: heap used 173.3 MB 5.0 MB 2.9%
vue-node-resize-workload: DOM nodes -8015 130 0.0%
vue-node-resize-workload: event listeners -14923 0 0.0%
vue-zoom-out-idle: avg frame time 18ms 0ms 2.1%
vue-zoom-out-idle: p95 frame time 17ms 0ms 0.1%
vue-zoom-out-idle: layout duration 0ms 0ms 0.0%
vue-zoom-out-idle: style recalc duration 0ms 0ms 0.0%
vue-zoom-out-idle: layout count 0 0 0.0%
vue-zoom-out-idle: style recalc count 0 0 0.0%
vue-zoom-out-idle: task duration 7838ms 1143ms 14.6%
vue-zoom-out-idle: script duration 131ms 23ms 17.6%
vue-zoom-out-idle: TBT 0ms 1ms 387.3%
vue-zoom-out-idle: heap used 173.8 MB 4.5 MB 2.6%
vue-zoom-out-idle: DOM nodes -0 0 0.0%
vue-zoom-out-idle: event listeners -0 0 0.0%
workflow-execution: avg frame time 17ms 0ms 0.0%
workflow-execution: p95 frame time 17ms 0ms 0.2%
workflow-execution: layout duration 2ms 0ms 22.5%
workflow-execution: style recalc duration 17ms 4ms 24.9%
workflow-execution: layout count 4 1 17.0%
workflow-execution: style recalc count 14 4 32.0%
workflow-execution: task duration 106ms 28ms 26.1%
workflow-execution: script duration 11ms 3ms 29.8%
workflow-execution: TBT 0ms 0ms 0.0%
workflow-execution: heap used 63.2 MB 563.9 KB 0.9%
workflow-execution: DOM nodes 114 9 7.5%
workflow-execution: event listeners 53 18 33.3%
Trend (last 15 commits on main)
Metric Trend Dir Latest
canvas-idle: avg frame time █▃████▆▆▆█▃▆▆▁▆ ➡️ 17ms
canvas-idle: p95 frame time ▆▁▆▃▁▆█▆▁▃▆█▁▃▆ ➡️ 17ms
canvas-idle: layout duration ▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄ ➡️ 0ms
canvas-idle: style recalc duration ▁▆▂▄▅▃█▆▆▅▇▅▆▄▇ ➡️ 5ms
canvas-idle: layout count ▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄ ➡️ 0
canvas-idle: style recalc count ▇▁▄▃▁█▂▄▃▃▄▄▂▂▂ ➡️ 10
canvas-idle: task duration ▁▆▃▆▄▂█▅▆▅▆▅▆▆▇ 📈 519ms
canvas-idle: script duration ▁▅▂▃▃▁█▃▅▂▅▃▄▃▅ ➡️ 12ms
canvas-idle: TBT ▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄ ➡️ 0ms
canvas-idle: heap used ▅▆▆▁▄▄▄▄█▅▅█▆▆▇ ➡️ 66.9 MB
canvas-idle: DOM nodes █▃▁▆▁▆▁▆▃▃▁▃▁▁▁ 📈 -228
canvas-idle: event listeners █▃▂▁▂▄▂▆▄▄▂▄▂▂▂ ➡️ -142
canvas-mouse-sweep: avg frame time ▁▁▆▆▃▁▃█▆█▁▃▆▃▆ ➡️ 17ms
canvas-mouse-sweep: p95 frame time █▄█▄█▄▅█▁▄▅▅▄▅▁ ➡️ 17ms
canvas-mouse-sweep: layout duration ▁▆▂▆▄▁█▅▆▂▇▅▄▃▅ ➡️ 5ms
canvas-mouse-sweep: style recalc duration ▁▅▂▄▅▁█▅▇▄▇▅▅▄▆ ➡️ 19ms
canvas-mouse-sweep: layout count ▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄ ➡️ 12
canvas-mouse-sweep: style recalc count ▂▂▂█▂▃▅▁▄▂█▃▄▂▂ ➡️ 71
canvas-mouse-sweep: task duration ▁▇▄▆▇▂█▆▇▆▇▆▆▆▇ 📈 901ms
canvas-mouse-sweep: script duration ▁▇▃▅▇▁█▅▆▆▆▅▇▆▇ 📈 180ms
canvas-mouse-sweep: TBT ▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄ ➡️ 0ms
canvas-mouse-sweep: heap used ▇▇▃▅▄▁▆▂▂▇▅█▇▇▄ ➡️ 62.7 MB
canvas-mouse-sweep: DOM nodes █▁▁▁▁▁▁▁▁▁▁▁▁▁▁ ➡️ -228
canvas-mouse-sweep: event listeners █▃▂▃▃▁▃▃▁▃▃▃▃▃▂ ➡️ -157
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 ▁▇▂▄▄▄█▆▇▇▇▄▇▅█ ➡️ 11ms
canvas-zoom-sweep: layout count ▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄ ➡️ 6
canvas-zoom-sweep: style recalc count ▄▅▁▄▆▄▃▅█▇▅▅▇▂▇ ➡️ 32
canvas-zoom-sweep: task duration ▁▇▃▅▅▂█▅▅▆▆▅▆▅▆ 📈 346ms
canvas-zoom-sweep: script duration ▁▇▃▃▄▂█▅▅▄▆▄▆▃▆ ➡️ 15ms
canvas-zoom-sweep: TBT ▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄ ➡️ 0ms
canvas-zoom-sweep: heap used █▂▃▁█▇▂▃▃▂▃▇▃▂▂ ➡️ 61.4 MB
canvas-zoom-sweep: DOM nodes ▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄ ➡️ 53
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 ▂█▁▁▆▁█▃█▆▅▂▂▅▆ ➡️ 4ms
dom-widget-clipping: layout count ▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄ ➡️ 0
dom-widget-clipping: style recalc count █▁▇▅▅▅▁▃▂▅▄▃▁▅▃ ➡️ 12
dom-widget-clipping: task duration ▁▇▄▆▆▁█▆▇▆▇▆▇▆▇ 📈 483ms
dom-widget-clipping: script duration ▁█▄▆▇▂█▆▇▇▆▇▇▇█ 📈 180ms
dom-widget-clipping: TBT ▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄ ➡️ 0ms
dom-widget-clipping: heap used ▄▅▁▂▂▁▅▂▁█▅▁▂▂▂ ➡️ 77.2 MB
dom-widget-clipping: DOM nodes ▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄ ➡️ 0
dom-widget-clipping: event listeners ▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄ ➡️ 0
dom-widget-order-dense-n200-w200-i120: avg frame time ▁▆▃█▃▃▃▁██▆▆▃▆▁ ➡️ 17ms
dom-widget-order-dense-n200-w200-i120: p95 frame time ▃█▁█▆▆▆▃▁▃▁▃▃▃▃ ➡️ 17ms
dom-widget-order-dense-n200-w200-i120: layout duration ▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄ ➡️ 0ms
dom-widget-order-dense-n200-w200-i120: style recalc duration ▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄ ➡️ 0ms
dom-widget-order-dense-n200-w200-i120: layout count ▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄ ➡️ 0
dom-widget-order-dense-n200-w200-i120: style recalc count ▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄ ➡️ 0
dom-widget-order-dense-n200-w200-i120: task duration ▁▇▄▆▇▁█▆▇▇▆▆█▇▇ 📈 946ms
dom-widget-order-dense-n200-w200-i120: script duration ▂█▃▆█▁█▅▆▇▅▆█▇█ 📈 74ms
dom-widget-order-dense-n200-w200-i120: TBT ▁▇▄▆▇▁█▆▆▆▆▆█▆▇ 📈 599ms
dom-widget-order-dense-n200-w200-i120: heap used ▄█▄▄▄▁▄▁▄▁▄▇▄▁▄ ➡️ 78.1 MB
dom-widget-order-dense-n200-w200-i120: DOM nodes ▁█▁▇▁▁▁▁▁▁▁▁▇▁▇ ➡️ -173
dom-widget-order-dense-n200-w200-i120: event listeners ▂█▂▇▂▁▂▁▂▂▂▃█▂█ ➡️ -131
dom-widget-order-sparse-n1000-w20-i120: avg frame time █▆▃█▆▁██▃▃▃▃▁█▁ ➡️ 17ms
dom-widget-order-sparse-n1000-w20-i120: p95 frame time ▆█▆▆█▆▆▃▆██▁▃▁▃ ➡️ 17ms
dom-widget-order-sparse-n1000-w20-i120: layout duration ▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄ ➡️ 0ms
dom-widget-order-sparse-n1000-w20-i120: style recalc duration ▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄ ➡️ 0ms
dom-widget-order-sparse-n1000-w20-i120: layout count ▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄ ➡️ 0
dom-widget-order-sparse-n1000-w20-i120: style recalc count ▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄ ➡️ 0
dom-widget-order-sparse-n1000-w20-i120: task duration ▁▇▄▅▇▂█▆▆▆▅▆▇▇▇ 📈 502ms
dom-widget-order-sparse-n1000-w20-i120: script duration ▁▇▃▅▇▁█▅▅▇▄▅▇▇█ 📈 181ms
dom-widget-order-sparse-n1000-w20-i120: TBT ▁█▄▆█▁█▇▇▇▄▇███ 📈 240ms
dom-widget-order-sparse-n1000-w20-i120: heap used ▄▂▂▁▄▆█▅▆▄▄▂▃▃▅ ➡️ 87.4 MB
dom-widget-order-sparse-n1000-w20-i120: DOM nodes ▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄ ➡️ 0
dom-widget-order-sparse-n1000-w20-i120: event listeners ▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄ ➡️ 0
extension-clean-combined-draw: avg frame time ▁█▄▆▇▂█▆▄█▄▄█▇▆ ➡️ 19ms
extension-clean-combined-draw: p95 frame time ▁█▄▇█▂█▆▄█▄▄███ 📈 50ms
extension-clean-combined-draw: layout duration ▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄ ➡️ 0ms
extension-clean-combined-draw: style recalc duration ▇▁▄▁▁█▁▂▁▁▁▁▁▁▁ 📉 0ms
extension-clean-combined-draw: layout count ▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄ ➡️ 0
extension-clean-combined-draw: style recalc count ▅▁▅▂▁█▁▂▁▁▁▁▁▁▁ 📉 0
extension-clean-combined-draw: task duration ▁█▃▅▆▁█▅▅▇▄▅█▇▇ 📈 9851ms
extension-clean-combined-draw: script duration ▁█▃▅▆▁█▅▅▇▄▅█▇▇ 📈 8165ms
extension-clean-combined-draw: TBT ▁█▁▂▆▁█▂▂▆▁▂▇▆▆ 📈 1500ms
extension-clean-combined-draw: heap used ▁▁▁▃▆▂▃▅▄▃▆▃█▄▅ ➡️ 82.3 MB
extension-clean-combined-draw: DOM nodes ▁█▅▅█▅█▅▁▅███▁█ ➡️ 0
extension-clean-combined-draw: event listeners ▁█▅▅█▅█▅▁▅███▁█ ➡️ 0
extension-rgthree-prototype-draw: avg frame time ▁█▆▇▇▁▆▅▆▇▄▆▇▇█ ➡️ 20ms
extension-rgthree-prototype-draw: p95 frame time ▁█▄██▁█▆▄█▄▆███ 📈 50ms
extension-rgthree-prototype-draw: layout duration ▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄ ➡️ 0ms
extension-rgthree-prototype-draw: style recalc duration ▇▁▆▁▁█▁▁▃▁▃▁▁▁▁ 📉 0ms
extension-rgthree-prototype-draw: layout count ▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄ ➡️ 0
extension-rgthree-prototype-draw: style recalc count ▆▁▅▁▂█▁▁▃▁▃▂▁▁▂ 📉 0
extension-rgthree-prototype-draw: task duration ▁▇▃▆▇▁█▅▅▇▅▅▇▆▇ 📈 10398ms
extension-rgthree-prototype-draw: script duration ▁▇▃▆▇▁█▅▅▇▄▅▇▆▇ 📈 8584ms
extension-rgthree-prototype-draw: TBT ▁▇▁▄▆▁█▂▂▅▂▃▆▅▆ ➡️ 1523ms
extension-rgthree-prototype-draw: heap used ▅▅▇▄█▅▄▆▁▆▃▅▃▅▄ ➡️ 78.1 MB
extension-rgthree-prototype-draw: DOM nodes ▆█▃▆▁███▃▆▃▆▆█▃ 📈 -152
extension-rgthree-prototype-draw: event listeners ▅█▁▅▁███▁▅▁▅▅█▁ 📈 -109
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 ▃▂▄▃▄█▃█▄▁▅▃▇▁▇ ➡️ 4ms
large-graph-idle: layout count ▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄ ➡️ 0
large-graph-idle: style recalc count ▇▂█▅▄▅▁▅▂▂▄▄▅▂▅ ➡️ 9
large-graph-idle: task duration ▁█▄▆▇▁▇▇█▅▇▇█▆█ 📈 661ms
large-graph-idle: script duration ▂▆▃▄▆▁▇▆█▄▅▆▆▄▆ 📈 38ms
large-graph-idle: TBT ▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄ ➡️ 0ms
large-graph-idle: heap used ▄█▁▁▅▆█▅▇▆▅▆▃█▅ ➡️ 76.2 MB
large-graph-idle: DOM nodes ███████████▁███ ➡️ -228
large-graph-idle: event listeners ▂▃▁▁▃▃▃▃▃█▂▂▂▃▃ ➡️ -149
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 ▆▄▃▂▄▆▅▄█▁█▃▃▁▄ ➡️ 11ms
large-graph-pan: layout count ▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄ ➡️ 0
large-graph-pan: style recalc count █▅▅▅▅█▃▂▇▁▅▂▁▃▄ ➡️ 68
large-graph-pan: task duration ▁▇▃▆▇▁█▅▇▆▇▆▇▅▇ 📈 1782ms
large-graph-pan: script duration ▁▇▃▆▇▂█▅▆▆▆▆▇▆▇ 📈 914ms
large-graph-pan: TBT ▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄ ➡️ 0ms
large-graph-pan: heap used ▂▃▄▅▄▁█▅▁▅▆▆▄▇▆ ➡️ 81.2 MB
large-graph-pan: DOM nodes ▇▁▇▁▁▁▁█▁▇▂▁▇▇▁ ➡️ -228
large-graph-pan: event listeners ▄▁▅▅▁▁▂█▁▅▁██▅▂ 📉 -149
large-graph-zoom: avg frame time ▅▁█▅███▅▅▅█▁▅██ ➡️ 17ms
large-graph-zoom: p95 frame time ▃▃▁▃▁▆▃██▆▃▆▆▃▃ ➡️ 17ms
large-graph-zoom: layout duration ▄▄▂▂▃▄▅▆█▂█▅▃▁▃ ➡️ 14ms
large-graph-zoom: style recalc duration ▅▂▃▂▃▅▃▃█▂█▂▂▁▂ ➡️ 12ms
large-graph-zoom: layout count ▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄ ➡️ 60
large-graph-zoom: style recalc count █▂▅▄▄█▃▁▄▄▃▁▁▃▁ ➡️ 62
large-graph-zoom: task duration ▁▇▄▆▆▁█▆▇▆▇▆▇▆▇ 📈 1805ms
large-graph-zoom: script duration ▁▇▄▆▇▁█▇▇▇▆▆▇▆▇ 📈 842ms
large-graph-zoom: TBT ▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄ ➡️ 0ms
large-graph-zoom: heap used ▄▄▄▆█▁▄▃▄▃▄▃▃▃▄ ➡️ 72.5 MB
large-graph-zoom: DOM nodes ▃▆▁▆▆▁▆▆▁▃▃▆█▃█ 📉 0
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 █▁▆▄▂▆▁▆▄▆▄▄▃▅▁ ➡️ 42
legacy-node-drag: task duration ▁▇▃▇▇▁███▇▇▇█▇█ 📈 2032ms
legacy-node-drag: script duration ▁▇▃▆▇▁█▇▇▇▆▇█▇▇ 📈 1042ms
legacy-node-drag: TBT ▁▁▁▁▁▁▁▁▃▃█▁▁▃▁ 📈 0ms
legacy-node-drag: heap used ▆▅▇▇▇▄█▆▄▄▂▆▁▅█ ➡️ 88.0 MB
legacy-node-drag: DOM nodes ███▆▆█▆▁█▃█▃▆██ 📈 0
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 ▃▄▂▁▆▁▂▂▃▃▂▃▅▂█ 📈 5ms
minimap-idle: layout count ▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄ ➡️ 0
minimap-idle: style recalc count █▄▆▂▄▅▁▃▄▃▄▄▅▂▃ ➡️ 7
minimap-idle: task duration ▁█▃▄▅▁█▅▆▅▆▆▆▄▇ 📈 649ms
minimap-idle: script duration ▂█▄▄▆▁█▅▇▅▇▆▆▅▇ 📈 39ms
minimap-idle: TBT ▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄ ➡️ 0ms
minimap-idle: heap used ▁▇▄█▆▆█▆▃▅▅▄▆▇▅ ➡️ 76.4 MB
minimap-idle: DOM nodes ▁▁▁█▁█▁█▁▁▁▁▁█▁ ➡️ -228
minimap-idle: event listeners ▁▂▁▅▂█▅▅▁▁▂▁▂▅▁ 📈 -157
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 ▂▄▁▃▃▄█▃▅▃▅▂▄▁▆ ➡️ 7ms
subgraph-dom-widget-clipping: layout count ▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄ ➡️ 0
subgraph-dom-widget-clipping: style recalc count ▇▂█▃▂█▁▆▃▂▂▅▁▃▃ ➡️ 48
subgraph-dom-widget-clipping: task duration ▁▇▄▆▆▂█▆▇▇▇▆▇▆▇ 📈 422ms
subgraph-dom-widget-clipping: script duration ▁▇▄▆▇▂█▆▇▇▆▆▇▆▇ 📈 152ms
subgraph-dom-widget-clipping: TBT ▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄ ➡️ 0ms
subgraph-dom-widget-clipping: heap used ▂▃▂▂▁█▂▃▂▂▃▃▁▂▂ ➡️ 73.3 MB
subgraph-dom-widget-clipping: DOM nodes ▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄ ➡️ 0
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 ▁▇▄▃▆▂▇▅▆▃▄▄█▅█ ➡️ 5ms
subgraph-idle: layout count ▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄ ➡️ 0
subgraph-idle: style recalc count ▆▄▇▃▃█▁▃▃▂▁▃▄▃▃ ➡️ 11
subgraph-idle: task duration ▁▇▃▅▅▂█▅▆▅▆▄▆▅▅ ➡️ 471ms
subgraph-idle: script duration ▁▆▂▃▄▁█▄▅▂▆▃▆▃▅ ➡️ 10ms
subgraph-idle: TBT ▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄ ➡️ 0ms
subgraph-idle: heap used ▁▃▄▄▄▂▇▄▁▆▅▄█▆▅ ➡️ 65.2 MB
subgraph-idle: DOM nodes █▁▁▁▁▁▁█▁▁▁▁█▁▁ ➡️ -244
subgraph-idle: event listeners ▇▂▂▂▂▂▃▇▁▃▂▂█▃▃ ➡️ -188
subgraph-mouse-sweep: avg frame time ▁▆▅▃▃▆▆▆█▆▅█▅▆▃ ➡️ 17ms
subgraph-mouse-sweep: p95 frame time ▃▁▆▁▁▃▆▃▆█▁▆▃▃▁ ➡️ 17ms
subgraph-mouse-sweep: layout duration ▁▇▁▂▂▁▆▅█▂█▄▅▃▆ ➡️ 6ms
subgraph-mouse-sweep: style recalc duration ▁█▂▁▅▁█▆█▂█▄▅▂▆ ➡️ 19ms
subgraph-mouse-sweep: layout count ▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄ ➡️ 16
subgraph-mouse-sweep: style recalc count ▇▄█▇▆▇▄▆▁▇▆▆▁▄▆ ➡️ 73
subgraph-mouse-sweep: task duration ▁█▃▅▇▁▇▆▇▆█▆▇▆▇ 📈 849ms
subgraph-mouse-sweep: script duration ▁█▂▄▆▁█▅▆▅▅▅▇▅▇ ➡️ 122ms
subgraph-mouse-sweep: TBT ▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄ ➡️ 0ms
subgraph-mouse-sweep: heap used ▄▃▃▇█▁▄▂▅▄▄▄█▇▄ ➡️ 61.9 MB
subgraph-mouse-sweep: DOM nodes ▁▁▁▁▁▁▁▁▁▁▁▁█▁▁ ➡️ -244
subgraph-mouse-sweep: event listeners ▂▂▂▃▃▁▂▁▂▂▁▂█▃▂ ➡️ -203
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 ▁▇▃▅▆▂█▆▆▆▅▆▇▇▇ 📈 31ms
subgraph-transition-enter: layout count ▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄ ➡️ 5
subgraph-transition-enter: style recalc count █▅█▆▅█▁▅▃▃▅▅▅▅▆ ➡️ 18
subgraph-transition-enter: task duration ▁▇▃▆▆▁█▆▆▆▆▆▇▆▇ 📈 971ms
subgraph-transition-enter: script duration ▁▇▂▆▅▁█▅▆▅▇▆▆▆▇ 📈 33ms
subgraph-transition-enter: TBT ▁▇▃▅▆▁█▅▅▆▆▅▇▆▆ 📈 145ms
subgraph-transition-enter: heap used ▁▁▇▁▇█▁▁▇▇▅▇▁▁▂ ➡️ 79.3 MB
subgraph-transition-enter: DOM nodes ▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄ ➡️ 13667
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 ▄▄▃▂▂▅▄▅▇▁█▄▂▁▃ ➡️ 35ms
viewport-pan-sweep: layout count ▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄ ➡️ 0
viewport-pan-sweep: style recalc count ▁▆█▆▆▅▃█▆▃▆█▅▆▆ ➡️ 250
viewport-pan-sweep: task duration ▁▇▃▆▇▁█▆▆▆▇▆▇▆▇ 📈 6295ms
viewport-pan-sweep: script duration ▁▇▃▆▇▁█▆▆▆▆▆▇▆▇ 📈 2986ms
viewport-pan-sweep: TBT ▁▁▁▁▁▁▁▁▁█▁▁▁▁▁ 📈 0ms
viewport-pan-sweep: heap used ▁▃▃▁▄▄█▆▆▆▄▆▄▂▄ ➡️ 75.1 MB
viewport-pan-sweep: DOM nodes ▁▁▁▁▁▁█▁▁▁▁▁█▁▁ ➡️ -228
viewport-pan-sweep: event listeners █▂▁▂▄▄▃▁▄▂▃▃▃▁▃ ➡️ -149
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 ▁▆▄▅▇▁███▇▄▆▇▇▇ 📈 17117ms
vue-large-graph-idle: script duration ▁▇▄▄▆▁██▇▆▅▆▇▆▇ 📈 284ms
vue-large-graph-idle: TBT ▁▁▁▁▁▁▁█▁▁▁▁▁▁▁ ➡️ 0ms
vue-large-graph-idle: heap used ▃▂▄█▄▅▅▁▅▄▄▇▇▃▅ ➡️ 175.1 MB
vue-large-graph-idle: DOM nodes █████▁█████▅███ ➡️ -8049
vue-large-graph-idle: event listeners ▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄ ➡️ -14923
vue-large-graph-pan: avg frame time ▂▅▄▄▅▁▆▇▅▅▄▅▅▅█ ➡️ 19ms
vue-large-graph-pan: p95 frame time ▃▆█▃█▁██▆██▆██▆ ➡️ 17ms
vue-large-graph-pan: layout duration ▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄ ➡️ 0ms
vue-large-graph-pan: style recalc duration ▁█▂▃▄▁█▇█▄▆▅▆▄▅ 📈 19ms
vue-large-graph-pan: layout count ▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄ ➡️ 0
vue-large-graph-pan: style recalc count ▁█▅▆█▁█▇█▇▆▆██▇ 📈 151
vue-large-graph-pan: task duration ▁█▄▅▇▁███▇▄▆▇▇▇ 📈 21018ms
vue-large-graph-pan: script duration ▁▇▃▅▆▁█▆▇▆▆▆▇▆▇ 📈 950ms
vue-large-graph-pan: TBT ▁▆▃▂▃▂▆▇▆▅▁▄█▃▃ 📈 46ms
vue-large-graph-pan: heap used █▂▄█▄▁▅▃▃▅▅▇▆▄▅ ➡️ 172.4 MB
vue-large-graph-pan: DOM nodes ███████████▁█▆█ ➡️ -8049
vue-large-graph-pan: event listeners ▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄ ➡️ -14923
vue-node-resize-workload: avg frame time ▁▆▃▇▇▂▇▆█▄▂▆▆▆▇ ➡️ 18ms
vue-node-resize-workload: p95 frame time █▅█▅▅▅▁▄▅▁▄█▁▅▅ ➡️ 17ms
vue-node-resize-workload: layout duration ▂▆▂▄▃▁█▄▆█▅▅▆▃▄ ➡️ 24ms
vue-node-resize-workload: style recalc duration ▁▆▂▅▅▁▇▄▄█▄▅▆▅▅ 📈 78ms
vue-node-resize-workload: layout count ▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄ ➡️ 20
vue-node-resize-workload: style recalc count ▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄ ➡️ 20
vue-node-resize-workload: task duration ▁█▄▅▇▁▇██▅▃██▇▇ 📈 6273ms
vue-node-resize-workload: script duration ▁▇▃▄▅▁▇▆█▇▄▆▆▅▆ 📈 120ms
vue-node-resize-workload: TBT ▁▇▄▅▇▁▇▇█▄▂█▇▆▇ 📈 414ms
vue-node-resize-workload: heap used ▃█▅▆▆▂▃▁▄▃▅▆▆▅▄ ➡️ 171.2 MB
vue-node-resize-workload: DOM nodes █▁▁▁▁▁▁▁▁▁▁▁▁▁▁ ➡️ -8049
vue-node-resize-workload: event listeners ▇▇▇██▁▇▇▇▇▇▇▇▇▅ ➡️ -14923
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 ▁▆▄▅▇▁███▅▅█▇▇▇ 📈 8602ms
vue-zoom-out-idle: script duration ▃▇▄▄▆▁█▇▇▆▄▇▆▇▆ 📈 138ms
vue-zoom-out-idle: TBT ▁█▁▁▁▁▁▁▁▁▁▁▁▁▁ 📉 0ms
vue-zoom-out-idle: heap used ▄▅▆▅▇▆▁█▄▆▆▆▆▄▇ ➡️ 178.1 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 ▄▇▁▆▄▄▇█▄▇▅▅▆▄▇ ➡️ 2ms
workflow-execution: style recalc duration ▁▇▃▅▇▁█▇▅▅▅▆▅▆▇ 📈 20ms
workflow-execution: layout count ▂▇▁▄▄▄██▂▆▂▄▄▂▄ ➡️ 4
workflow-execution: style recalc count ▁▅▃▄▇▁██▄▅▄▇▆▅▆ 📈 16
workflow-execution: task duration ▁▆▃▅▆▁█▇▅▅▅▇▆▅▆ 📈 123ms
workflow-execution: script duration ▁▇▂▃▆▁█▆▄▅▄▆▇▆▆ 📈 13ms
workflow-execution: TBT ▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄ ➡️ 0ms
workflow-execution: heap used ▁▃▃▇▆▅█▇▃▆▃█▆▃▆ ➡️ 63.4 MB
workflow-execution: DOM nodes ▂▅▁▄▅▅▆█▃▅▃▆▇▅▇ ➡️ 124
workflow-execution: event listeners ▃▄▅▃▆▁█▇▃▆▅▇▆▅▆ 📈 60
Raw data
{
  "timestamp": "2026-09-25T20:34:12.779Z",
  "gitSha": "7b2956da06f06668e9bbe3c4539b10377a9e03fc",
  "branch": "dante01yoon/fe-2897-web-session-lifecycle",
  "measurements": [
    {
      "name": "canvas-idle",
      "durationMs": 1994.529,
      "styleRecalcs": 11,
      "styleRecalcDurationMs": 3.3480000000000003,
      "layouts": 0,
      "layoutDurationMs": 0,
      "taskDurationMs": 329.878,
      "heapDeltaBytes": 25277512,
      "heapUsedBytes": 87732320,
      "domNodes": 0,
      "jsHeapTotalBytes": 5242880,
      "scriptDurationMs": 7.76,
      "eventListeners": 0,
      "totalBlockingTimeMs": 0,
      "frameDurationMs": 16.666666666666668,
      "p95FrameDurationMs": 16.799999999999272
    },
    {
      "name": "canvas-idle",
      "durationMs": 1993.0739999999787,
      "styleRecalcs": 11,
      "styleRecalcDurationMs": 3.595000000000001,
      "layouts": 0,
      "layoutDurationMs": 0,
      "taskDurationMs": 321.518,
      "heapDeltaBytes": -1174572,
      "heapUsedBytes": 61499576,
      "domNodes": 0,
      "jsHeapTotalBytes": 5242880,
      "scriptDurationMs": 7.434999999999999,
      "eventListeners": 0,
      "totalBlockingTimeMs": 0,
      "frameDurationMs": 16.666666666666668,
      "p95FrameDurationMs": 16.799999999999272
    },
    {
      "name": "canvas-mouse-sweep",
      "durationMs": 1695.2759999999785,
      "styleRecalcs": 71,
      "styleRecalcDurationMs": 15.334,
      "layouts": 12,
      "layoutDurationMs": 3.9630000000000005,
      "taskDurationMs": 656.236,
      "heapDeltaBytes": 13249236,
      "heapUsedBytes": 75511052,
      "domNodes": -228,
      "jsHeapTotalBytes": 4972544,
      "scriptDurationMs": 127.31,
      "eventListeners": -142,
      "totalBlockingTimeMs": 0,
      "frameDurationMs": 16.66333333333332,
      "p95FrameDurationMs": 16.700000000000728
    },
    {
      "name": "canvas-mouse-sweep",
      "durationMs": 1694.4180000000415,
      "styleRecalcs": 71,
      "styleRecalcDurationMs": 14.956999999999999,
      "layouts": 12,
      "layoutDurationMs": 4.174,
      "taskDurationMs": 666.586,
      "heapDeltaBytes": -3800024,
      "heapUsedBytes": 58551252,
      "domNodes": -228,
      "jsHeapTotalBytes": 4972544,
      "scriptDurationMs": 125.388,
      "eventListeners": -164,
      "totalBlockingTimeMs": 0,
      "frameDurationMs": 16.66333333333335,
      "p95FrameDurationMs": 16.699999999999818
    },
    {
      "name": "canvas-zoom-sweep",
      "durationMs": 1692.7460000000565,
      "styleRecalcs": 30,
      "styleRecalcDurationMs": 8.541,
      "layouts": 6,
      "layoutDurationMs": 1.076,
      "taskDurationMs": 262.274,
      "heapDeltaBytes": 2148340,
      "heapUsedBytes": 64536844,
      "domNodes": 53,
      "jsHeapTotalBytes": 5242880,
      "scriptDurationMs": 10.311999999999998,
      "eventListeners": 15,
      "totalBlockingTimeMs": 0,
      "frameDurationMs": 16.666666666666668,
      "p95FrameDurationMs": 16.800000000000182
    },
    {
      "name": "canvas-zoom-sweep",
      "durationMs": 1692.6630000000387,
      "styleRecalcs": 28,
      "styleRecalcDurationMs": 8.102,
      "layouts": 6,
      "layoutDurationMs": 0.9319999999999999,
      "taskDurationMs": 260.62600000000003,
      "heapDeltaBytes": 2077652,
      "heapUsedBytes": 64611144,
      "domNodes": 53,
      "jsHeapTotalBytes": 5242880,
      "scriptDurationMs": 9.719999999999999,
      "eventListeners": 15,
      "totalBlockingTimeMs": 0,
      "frameDurationMs": 16.666666666666668,
      "p95FrameDurationMs": 16.700000000000728
    },
    {
      "name": "dom-widget-clipping",
      "durationMs": 518.3779999999842,
      "styleRecalcs": 14,
      "styleRecalcDurationMs": 3.6970000000000005,
      "layouts": 0,
      "layoutDurationMs": 0,
      "taskDurationMs": 328.129,
      "heapDeltaBytes": 18132728,
      "heapUsedBytes": 80667292,
      "domNodes": 0,
      "jsHeapTotalBytes": 5767168,
      "scriptDurationMs": 131.553,
      "eventListeners": 0,
      "totalBlockingTimeMs": 0,
      "frameDurationMs": 16.666666666666668,
      "p95FrameDurationMs": 16.799999999999272
    },
    {
      "name": "dom-widget-clipping",
      "durationMs": 549.5949999999539,
      "styleRecalcs": 13,
      "styleRecalcDurationMs": 3.837,
      "layouts": 0,
      "layoutDurationMs": 0,
      "taskDurationMs": 369.13399999999996,
      "heapDeltaBytes": 18603100,
      "heapUsedBytes": 80374336,
      "domNodes": 0,
      "jsHeapTotalBytes": 4980736,
      "scriptDurationMs": 136.934,
      "eventListeners": 0,
      "totalBlockingTimeMs": 0,
      "frameDurationMs": 16.66333333333332,
      "p95FrameDurationMs": 16.799999999999727
    },
    {
      "name": "dom-widget-order-dense-n200-w200-i120",
      "durationMs": 1030.27400000002,
      "styleRecalcs": 0,
      "styleRecalcDurationMs": 0,
      "layouts": 0,
      "layoutDurationMs": 0,
      "taskDurationMs": 690.1800000000001,
      "heapDeltaBytes": -14513792,
      "heapUsedBytes": 71809732,
      "domNodes": -259,
      "jsHeapTotalBytes": 19267584,
      "scriptDurationMs": 51.407,
      "eventListeners": -207,
      "totalBlockingTimeMs": 391,
      "frameDurationMs": 16.666666666666668,
      "p95FrameDurationMs": 16.800000000000182
    },
    {
      "name": "dom-widget-order-dense-n200-w200-i120",
      "durationMs": 1035.8080000000882,
      "styleRecalcs": 0,
      "styleRecalcDurationMs": 0,
      "layouts": 0,
      "layoutDurationMs": 0,
      "taskDurationMs": 691.5040000000001,
      "heapDeltaBytes": -15118200,
      "heapUsedBytes": 72477852,
      "domNodes": -259,
      "jsHeapTotalBytes": 21102592,
      "scriptDurationMs": 45.65999999999999,
      "eventListeners": -207,
      "totalBlockingTimeMs": 393,
      "frameDurationMs": 16.666666666666668,
      "p95FrameDurationMs": 16.700000000000728
    },
    {
      "name": "dom-widget-order-sparse-n1000-w20-i120",
      "durationMs": 765.3950000000123,
      "styleRecalcs": 0,
      "styleRecalcDurationMs": 0,
      "layouts": 0,
      "layoutDurationMs": 0,
      "taskDurationMs": 364.4409999999998,
      "heapDeltaBytes": 14568416,
      "heapUsedBytes": 91058636,
      "domNodes": 0,
      "jsHeapTotalBytes": 0,
      "scriptDurationMs": 114.77100000000002,
      "eventListeners": 0,
      "totalBlockingTimeMs": 157,
      "frameDurationMs": 16.666666666666668,
      "p95FrameDurationMs": 16.800000000000182
    },
    {
      "name": "dom-widget-order-sparse-n1000-w20-i120",
      "durationMs": 783.7979999999334,
      "styleRecalcs": 0,
      "styleRecalcDurationMs": 0,
      "layouts": 0,
      "layoutDurationMs": 0,
      "taskDurationMs": 375.899,
      "heapDeltaBytes": 14271324,
      "heapUsedBytes": 89729888,
      "domNodes": 0,
      "jsHeapTotalBytes": 0,
      "scriptDurationMs": 119.54199999999999,
      "eventListeners": 0,
      "totalBlockingTimeMs": 158,
      "frameDurationMs": 16.666666666666668,
      "p95FrameDurationMs": 16.800000000000182
    },
    {
      "name": "extension-clean-combined-draw",
      "durationMs": 7225.278000000003,
      "styleRecalcs": 1,
      "styleRecalcDurationMs": 0.05300000000000096,
      "layouts": 0,
      "layoutDurationMs": 0,
      "taskDurationMs": 6418.936,
      "heapDeltaBytes": 4038296,
      "heapUsedBytes": 86840992,
      "domNodes": 0,
      "jsHeapTotalBytes": 5242880,
      "scriptDurationMs": 5322.3,
      "eventListeners": 0,
      "totalBlockingTimeMs": 71,
      "frameDurationMs": 18.33666666666668,
      "p95FrameDurationMs": 33.399999999999636
    },
    {
      "name": "extension-clean-combined-draw",
      "durationMs": 7260.086000000001,
      "styleRecalcs": 1,
      "styleRecalcDurationMs": 0.342000000000002,
      "layouts": 0,
      "layoutDurationMs": 0,
      "taskDurationMs": 6453.542,
      "heapDeltaBytes": -10454084,
      "heapUsedBytes": 72210316,
      "domNodes": 0,
      "jsHeapTotalBytes": 6291456,
      "scriptDurationMs": 5115.905,
      "eventListeners": 0,
      "totalBlockingTimeMs": 37,
      "frameDurationMs": 18.329999999999988,
      "p95FrameDurationMs": 33.399999999999636
    },
    {
      "name": "extension-rgthree-prototype-draw",
      "durationMs": 7423.519999999997,
      "styleRecalcs": 2,
      "styleRecalcDurationMs": 0.4360000000000024,
      "layouts": 0,
      "layoutDurationMs": 0,
      "taskDurationMs": 6631.406,
      "heapDeltaBytes": 3803384,
      "heapUsedBytes": 81914916,
      "domNodes": -228,
      "jsHeapTotalBytes": 9428992,
      "scriptDurationMs": 5352.401000000001,
      "eventListeners": -164,
      "totalBlockingTimeMs": 67,
      "frameDurationMs": 17.779999999999987,
      "p95FrameDurationMs": 33.29999999999927
    },
    {
      "name": "extension-rgthree-prototype-draw",
      "durationMs": 6403.389000000061,
      "styleRecalcs": 2,
      "styleRecalcDurationMs": 0.5549999999999999,
      "layouts": 0,
      "layoutDurationMs": 0,
      "taskDurationMs": 5905.76,
      "heapDeltaBytes": 15968200,
      "heapUsedBytes": 93481992,
      "domNodes": -228,
      "jsHeapTotalBytes": 1564672,
      "scriptDurationMs": 4845.789000000001,
      "eventListeners": -164,
      "totalBlockingTimeMs": 29,
      "frameDurationMs": 17.776666666666642,
      "p95FrameDurationMs": 33.30000000000109
    },
    {
      "name": "large-graph-idle",
      "durationMs": 2022.6649999999609,
      "styleRecalcs": 9,
      "styleRecalcDurationMs": 3.371999999999998,
      "layouts": 0,
      "layoutDurationMs": 0,
      "taskDurationMs": 481.31200000000007,
      "heapDeltaBytes": -8319260,
      "heapUsedBytes": 71958092,
      "domNodes": -228,
      "jsHeapTotalBytes": -8192,
      "scriptDurationMs": 29.156000000000002,
      "eventListeners": -164,
      "totalBlockingTimeMs": 0,
      "frameDurationMs": 16.66333333333332,
      "p95FrameDurationMs": 16.700000000000728
    },
    {
      "name": "large-graph-idle",
      "durationMs": 2015.4959999999846,
      "styleRecalcs": 8,
      "styleRecalcDurationMs": 2.241000000000002,
      "layouts": 0,
      "layoutDurationMs": 0,
      "taskDurationMs": 423.3770000000001,
      "heapDeltaBytes": 19739584,
      "heapUsedBytes": 83610464,
      "domNodes": -228,
      "jsHeapTotalBytes": 0,
      "scriptDurationMs": 26.119000000000003,
      "eventListeners": -142,
      "totalBlockingTimeMs": 0,
      "frameDurationMs": 16.666666666666668,
      "p95FrameDurationMs": 16.700000000000728
    },
    {
      "name": "large-graph-pan",
      "durationMs": 2178.386000000046,
      "styleRecalcs": 70,
      "styleRecalcDurationMs": 10.917,
      "layouts": 0,
      "layoutDurationMs": 0,
      "taskDurationMs": 1452.786,
      "heapDeltaBytes": -14090236,
      "heapUsedBytes": 68699984,
      "domNodes": -228,
      "jsHeapTotalBytes": 1863680,
      "scriptDurationMs": 727.263,
      "eventListeners": -164,
      "totalBlockingTimeMs": 0,
      "frameDurationMs": 16.666666666666668,
      "p95FrameDurationMs": 16.700000000000728
    },
    {
      "name": "large-graph-pan",
      "durationMs": 2106.1560000000554,
      "styleRecalcs": 69,
      "styleRecalcDurationMs": 9.843000000000002,
      "layouts": 0,
      "layoutDurationMs": 0,
      "taskDurationMs": 1284.109,
      "heapDeltaBytes": 16220604,
      "heapUsedBytes": 80413756,
      "domNodes": -228,
      "jsHeapTotalBytes": 1273856,
      "scriptDurationMs": 664.9730000000001,
      "eventListeners": -142,
      "totalBlockingTimeMs": 0,
      "frameDurationMs": 16.66333333333332,
      "p95FrameDurationMs": 16.800000000000182
    },
    {
      "name": "large-graph-zoom",
      "durationMs": 3216.750999999931,
      "styleRecalcs": 65,
      "styleRecalcDurationMs": 11.672,
      "layouts": 60,
      "layoutDurationMs": 13.861,
      "taskDurationMs": 1437.185,
      "heapDeltaBytes": -7518160,
      "heapUsedBytes": 74762932,
      "domNodes": -228,
      "jsHeapTotalBytes": 5496832,
      "scriptDurationMs": 628.1460000000001,
      "eventListeners": -164,
      "totalBlockingTimeMs": 0,
      "frameDurationMs": 16.666666666666668,
      "p95FrameDurationMs": 16.700000000000728
    },
    {
      "name": "large-graph-zoom",
      "durationMs": 3185.6940000000122,
      "styleRecalcs": 66,
      "styleRecalcDurationMs": 11.860999999999999,
      "layouts": 60,
      "layoutDurationMs": 16.435,
      "taskDurationMs": 1398.3850000000002,
      "heapDeltaBytes": -16573656,
      "heapUsedBytes": 72803824,
      "domNodes": -228,
      "jsHeapTotalBytes": 5271552,
      "scriptDurationMs": 627.513,
      "eventListeners": -164,
      "totalBlockingTimeMs": 0,
      "frameDurationMs": 16.66333333333335,
      "p95FrameDurationMs": 16.800000000000182
    },
    {
      "name": "legacy-node-drag",
      "durationMs": 2505.0410000000056,
      "styleRecalcs": 44,
      "styleRecalcDurationMs": 5.958,
      "layouts": 0,
      "layoutDurationMs": 0,
      "taskDurationMs": 1603.9430000000002,
      "heapDeltaBytes": 17326792,
      "heapUsedBytes": 83746936,
      "domNodes": 0,
      "jsHeapTotalBytes": 1466368,
      "scriptDurationMs": 808.592,
      "eventListeners": 180,
      "totalBlockingTimeMs": 0,
      "frameDurationMs": 16.670000000000012,
      "p95FrameDurationMs": 16.800000000000182
    },
    {
      "name": "legacy-node-drag",
      "durationMs": 2231.0790000000225,
      "styleRecalcs": 48,
      "styleRecalcDurationMs": 7.045000000000001,
      "layouts": 0,
      "layoutDurationMs": 0,
      "taskDurationMs": 1541.5590000000002,
      "heapDeltaBytes": -10239688,
      "heapUsedBytes": 76009896,
      "domNodes": 0,
      "jsHeapTotalBytes": 6066176,
      "scriptDurationMs": 791.128,
      "eventListeners": 180,
      "totalBlockingTimeMs": 0,
      "frameDurationMs": 16.666666666666668,
      "p95FrameDurationMs": 16.800000000000182
    },
    {
      "name": "minimap-idle",
      "durationMs": 2001.9829999999956,
      "styleRecalcs": 8,
      "styleRecalcDurationMs": 2.7019999999999995,
      "layouts": 0,
      "layoutDurationMs": 0,
      "taskDurationMs": 445.461,
      "heapDeltaBytes": 20139436,
      "heapUsedBytes": 84301164,
      "domNodes": -228,
      "jsHeapTotalBytes": 0,
      "scriptDurationMs": 31.584,
      "eventListeners": -142,
      "totalBlockingTimeMs": 0,
      "frameDurationMs": 16.666666666666668,
      "p95FrameDurationMs": 16.700000000000728
    },
    {
      "name": "minimap-idle",
      "durationMs": 2033.0770000000484,
      "styleRecalcs": 8,
      "styleRecalcDurationMs": 3.023999999999999,
      "layouts": 0,
      "layoutDurationMs": 0,
      "taskDurationMs": 478.3130000000001,
      "heapDeltaBytes": -13818680,
      "heapUsedBytes": 75190032,
      "domNodes": -228,
      "jsHeapTotalBytes": 3436544,
      "scriptDurationMs": 28.580999999999996,
      "eventListeners": -164,
      "totalBlockingTimeMs": 0,
      "frameDurationMs": 16.66333333333335,
      "p95FrameDurationMs": 16.699999999999818
    },
    {
      "name": "subgraph-dom-widget-clipping",
      "durationMs": 523.967999999968,
      "styleRecalcs": 48,
      "styleRecalcDurationMs": 5.795999999999999,
      "layouts": 0,
      "layoutDurationMs": 0,
      "taskDurationMs": 321.947,
      "heapDeltaBytes": 13228876,
      "heapUsedBytes": 76767744,
      "domNodes": 0,
      "jsHeapTotalBytes": 4980736,
      "scriptDurationMs": 116.846,
      "eventListeners": 6,
      "totalBlockingTimeMs": 0,
      "frameDurationMs": 16.666666666666668,
      "p95FrameDurationMs": 16.700000000000728
    },
    {
      "name": "subgraph-dom-widget-clipping",
      "durationMs": 499.4850000000497,
      "styleRecalcs": 48,
      "styleRecalcDurationMs": 6.996000000000002,
      "layouts": 0,
      "layoutDurationMs": 0,
      "taskDurationMs": 316.638,
      "heapDeltaBytes": 13523228,
      "heapUsedBytes": 77138720,
      "domNodes": 0,
      "jsHeapTotalBytes": 5242880,
      "scriptDurationMs": 118.78099999999999,
      "eventListeners": 6,
      "totalBlockingTimeMs": 0,
      "frameDurationMs": 16.666666666666682,
      "p95FrameDurationMs": 16.700000000000273
    },
    {
      "name": "subgraph-idle",
      "durationMs": 1992.134999999962,
      "styleRecalcs": 10,
      "styleRecalcDurationMs": 3.5559999999999983,
      "layouts": 0,
      "layoutDurationMs": 0,
      "taskDurationMs": 363.5849999999999,
      "heapDeltaBytes": -5907388,
      "heapUsedBytes": 57889676,
      "domNodes": -244,
      "jsHeapTotalBytes": 4972544,
      "scriptDurationMs": 6.811000000000001,
      "eventListeners": -210,
      "totalBlockingTimeMs": 0,
      "frameDurationMs": 16.666666666666668,
      "p95FrameDurationMs": 16.700000000000728
    },
    {
      "name": "subgraph-idle",
      "durationMs": 1990.0870000000168,
      "styleRecalcs": 11,
      "styleRecalcDurationMs": 3.248000000000001,
      "layouts": 0,
      "layoutDurationMs": 0,
      "taskDurationMs": 349.01800000000003,
      "heapDeltaBytes": -7239212,
      "heapUsedBytes": 55757268,
      "domNodes": -244,
      "jsHeapTotalBytes": 3923968,
      "scriptDurationMs": 6.580000000000001,
      "eventListeners": -210,
      "totalBlockingTimeMs": 0,
      "frameDurationMs": 16.66333333333332,
      "p95FrameDurationMs": 16.800000000000182
    },
    {
      "name": "subgraph-mouse-sweep",
      "durationMs": 1694.9369999999817,
      "styleRecalcs": 75,
      "styleRecalcDurationMs": 16.753,
      "layouts": 16,
      "layoutDurationMs": 5.642,
      "taskDurationMs": 648.717,
      "heapDeltaBytes": 4766876,
      "heapUsedBytes": 68394612,
      "domNodes": -244,
      "jsHeapTotalBytes": 6021120,
      "scriptDurationMs": 92.849,
      "eventListeners": -188,
      "totalBlockingTimeMs": 0,
      "frameDurationMs": 16.666666666666668,
      "p95FrameDurationMs": 16.800000000000182
    },
    {
      "name": "subgraph-mouse-sweep",
      "durationMs": 1695.607000000109,
      "styleRecalcs": 77,
      "styleRecalcDurationMs": 15.312000000000001,
      "layouts": 16,
      "layoutDurationMs": 4.718,
      "taskDurationMs": 617.6669999999999,
      "heapDeltaBytes": -6930156,
      "heapUsedBytes": 55806424,
      "domNodes": -244,
      "jsHeapTotalBytes": 4448256,
      "scriptDurationMs": 87.90100000000001,
      "eventListeners": -210,
      "totalBlockingTimeMs": 0,
      "frameDurationMs": 16.66333333333335,
      "p95FrameDurationMs": 16.700000000000728
    },
    {
      "name": "subgraph-transition-enter",
      "durationMs": 866.9670000000451,
      "styleRecalcs": 18,
      "styleRecalcDurationMs": 22.038999999999994,
      "layouts": 5,
      "layoutDurationMs": 9.288,
      "taskDurationMs": 690.5530000000002,
      "heapDeltaBytes": -6270260,
      "heapUsedBytes": 81015812,
      "domNodes": 13667,
      "jsHeapTotalBytes": 10747904,
      "scriptDurationMs": 22.241000000000003,
      "eventListeners": 2383,
      "totalBlockingTimeMs": 87,
      "frameDurationMs": 16.66333333333335,
      "p95FrameDurationMs": 16.700000000000728
    },
    {
      "name": "viewport-pan-sweep",
      "durationMs": 8198.208999999906,
      "styleRecalcs": 250,
      "styleRecalcDurationMs": 34.535,
      "layouts": 0,
      "layoutDurationMs": 0,
      "taskDurationMs": 4846.9490000000005,
      "heapDeltaBytes": 13832928,
      "heapUsedBytes": 95495160,
      "domNodes": -228,
      "jsHeapTotalBytes": 1826816,
      "scriptDurationMs": 2296.711,
      "eventListeners": -164,
      "totalBlockingTimeMs": 0,
      "frameDurationMs": 16.66333333333338,
      "p95FrameDurationMs": 16.700000000000728
    },
    {
      "name": "viewport-pan-sweep",
      "durationMs": 8157.831999999985,
      "styleRecalcs": 251,
      "styleRecalcDurationMs": 34.477000000000004,
      "layouts": 0,
      "layoutDurationMs": 0,
      "taskDurationMs": 4538.628,
      "heapDeltaBytes": 7565284,
      "heapUsedBytes": 89327788,
      "domNodes": -228,
      "jsHeapTotalBytes": 1302528,
      "scriptDurationMs": 2159.2569999999996,
      "eventListeners": -164,
      "totalBlockingTimeMs": 0,
      "frameDurationMs": 16.666666666666668,
      "p95FrameDurationMs": 16.80000000000109
    },
    {
      "name": "vue-large-graph-idle",
      "durationMs": 14354.801999999949,
      "styleRecalcs": 0,
      "styleRecalcDurationMs": 0,
      "layouts": 0,
      "layoutDurationMs": 0,
      "taskDurationMs": 14210.081000000002,
      "heapDeltaBytes": -65599156,
      "heapUsedBytes": 178359284,
      "domNodes": -8049,
      "jsHeapTotalBytes": -19464192,
      "scriptDurationMs": 207.044,
      "eventListeners": -14923,
      "totalBlockingTimeMs": 0,
      "frameDurationMs": 17.776666666666642,
      "p95FrameDurationMs": 16.80000000000291
    },
    {
      "name": "vue-large-graph-idle",
      "durationMs": 11390.202000000045,
      "styleRecalcs": 0,
      "styleRecalcDurationMs": 0,
      "layouts": 0,
      "layoutDurationMs": 0,
      "taskDurationMs": 10783.086999999998,
      "heapDeltaBytes": -12025208,
      "heapUsedBytes": 201327212,
      "domNodes": -8050,
      "jsHeapTotalBytes": -7323648,
      "scriptDurationMs": 172.20200000000003,
      "eventListeners": -14923,
      "totalBlockingTimeMs": 0,
      "frameDurationMs": 16.669999999999952,
      "p95FrameDurationMs": 16.799999999999272
    },
    {
      "name": "vue-large-graph-pan",
      "durationMs": 17179.000000000087,
      "styleRecalcs": 120,
      "styleRecalcDurationMs": 15.576000000000006,
      "layouts": 0,
      "layoutDurationMs": 0,
      "taskDurationMs": 17093.645,
      "heapDeltaBytes": -24165384,
      "heapUsedBytes": 192153864,
      "domNodes": -8049,
      "jsHeapTotalBytes": -15384576,
      "scriptDurationMs": 697.0540000000001,
      "eventListeners": -14923,
      "totalBlockingTimeMs": 11,
      "frameDurationMs": 17.223333333333358,
      "p95FrameDurationMs": 16.700000000000728
    },
    {
      "name": "vue-large-graph-pan",
      "durationMs": 17196.244000000093,
      "styleRecalcs": 119,
      "styleRecalcDurationMs": 14.470000000000011,
      "layouts": 0,
      "layoutDurationMs": 0,
      "taskDurationMs": 17003.099,
      "heapDeltaBytes": -26810596,
      "heapUsedBytes": 192321196,
      "domNodes": -8049,
      "jsHeapTotalBytes": -17117184,
      "scriptDurationMs": 708.191,
      "eventListeners": -14923,
      "totalBlockingTimeMs": 8,
      "frameDurationMs": 17.220000000000073,
      "p95FrameDurationMs": 16.799999999999272
    },
    {
      "name": "vue-node-resize-workload",
      "durationMs": 5107.519000000025,
      "styleRecalcs": 20,
      "styleRecalcDurationMs": 59.365,
      "layouts": 20,
      "layoutDurationMs": 20.808999999999994,
      "taskDurationMs": 5077.5160000000005,
      "heapDeltaBytes": -31444252,
      "heapUsedBytes": 185344856,
      "domNodes": -8050,
      "jsHeapTotalBytes": 20860928,
      "scriptDurationMs": 85.354,
      "eventListeners": -14923,
      "totalBlockingTimeMs": 187,
      "frameDurationMs": 17.223333333333358,
      "p95FrameDurationMs": 16.80000000000109
    },
    {
      "name": "vue-node-resize-workload",
      "durationMs": 5185.263000000077,
      "styleRecalcs": 20,
      "styleRecalcDurationMs": 57.194000000000024,
      "layouts": 20,
      "layoutDurationMs": 20.819000000000003,
      "taskDurationMs": 5150.219,
      "heapDeltaBytes": -60202536,
      "heapUsedBytes": 176935832,
      "domNodes": -8049,
      "jsHeapTotalBytes": 18763776,
      "scriptDurationMs": 84.50000000000001,
      "eventListeners": -14923,
      "totalBlockingTimeMs": 193,
      "frameDurationMs": 17.220000000000013,
      "p95FrameDurationMs": 16.80000000000109
    },
    {
      "name": "vue-zoom-out-idle",
      "durationMs": 7259.922999999958,
      "styleRecalcs": 0,
      "styleRecalcDurationMs": 0,
      "layouts": 0,
      "layoutDurationMs": 0,
      "taskDurationMs": 7113.1320000000005,
      "heapDeltaBytes": -2134816,
      "heapUsedBytes": 194253144,
      "domNodes": 0,
      "jsHeapTotalBytes": -20447232,
      "scriptDurationMs": 107.578,
      "eventListeners": 0,
      "totalBlockingTimeMs": 0,
      "frameDurationMs": 17.779999999999927,
      "p95FrameDurationMs": 16.799999999999272
    },
    {
      "name": "vue-zoom-out-idle",
      "durationMs": 7289.805999999999,
      "styleRecalcs": 0,
      "styleRecalcDurationMs": 0,
      "layouts": 0,
      "layoutDurationMs": 0,
      "taskDurationMs": 7191.985999999998,
      "heapDeltaBytes": 18446996,
      "heapUsedBytes": 179407112,
      "domNodes": 0,
      "jsHeapTotalBytes": -12320768,
      "scriptDurationMs": 101.18400000000005,
      "eventListeners": 0,
      "totalBlockingTimeMs": 0,
      "frameDurationMs": 17.223333333333358,
      "p95FrameDurationMs": 16.799999999999272
    },
    {
      "name": "workflow-execution",
      "durationMs": 448.1950000000552,
      "styleRecalcs": 18,
      "styleRecalcDurationMs": 17.311,
      "layouts": 5,
      "layoutDurationMs": 2.0759999999999996,
      "taskDurationMs": 114.97699999999999,
      "heapDeltaBytes": 5343512,
      "heapUsedBytes": 67262692,
      "domNodes": 131,
      "jsHeapTotalBytes": 262144,
      "scriptDurationMs": 12.624999999999998,
      "eventListeners": 81,
      "totalBlockingTimeMs": 0,
      "frameDurationMs": 16.663333333333338,
      "p95FrameDurationMs": 16.700000000000273
    },
    {
      "name": "workflow-execution",
      "durationMs": 76.99400000001333,
      "styleRecalcs": 5,
      "styleRecalcDurationMs": 8.652,
      "layouts": 2,
      "layoutDurationMs": 1.1280000000000001,
      "taskDurationMs": 53.35200000000001,
      "heapDeltaBytes": 2960728,
      "heapUsedBytes": 65139756,
      "domNodes": 113,
      "jsHeapTotalBytes": 0,
      "scriptDurationMs": 4.576999999999999,
      "eventListeners": 17,
      "totalBlockingTimeMs": 0,
      "frameDurationMs": 16.663333333333338,
      "p95FrameDurationMs": 16.799999999999727
    }
  ]
}

🔬 E2E Coverage

Metric Covered Total Pct
Lines 52512 79544 66.0% 🟡
Functions 0 0 — —
Branches 0 0 — —
Top 10 files by uncovered lines
File Coverage Missed
src/LGraphCanvas.ts 67.4% 1151
src/LGraphNode.ts 70.2% 388
src/extensions/core/cameraInfo/CameraInfoViewport.ts 2.5% 344
src/renderer/extensions/layerEditor/composables/useLayerEditorSession.ts 40.1% 332
src/platform/workspace/stores/billingOperationStore.ts 7.8% 320
src/LGraph.ts 78.7% 272
src/scripts/app.ts 72.1% 259
src/platform/workspace/stores/teamWorkspaceStore.ts 38.9% 256
src/core/billing/operationLifecycle.ts 1.3% 232
src/scripts/pnginfo.ts 20.8% 221

@codecov

codecov Bot commented Sep 24, 2026 •

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 86.13139% with 19 lines in your changes missing coverage. Please review.

Files with missing lines Patch % Lines
...ckages/account-core/src/core/webSessionIdentity.ts 85.38% 8 Missing and 11 partials ⚠️
@@            Coverage Diff             @@
##             main   #18719      +/-   ##
==========================================
- Coverage   83.96%   83.96%   -0.01%     
==========================================
  Files        3077     3077              
  Lines      152299   152413     +114     
  Branches    39171    39654     +483     
==========================================
+ Hits       127879   127971      +92     
- Misses      22938    22955      +17     
- Partials     1482     1487       +5     
Flag Coverage Δ
billing-web-unit 88.32% <ø> (ø)
e2e 66.01% <100.00%> (-0.01%) ⬇️
unit 81.05% <86.02%> (+<0.01%) ⬆️
website-unit 77.17% <ø> (ø)

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

Files with missing lines Coverage Δ
packages/account-core/src/core/sessionContracts.ts 66.66% <ø> (ø)
packages/account-core/src/web/crossTabRefresh.ts 77.96% <100.00%> (+2.49%) ⬆️
...ckages/account-core/src/core/webSessionIdentity.ts 86.20% <85.38%> (+1.99%) ⬆️

... and 9 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:high PR risk grade (advisory shadow check; grader-owned) label Sep 24, 2026
pull Bot pushed a commit to Penguinjanator/ComfyUI_frontend that referenced this pull request Sep 24, 2026
…g#18707)

## Why

The "One Comfy session across comfy.org" TDD moves every first-party web
app onto one revocable session cookie on the Cloud host. The decisions
behind it, and above all why the cookie is host-only `__Host-` instead
of the domain-wide cookie first recorded in the Account Layer TDD,
cannot be read off the code. This ADR records them before the SDK and
app slices land, so reviewers of those slices have one place to check
against.

## How

- New
`docs/adr/AUTH-SESSION-0037-shared-web-session-on-a-host-only-cookie.md`:
the eight decisions (host-only `__Host-comfy_session`, opaque DB-backed
reference, provider-neutral session, workspace per request, stored CSRF
token + trusted Origin, new session per real sign-in, tokens stay for
non-web clients, one client flag with the server owning the AND), the
rejected alternatives with the reason each lost (domain-wide cookie:
vendor-operated hosts under comfy.org, sibling-host overwrite,
twin-cookie switch, rollback cleanup; signed cookie; workspace in
cookie; double-submit CSRF; cookie-only-for-sign-in; cookie on other
services; redirect hub; timer rotation), and the consequences.
- Index row in `docs/adr/README.md`. `pnpm adr:check` passes.
- Not in this PR: the README auth sections for `apps/website`,
`apps/billing-web` and `packages/account-core`. The ticket finalizes
them as the SDK and app slices land; writing them now would describe
code that does not exist yet.

## AS IS / TO BE

Docs only, no UI.

- AS IS: no ADR for the web session; the domain-wide cookie decision
exists only in the Account Layer TDD, amended in security review on
2026-09-24.
- TO BE: `AUTH-SESSION-0037` (Proposed) records the host-only decision
and the alternatives it rejected; `pnpm adr:check` → `ADR naming and
index validation passed`.

## docs.comfy.org suggestion

Once the flag ramps (FE-2907): a short "Signing in across Comfy sites"
note. Signing in on comfy.org, cloud.comfy.org or billing.comfy.org
signs you in on the others; signing out of one signs you out of all;
"sign out of all devices" ends every session. CLI, API keys and Desktop
are unchanged.

## Links

- TDD: https://app.notion.com/p/3de6d73d365081d7a4c8f808c0a0384b
(sections 4, 10, A10)
- Action items and dependency graph:
https://app.notion.com/p/3e56d73d3650812d962decc97fbd9ea3
- Linear: https://linear.app/comfyorg/issue/FE-2893

## Where this PR sits in the plan

| Ticket | Scope | Blocked by | State |
| --- | --- | --- | --- |
| FE-2891 | `unified_web_session` client flag, off by default | BE-17135
to turn on; C11 for website/billing-web readers | Comfy-Org#18708 |
| FE-2892 | account-core web session client + error codes | C1, C3
(BE-17063 generated types) | Comfy-Org#18710, do not merge |
| **FE-2893 (this PR)** | ADR for the shared web session | none | Comfy-Org#18707
|
| FE-2901 | non-web clients stay on tokens (baseline) | FE-2895 for
`authorize()` rows | Comfy-Org#18711 |
| FE-2894 | session-backed identity + boot rules (stacked on Comfy-Org#18710) |
FE-2892, C3 | Comfy-Org#18715, do not merge |
| FE-2895 | `authorize()` for cookie requests (stacked on Comfy-Org#18710) |
FE-2892, C5 | Comfy-Org#18716, do not merge |
| FE-2897 | session lifecycle, heartbeat (stacked on Comfy-Org#18715) | FE-2894,
C1, C3 | Comfy-Org#18719, do not merge |
| FE-2906 | cross-origin E2E harness + §17 test ids | C3/C5/C6/C7 on
staging for the rows | Comfy-Org#18718 (harness only) |
| FE-2896, 2898–2900, 2902–2905, 2907, 2908 | apps, token mint, rollout,
cleanup | C5/C6/C7/C8/C11 contracts | not started |

```mermaid
flowchart LR
  subgraph BE["BE · cloud ingest and infra"]
    C0["BE-17071 C0 preview CORS gate"]
    C1["BE-17061 C1 sessions table + revocable cookie"]
    C3["BE-17063 C3 GET /session, trusted origins, flag"]
    C4["BE-17062 C4 shared workspace resolution"]
    C5["BE-17066 C5 cookie on API: CSRF, Origin, workspace header"]
    C2["BE-17064 C2 revoke-all, purge, caps"]
    C6["BE-17067 C6 WebSocket on session"]
    C7["BE-17068 C7 scoped media"]
    C8["BE-17069 C8 token mint from session"]
    C9["BE-17065 C9 Redis cache + load test"]
    C10["BE-17072 C10 prod config, cleanup"]
    C11["C11 flag before sign-in (OQ17)"]
    B135["BE-17135 serve unified_web_session (server AND)"]
    I2["BE-17070 I2 edge limit, log + DNS audit"]
  end
  subgraph SDK["FE · account-core"]
    F2891["FE-2891 flag"]
    F2892["FE-2892 web session client"]
    F2894["FE-2894 identity + boot rules"]
    F2897["FE-2897 lifecycle, heartbeat"]
    F2895["FE-2895 authorize()"]
    F2900["FE-2900 lazy token mint"]
    F2901["FE-2901 non-web stay on tokens"]
  end
  subgraph APPS["FE · apps"]
    F2896["FE-2896 website header"]
    F2903["FE-2903 cloud lifecycle"]
    F2899["FE-2899 website credits"]
    F2904["FE-2904 cloud API client"]
    F2905["FE-2905 socket + media"]
    F2898["FE-2898 billing-web joins session"]
    F2902["FE-2902 platform"]
  end
  subgraph QA["QA · rollout · docs"]
    F2906["FE-2906 cross-origin E2E"]
    F2893["FE-2893 ADR + docs"]
    F2907["FE-2907 ramp + rollback"]
    F2908["FE-2908 cleanup"]
  end
  C0 --> C1 --> C3 --> C5
  C3 --> C11 --> F2891
  B135 --> F2891
  C4 --> C5
  C1 --> C2
  C1 --> C9
  C5 --> C6 & C7 & C8
  C3 --> F2892
  C1 --> F2892
  F2891 --> F2894
  C3 --> F2894
  F2892 --> F2894 --> F2896
  F2894 --> F2897 --> F2903
  C1 --> F2897
  F2892 --> F2895
  C5 --> F2895
  F2895 --> F2899 & F2904 & F2900 & F2901 & F2902
  C5 --> F2899 & F2904
  F2903 --> F2904 --> F2905
  C6 --> F2905
  C7 --> F2905
  C8 --> F2900
  F2894 --> F2898
  F2895 --> F2898
  C3 --> F2898
  C5 --> F2898
  F2903 & F2904 & F2905 & F2898 --> F2906
  C3 & C2 --> F2906
  F2906 --> F2907
  C9 & C10 & I2 --> F2907
  F2907 --> F2908
  C10 --> F2908
  classDef thisPr fill:#ffe08a,stroke:#b8860b,stroke-width:4px,color:#000
  class F2893 thisPr
```

- Blocked by: nothing.
- Unblocks: nothing in code; it is the reference the SDK and app slices
(FE-2892 onward) are reviewed against.
zeus-onl pushed a commit to zeus-onl/ComfyUI_frontend that referenced this pull request Sep 25, 2026
…omfy-Org#18708)

## Why

The unified web session (TDD "One Comfy session across comfy.org") ships
dark behind one client flag, `unified_web_session`, so every later slice
(FE-2894 onward) can merge with the flag off and rollback is a flag
flip. This PR adds the flag reader and a request-level proof that
nothing changes while it is off.

## How

- `unified_web_session?: boolean` on `RemoteConfig`,
`ServerFeatureFlag.UNIFIED_WEB_SESSION`, and
`flags.unifiedWebSessionEnabled`, false outside cloud, then session
override (`?ff=`) > dev override (`ff:unified_web_session`) >
`/api/features` > `false`. Unlike `resolveFlag` there is no
`api.getServerFeature` fallback, so `/api/features` (where the backend
serves the AND) is the only server source, and only a literal `true`
counts, so a malformed value such as `"false"` stays off.
- It reads no other flag. The backend serves `unified_web_session` true
only when its own `web_session_enabled` is on for the caller (BE-17135,
cloud#10552); the frontend never combines them.
- Nothing reads the getter yet, so the app is unchanged. It is not added
to `startFeatureFlagTelemetry` either, because that would emit a new
evaluation event while the flag is off; FE-2907 can add it when the ramp
needs the metric.
- Scope note: the ticket also lists `apps/website` and
`apps/billing-web`. Those sites read the flag before they know the user,
which is open question 17 / C11 (not started). Their readers land with
C11 instead of guessing its shape here.

### The flag-off proof (`src/platform/auth/webSessionFlagOff.test.ts`)

Drives the real cloud auth code: real Pinia stores, the real
`Comfy.Cloud.SessionCookie` extension hooked through
`useCurrentUser().onUserResolved` / `onTokenRefreshed`, real
`useSessionCookie`, real `workspaceAuthStore` unified mint and refresh
scheduler, real `api.fetchApi`, and flags loaded through the real
`refreshRemoteConfig` from a stubbed `GET /api/features`. Only the
Firebase identity, telemetry, `reportError` and `distribution/types` are
faked. `fetch` is a recorder.

2x2, `it.for`: `unified_cloud_auth` ∈ {off, on} × `unified_web_session`
∈ {absent from `/api/features`, `false`}. Each row must produce exactly
the pinned request list (method, path, full lowercased header set,
`credentials`; WebSocket opens are recorded by URL) for each phase and
in total:

| Flow | `unified_cloud_auth` off | `unified_cloud_auth` on |
| --- | --- | --- |
| sign-in (`authStore.login()`) | `POST /api/auth/session` (Bearer
Firebase, `credentials: include`), then `POST {comfy-api}/customers`
(Bearer Firebase) | `POST /api/auth/token`, then `POST
/api/auth/session`, then `POST {comfy-api}/customers` |
| token refresh | `POST /api/auth/session` | `POST /api/auth/token`,
then `POST /api/auth/session` |
| API call | `GET /api/queue`, `POST /api/prompt` with Bearer Firebase +
`Comfy-User`, no credentials | same, with Bearer Cloud JWT |
| sign-out | `DELETE /api/auth/session` (`credentials: include`, no
headers), then the socket reconnects at `/ws` with no token | same |
| socket reconnect | `WebSocket /ws?token=<Firebase token>` | `WebSocket
/ws?token=<Cloud JWT>` |
| media URLs | `/api/view?filename=…&type=…&subfolder=` and the preview
with `&res=512`, no `workspace_id` | same |

Every row also asserts: no `X-Comfy-Workspace-ID`, `X-CSRF-Token` or
`X-Comfy-Client` on any request; `credentials: 'include'` only on the
session POST/DELETE; no `GET /api/auth/session`.

The file does not reference the new flag by type, so the identical file
ships in FE-2892 and FE-2901 and passes on plain `main` (verified).
Identical content merges cleanly in any order.

Mutation check: adding `X-Comfy-Client` to `fetchApi` headers → 4/4 rows
red; adding `credentials: 'include'` to `fetchApi` → 4/4 rows red;
adding `workspace_id` to the socket URL → 4/4 red; adding `X-CSRF-Token`
to the sign-out DELETE → 4/4 red; adding `workspace_id` to media URLs →
4/4 red; adding `credentials: 'include'` to customer provisioning → 4/4
red.

Combined check: `origin/main` + all four unified-web-session PRs
(Comfy-Org#18707, Comfy-Org#18708, Comfy-Org#18710, Comfy-Org#18711) merge without conflict. On that tree
the harness passes, `pnpm typecheck` and `pnpm knip` exit 0, and `pnpm
test:unit` gives 23807 passed with 17 failures, all in
`scripts/cicd/check-binary-size` and `reconcile-latest-release`. Those
fail the same way on plain `main` locally (exit 127, a missing local
tool), so they are unrelated. The only non-test runtime diff across the
four PRs is the flag getter and enum in `useFeatureFlags.ts` and one
`RemoteConfig` key; nothing in `src/` or `apps/` reads the getter or
imports `@comfyorg/account-core/webSession`.


## AS IS / TO BE

No UI; the evidence is tests.

- AS IS: no `unified_web_session` flag; cloud auth sends the requests
pinned above.
- TO BE: the flag exists, defaults off, and with it off (absent or
`false`) the cloud app sends exactly the same requests, for
`unified_cloud_auth` on and off.

```
pnpm exec vitest run src/composables/useFeatureFlags.test.ts src/platform/auth/webSessionFlagOff.test.ts
 Test Files  2 passed (2)
      Tests  95 passed (95)
```

Flag reader cases (`useFeatureFlags.test.ts`): off when `/api/features`
lacks it (even if the server-feature channel says `true`), failed to
load, or an override is malformed (`"true"`, `"false"`, `1`); on when
the server sends true on cloud; `ff:` and `?ff=` overrides honoured; off
outside cloud; independent of `unified_cloud_auth` in both directions.

Checks: `pnpm typecheck` exit 0, `pnpm knip` exit 0, eslint/oxlint/oxfmt
clean on changed files, `vitest run src/platform/auth src/composables
src/platform/remoteConfig src/stores/authStore` 2205 passed.

## Links

- TDD: https://app.notion.com/p/3de6d73d365081d7a4c8f808c0a0384b
(sections 15, 18)
- Action items and dependency graph:
https://app.notion.com/p/3e56d73d3650812d962decc97fbd9ea3
- Linear: https://linear.app/comfyorg/issue/FE-2891
- Backend flag: Comfy-Org/cloud#10552 (BE-17135)

## Where this PR sits in the plan

| Ticket | Scope | Blocked by | State |
| --- | --- | --- | --- |
| **FE-2891 (this PR)** | `unified_web_session` client flag, off by
default | BE-17135 to turn on; C11 for website/billing-web readers |
Comfy-Org#18708 |
| FE-2892 | account-core web session client + error codes | C1, C3
(BE-17063 generated types) | Comfy-Org#18710, do not merge |
| FE-2893 | ADR for the shared web session | none | Comfy-Org#18707 |
| FE-2901 | non-web clients stay on tokens (baseline) | FE-2895 for
`authorize()` rows | Comfy-Org#18711 |
| FE-2894 | session-backed identity + boot rules (stacked on Comfy-Org#18710) |
FE-2892, C3 | Comfy-Org#18715, do not merge |
| FE-2895 | `authorize()` for cookie requests (stacked on Comfy-Org#18710) |
FE-2892, C5 | Comfy-Org#18716, do not merge |
| FE-2897 | session lifecycle, heartbeat (stacked on Comfy-Org#18715) | FE-2894,
C1, C3 | Comfy-Org#18719, do not merge |
| FE-2906 | cross-origin E2E harness + §17 test ids | C3/C5/C6/C7 on
staging for the rows | Comfy-Org#18718 (harness only) |
| FE-2896, 2898–2900, 2902–2905, 2907, 2908 | apps, token mint, rollout,
cleanup | C5/C6/C7/C8/C11 contracts | not started |

```mermaid
flowchart LR
  subgraph BE["BE · cloud ingest and infra"]
    C0["BE-17071 C0 preview CORS gate"]
    C1["BE-17061 C1 sessions table + revocable cookie"]
    C3["BE-17063 C3 GET /session, trusted origins, flag"]
    C4["BE-17062 C4 shared workspace resolution"]
    C5["BE-17066 C5 cookie on API: CSRF, Origin, workspace header"]
    C2["BE-17064 C2 revoke-all, purge, caps"]
    C6["BE-17067 C6 WebSocket on session"]
    C7["BE-17068 C7 scoped media"]
    C8["BE-17069 C8 token mint from session"]
    C9["BE-17065 C9 Redis cache + load test"]
    C10["BE-17072 C10 prod config, cleanup"]
    C11["C11 flag before sign-in (OQ17)"]
    B135["BE-17135 serve unified_web_session (server AND)"]
    I2["BE-17070 I2 edge limit, log + DNS audit"]
  end
  subgraph SDK["FE · account-core"]
    F2891["FE-2891 flag"]
    F2892["FE-2892 web session client"]
    F2894["FE-2894 identity + boot rules"]
    F2897["FE-2897 lifecycle, heartbeat"]
    F2895["FE-2895 authorize()"]
    F2900["FE-2900 lazy token mint"]
    F2901["FE-2901 non-web stay on tokens"]
  end
  subgraph APPS["FE · apps"]
    F2896["FE-2896 website header"]
    F2903["FE-2903 cloud lifecycle"]
    F2899["FE-2899 website credits"]
    F2904["FE-2904 cloud API client"]
    F2905["FE-2905 socket + media"]
    F2898["FE-2898 billing-web joins session"]
    F2902["FE-2902 platform"]
  end
  subgraph QA["QA · rollout · docs"]
    F2906["FE-2906 cross-origin E2E"]
    F2893["FE-2893 ADR + docs"]
    F2907["FE-2907 ramp + rollback"]
    F2908["FE-2908 cleanup"]
  end
  C0 --> C1 --> C3 --> C5
  C3 --> C11 --> F2891
  B135 --> F2891
  C4 --> C5
  C1 --> C2
  C1 --> C9
  C5 --> C6 & C7 & C8
  C3 --> F2892
  C1 --> F2892
  F2891 --> F2894
  C3 --> F2894
  F2892 --> F2894 --> F2896
  F2894 --> F2897 --> F2903
  C1 --> F2897
  F2892 --> F2895
  C5 --> F2895
  F2895 --> F2899 & F2904 & F2900 & F2901 & F2902
  C5 --> F2899 & F2904
  F2903 --> F2904 --> F2905
  C6 --> F2905
  C7 --> F2905
  C8 --> F2900
  F2894 --> F2898
  F2895 --> F2898
  C3 --> F2898
  C5 --> F2898
  F2903 & F2904 & F2905 & F2898 --> F2906
  C3 & C2 --> F2906
  F2906 --> F2907
  C9 & C10 & I2 --> F2907
  F2907 --> F2908
  C10 --> F2908
  classDef thisPr fill:#ffe08a,stroke:#b8860b,stroke-width:4px,color:#000
  class F2891 thisPr
```

- Blocked by: BE-17135 to turn it on anywhere (the reader lands first
and stays off); C11 for the website and billing-web readers.
- Unblocks: FE-2894 (session-backed identity and boot rules), FE-2907
(ramp and rollback).
@comfy-pr-bot

Copy link
Copy Markdown
Member

⚠️ Backport to cloud/1.55 failed

Reason: Merge conflicts detected during cherry-pick of 1685d33

The auto-backport could not be completed automatically. Please backport
manually onto branch backport-18719-to-cloud-1.55 (from origin/cloud/1.55) and
open a PR to cloud/1.55.

This may be a stacking conflict rather than a real one. #18982, #18980 are still open against cloud/1.55. If this PR sits on top of any of them, the conflict will disappear once they merge — wait for that, then remove and re-add the needs-backport label to re-run this workflow.

📄 Conflicting files
packages/account-core/src/core/webSessionIdentity.ts
packages/account-core/src/webSessionInertImport.test.ts
🤖 Prompt for AI Agents
Backport PR #18719 (https://github.com/Comfy-Org/ComfyUI_frontend/pull/18719) to cloud/1.55.
Cherry-pick merge commit 1685d3352be73fb15bfac57c3c9858031d2d60f7 onto new branch
backport-18719-to-cloud-1.55 from origin/cloud/1.55.
Resolve conflicts in: packages/account-core/src/core/webSessionIdentity.ts packages/account-core/src/webSessionInertImport.test.ts .

> **This may be a stacking conflict rather than a real one.** #18982, #18980 are still open against `cloud/1.55`. If this PR sits on top of any of them, the conflict will disappear once they merge — wait for that, then remove and re-add the `needs-backport` label to re-run this workflow.

For test snapshots (browser_tests/**/*-snapshots/), accept PR version if
changed in original PR, else keep target. For package.json versions, keep
target branch. For pnpm-lock.yaml, regenerate with pnpm install.
Ask user for non-obvious conflicts.
Create PR titled "[backport cloud/1.55] <original title>" with label "backport".
See .github/workflows/pr-backport.yaml for workflow details.

cc @dante01yoon

pull Bot pushed a commit to Penguinjanator/ComfyUI_frontend that referenced this pull request Sep 26, 2026
…ssion (Comfy-Org#18870)

> **Stacked on Comfy-Org#18716 (FE-2895). Do not merge** until Comfy-Org#18716 merges and
C8 (BE-17069, cloud#10585 + Comfy-Org#10697: `POST /api/auth/token` accepts the
cookie) is on testcloud.

## Why

comfy-api and the other services cannot read the session cookie. A site
that arrived by session has no Firebase login to hand them. TDD §7/§12
has the site mint a short-lived workspace token from the session, lazily
and only when a non-ingest call needs one. This is the token source
`authorize()` (Comfy-Org#18716) takes for its `resource` target.

## How

New entry `@comfyorg/account-core/sessionTokenMint`:
`createSessionTokenMint({ apiBaseUrl, fetchImpl, getSession, now?,
refreshBufferMs? })` returns:
- `mint(workspaceId?)`, which returns a coded result;
- `getWorkspaceToken(workspaceId?)`, which plugs into
`createRequestAuthorizer({ getWorkspaceToken })` and rejects with
`SessionTokenError` on failure.

Details:
- **Request.** `POST /auth/token` with `credentials: 'include'`,
`X-Comfy-Client`, `X-CSRF-Token` and `X-Comfy-Workspace-ID`. The body is
`{}` for the personal workspace or `{ workspace_id }`. No
`Authorization` header is sent. The response is parsed with the
generated `zExchangeTokenResponse`, since C8 leaves the 200 shape
unchanged.
- **Lazy.** Nothing is sent until the first call.
- **Cache.** Tokens are cached per workspace and owned by the current
session user, and reused until 60 s before expiry. Concurrent callers
for one workspace share a single request. A user change or sign-out
drops the cache and anything in flight, and a token that arrives after
the user changed is not cached.
- **Failure codes.** A 401 is the session's code (and clears the cache).
403 `csrf_invalid` is `CSRF_STALE` and 403 `workspace_access_denied` is
`WORKSPACE_ACCESS_DENIED`. Other 403s, 400 and 404 are refused. 5xx and
network errors are transient. A 429 carries `retryAfterMs` and holds
further requests until then.
- **Inert on import.** It is added to the importGuard closure, the
inert-import test, package exports and smokePack. No app wires it yet,
and the flag-off harness is unchanged (4/4).
- **For review:**
- It sends `X-Comfy-Workspace-ID` equal to the body's `workspace_id`. C8
only rejects a header that names a different workspace; if you'd rather
send none, it's a one-line removal.
- It has its own classifier because C8 defines a code-less 401 as a dead
session, where `webSession.ts` refuses it.

## AS IS / TO BE

No UI; the evidence is tests.

- AS IS: a session-only site has no token for comfy-api.
- TO BE: tests cover zero requests before the first call, headers and
credentials, cache hit, re-mint at expiry, single-flight, the cache
dropping on a user change, per-workspace keys, a late token not cached
across users, 401/403/404/429/5xx mapping, and Retry-After.

Eight mutations, each reverted with the full suite rerun, all go red:
cache key, user-change drop, expiry buffer, credentials, single-flight,
Retry-After, stale-owner guard, and 401 cache clear.

Checks: account-core 1139 tests pass; typecheck, lint, knip, fallow and
smoke:pack are clean.

## Links

- TDD: https://app.notion.com/p/3de6d73d365081d7a4c8f808c0a0384b
(sections 7, 9, 12, F6)
- Action items:
https://app.notion.com/p/3e56d73d3650812d962decc97fbd9ea3
- Linear: https://linear.app/comfyorg/issue/FE-2900
- Contract: Comfy-Org/cloud#10585, Comfy-Org/cloud#10697

## Where this PR sits in the plan

| Ticket | Scope | Blocked by | State |
| --- | --- | --- | --- |
| FE-2891 | flag (cloud) + website/billing-web readers | C11 cloud#10689
+ probe switch (readers) | Comfy-Org#18708 merged; readers in progress |
| FE-2892 | web session client (+ revoke-all follow-up) | C2a
cloud#10589 for revoke-all | Comfy-Org#18710 merged; revoke-all Comfy-Org#18869, do not
merge |
| FE-2893 | ADR | none | Comfy-Org#18707 merged |
| FE-2894 | identity + boot rules | BE-17063 on testcloud | Comfy-Org#18715, do
not merge |
| FE-2895 | `authorize()` | C5 cloud#10555 | Comfy-Org#18716, do not merge |
| FE-2897 | lifecycle, heartbeat | FE-2894, C1 | Comfy-Org#18719, do not merge |
| **FE-2900 (this PR)** | lazy token mint from the session | FE-2895, C8
cloud#10585 | Comfy-Org#18870, do not merge |
| FE-2901 | non-web clients stay on tokens | — | Comfy-Org#18711 |
| FE-2903 | cloud app joins the lifecycle | FE-2897 | Comfy-Org#18871, do not
merge |
| FE-2904 | cloud API client on `authorize()` | FE-2903, FE-2895, C5 |
in progress |
| FE-2905 | socket + media carry workspace | FE-2904, C6, C7 | next |
| FE-2896 / 2899 / 2898 | website header, website credits, billing-web |
FE-2891 readers, FE-2894/2895, C5, C11 | next |
| FE-2906 | cross-origin E2E harness | — | Comfy-Org#18718 (harness only) |
| FE-2902 / 2907 / 2908 | platform, rollout, cleanup | other repo / ops
/ after ramp | not started |

```mermaid
flowchart LR
  subgraph BE["BE · cloud ingest and infra"]
    C0["BE-17071 C0 preview CORS gate"]
    C1["BE-17061 C1 sessions table + revocable cookie"]
    C3["BE-17063 C3 GET /session, trusted origins, flag"]
    C4["BE-17062 C4 shared workspace resolution"]
    C5["BE-17066 C5 cookie on API: CSRF, Origin, workspace header"]
    C2["BE-17064 C2 revoke-all, purge, caps"]
    C6["BE-17067 C6 WebSocket on session"]
    C7["BE-17068 C7 scoped media"]
    C8["BE-17069 C8 token mint from session"]
    C9["BE-17065 C9 Redis cache + load test"]
    C10["BE-17072 C10 prod config, cleanup"]
    C11["C11 flag before sign-in (OQ17)"]
    B135["BE-17135 serve unified_web_session (server AND)"]
    I2["BE-17070 I2 edge limit, log + DNS audit"]
  end
  subgraph SDK["FE · account-core"]
    F2891["FE-2891 flag"]
    F2892["FE-2892 web session client"]
    F2894["FE-2894 identity + boot rules"]
    F2897["FE-2897 lifecycle, heartbeat"]
    F2895["FE-2895 authorize()"]
    F2900["FE-2900 lazy token mint"]
    F2901["FE-2901 non-web stay on tokens"]
  end
  subgraph APPS["FE · apps"]
    F2896["FE-2896 website header"]
    F2903["FE-2903 cloud lifecycle"]
    F2899["FE-2899 website credits"]
    F2904["FE-2904 cloud API client"]
    F2905["FE-2905 socket + media"]
    F2898["FE-2898 billing-web joins session"]
    F2902["FE-2902 platform"]
  end
  subgraph QA["QA · rollout · docs"]
    F2906["FE-2906 cross-origin E2E"]
    F2893["FE-2893 ADR + docs"]
    F2907["FE-2907 ramp + rollback"]
    F2908["FE-2908 cleanup"]
  end
  C0 --> C1 --> C3 --> C5
  C3 --> C11 --> F2891
  B135 --> F2891
  C4 --> C5
  C1 --> C2
  C1 --> C9
  C5 --> C6 & C7 & C8
  C3 --> F2892
  C1 --> F2892
  F2891 --> F2894
  C3 --> F2894
  F2892 --> F2894 --> F2896
  F2894 --> F2897 --> F2903
  C1 --> F2897
  F2892 --> F2895
  C5 --> F2895
  F2895 --> F2899 & F2904 & F2900 & F2901 & F2902
  C5 --> F2899 & F2904
  F2903 --> F2904 --> F2905
  C6 --> F2905
  C7 --> F2905
  C8 --> F2900
  F2894 --> F2898
  F2895 --> F2898
  C3 --> F2898
  C5 --> F2898
  F2903 & F2904 & F2905 & F2898 --> F2906
  C3 & C2 --> F2906
  F2906 --> F2907
  C9 & C10 & I2 --> F2907
  F2907 --> F2908
  C10 --> F2908
  classDef thisPr fill:#ffe08a,stroke:#b8860b,stroke-width:4px,color:#000
  class F2900 thisPr
```

- Blocked by: Comfy-Org#18716 (FE-2895) and C8 cloud#10585 on testcloud.
- Unblocks: comfy-api callers on session sites (FE-2904 host wiring,
FE-2898 billing-web).

---------

Co-authored-by: mattmillerai <7741082+mattmillerai@users.noreply.github.com>
@dante01yoon dante01yoon removed needs-backport Fix/change that needs to be cherry-picked to the current feature freeze branch core/1.55 Backport PRs for core 1.55 cloud/1.55 Backport PRs for cloud 1.55 labels Sep 26, 2026
christian-byrne pushed a commit that referenced this pull request Sep 27, 2026
…tity source and boot rules (#19019)

Backport of #18715 to `cloud/1.55` (cherry-pick -x of 1699fa8).

## Why

The unified web session stack is going to 1.55. #18715 adds
`@comfyorg/account-core/webSessionIdentity`
(`packages/account-core/src/core/webSessionIdentity.ts`), the
session-backed identity source and boot rules that #18719 builds on. Its
dependencies (#18710 `webSession`, #18716 `requestAuth`) are already on
`cloud/1.55`.

## Root cause (what conflicted)

`packages/account-core/package.json` (exports), `scripts/smokePack.ts`
and `src/webSessionInertImport.test.ts`: adjacent-line conflicts where
`cloud/1.55` already lists `requestAuth` (from the #18716 backport) at
the same spot #18715 inserts `webSessionIdentity`. `importGuard.test.ts`
applied cleanly.

## How

Kept the release branch's `requestAuth` entries and added only #18715's
own `webSessionIdentity` entries, in main's order (`requestAuth` then
`webSessionIdentity`). No other main-only entries (`sessionTokenMint`
etc.) were pulled in. `webSessionIdentity.ts` and its test apply
verbatim.

Validation: `pnpm typecheck:account-core` exit 0; vitest
`webSessionIdentity`, `webSession`, `importGuard`,
`webSessionInertImport` 75/75 pass; package.json parses.

## AS IS / TO BE

No UI change (inert behind `unified_web_session`).

Co-authored-by: mattmillerai <7741082+mattmillerai@users.noreply.github.com>
christian-byrne pushed a commit that referenced this pull request Sep 27, 2026
…ules (#18715)

> **Do not merge** until BE-17063 (`GET /api/auth/session`, cloud#10549,
merged) is deployed on testcloud (the web session backend is not on
staging yet). #18710 (FE-2892) is merged; this PR now targets `main` and
the diff shows only this ticket.

A site that joins the shared web session has to decide at boot who is
signed in: the session on ingest, a login this browser remembers, or
nobody. TDD §12's boot table defines that, and §8 defines the silent
restore that lets every existing user migrate without signing in again.
This PR is that decision, as a pure state machine in
`@comfyorg/account-core`, inert until a host calls `boot()`.

New entry `@comfyorg/account-core/webSessionIdentity`
(`packages/account-core/src/core/webSessionIdentity.ts`):

- `createWebSessionIdentity({ session, principal, origin, onBootstrap?,
schedule?, retryBaseMs?, retryMaxMs? })` → `{ getState, subscribe, boot,
dispose }`. Constructing it sends nothing and starts nothing.
- `principal`: `{ kind: 'account', rememberedLogin }` or `{ kind:
'api_key' }`. An API-key principal never enters the machine and never
touches `/api/auth/session`.
- `RememberedLogin` is an opaque port (`currentUserId`, `getProof`
returning `string | null`, `signOutLocally`), so the core imports no
provider. `importGuard` now walks the import chain from
`webSessionIdentity.ts`.
- One discriminated state (`idle | api_key | reading | retry_wait |
restoring | signed_in | signed_out`), one pure
`transitionWebSessionIdentity(state, event)` returning `{ state, effects
}`; the shell only runs effects (`read`, `restore`, `schedule_retry`,
`sign_out_locally`, `report`). `session_bootstrap` (outcome, origin)
goes out through `onBootstrap`.

| `GET /session` | Result |
| --- | --- |
| 200 | `signed_in`; if the remembered login is a different user, sign
it out locally |
| 401 `session_revoked` | `signed_out(revoked)`, local sign-out, never a
silent restore |
| 401 `no_session` / `session_expired`, login remembered | silent
restore (`createWebSession` with the remembered proof); success →
`signed_in(restored)`; a completed failure →
`signed_out(restore_failed)` |
| 401 `no_session` / `session_expired`, nothing remembered |
`signed_out` |
| `SESSION_UNAVAILABLE` (network, 429, 5xx) | `retry_wait`, backoff 1s
doubling to 60s, never signs out |

- A restore that fails transiently (network, 5xx, or `getProof`
throwing) is not spent: after backoff it re-reads first, so a POST that
landed but lost its answer yields 200 and no second POST. `getProof`
returning `null` is permanent (`restore_failed`, no local sign-out). A
restore that gets a real answer completes at most once per boot.
- The SDK keeps no record of past sessions; the server's answer decides.
- Not wired into any app yet (FE-2896 website, FE-2903 cloud). The
shared flag-off harness from #18708/#18710 is inherited from the base
and stays green.

No UI; the evidence is tests with injected time and the package fakes,
no sleeps.

- AS IS: no boot logic for the web session.
- TO BE: one test per boot-table row (row 1 split by remembered user
same/different/none; row 3 for both 401 codes), backoff 1000 → 2000 then
sign-in with zero sign-outs, restore lost twice then restored (`GET POST
GET POST GET POST GET`), a landed-but-unanswered POST (`GET POST GET`,
no second POST), `getProof` null / throwing, a pure table of restore
answers, API key → zero requests.

```
pnpm --filter @comfyorg/account-core test   Test Files 62 passed, Tests 1070 passed
pnpm --filter @comfyorg/account-core typecheck / lint   exit 0
pnpm typecheck   exit 0
pnpm knip        exit 0
pnpm fallow audit --base <FE-2892 branch>   No issues in 6 changed files
```

Mutation checks (each reverted): `session_revoked` restores → red;
network error on read signs out → red; transient restore failure signs
out → red; completed restore failure retries → red; thrown proof signs
out → red.

Size: `webSessionIdentity.ts` is 336 lines, mostly the state, event and
effect types; the transition itself is small.

For review: `RememberedLogin.currentUserId()` must return the Comfy user
id, since it is compared with the session's `user.id`. The host adapters
(FE-2896/FE-2903) need to confirm that equals the Firebase uid.

- TDD: https://app.notion.com/p/3de6d73d365081d7a4c8f808c0a0384b
(sections 8, 12, A8)
- Action items and dependency graph:
https://app.notion.com/p/3e56d73d3650812d962decc97fbd9ea3
- Linear: https://linear.app/comfyorg/issue/FE-2894

| Ticket | Scope | Blocked by | State |
| --- | --- | --- | --- |
| FE-2891 | `unified_web_session` client flag, off by default | BE-17135
to turn on; C11 for website/billing-web readers | #18708 |
| FE-2892 | account-core web session client + error codes | C1, C3
(BE-17063 generated types) | #18710, do not merge |
| FE-2893 | ADR for the shared web session | none | #18707 |
| FE-2901 | non-web clients stay on tokens (baseline) | FE-2895 for
`authorize()` rows | #18711 |
| **FE-2894 (this PR)** | session-backed identity + boot rules (stacked
on #18710) | FE-2892, C3 | #18715, do not merge |
| FE-2895 | `authorize()` for cookie requests (stacked on #18710) |
FE-2892, C5 | #18716, do not merge |
| FE-2897 | session lifecycle, heartbeat (stacked on #18715) | FE-2894,
C1, C3 | #18719, do not merge |
| FE-2906 | cross-origin E2E harness + §17 test ids | C3/C5/C6/C7 on
staging for the rows | #18718 (harness only) |
| FE-2896, 2898–2900, 2902–2905, 2907, 2908 | apps, token mint, rollout,
cleanup | C5/C6/C7/C8/C11 contracts | not started |

```mermaid
flowchart LR
  subgraph BE["BE · cloud ingest and infra"]
    C0["BE-17071 C0 preview CORS gate"]
    C1["BE-17061 C1 sessions table + revocable cookie"]
    C3["BE-17063 C3 GET /session, trusted origins, flag"]
    C4["BE-17062 C4 shared workspace resolution"]
    C5["BE-17066 C5 cookie on API: CSRF, Origin, workspace header"]
    C2["BE-17064 C2 revoke-all, purge, caps"]
    C6["BE-17067 C6 WebSocket on session"]
    C7["BE-17068 C7 scoped media"]
    C8["BE-17069 C8 token mint from session"]
    C9["BE-17065 C9 Redis cache + load test"]
    C10["BE-17072 C10 prod config, cleanup"]
    C11["C11 flag before sign-in (OQ17)"]
    B135["BE-17135 serve unified_web_session (server AND)"]
    I2["BE-17070 I2 edge limit, log + DNS audit"]
  end
  subgraph SDK["FE · account-core"]
    F2891["FE-2891 flag"]
    F2892["FE-2892 web session client"]
    F2894["FE-2894 identity + boot rules"]
    F2897["FE-2897 lifecycle, heartbeat"]
    F2895["FE-2895 authorize()"]
    F2900["FE-2900 lazy token mint"]
    F2901["FE-2901 non-web stay on tokens"]
  end
  subgraph APPS["FE · apps"]
    F2896["FE-2896 website header"]
    F2903["FE-2903 cloud lifecycle"]
    F2899["FE-2899 website credits"]
    F2904["FE-2904 cloud API client"]
    F2905["FE-2905 socket + media"]
    F2898["FE-2898 billing-web joins session"]
    F2902["FE-2902 platform"]
  end
  subgraph QA["QA · rollout · docs"]
    F2906["FE-2906 cross-origin E2E"]
    F2893["FE-2893 ADR + docs"]
    F2907["FE-2907 ramp + rollback"]
    F2908["FE-2908 cleanup"]
  end
  C0 --> C1 --> C3 --> C5
  C3 --> C11 --> F2891
  B135 --> F2891
  C4 --> C5
  C1 --> C2
  C1 --> C9
  C5 --> C6 & C7 & C8
  C3 --> F2892
  C1 --> F2892
  F2891 --> F2894
  C3 --> F2894
  F2892 --> F2894 --> F2896
  F2894 --> F2897 --> F2903
  C1 --> F2897
  F2892 --> F2895
  C5 --> F2895
  F2895 --> F2899 & F2904 & F2900 & F2901 & F2902
  C5 --> F2899 & F2904
  F2903 --> F2904 --> F2905
  C6 --> F2905
  C7 --> F2905
  C8 --> F2900
  F2894 --> F2898
  F2895 --> F2898
  C3 --> F2898
  C5 --> F2898
  F2903 & F2904 & F2905 & F2898 --> F2906
  C3 & C2 --> F2906
  F2906 --> F2907
  C9 & C10 & I2 --> F2907
  F2907 --> F2908
  C10 --> F2908
  classDef thisPr fill:#ffe08a,stroke:#b8860b,stroke-width:4px,color:#000
  class F2894 thisPr
```

- Blocked by: #18710 (FE-2892) and BE-17063 (C3). FE-2891 gates it at
the host, not here.
- Unblocks: FE-2896 (website header), FE-2897 (lifecycle, heartbeat),
FE-2898 (billing-web).

---------

Co-authored-by: mattmillerai <7741082+mattmillerai@users.noreply.github.com>
(cherry picked from commit 1699fa8)
christian-byrne pushed a commit that referenced this pull request Sep 27, 2026
…ete on sign-out, heartbeat (#18719)

> **Stacked on #18715 (FE-2894) → #18710 (FE-2892). Do not merge** until
those merge and BE-17061 (C1) and BE-17063 (C3) are on testcloud (the
web session backend is not on staging yet). The base of this PR is the
FE-2894 branch.

## Why

With one shared session, signing in or out on one site has to reach
every open tab on every other site, and a tab must never finish Alice's
action as Bob. TDD §7, §12 and A8 define how: create the session only on
a real sign-in, delete it on sign-out, and run a heartbeat that notices
a remote sign-out or an account change and tells the app to reset.

## How

This extends the FE-2894 state machine rather than adding a second
module, so there is still one state and one pure transition.

- `signedIn(getProof)`: the host calls it only after an interactive
sign-in. A token refresh never creates a session.
- `signOut()`: signs the tab out at once, sends `DELETE
/api/auth/session` (which works on a dead session), and tells sibling
tabs.
- Heartbeat: `GET /session` every 10 minutes while the tab is visible,
and once when it becomes visible. The GET never extends the idle timer.
  - A new CSRF token is adopted silently.
  - `session_revoked` → signed out.
- `no_session`/`session_expired` → restore in place from the remembered
login, without bumping the epoch.
- `SESSION_UNAVAILABLE` and other ambiguous answers keep the user signed
in; the next beat tries again.
- Cross-tab: within one site, only a visible, signed-in tab holds the
lead and beats. Siblings adopt `ok` and `revoked` answers over the
existing broadcast port and validate each message with a schema before
adopting it.
- `CrossTabRefreshPort` gains a message type parameter (`<Message =
AccountCredential>`). The change is type-only, and the cloud app's
existing `createWebCrossTabRefreshPort()` call keeps the same runtime
behaviour.
- `createWebVisibilityPort()` joins `./web`, so the core still touches
no browser global.
- Account change: `onAccountChanged` fires on a remote sign-out, a
different user in any answer, and the host's own sign-out. `getEpoch()`
goes up on each change, and an answer started under an older epoch is
discarded. The host tags requests with the epoch and clears its own
caches, workspace selection and socket (FE-2903). `onSignedOutRemotely`
is the `session_signed_out_remotely` event (revoked only).
- Inert until `boot()`: nothing watches visibility or the channel before
then; the inert-import test now covers `./web`.
- Size: about 358 net non-test lines, over the ~300 guideline. If you
want it smaller, the split is cross-tab adoption + the visibility port +
the generic port type (~70 lines) into a follow-up, or the pure
transition into its own module.

## AS IS / TO BE

No UI; the evidence is tests with injected time, fake visibility and a
fake cross-tab port, no sleeps.

- AS IS: no session lifecycle or heartbeat.
- TO BE: `webSessionIdentity.lifecycle.test.ts` covers:
- a sign-out on another site reaching this tab at its next beat or on
focus;
- a different user in a heartbeat resetting state, with a pending answer
from the old epoch dropped;
  - a hidden tab never beating;
  - followers adopting instead of reading;
  - a token refresh never creating a session;
  - `SESSION_UNAVAILABLE` never signing out.

```
pnpm --filter @comfyorg/account-core test   Tests 1094 passed
pnpm --filter @comfyorg/account-core typecheck / lint   clean
pnpm typecheck   clean
pnpm knip        clean
pnpm fallow audit --base <FE-2894 branch>   No issues in 6 changed files
```

Mutation checks (each reverted):

| Mutation | Result |
| --- | --- |
| hidden tab beats | 2 red |
| followers read too | 1 red |
| heartbeat creates a session | 5 red |
| `SESSION_UNAVAILABLE` signs out | 1 red |
| old-epoch answer applied after an account change | 1 red |

For review:
- The CSRF token travels on the same-origin broadcast channel, the same
trust boundary the port already documents for the workspace token.
- `signOut()` calls `RememberedLogin.signOutLocally` itself, which may
overlap the host's own Firebase sign-out.

## Links

- TDD: https://app.notion.com/p/3de6d73d365081d7a4c8f808c0a0384b
(sections 7, 12, 15 F2, A8)
- Action items and dependency graph:
https://app.notion.com/p/3e56d73d3650812d962decc97fbd9ea3
- Linear: https://linear.app/comfyorg/issue/FE-2897

## Where this PR sits in the plan

| Ticket | Scope | Blocked by | State |
| --- | --- | --- | --- |
| FE-2891 | `unified_web_session` client flag, off by default | BE-17135
to turn on; C11 for website/billing-web readers | #18708 |
| FE-2892 | account-core web session client + error codes | C1, C3
(BE-17063 generated types) | #18710, do not merge |
| FE-2893 | ADR for the shared web session | none | #18707 |
| FE-2901 | non-web clients stay on tokens (baseline) | FE-2895 for
`authorize()` rows | #18711 |
| FE-2894 | session-backed identity + boot rules (stacked on #18710) |
FE-2892, C3 | #18715, do not merge |
| FE-2895 | `authorize()` for cookie requests (stacked on #18710) |
FE-2892, C5 | #18716, do not merge |
| **FE-2897 (this PR)** | session lifecycle, heartbeat (stacked on
#18715) | FE-2894, C1, C3 | #18719, do not merge |
| FE-2906 | cross-origin E2E harness + §17 test ids | C3/C5/C6/C7 on
staging for the rows | #18718 (harness only) |
| FE-2896, 2898–2900, 2902–2905, 2907, 2908 | apps, token mint, rollout,
cleanup | C5/C6/C7/C8/C11 contracts | not started |

```mermaid
flowchart LR
  subgraph BE["BE · cloud ingest and infra"]
    C0["BE-17071 C0 preview CORS gate"]
    C1["BE-17061 C1 sessions table + revocable cookie"]
    C3["BE-17063 C3 GET /session, trusted origins, flag"]
    C4["BE-17062 C4 shared workspace resolution"]
    C5["BE-17066 C5 cookie on API: CSRF, Origin, workspace header"]
    C2["BE-17064 C2 revoke-all, purge, caps"]
    C6["BE-17067 C6 WebSocket on session"]
    C7["BE-17068 C7 scoped media"]
    C8["BE-17069 C8 token mint from session"]
    C9["BE-17065 C9 Redis cache + load test"]
    C10["BE-17072 C10 prod config, cleanup"]
    C11["C11 flag before sign-in (OQ17)"]
    B135["BE-17135 serve unified_web_session (server AND)"]
    I2["BE-17070 I2 edge limit, log + DNS audit"]
  end
  subgraph SDK["FE · account-core"]
    F2891["FE-2891 flag"]
    F2892["FE-2892 web session client"]
    F2894["FE-2894 identity + boot rules"]
    F2897["FE-2897 lifecycle, heartbeat"]
    F2895["FE-2895 authorize()"]
    F2900["FE-2900 lazy token mint"]
    F2901["FE-2901 non-web stay on tokens"]
  end
  subgraph APPS["FE · apps"]
    F2896["FE-2896 website header"]
    F2903["FE-2903 cloud lifecycle"]
    F2899["FE-2899 website credits"]
    F2904["FE-2904 cloud API client"]
    F2905["FE-2905 socket + media"]
    F2898["FE-2898 billing-web joins session"]
    F2902["FE-2902 platform"]
  end
  subgraph QA["QA · rollout · docs"]
    F2906["FE-2906 cross-origin E2E"]
    F2893["FE-2893 ADR + docs"]
    F2907["FE-2907 ramp + rollback"]
    F2908["FE-2908 cleanup"]
  end
  C0 --> C1 --> C3 --> C5
  C3 --> C11 --> F2891
  B135 --> F2891
  C4 --> C5
  C1 --> C2
  C1 --> C9
  C5 --> C6 & C7 & C8
  C3 --> F2892
  C1 --> F2892
  F2891 --> F2894
  C3 --> F2894
  F2892 --> F2894 --> F2896
  F2894 --> F2897 --> F2903
  C1 --> F2897
  F2892 --> F2895
  C5 --> F2895
  F2895 --> F2899 & F2904 & F2900 & F2901 & F2902
  C5 --> F2899 & F2904
  F2903 --> F2904 --> F2905
  C6 --> F2905
  C7 --> F2905
  C8 --> F2900
  F2894 --> F2898
  F2895 --> F2898
  C3 --> F2898
  C5 --> F2898
  F2903 & F2904 & F2905 & F2898 --> F2906
  C3 & C2 --> F2906
  F2906 --> F2907
  C9 & C10 & I2 --> F2907
  F2907 --> F2908
  C10 --> F2908
  classDef thisPr fill:#ffe08a,stroke:#b8860b,stroke-width:4px,color:#000
  class F2897 thisPr
```

- Blocked by: #18715 (FE-2894), #18710 (FE-2892), BE-17061 (C1),
BE-17063 (C3).
- Unblocks: FE-2903 (cloud app joins the lifecycle), and through it
FE-2904, FE-2905 and FE-2906 rows E2E-02/05/07.

---------

Co-authored-by: mattmillerai <7741082+mattmillerai@users.noreply.github.com>
(cherry picked from commit 1685d33)
christian-byrne pushed a commit that referenced this pull request Sep 27, 2026
…ity source and boot rules (#19018)

Backport of #18715 to `core/1.55` (cherry-pick -x of 1699fa8).

## Why

The unified web session stack is going to 1.55. #18715 adds
`@comfyorg/account-core/webSessionIdentity`
(`packages/account-core/src/core/webSessionIdentity.ts`), the
session-backed identity source and boot rules that #18719 builds on. Its
dependencies (#18710 `webSession`, #18716 `requestAuth`) are already on
`core/1.55`.

## Root cause (what conflicted)

`packages/account-core/package.json` (exports), `scripts/smokePack.ts`
and `src/webSessionInertImport.test.ts`: adjacent-line conflicts where
`core/1.55` already lists `requestAuth` (from the #18716 backport) at
the same spot #18715 inserts `webSessionIdentity`. `importGuard.test.ts`
applied cleanly.

## How

Kept the release branch's `requestAuth` entries and added only #18715's
own `webSessionIdentity` entries, in main's order (`requestAuth` then
`webSessionIdentity`). No other main-only entries (`sessionTokenMint`
etc.) were pulled in. `webSessionIdentity.ts` and its test apply
verbatim.

Validation: `pnpm typecheck:account-core` exit 0; vitest
`webSessionIdentity`, `webSession`, `importGuard`,
`webSessionInertImport` 75/75 pass; package.json parses.

## AS IS / TO BE

No UI change (inert behind `unified_web_session`).

Co-authored-by: mattmillerai <7741082+mattmillerai@users.noreply.github.com>
christian-byrne pushed a commit that referenced this pull request Sep 27, 2026
…ete on sign-out, heartbeat (#18719)

> **Stacked on #18715 (FE-2894) → #18710 (FE-2892). Do not merge** until
those merge and BE-17061 (C1) and BE-17063 (C3) are on testcloud (the
web session backend is not on staging yet). The base of this PR is the
FE-2894 branch.

## Why

With one shared session, signing in or out on one site has to reach
every open tab on every other site, and a tab must never finish Alice's
action as Bob. TDD §7, §12 and A8 define how: create the session only on
a real sign-in, delete it on sign-out, and run a heartbeat that notices
a remote sign-out or an account change and tells the app to reset.

## How

This extends the FE-2894 state machine rather than adding a second
module, so there is still one state and one pure transition.

- `signedIn(getProof)`: the host calls it only after an interactive
sign-in. A token refresh never creates a session.
- `signOut()`: signs the tab out at once, sends `DELETE
/api/auth/session` (which works on a dead session), and tells sibling
tabs.
- Heartbeat: `GET /session` every 10 minutes while the tab is visible,
and once when it becomes visible. The GET never extends the idle timer.
  - A new CSRF token is adopted silently.
  - `session_revoked` → signed out.
- `no_session`/`session_expired` → restore in place from the remembered
login, without bumping the epoch.
- `SESSION_UNAVAILABLE` and other ambiguous answers keep the user signed
in; the next beat tries again.
- Cross-tab: within one site, only a visible, signed-in tab holds the
lead and beats. Siblings adopt `ok` and `revoked` answers over the
existing broadcast port and validate each message with a schema before
adopting it.
- `CrossTabRefreshPort` gains a message type parameter (`<Message =
AccountCredential>`). The change is type-only, and the cloud app's
existing `createWebCrossTabRefreshPort()` call keeps the same runtime
behaviour.
- `createWebVisibilityPort()` joins `./web`, so the core still touches
no browser global.
- Account change: `onAccountChanged` fires on a remote sign-out, a
different user in any answer, and the host's own sign-out. `getEpoch()`
goes up on each change, and an answer started under an older epoch is
discarded. The host tags requests with the epoch and clears its own
caches, workspace selection and socket (FE-2903). `onSignedOutRemotely`
is the `session_signed_out_remotely` event (revoked only).
- Inert until `boot()`: nothing watches visibility or the channel before
then; the inert-import test now covers `./web`.
- Size: about 358 net non-test lines, over the ~300 guideline. If you
want it smaller, the split is cross-tab adoption + the visibility port +
the generic port type (~70 lines) into a follow-up, or the pure
transition into its own module.

## AS IS / TO BE

No UI; the evidence is tests with injected time, fake visibility and a
fake cross-tab port, no sleeps.

- AS IS: no session lifecycle or heartbeat.
- TO BE: `webSessionIdentity.lifecycle.test.ts` covers:
- a sign-out on another site reaching this tab at its next beat or on
focus;
- a different user in a heartbeat resetting state, with a pending answer
from the old epoch dropped;
  - a hidden tab never beating;
  - followers adopting instead of reading;
  - a token refresh never creating a session;
  - `SESSION_UNAVAILABLE` never signing out.

```
pnpm --filter @comfyorg/account-core test   Tests 1094 passed
pnpm --filter @comfyorg/account-core typecheck / lint   clean
pnpm typecheck   clean
pnpm knip        clean
pnpm fallow audit --base <FE-2894 branch>   No issues in 6 changed files
```

Mutation checks (each reverted):

| Mutation | Result |
| --- | --- |
| hidden tab beats | 2 red |
| followers read too | 1 red |
| heartbeat creates a session | 5 red |
| `SESSION_UNAVAILABLE` signs out | 1 red |
| old-epoch answer applied after an account change | 1 red |

For review:
- The CSRF token travels on the same-origin broadcast channel, the same
trust boundary the port already documents for the workspace token.
- `signOut()` calls `RememberedLogin.signOutLocally` itself, which may
overlap the host's own Firebase sign-out.

## Links

- TDD: https://app.notion.com/p/3de6d73d365081d7a4c8f808c0a0384b
(sections 7, 12, 15 F2, A8)
- Action items and dependency graph:
https://app.notion.com/p/3e56d73d3650812d962decc97fbd9ea3
- Linear: https://linear.app/comfyorg/issue/FE-2897

## Where this PR sits in the plan

| Ticket | Scope | Blocked by | State |
| --- | --- | --- | --- |
| FE-2891 | `unified_web_session` client flag, off by default | BE-17135
to turn on; C11 for website/billing-web readers | #18708 |
| FE-2892 | account-core web session client + error codes | C1, C3
(BE-17063 generated types) | #18710, do not merge |
| FE-2893 | ADR for the shared web session | none | #18707 |
| FE-2901 | non-web clients stay on tokens (baseline) | FE-2895 for
`authorize()` rows | #18711 |
| FE-2894 | session-backed identity + boot rules (stacked on #18710) |
FE-2892, C3 | #18715, do not merge |
| FE-2895 | `authorize()` for cookie requests (stacked on #18710) |
FE-2892, C5 | #18716, do not merge |
| **FE-2897 (this PR)** | session lifecycle, heartbeat (stacked on
#18715) | FE-2894, C1, C3 | #18719, do not merge |
| FE-2906 | cross-origin E2E harness + §17 test ids | C3/C5/C6/C7 on
staging for the rows | #18718 (harness only) |
| FE-2896, 2898–2900, 2902–2905, 2907, 2908 | apps, token mint, rollout,
cleanup | C5/C6/C7/C8/C11 contracts | not started |

```mermaid
flowchart LR
  subgraph BE["BE · cloud ingest and infra"]
    C0["BE-17071 C0 preview CORS gate"]
    C1["BE-17061 C1 sessions table + revocable cookie"]
    C3["BE-17063 C3 GET /session, trusted origins, flag"]
    C4["BE-17062 C4 shared workspace resolution"]
    C5["BE-17066 C5 cookie on API: CSRF, Origin, workspace header"]
    C2["BE-17064 C2 revoke-all, purge, caps"]
    C6["BE-17067 C6 WebSocket on session"]
    C7["BE-17068 C7 scoped media"]
    C8["BE-17069 C8 token mint from session"]
    C9["BE-17065 C9 Redis cache + load test"]
    C10["BE-17072 C10 prod config, cleanup"]
    C11["C11 flag before sign-in (OQ17)"]
    B135["BE-17135 serve unified_web_session (server AND)"]
    I2["BE-17070 I2 edge limit, log + DNS audit"]
  end
  subgraph SDK["FE · account-core"]
    F2891["FE-2891 flag"]
    F2892["FE-2892 web session client"]
    F2894["FE-2894 identity + boot rules"]
    F2897["FE-2897 lifecycle, heartbeat"]
    F2895["FE-2895 authorize()"]
    F2900["FE-2900 lazy token mint"]
    F2901["FE-2901 non-web stay on tokens"]
  end
  subgraph APPS["FE · apps"]
    F2896["FE-2896 website header"]
    F2903["FE-2903 cloud lifecycle"]
    F2899["FE-2899 website credits"]
    F2904["FE-2904 cloud API client"]
    F2905["FE-2905 socket + media"]
    F2898["FE-2898 billing-web joins session"]
    F2902["FE-2902 platform"]
  end
  subgraph QA["QA · rollout · docs"]
    F2906["FE-2906 cross-origin E2E"]
    F2893["FE-2893 ADR + docs"]
    F2907["FE-2907 ramp + rollback"]
    F2908["FE-2908 cleanup"]
  end
  C0 --> C1 --> C3 --> C5
  C3 --> C11 --> F2891
  B135 --> F2891
  C4 --> C5
  C1 --> C2
  C1 --> C9
  C5 --> C6 & C7 & C8
  C3 --> F2892
  C1 --> F2892
  F2891 --> F2894
  C3 --> F2894
  F2892 --> F2894 --> F2896
  F2894 --> F2897 --> F2903
  C1 --> F2897
  F2892 --> F2895
  C5 --> F2895
  F2895 --> F2899 & F2904 & F2900 & F2901 & F2902
  C5 --> F2899 & F2904
  F2903 --> F2904 --> F2905
  C6 --> F2905
  C7 --> F2905
  C8 --> F2900
  F2894 --> F2898
  F2895 --> F2898
  C3 --> F2898
  C5 --> F2898
  F2903 & F2904 & F2905 & F2898 --> F2906
  C3 & C2 --> F2906
  F2906 --> F2907
  C9 & C10 & I2 --> F2907
  F2907 --> F2908
  C10 --> F2908
  classDef thisPr fill:#ffe08a,stroke:#b8860b,stroke-width:4px,color:#000
  class F2897 thisPr
```

- Blocked by: #18715 (FE-2894), #18710 (FE-2892), BE-17061 (C1),
BE-17063 (C3).
- Unblocks: FE-2903 (cloud app joins the lifecycle), and through it
FE-2904, FE-2905 and FE-2906 rows E2E-02/05/07.

---------

Co-authored-by: mattmillerai <7741082+mattmillerai@users.noreply.github.com>
(cherry picked from commit 1685d33)
christian-byrne pushed a commit that referenced this pull request Sep 27, 2026
…ssion (#18870)

> **Stacked on #18716 (FE-2895). Do not merge** until #18716 merges and
C8 (BE-17069, cloud#10585 + #10697: `POST /api/auth/token` accepts the
cookie) is on testcloud.

## Why

comfy-api and the other services cannot read the session cookie. A site
that arrived by session has no Firebase login to hand them. TDD §7/§12
has the site mint a short-lived workspace token from the session, lazily
and only when a non-ingest call needs one. This is the token source
`authorize()` (#18716) takes for its `resource` target.

## How

New entry `@comfyorg/account-core/sessionTokenMint`:
`createSessionTokenMint({ apiBaseUrl, fetchImpl, getSession, now?,
refreshBufferMs? })` returns:
- `mint(workspaceId?)`, which returns a coded result;
- `getWorkspaceToken(workspaceId?)`, which plugs into
`createRequestAuthorizer({ getWorkspaceToken })` and rejects with
`SessionTokenError` on failure.

Details:
- **Request.** `POST /auth/token` with `credentials: 'include'`,
`X-Comfy-Client`, `X-CSRF-Token` and `X-Comfy-Workspace-ID`. The body is
`{}` for the personal workspace or `{ workspace_id }`. No
`Authorization` header is sent. The response is parsed with the
generated `zExchangeTokenResponse`, since C8 leaves the 200 shape
unchanged.
- **Lazy.** Nothing is sent until the first call.
- **Cache.** Tokens are cached per workspace and owned by the current
session user, and reused until 60 s before expiry. Concurrent callers
for one workspace share a single request. A user change or sign-out
drops the cache and anything in flight, and a token that arrives after
the user changed is not cached.
- **Failure codes.** A 401 is the session's code (and clears the cache).
403 `csrf_invalid` is `CSRF_STALE` and 403 `workspace_access_denied` is
`WORKSPACE_ACCESS_DENIED`. Other 403s, 400 and 404 are refused. 5xx and
network errors are transient. A 429 carries `retryAfterMs` and holds
further requests until then.
- **Inert on import.** It is added to the importGuard closure, the
inert-import test, package exports and smokePack. No app wires it yet,
and the flag-off harness is unchanged (4/4).
- **For review:**
- It sends `X-Comfy-Workspace-ID` equal to the body's `workspace_id`. C8
only rejects a header that names a different workspace; if you'd rather
send none, it's a one-line removal.
- It has its own classifier because C8 defines a code-less 401 as a dead
session, where `webSession.ts` refuses it.

## AS IS / TO BE

No UI; the evidence is tests.

- AS IS: a session-only site has no token for comfy-api.
- TO BE: tests cover zero requests before the first call, headers and
credentials, cache hit, re-mint at expiry, single-flight, the cache
dropping on a user change, per-workspace keys, a late token not cached
across users, 401/403/404/429/5xx mapping, and Retry-After.

Eight mutations, each reverted with the full suite rerun, all go red:
cache key, user-change drop, expiry buffer, credentials, single-flight,
Retry-After, stale-owner guard, and 401 cache clear.

Checks: account-core 1139 tests pass; typecheck, lint, knip, fallow and
smoke:pack are clean.

## Links

- TDD: https://app.notion.com/p/3de6d73d365081d7a4c8f808c0a0384b
(sections 7, 9, 12, F6)
- Action items:
https://app.notion.com/p/3e56d73d3650812d962decc97fbd9ea3
- Linear: https://linear.app/comfyorg/issue/FE-2900
- Contract: Comfy-Org/cloud#10585, Comfy-Org/cloud#10697

## Where this PR sits in the plan

| Ticket | Scope | Blocked by | State |
| --- | --- | --- | --- |
| FE-2891 | flag (cloud) + website/billing-web readers | C11 cloud#10689
+ probe switch (readers) | #18708 merged; readers in progress |
| FE-2892 | web session client (+ revoke-all follow-up) | C2a
cloud#10589 for revoke-all | #18710 merged; revoke-all #18869, do not
merge |
| FE-2893 | ADR | none | #18707 merged |
| FE-2894 | identity + boot rules | BE-17063 on testcloud | #18715, do
not merge |
| FE-2895 | `authorize()` | C5 cloud#10555 | #18716, do not merge |
| FE-2897 | lifecycle, heartbeat | FE-2894, C1 | #18719, do not merge |
| **FE-2900 (this PR)** | lazy token mint from the session | FE-2895, C8
cloud#10585 | #18870, do not merge |
| FE-2901 | non-web clients stay on tokens | — | #18711 |
| FE-2903 | cloud app joins the lifecycle | FE-2897 | #18871, do not
merge |
| FE-2904 | cloud API client on `authorize()` | FE-2903, FE-2895, C5 |
in progress |
| FE-2905 | socket + media carry workspace | FE-2904, C6, C7 | next |
| FE-2896 / 2899 / 2898 | website header, website credits, billing-web |
FE-2891 readers, FE-2894/2895, C5, C11 | next |
| FE-2906 | cross-origin E2E harness | — | #18718 (harness only) |
| FE-2902 / 2907 / 2908 | platform, rollout, cleanup | other repo / ops
/ after ramp | not started |

```mermaid
flowchart LR
  subgraph BE["BE · cloud ingest and infra"]
    C0["BE-17071 C0 preview CORS gate"]
    C1["BE-17061 C1 sessions table + revocable cookie"]
    C3["BE-17063 C3 GET /session, trusted origins, flag"]
    C4["BE-17062 C4 shared workspace resolution"]
    C5["BE-17066 C5 cookie on API: CSRF, Origin, workspace header"]
    C2["BE-17064 C2 revoke-all, purge, caps"]
    C6["BE-17067 C6 WebSocket on session"]
    C7["BE-17068 C7 scoped media"]
    C8["BE-17069 C8 token mint from session"]
    C9["BE-17065 C9 Redis cache + load test"]
    C10["BE-17072 C10 prod config, cleanup"]
    C11["C11 flag before sign-in (OQ17)"]
    B135["BE-17135 serve unified_web_session (server AND)"]
    I2["BE-17070 I2 edge limit, log + DNS audit"]
  end
  subgraph SDK["FE · account-core"]
    F2891["FE-2891 flag"]
    F2892["FE-2892 web session client"]
    F2894["FE-2894 identity + boot rules"]
    F2897["FE-2897 lifecycle, heartbeat"]
    F2895["FE-2895 authorize()"]
    F2900["FE-2900 lazy token mint"]
    F2901["FE-2901 non-web stay on tokens"]
  end
  subgraph APPS["FE · apps"]
    F2896["FE-2896 website header"]
    F2903["FE-2903 cloud lifecycle"]
    F2899["FE-2899 website credits"]
    F2904["FE-2904 cloud API client"]
    F2905["FE-2905 socket + media"]
    F2898["FE-2898 billing-web joins session"]
    F2902["FE-2902 platform"]
  end
  subgraph QA["QA · rollout · docs"]
    F2906["FE-2906 cross-origin E2E"]
    F2893["FE-2893 ADR + docs"]
    F2907["FE-2907 ramp + rollback"]
    F2908["FE-2908 cleanup"]
  end
  C0 --> C1 --> C3 --> C5
  C3 --> C11 --> F2891
  B135 --> F2891
  C4 --> C5
  C1 --> C2
  C1 --> C9
  C5 --> C6 & C7 & C8
  C3 --> F2892
  C1 --> F2892
  F2891 --> F2894
  C3 --> F2894
  F2892 --> F2894 --> F2896
  F2894 --> F2897 --> F2903
  C1 --> F2897
  F2892 --> F2895
  C5 --> F2895
  F2895 --> F2899 & F2904 & F2900 & F2901 & F2902
  C5 --> F2899 & F2904
  F2903 --> F2904 --> F2905
  C6 --> F2905
  C7 --> F2905
  C8 --> F2900
  F2894 --> F2898
  F2895 --> F2898
  C3 --> F2898
  C5 --> F2898
  F2903 & F2904 & F2905 & F2898 --> F2906
  C3 & C2 --> F2906
  F2906 --> F2907
  C9 & C10 & I2 --> F2907
  F2907 --> F2908
  C10 --> F2908
  classDef thisPr fill:#ffe08a,stroke:#b8860b,stroke-width:4px,color:#000
  class F2900 thisPr
```

- Blocked by: #18716 (FE-2895) and C8 cloud#10585 on testcloud.
- Unblocks: comfy-api callers on session sites (FE-2904 host wiring,
FE-2898 billing-web).

---------

Co-authored-by: mattmillerai <7741082+mattmillerai@users.noreply.github.com>
(cherry picked from commit 70ce571)
christian-byrne pushed a commit that referenced this pull request Sep 27, 2026
…ete on sign-out, heartbeat (#18719)

> **Stacked on #18715 (FE-2894) → #18710 (FE-2892). Do not merge** until
those merge and BE-17061 (C1) and BE-17063 (C3) are on testcloud (the
web session backend is not on staging yet). The base of this PR is the
FE-2894 branch.

## Why

With one shared session, signing in or out on one site has to reach
every open tab on every other site, and a tab must never finish Alice's
action as Bob. TDD §7, §12 and A8 define how: create the session only on
a real sign-in, delete it on sign-out, and run a heartbeat that notices
a remote sign-out or an account change and tells the app to reset.

## How

This extends the FE-2894 state machine rather than adding a second
module, so there is still one state and one pure transition.

- `signedIn(getProof)`: the host calls it only after an interactive
sign-in. A token refresh never creates a session.
- `signOut()`: signs the tab out at once, sends `DELETE
/api/auth/session` (which works on a dead session), and tells sibling
tabs.
- Heartbeat: `GET /session` every 10 minutes while the tab is visible,
and once when it becomes visible. The GET never extends the idle timer.
  - A new CSRF token is adopted silently.
  - `session_revoked` → signed out.
- `no_session`/`session_expired` → restore in place from the remembered
login, without bumping the epoch.
- `SESSION_UNAVAILABLE` and other ambiguous answers keep the user signed
in; the next beat tries again.
- Cross-tab: within one site, only a visible, signed-in tab holds the
lead and beats. Siblings adopt `ok` and `revoked` answers over the
existing broadcast port and validate each message with a schema before
adopting it.
- `CrossTabRefreshPort` gains a message type parameter (`<Message =
AccountCredential>`). The change is type-only, and the cloud app's
existing `createWebCrossTabRefreshPort()` call keeps the same runtime
behaviour.
- `createWebVisibilityPort()` joins `./web`, so the core still touches
no browser global.
- Account change: `onAccountChanged` fires on a remote sign-out, a
different user in any answer, and the host's own sign-out. `getEpoch()`
goes up on each change, and an answer started under an older epoch is
discarded. The host tags requests with the epoch and clears its own
caches, workspace selection and socket (FE-2903). `onSignedOutRemotely`
is the `session_signed_out_remotely` event (revoked only).
- Inert until `boot()`: nothing watches visibility or the channel before
then; the inert-import test now covers `./web`.
- Size: about 358 net non-test lines, over the ~300 guideline. If you
want it smaller, the split is cross-tab adoption + the visibility port +
the generic port type (~70 lines) into a follow-up, or the pure
transition into its own module.

## AS IS / TO BE

No UI; the evidence is tests with injected time, fake visibility and a
fake cross-tab port, no sleeps.

- AS IS: no session lifecycle or heartbeat.
- TO BE: `webSessionIdentity.lifecycle.test.ts` covers:
- a sign-out on another site reaching this tab at its next beat or on
focus;
- a different user in a heartbeat resetting state, with a pending answer
from the old epoch dropped;
  - a hidden tab never beating;
  - followers adopting instead of reading;
  - a token refresh never creating a session;
  - `SESSION_UNAVAILABLE` never signing out.

```
pnpm --filter @comfyorg/account-core test   Tests 1094 passed
pnpm --filter @comfyorg/account-core typecheck / lint   clean
pnpm typecheck   clean
pnpm knip        clean
pnpm fallow audit --base <FE-2894 branch>   No issues in 6 changed files
```

Mutation checks (each reverted):

| Mutation | Result |
| --- | --- |
| hidden tab beats | 2 red |
| followers read too | 1 red |
| heartbeat creates a session | 5 red |
| `SESSION_UNAVAILABLE` signs out | 1 red |
| old-epoch answer applied after an account change | 1 red |

For review:
- The CSRF token travels on the same-origin broadcast channel, the same
trust boundary the port already documents for the workspace token.
- `signOut()` calls `RememberedLogin.signOutLocally` itself, which may
overlap the host's own Firebase sign-out.

## Links

- TDD: https://app.notion.com/p/3de6d73d365081d7a4c8f808c0a0384b
(sections 7, 12, 15 F2, A8)
- Action items and dependency graph:
https://app.notion.com/p/3e56d73d3650812d962decc97fbd9ea3
- Linear: https://linear.app/comfyorg/issue/FE-2897

## Where this PR sits in the plan

| Ticket | Scope | Blocked by | State |
| --- | --- | --- | --- |
| FE-2891 | `unified_web_session` client flag, off by default | BE-17135
to turn on; C11 for website/billing-web readers | #18708 |
| FE-2892 | account-core web session client + error codes | C1, C3
(BE-17063 generated types) | #18710, do not merge |
| FE-2893 | ADR for the shared web session | none | #18707 |
| FE-2901 | non-web clients stay on tokens (baseline) | FE-2895 for
`authorize()` rows | #18711 |
| FE-2894 | session-backed identity + boot rules (stacked on #18710) |
FE-2892, C3 | #18715, do not merge |
| FE-2895 | `authorize()` for cookie requests (stacked on #18710) |
FE-2892, C5 | #18716, do not merge |
| **FE-2897 (this PR)** | session lifecycle, heartbeat (stacked on
#18715) | FE-2894, C1, C3 | #18719, do not merge |
| FE-2906 | cross-origin E2E harness + §17 test ids | C3/C5/C6/C7 on
staging for the rows | #18718 (harness only) |
| FE-2896, 2898–2900, 2902–2905, 2907, 2908 | apps, token mint, rollout,
cleanup | C5/C6/C7/C8/C11 contracts | not started |

```mermaid
flowchart LR
  subgraph BE["BE · cloud ingest and infra"]
    C0["BE-17071 C0 preview CORS gate"]
    C1["BE-17061 C1 sessions table + revocable cookie"]
    C3["BE-17063 C3 GET /session, trusted origins, flag"]
    C4["BE-17062 C4 shared workspace resolution"]
    C5["BE-17066 C5 cookie on API: CSRF, Origin, workspace header"]
    C2["BE-17064 C2 revoke-all, purge, caps"]
    C6["BE-17067 C6 WebSocket on session"]
    C7["BE-17068 C7 scoped media"]
    C8["BE-17069 C8 token mint from session"]
    C9["BE-17065 C9 Redis cache + load test"]
    C10["BE-17072 C10 prod config, cleanup"]
    C11["C11 flag before sign-in (OQ17)"]
    B135["BE-17135 serve unified_web_session (server AND)"]
    I2["BE-17070 I2 edge limit, log + DNS audit"]
  end
  subgraph SDK["FE · account-core"]
    F2891["FE-2891 flag"]
    F2892["FE-2892 web session client"]
    F2894["FE-2894 identity + boot rules"]
    F2897["FE-2897 lifecycle, heartbeat"]
    F2895["FE-2895 authorize()"]
    F2900["FE-2900 lazy token mint"]
    F2901["FE-2901 non-web stay on tokens"]
  end
  subgraph APPS["FE · apps"]
    F2896["FE-2896 website header"]
    F2903["FE-2903 cloud lifecycle"]
    F2899["FE-2899 website credits"]
    F2904["FE-2904 cloud API client"]
    F2905["FE-2905 socket + media"]
    F2898["FE-2898 billing-web joins session"]
    F2902["FE-2902 platform"]
  end
  subgraph QA["QA · rollout · docs"]
    F2906["FE-2906 cross-origin E2E"]
    F2893["FE-2893 ADR + docs"]
    F2907["FE-2907 ramp + rollback"]
    F2908["FE-2908 cleanup"]
  end
  C0 --> C1 --> C3 --> C5
  C3 --> C11 --> F2891
  B135 --> F2891
  C4 --> C5
  C1 --> C2
  C1 --> C9
  C5 --> C6 & C7 & C8
  C3 --> F2892
  C1 --> F2892
  F2891 --> F2894
  C3 --> F2894
  F2892 --> F2894 --> F2896
  F2894 --> F2897 --> F2903
  C1 --> F2897
  F2892 --> F2895
  C5 --> F2895
  F2895 --> F2899 & F2904 & F2900 & F2901 & F2902
  C5 --> F2899 & F2904
  F2903 --> F2904 --> F2905
  C6 --> F2905
  C7 --> F2905
  C8 --> F2900
  F2894 --> F2898
  F2895 --> F2898
  C3 --> F2898
  C5 --> F2898
  F2903 & F2904 & F2905 & F2898 --> F2906
  C3 & C2 --> F2906
  F2906 --> F2907
  C9 & C10 & I2 --> F2907
  F2907 --> F2908
  C10 --> F2908
  classDef thisPr fill:#ffe08a,stroke:#b8860b,stroke-width:4px,color:#000
  class F2897 thisPr
```

- Blocked by: #18715 (FE-2894), #18710 (FE-2892), BE-17061 (C1),
BE-17063 (C3).
- Unblocks: FE-2903 (cloud app joins the lifecycle), and through it
FE-2904, FE-2905 and FE-2906 rows E2E-02/05/07.

---------

Co-authored-by: mattmillerai <7741082+mattmillerai@users.noreply.github.com>
(cherry picked from commit 1685d33)
christian-byrne pushed a commit that referenced this pull request Sep 27, 2026
…reate on sign-in, delete on sign-out, heartbeat (#19020)

Backport of #18719 to `core/1.55` (cherry-pick -x of 1685d33).

Merge #19018 first. This branch is stacked on it, so until #19018 merges
the diff also shows its #18715 commit.

## Why

The unified web session stack is going to 1.55. #18719 adds the session
lifecycle to `webSessionIdentity` (create on sign-in, delete on
sign-out, heartbeat) and generalises `CrossTabRefreshPort` so the web
cross-tab port can carry it. It builds on #18715 (backported in #19018).

## Root cause (what conflicted)

Nothing. On top of the #18715 backport the cherry-pick applied cleanly;
every touched file (`sessionContracts.ts`, `webSessionIdentity.ts`,
`web/crossTabRefresh.ts`, their tests, `webSessionInertImport.test.ts`)
matches main's pre-#18719 state for these lines. The
`@comfyorg/account-core/web` entry it adds to the inert-import test is
already exported on `core/1.55`.

## How

Kept everything from #18719 verbatim; dropped nothing. No files from
other PRs.

Validation: `pnpm typecheck:account-core` exit 0; vitest
`webSessionIdentity`, `webSessionIdentity.lifecycle`, `webSession`,
`importGuard`, `webSessionInertImport`, `web/crossTabRefresh`,
`session`, `requestAuth` 214/214 pass; package.json parses.

## AS IS / TO BE

No UI change (inert behind `unified_web_session`).

Co-authored-by: mattmillerai <7741082+mattmillerai@users.noreply.github.com>
christian-byrne pushed a commit that referenced this pull request Sep 27, 2026
…create on sign-in, delete on sign-out, heartbeat (#19021)

Backport of #18719 to `cloud/1.55` (cherry-pick -x of 1685d33).

Merge #19019 first. This branch is stacked on it, so until #19019 merges
the diff also shows its #18715 commit.

## Why

The unified web session stack is going to 1.55. #18719 adds the session
lifecycle to `webSessionIdentity` (create on sign-in, delete on
sign-out, heartbeat) and generalises `CrossTabRefreshPort` so the web
cross-tab port can carry it. It builds on #18715 (backported in #19019).

## Root cause (what conflicted)

Nothing. On top of the #18715 backport the cherry-pick applied cleanly;
every touched file (`sessionContracts.ts`, `webSessionIdentity.ts`,
`web/crossTabRefresh.ts`, their tests, `webSessionInertImport.test.ts`)
matches main's pre-#18719 state for these lines. The
`@comfyorg/account-core/web` entry it adds to the inert-import test is
already exported on `cloud/1.55`.

## How

Kept everything from #18719 verbatim; dropped nothing. No files from
other PRs.

Validation: `pnpm typecheck:account-core` exit 0; vitest
`webSessionIdentity`, `webSessionIdentity.lifecycle`, `webSession`,
`importGuard`, `webSessionInertImport`, `web/crossTabRefresh`,
`session`, `requestAuth` 214/214 pass; package.json parses.

## AS IS / TO BE

No UI change (inert behind `unified_web_session`).

Co-authored-by: mattmillerai <7741082+mattmillerai@users.noreply.github.com>
laurigates pushed a commit to laurigates/ComfyUI_frontend that referenced this pull request Sep 28, 2026
…ds (Comfy-Org#18718)

## Why

The unified web session only proves itself across real origins: a cookie
on the Cloud host, read by pages on other `comfy.org` names, refused for
untrusted origins. TDD §17 lists the end-to-end rows and failure
sequences that gate turning the flag on (rollout step 5). The web
session backend is not on staging yet, so the suite targets the test
environment (`testcloud.comfy.org`, `testbilling.comfy.org`); it moves
to staging by changing env vars once the backend is there. The
behaviours need backend C3/C5/C6/C7 on testcloud and FE-2894..FE-2905,
but the harness and the test-id map can land now so each slice fills in
its rows instead of building infrastructure late.

## How

- `playwright.session.config.ts`: a separate config with projects
`session-flag-off` and `session-flag-on` (selected by `@flag-off` /
`@flag-on`), one worker, no global setup. Not part of the default run:
`playwright.config.ts` only gains `'**/crossOriginSession/**'` in
`testIgnore`; the default `--list` is identical before and after (2641
tests in 472 files).
- Mapping the website to a `comfy.org` name: the fixture serves the
locally running website under a real name (default
`https://www.comfy.org`) by intercepting that host in the browser and
fetching from the local server. Page URL, `Origin`, secure context and
same-site checks all use the real name, which the `__Host-` cookie
needs; `--host-resolver-rules` would need a trusted local TLS server on
443. This proves Origin and trusted-origin behaviour, not TLS, DNS or
hosting (TDD §17).
- Fixtures: `cloudTab`, `websiteTab`, `billingTab`, `platformTab` in one
browser context (shared cookie jar). Each records Firebase Auth calls
(`identitytoolkit`/`securetoken`) and `/api/auth/session` calls, and has
`waitForSocket` / `waitForClose`. Also `sessionAccount`,
`teamWorkspaceId`, `signInOnCloud`, `openPreviewPage` (a
`pr-1.testenvs.comfy.org` page) and `credentialedFetch`.
- Safety, fail-closed: production hosts (cloud, api, billing, platform)
are refused even if configured and fail the test; any other `comfy.org`
origin that is not configured (the `SESSION_E2E_*` URLs or
`SESSION_E2E_EXTRA_ORIGINS`) is blocked, as are unlisted third-party
requests, and all blocked egress is attached as `blocked-egress.json`; a
test whose env vars are missing skips and names them. No credentials in
the repo; they come from env (`SESSION_E2E_*`), see the README.
- The flag is set both ways the app reads it: `ff:unified_web_session`
in localStorage and `?ff=unified_web_session:<bool>` on the Cloud tab.
- Test ids: every §17 row and FE-observable failure sequence, plus M2
SS1–SS6 / SO1–SO6, is a definition-level `test.fixme('[E2E-01] …',
blockedBy('<ticket / slice>'), expectStepsWritten)`: it keeps a stable
id and its blocker as a `blocked-by` annotation, skips before any
fixture runs, and has no guessed steps. `expectStepsWritten` throws, so
a row flipped to `test` before its steps are written fails instead of
passing empty. Steps are written when each blocker lands. `HARNESS-01`
is the one runnable smoke (flag off): the website loads under the mapped
name, calls testcloud with the right `Origin`, and the Firebase recorder
sees the sign-in.
- Carries the shared flag-off request test
(`src/platform/auth/webSessionFlagOff.test.ts`), byte-identical to
Comfy-Org#18708 / Comfy-Org#18710 / Comfy-Org#18711.

| ID | Row | Blocked by |
| --- | --- | --- |
| HARNESS-01 | runnable smoke, flag off | testcloud credentials |
| E2E-01 | sign in on Cloud → website signed in, zero Firebase calls |
FE-2896, FE-2894; C3, C11 |
| E2E-02 | the reverse | FE-2897, FE-2903; C1, C3 |
| E2E-03 | two tabs, two workspaces | FE-2904; C5 |
| E2E-04 | team-workspace media | FE-2905; C7 |
| E2E-05 | sign out on one site, other signs out, socket closes |
FE-2897, FE-2903, FE-2905; C6 |
| E2E-06 | removed from workspace → next request refused | FE-2904; C5 |
| E2E-07 | sign out of all devices | FE-2897; C2 |
| E2E-08 | flag off behaves as today | FE-2891, FE-2894, FE-2903 |
| E2E-09 | signed-in user crosses each rollout step | FE-2903, FE-2907;
C1, C3 |
| FS-01, 02, 06–15, 18, 19 | failure sequences a browser can observe |
see each test's fixme reason |
| SS1–SS6, SO1–SO6 | M2 billing-web rows | FE-2898 (+
FE-2903/2897/2895/2894); C1/C3/C5/C11 |

Not mapped on purpose: FS-03, FS-04, FS-05, FS-16, FS-17 (backend races
and load a browser cannot observe).

## AS IS / TO BE

No UI change; the evidence is the test list and checks.

- AS IS: no harness for cross-origin session tests.
- TO BE: `pnpm exec playwright test --config
playwright.session.config.ts --list` → `Total: 36 tests in 4 files`;
with no env every test skips cleanly. Default config unchanged (`Total:
2641 tests in 472 files` before and after, identical sorted list).

Checked by hand with a temporary spec (deleted): the local website
served as `https://www.comfy.org` in a secure context, a call to Cloud
carried `Origin: https://www.comfy.org` (that manual check ran against
stagingcloud before the switch to testcloud), the Firebase recorder
caught a `securetoken` call, and a request to `cloud.comfy.org` failed
the test with "A session E2E run reached production". The HARNESS-01
smoke itself has not run end to end; it needs a testcloud account.

Checks: `pnpm typecheck:browser` pass, eslint/oxlint/oxfmt clean on
changed files, `pnpm knip` clean, `crossOriginSessionConfig.test.ts`
11/11, flag-off request test 4/4.

## Needs a human

- A dedicated testcloud account: verified `@comfy.org` (so `?ff=` works
on deployed builds), in the test environment's `web_session_enabled`
set, owning a team workspace. A second account for FS-10, FS-13 and SS3.
- Which `comfy.org` name for the website is on the test environment's
trusted-origin list (README defaults to `https://www.comfy.org`).
- Whether Cloudflare Access or Turnstile in front of testcloud needs an
origin in `SESSION_E2E_EXTRA_ORIGINS` or an Access token.
- The test platform URL is unknown.

## Links

- TDD: https://app.notion.com/p/3de6d73d365081d7a4c8f808c0a0384b
(sections 17, 18)
- Action items and dependency graph:
https://app.notion.com/p/3e56d73d3650812d962decc97fbd9ea3
- M2 QA test plan:
https://app.notion.com/p/3e26d73d3650815fb78ec0d273278d3b
- Linear: https://linear.app/comfyorg/issue/FE-2906

## Where this PR sits in the plan

| Ticket | Scope | Blocked by | State |
| --- | --- | --- | --- |
| FE-2891 | `unified_web_session` client flag, off by default | BE-17135
to turn on; C11 for website/billing-web readers | Comfy-Org#18708 |
| FE-2892 | account-core web session client + error codes | C1, C3
(BE-17063 generated types) | Comfy-Org#18710, do not merge |
| FE-2893 | ADR for the shared web session | none | Comfy-Org#18707 |
| FE-2901 | non-web clients stay on tokens (baseline) | FE-2895 for
`authorize()` rows | Comfy-Org#18711 |
| FE-2894 | session-backed identity + boot rules (stacked on Comfy-Org#18710) |
FE-2892, C3 | Comfy-Org#18715, do not merge |
| FE-2895 | `authorize()` for cookie requests (stacked on Comfy-Org#18710) |
FE-2892, C5 | Comfy-Org#18716, do not merge |
| FE-2897 | session lifecycle, heartbeat (stacked on Comfy-Org#18715) | FE-2894,
C1, C3 | Comfy-Org#18719, do not merge |
| **FE-2906 (this PR)** | cross-origin E2E harness + §17 test ids |
C3/C5/C6/C7 on testcloud for the rows | Comfy-Org#18718 (harness only) |
| FE-2896, 2898–2900, 2902–2905, 2907, 2908 | apps, token mint, rollout,
cleanup | C5/C6/C7/C8/C11 contracts | not started |

```mermaid
flowchart LR
  subgraph BE["BE · cloud ingest and infra"]
    C0["BE-17071 C0 preview CORS gate"]
    C1["BE-17061 C1 sessions table + revocable cookie"]
    C3["BE-17063 C3 GET /session, trusted origins, flag"]
    C4["BE-17062 C4 shared workspace resolution"]
    C5["BE-17066 C5 cookie on API: CSRF, Origin, workspace header"]
    C2["BE-17064 C2 revoke-all, purge, caps"]
    C6["BE-17067 C6 WebSocket on session"]
    C7["BE-17068 C7 scoped media"]
    C8["BE-17069 C8 token mint from session"]
    C9["BE-17065 C9 Redis cache + load test"]
    C10["BE-17072 C10 prod config, cleanup"]
    C11["C11 flag before sign-in (OQ17)"]
    B135["BE-17135 serve unified_web_session (server AND)"]
    I2["BE-17070 I2 edge limit, log + DNS audit"]
  end
  subgraph SDK["FE · account-core"]
    F2891["FE-2891 flag"]
    F2892["FE-2892 web session client"]
    F2894["FE-2894 identity + boot rules"]
    F2897["FE-2897 lifecycle, heartbeat"]
    F2895["FE-2895 authorize()"]
    F2900["FE-2900 lazy token mint"]
    F2901["FE-2901 non-web stay on tokens"]
  end
  subgraph APPS["FE · apps"]
    F2896["FE-2896 website header"]
    F2903["FE-2903 cloud lifecycle"]
    F2899["FE-2899 website credits"]
    F2904["FE-2904 cloud API client"]
    F2905["FE-2905 socket + media"]
    F2898["FE-2898 billing-web joins session"]
    F2902["FE-2902 platform"]
  end
  subgraph QA["QA · rollout · docs"]
    F2906["FE-2906 cross-origin E2E"]
    F2893["FE-2893 ADR + docs"]
    F2907["FE-2907 ramp + rollback"]
    F2908["FE-2908 cleanup"]
  end
  C0 --> C1 --> C3 --> C5
  C3 --> C11 --> F2891
  B135 --> F2891
  C4 --> C5
  C1 --> C2
  C1 --> C9
  C5 --> C6 & C7 & C8
  C3 --> F2892
  C1 --> F2892
  F2891 --> F2894
  C3 --> F2894
  F2892 --> F2894 --> F2896
  F2894 --> F2897 --> F2903
  C1 --> F2897
  F2892 --> F2895
  C5 --> F2895
  F2895 --> F2899 & F2904 & F2900 & F2901 & F2902
  C5 --> F2899 & F2904
  F2903 --> F2904 --> F2905
  C6 --> F2905
  C7 --> F2905
  C8 --> F2900
  F2894 --> F2898
  F2895 --> F2898
  C3 --> F2898
  C5 --> F2898
  F2903 & F2904 & F2905 & F2898 --> F2906
  C3 & C2 --> F2906
  F2906 --> F2907
  C9 & C10 & I2 --> F2907
  F2907 --> F2908
  C10 --> F2908
  classDef thisPr fill:#ffe08a,stroke:#b8860b,stroke-width:4px,color:#000
  class F2906 thisPr
```

- Blocked by: nothing for the harness. The rows need C3/C5/C6/C7 on
testcloud and FE-2894..FE-2905.
- Unblocks: FE-2907 (turning the flag on needs the §17 rows green).
zeus-onl pushed a commit to zeus-onl/ComfyUI_frontend that referenced this pull request Sep 28, 2026
…omfy-Org#19002)

## Why

The web session PRs merged with four non-blocking review notes from
Christian, and CodeRabbit found one real defect after Comfy-Org#18719 merged. All
of this code is on main now, so the fixes land together here.

## Root cause (the defect)

`signedIn()` awaited `createWebSession` (a POST, then a GET) and then
always dispatched `session_created` and published `sign_in`. It never
checked whether `signOut()` had run in the meantime.
- The cloud store starts the interactive session without awaiting it, so
a user who logs out quickly hits exactly this window.
- The tab went back to `signed_in`, and every signed-out sibling tab
adopted the published `sign_in`.
- If the POST reached the server after the DELETE, a live session cookie
also stayed behind.

The epoch alone can't catch this: a sign-out from a settling or idle
state emits no `account_changed`, so the epoch never moves.

## How

- **Sign-out wins over an in-flight sign-in** (CodeRabbit on Comfy-Org#18871,
Major). `signOut()` bumps a sign-out counter, and `signedIn()` captures
it before the POST. If the counter changed, the new session is:
  - not dispatched and not published;
- deleted again, so no live cookie is left, unless a newer sign-in has
started since (that sign-in owns the cookie now);
- answered as `SESSION_REVOKED`, or with the cleanup's failure if the
DELETE fails.
- **FE-2894: adopt a live session when the remembered-login lookup
throws** (Christian on Comfy-Org#18715). A failed `currentUserId()` used to
discard a successful session read and retry. Now it only matters when
there is no live session. With one, the lookup can skip nothing but the
different-user sign-out, so the session is adopted.
- **CSRF replay re-checks scope after the re-read** (Christian on
Comfy-Org#18716). `stillInScope()` is checked again between the re-read and the
replay, so a request superseded during that round trip is abandoned
rather than replayed.
- **Comments Christian asked for:**
- on `zSharedMessage` (Comfy-Org#18719): the shared host-only cookie is what
licenses trusting a sibling tab's answer;
- in `mint()` (Comfy-Org#18870): the cache check deliberately precedes the
backoff.

## Tests

- **Sign-out during sign-in:** a lifecycle test holds the POST, signs
out, then releases it. It checks that both the tab and its sibling stay
`signed_out`, and that the late session is deleted (`DELETE, POST, GET,
DELETE`).
- **Lookup throws with a live session:** a boot test checks for
`signed_in` with no retry and no local sign-out. The existing test for a
failed lookup with no session (retry) still passes.
- **Overlapping sign-ins:** a stale sign-in released after a newer one
has succeeded sends no DELETE, and the tab stays signed in.
- **Failed cleanup:** when the cleanup DELETE fails, the call answers
`SESSION_UNAVAILABLE` instead of a clean revocation.
- **Scope changes during the re-read:** a transport test checks for
`SUPERSEDED` with no second send.
- **Mutation check:** reverting any of the three fixes turns exactly its
own test red.
- `pnpm --filter @comfyorg/account-core` suite: 1199 passed.
- The cloud auth tests pass, including the flag-off harness
`src/platform/auth/webSessionFlagOff.test.ts`.
- `fallow audit`: no issues in the changed files.

## Flag-off parity

Every change sits on the web session path, which only runs with
`unified_web_session` on. Flag-off behaviour is unchanged, and the
flag-off harness passes.

## AS IS / TO BE

| Case | AS IS | TO BE |
| --- | --- | --- |
| Sign out while an interactive sign-in is in flight | the tab and its
siblings go back to `signed_in`; a cookie may remain | stays signed out;
the late session is deleted |
| Session live, remembered-login lookup throws | discards the session
and retries | adopts the session |
| Scope changes during the CSRF re-read | replays into the old scope |
`SUPERSEDED`, no replay |

This is library logic with no UI of its own; the tests above are the
evidence.

## Links

- TDD: https://app.notion.com/p/3de6d73d365081d7a4c8f808c0a0384b
- Action items:
https://app.notion.com/p/3e56d73d3650812d962decc97fbd9ea3
- Linear: https://linear.app/comfyorg/issue/FE-2894

## Where this PR sits in the plan

| Ticket | Scope | Blocked by | State |
| --- | --- | --- | --- |
| FE-2891 | flag (cloud) + website/billing-web readers | C11 cloud#10689
+ BE-17276 probe (readers) | Comfy-Org#18708 merged; readers Comfy-Org#18874, do not merge
|
| FE-2892 | web session client (+ revoke-all follow-up) | C2a
cloud#10589 for revoke-all | Comfy-Org#18710 merged; revoke-all Comfy-Org#18869, do not
merge |
| FE-2893 | ADR | none | Comfy-Org#18707 merged |
| **FE-2894 (this PR)** | identity + boot rules | BE-17063 on testcloud
| Comfy-Org#18715 merged; review follow-ups in this PR |
| FE-2895 | `authorize()` | C5 cloud#10555 | Comfy-Org#18716 merged |
| FE-2897 | lifecycle, heartbeat | FE-2894, C1 | Comfy-Org#18719 merged |
| FE-2900 | lazy token mint from the session | FE-2895, C8 cloud#10585 |
Comfy-Org#18870 merged |
| FE-2901 | non-web clients stay on tokens | — | Comfy-Org#18711 merged (Desktop
checks open) |
| FE-2903 | cloud app joins the lifecycle | FE-2897 | Comfy-Org#18871, do not
merge |
| FE-2904 | cloud API client on `authorize()` | FE-2903, FE-2895, C5 |
Comfy-Org#18875, do not merge |
| FE-2905 | socket + media carry workspace | FE-2904, C6, C7 | Comfy-Org#18878,
do not merge |
| FE-2896 | website header | FE-2891 readers, FE-2894, C11 | Comfy-Org#18877, do
not merge |
| FE-2899 | website credits | FE-2896, FE-2895, C5 | Comfy-Org#18882, do not
merge |
| FE-2898 | billing-web on the session (A identity, B transport) |
FE-2891 readers, FE-2894, FE-2895, C5 | Comfy-Org#18880 + Comfy-Org#18881, do not merge |
| FE-2906 | cross-origin E2E harness | — | Comfy-Org#18718 (harness only) |
| FE-2902 / 2907 / 2908 | platform, rollout, cleanup | other repo / ops
/ after ramp | not started |

```mermaid
flowchart LR
  subgraph BE["BE · cloud ingest and infra"]
    C0["BE-17071 C0 preview CORS gate"]
    C1["BE-17061 C1 sessions table + revocable cookie"]
    C3["BE-17063 C3 GET /session, trusted origins, flag"]
    C4["BE-17062 C4 shared workspace resolution"]
    C5["BE-17066 C5 cookie on API: CSRF, Origin, workspace header"]
    C2["BE-17064 C2 revoke-all, purge, caps"]
    C6["BE-17067 C6 WebSocket on session"]
    C7["BE-17068 C7 scoped media"]
    C8["BE-17069 C8 token mint from session"]
    C9["BE-17065 C9 Redis cache + load test"]
    C10["BE-17072 C10 prod config, cleanup"]
    C11["C11 flag before sign-in (OQ17)"]
    B135["BE-17135 serve unified_web_session (server AND)"]
    I2["BE-17070 I2 edge limit, log + DNS audit"]
  end
  subgraph SDK["FE · account-core"]
    F2891["FE-2891 flag"]
    F2892["FE-2892 web session client"]
    F2894["FE-2894 identity + boot rules"]
    F2897["FE-2897 lifecycle, heartbeat"]
    F2895["FE-2895 authorize()"]
    F2900["FE-2900 lazy token mint"]
    F2901["FE-2901 non-web stay on tokens"]
  end
  subgraph APPS["FE · apps"]
    F2896["FE-2896 website header"]
    F2903["FE-2903 cloud lifecycle"]
    F2899["FE-2899 website credits"]
    F2904["FE-2904 cloud API client"]
    F2905["FE-2905 socket + media"]
    F2898["FE-2898 billing-web joins session"]
    F2902["FE-2902 platform"]
  end
  subgraph QA["QA · rollout · docs"]
    F2906["FE-2906 cross-origin E2E"]
    F2893["FE-2893 ADR + docs"]
    F2907["FE-2907 ramp + rollback"]
    F2908["FE-2908 cleanup"]
  end
  C0 --> C1 --> C3 --> C5
  C3 --> C11 --> F2891
  B135 --> F2891
  C4 --> C5
  C1 --> C2
  C1 --> C9
  C5 --> C6 & C7 & C8
  C3 --> F2892
  C1 --> F2892
  F2891 --> F2894
  C3 --> F2894
  F2892 --> F2894 --> F2896
  F2894 --> F2897 --> F2903
  C1 --> F2897
  F2892 --> F2895
  C5 --> F2895
  F2895 --> F2899 & F2904 & F2900 & F2901 & F2902
  C5 --> F2899 & F2904
  F2903 --> F2904 --> F2905
  C6 --> F2905
  C7 --> F2905
  C8 --> F2900
  F2894 --> F2898
  F2895 --> F2898
  C3 --> F2898
  C5 --> F2898
  F2903 & F2904 & F2905 & F2898 --> F2906
  C3 & C2 --> F2906
  F2906 --> F2907
  C9 & C10 & I2 --> F2907
  F2907 --> F2908
  C10 --> F2908
  classDef thisPr fill:#ffe08a,stroke:#b8860b,stroke-width:4px,color:#000
  class F2894 thisPr
```

- Blocked by: none: all the code is on main
- Unblocks: none; closes the review notes on Comfy-Org#18715, Comfy-Org#18716, Comfy-Org#18719 and
Comfy-Org#18870, and a CodeRabbit finding on Comfy-Org#18871
github-merge-queue Bot pushed a commit that referenced this pull request Sep 28, 2026
…or website and billing-web (#18874)

> **Do not merge until
[BE-17276](https://linear.app/comfyorg/issue/BE-17276) (C11b) settles
the `web_session_probe` contract.** Until the server sends the key,
every reader resolves to off. Nothing calls these readers yet, so
merging changes no request; the hold is only so the contract can't drift
under them.

## Why

The website and billing-web learn a session visitor's
`unified_web_session` only through C11 (cloud#10689). That means `GET
/api/features` with `credentials: 'include'` and `X-Comfy-Client`, sent
before the site knows the flag. We agreed to gate that request on a
global runtime switch served to anonymous callers, `web_session_probe`
(BE-17276, Maanil). Then the request and its CORS preflight don't exist
until rollout, and turning them off needs no deploy. This PR adds the
readers the website header (FE-2896), website credits (FE-2899) and
billing-web (FE-2898) will use.

## How

- **New entry `@comfyorg/account-core/webSessionFlag`.**
- `readWebSessionProbe`: a plain anonymous `GET /api/features` with no
credentials and no custom headers, so there is no preflight. It is on
only for `web_session_probe === true`.
- `resolveUnifiedWebSession({ probe, … })`: sends the credentialed read
(`credentials: 'include'`, `cache: 'no-store'`, `X-Comfy-Client`) only
when the probe resolves `true`. It returns on only for
`unified_web_session === true`.
- The probe never feeds into the result: it decides whether to ask, and
the per-user answer decides behaviour, so no server state is assembled
on the client.
- Any failure (network, non-2xx, bad body, timeout) is off, and nothing
throws into the apps. Importing the entry is inert, and there are no
browser globals in core.
- **billing-web.** It reads `web_session_probe` from the anonymous
`/api/features` it already fetches for the Firebase config.
- `fetchCloudFeatures` / `resolveWebSessionProbe` in
`@comfyorg/account-core/firebase` share that memoized request; the
timeout must stay 4000 ms to share it.
- With the probe absent or false, billing-web's requests are identical
to main. `readBillingWebUnifiedWebSession()` is cached per page load.
- **website.** It has no anonymous features read today, only the
signed-in Bearer read in `workshop-features.ts`. So its probe is one
plain anonymous GET.
- This is the one accepted flag-off request difference. It is cached per
page load, lazy, and never blocks render.
- The request is only sent once FE-2896 calls
`readUnifiedWebSessionEnabled()`; until then the website is unchanged.
- **`X-Comfy-Client`.** `COMFY_CLIENT` is not on main (it lives in
#18716), so the value is defined once in this module with the same shape
(`name/version`), and a note says it converges with #18716.
- The cloud app is unchanged, and
`src/platform/auth/webSessionFlagOff.test.ts` passes.

## AS IS / TO BE

No UI yet; the evidence is the request tables pinned with `it.for`.

| State | billing-web vs main | website vs main |
| --- | --- | --- |
| probe absent / false / `"true"` | identical | + one plain anonymous
GET |
| probe true, flag false | + one credentialed GET, result off | +
anonymous GET + one credentialed GET, result off |
| probe true, flag true | + one credentialed GET, result on | +
anonymous GET + one credentialed GET, result on |

These rows describe what happens once a consumer calls a reader; nothing
calls one in this PR. The `"true"` string row is covered in the
account-core tests. A second call sends nothing new.

Mutations (each reverted, full suites rerun):

| Mutation | Tests red |
| --- | --- |
| remove the probe gate | core 3, billing-web 3, website 4 |
| add credentials to the probe | core 1, website 4 |
| OR the probe into the result | core 1 |
| drop the cache | billing-web 2, website 4 |
| probe timeout ≠ 4000 on billing-web (breaks the shared fetch) | 5 |
| truthy comparison in `configSource` | 1 |

Checks: vitest passes for account-core 1101, billing-web 198, website
8924 and the flag-off harness 4. Typecheck, oxlint, eslint, oxfmt, knip,
fallow (no issues in 12 files) and `checkPublishable` are all clean.

For review:
- Does ingest check the `X-Comfy-Client` value or only that the header
is present? The value carries the package version.
- If an anonymous features document ever carried the probe but no
Firebase or Stripe fields, the memo would be evicted and refetched. The
eviction rule is unchanged from main.

## Links

- TDD: https://app.notion.com/p/3de6d73d365081d7a4c8f808c0a0384b (§14
OQ17, §15 C11, §18)
- Action items:
https://app.notion.com/p/3e56d73d3650812d962decc97fbd9ea3
- Linear: https://linear.app/comfyorg/issue/FE-2891 ; backend switch
https://linear.app/comfyorg/issue/BE-17276
- Contract: Comfy-Org/cloud#10689 (C11), BE-17276 (C11b, not yet built)

## Where this PR sits in the plan

| Ticket | Scope | Blocked by | State |
| --- | --- | --- | --- |
| **FE-2891 (this PR)** | flag (cloud) + website/billing-web readers |
C11 cloud#10689 + BE-17276 probe (readers) | #18708 merged; readers
#18874, do not merge |
| FE-2892 | web session client (+ revoke-all follow-up) | C2a
cloud#10589 for revoke-all | #18710 merged; revoke-all #18869, do not
merge |
| FE-2893 | ADR | none | #18707 merged |
| FE-2894 | identity + boot rules | BE-17063 on testcloud | #18715, do
not merge |
| FE-2895 | `authorize()` | C5 cloud#10555 | #18716, do not merge |
| FE-2897 | lifecycle, heartbeat | FE-2894, C1 | #18719, do not merge |
| FE-2900 | lazy token mint from the session | FE-2895, C8 cloud#10585 |
#18870, do not merge |
| FE-2901 | non-web clients stay on tokens | — | #18711 |
| FE-2903 | cloud app joins the lifecycle | FE-2897 | #18871, do not
merge |
| FE-2904 | cloud API client on `authorize()` | FE-2903, FE-2895, C5 |
in progress |
| FE-2905 | socket + media carry workspace | FE-2904, C6, C7 | next |
| FE-2896 / 2899 / 2898 | website header, website credits, billing-web |
FE-2891 readers, FE-2894/2895, C5, C11 | next |
| FE-2906 | cross-origin E2E harness | — | #18718 (harness only) |
| FE-2902 / 2907 / 2908 | platform, rollout, cleanup | other repo / ops
/ after ramp | not started |

```mermaid
flowchart LR
  subgraph BE["BE · cloud ingest and infra"]
    C0["BE-17071 C0 preview CORS gate"]
    C1["BE-17061 C1 sessions table + revocable cookie"]
    C3["BE-17063 C3 GET /session, trusted origins, flag"]
    C4["BE-17062 C4 shared workspace resolution"]
    C5["BE-17066 C5 cookie on API: CSRF, Origin, workspace header"]
    C2["BE-17064 C2 revoke-all, purge, caps"]
    C6["BE-17067 C6 WebSocket on session"]
    C7["BE-17068 C7 scoped media"]
    C8["BE-17069 C8 token mint from session"]
    C9["BE-17065 C9 Redis cache + load test"]
    C10["BE-17072 C10 prod config, cleanup"]
    C11["C11 flag before sign-in (OQ17)"]
    B135["BE-17135 serve unified_web_session (server AND)"]
    I2["BE-17070 I2 edge limit, log + DNS audit"]
  end
  subgraph SDK["FE · account-core"]
    F2891["FE-2891 flag"]
    F2892["FE-2892 web session client"]
    F2894["FE-2894 identity + boot rules"]
    F2897["FE-2897 lifecycle, heartbeat"]
    F2895["FE-2895 authorize()"]
    F2900["FE-2900 lazy token mint"]
    F2901["FE-2901 non-web stay on tokens"]
  end
  subgraph APPS["FE · apps"]
    F2896["FE-2896 website header"]
    F2903["FE-2903 cloud lifecycle"]
    F2899["FE-2899 website credits"]
    F2904["FE-2904 cloud API client"]
    F2905["FE-2905 socket + media"]
    F2898["FE-2898 billing-web joins session"]
    F2902["FE-2902 platform"]
  end
  subgraph QA["QA · rollout · docs"]
    F2906["FE-2906 cross-origin E2E"]
    F2893["FE-2893 ADR + docs"]
    F2907["FE-2907 ramp + rollback"]
    F2908["FE-2908 cleanup"]
  end
  C0 --> C1 --> C3 --> C5
  C3 --> C11 --> F2891
  B135 --> F2891
  C4 --> C5
  C1 --> C2
  C1 --> C9
  C5 --> C6 & C7 & C8
  C3 --> F2892
  C1 --> F2892
  F2891 --> F2894
  C3 --> F2894
  F2892 --> F2894 --> F2896
  F2894 --> F2897 --> F2903
  C1 --> F2897
  F2892 --> F2895
  C5 --> F2895
  F2895 --> F2899 & F2904 & F2900 & F2901 & F2902
  C5 --> F2899 & F2904
  F2903 --> F2904 --> F2905
  C6 --> F2905
  C7 --> F2905
  C8 --> F2900
  F2894 --> F2898
  F2895 --> F2898
  C3 --> F2898
  C5 --> F2898
  F2903 & F2904 & F2905 & F2898 --> F2906
  C3 & C2 --> F2906
  F2906 --> F2907
  C9 & C10 & I2 --> F2907
  F2907 --> F2908
  C10 --> F2908
  classDef thisPr fill:#ffe08a,stroke:#b8860b,stroke-width:4px,color:#000
  class F2891 thisPr
```

- Blocked by: BE-17276 (probe switch) for the contract; C11 cloud#10689.
- Unblocks: FE-2896 (website header), FE-2899 (website credits), FE-2898
(billing-web).

---------

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
kashish00208 pushed a commit to kashish00208/ComfyUI_frontend that referenced this pull request Sep 28, 2026
…ified_web_session (1/2) (Comfy-Org#18880)

> **Do not merge.** Part 1 of 2 for FE-2898 (part 2, the transport, is
Comfy-Org#18881, stacked on this). Gated on BE-17276 via the readers (Comfy-Org#18874), on
FE-2894 (Comfy-Org#18715), FE-2895 (Comfy-Org#18716) and C5 cloud#10555. Base is the
readers branch; the diff also shows the FE-2894/FE-2895 merges. This
PR's own change: 9 files, 299 non-test lines.

## Why

billing-web signs in on its own Firebase login and mints a workspace
token. With `unified_web_session` on, a visitor already signed in on
Cloud should be recognised from the shared session without starting
Firebase or signing in again. This part adds the one decision point and
the session-backed identity and sign-in. Part 2 adds the workspace scope
and the credentialed billing transport.

## How

- **`billingWebAuth.ts`: one decision per page load.** It chooses
`session-client` (today's path) or `web-session`.
- The router guard starts the decision but never waits for it. Until the
decision lands, every phase reads `pending`, which is exactly what main
shows while Firebase hasn't answered.
- A probe that is absent or false settles it as soon as the
`/api/features` document arrives. That is the same document Firebase's
config comes from, so Firebase starts at the same moment as on main.
- The session path gets **800 ms**. After that, the page load stays on
today's path, and a late `true` is ignored.
- **`unifiedBillingSession.ts`** boots the FE-2894 identity
(`@comfyorg/account-core/webSessionIdentity`). Firebase is only a lazy
RememberedLogin proof, consulted after the server says there is no
session.
- **Sign-in controller port:** `SignInView` gets a port that follows the
decision. If a Cloud session is found in time, the page is left the same
way a restored login leaves it.
- The router, `App` and `SignInView` are rewired to the decision point.
Entry-workspace rebinding still mints on today's path only.

### Decisions for review
1. **Flag-on first paint.** A visitor with a live Cloud session briefly
sees main's pre-config sign-in screen: disabled buttons and the
"unavailable" notice. It lasts until the decision lands, at most 800 ms,
and then the page leaves it. This is the price of never delaying the
flag-off path.
2. **A different remembered Firebase user is not signed out.** While the
session is live, nothing on billing-web asks Firebase for a token or
mints from `/auth/token`. Identity, scope and every billing request come
only from the session cookie. So a different remembered user has no path
to any request. It is consulted only after the server reports no
session, and a restore goes through the server's silent-restore rules.

## Flag-off parity

`billingWebAuth.flagOff.test.ts` renders `App` with the real router:
- **Features read hangs:** the page is on `/sign-in`, the notice is
shown, and Firebase is not initialised. Same as main.
- **Credentialed flag read hangs:** Firebase is not started at 799 ms
and is started at 800 ms. A late `true` sends no `/api/auth/session` and
doesn't re-initialise Firebase.
- **Probe false:** Firebase is initialised well before the cap.

The request tables are identical to main with the probe absent or false,
and `src/platform/auth/webSessionFlagOff.test.ts` passes.

Timing mutations each go red: no cap, cap at 5000 ms, the guard awaits
the decision, a late `true` swaps the mode, a false probe waits for the
cap.

## AS IS / TO BE

| | AS IS | TO BE |
| --- | --- | --- |
| Flag off | Firebase sign-in | unchanged, same first render and notice
|
| Flag on, live Cloud session | Firebase sign-in form | recognised from
the session in ≤ 800 ms, no Firebase |

Screenshots will be added by editing this description once testcloud
serves the probe.

## Links

- TDD: https://app.notion.com/p/3de6d73d365081d7a4c8f808c0a0384b
- Action items:
https://app.notion.com/p/3e56d73d3650812d962decc97fbd9ea3
- Linear: https://linear.app/comfyorg/issue/FE-2898

## Where this PR sits in the plan

| Ticket | Scope | Blocked by | State |
| --- | --- | --- | --- |
| FE-2891 | flag (cloud) + website/billing-web readers | C11 cloud#10689
+ BE-17276 probe (readers) | Comfy-Org#18708 merged; readers Comfy-Org#18874, do not merge
|
| FE-2892 | web session client (+ revoke-all follow-up) | C2a
cloud#10589 for revoke-all | Comfy-Org#18710 merged; revoke-all Comfy-Org#18869, do not
merge |
| FE-2893 | ADR | none | Comfy-Org#18707 merged |
| FE-2894 | identity + boot rules | BE-17063 on testcloud | Comfy-Org#18715, do
not merge |
| FE-2895 | `authorize()` | C5 cloud#10555 | Comfy-Org#18716, do not merge |
| FE-2897 | lifecycle, heartbeat | FE-2894, C1 | Comfy-Org#18719, do not merge |
| FE-2900 | lazy token mint from the session | FE-2895, C8 cloud#10585 |
Comfy-Org#18870, do not merge |
| FE-2901 | non-web clients stay on tokens | — | Comfy-Org#18711 |
| FE-2903 | cloud app joins the lifecycle | FE-2897 | Comfy-Org#18871, do not
merge |
| FE-2904 | cloud API client on `authorize()` | FE-2903, FE-2895, C5 |
Comfy-Org#18875, do not merge |
| FE-2905 | socket + media carry workspace | FE-2904, C6, C7 | Comfy-Org#18878,
do not merge |
| FE-2896 | website header | FE-2891 readers, FE-2894, C11 | Comfy-Org#18877, do
not merge |
| FE-2899 | website credits | FE-2896, FE-2895, C5 | in progress |
| **FE-2898 (this PR)** | billing-web on the session (A identity, B
transport) | FE-2891 readers, FE-2894, FE-2895, C5 | A + B, do not merge
|
| FE-2906 | cross-origin E2E harness | — | Comfy-Org#18718 (harness only) |
| FE-2902 / 2907 / 2908 | platform, rollout, cleanup | other repo / ops
/ after ramp | not started |

```mermaid
flowchart LR
  subgraph BE["BE · cloud ingest and infra"]
    C0["BE-17071 C0 preview CORS gate"]
    C1["BE-17061 C1 sessions table + revocable cookie"]
    C3["BE-17063 C3 GET /session, trusted origins, flag"]
    C4["BE-17062 C4 shared workspace resolution"]
    C5["BE-17066 C5 cookie on API: CSRF, Origin, workspace header"]
    C2["BE-17064 C2 revoke-all, purge, caps"]
    C6["BE-17067 C6 WebSocket on session"]
    C7["BE-17068 C7 scoped media"]
    C8["BE-17069 C8 token mint from session"]
    C9["BE-17065 C9 Redis cache + load test"]
    C10["BE-17072 C10 prod config, cleanup"]
    C11["C11 flag before sign-in (OQ17)"]
    B135["BE-17135 serve unified_web_session (server AND)"]
    I2["BE-17070 I2 edge limit, log + DNS audit"]
  end
  subgraph SDK["FE · account-core"]
    F2891["FE-2891 flag"]
    F2892["FE-2892 web session client"]
    F2894["FE-2894 identity + boot rules"]
    F2897["FE-2897 lifecycle, heartbeat"]
    F2895["FE-2895 authorize()"]
    F2900["FE-2900 lazy token mint"]
    F2901["FE-2901 non-web stay on tokens"]
  end
  subgraph APPS["FE · apps"]
    F2896["FE-2896 website header"]
    F2903["FE-2903 cloud lifecycle"]
    F2899["FE-2899 website credits"]
    F2904["FE-2904 cloud API client"]
    F2905["FE-2905 socket + media"]
    F2898["FE-2898 billing-web joins session"]
    F2902["FE-2902 platform"]
  end
  subgraph QA["QA · rollout · docs"]
    F2906["FE-2906 cross-origin E2E"]
    F2893["FE-2893 ADR + docs"]
    F2907["FE-2907 ramp + rollback"]
    F2908["FE-2908 cleanup"]
  end
  C0 --> C1 --> C3 --> C5
  C3 --> C11 --> F2891
  B135 --> F2891
  C4 --> C5
  C1 --> C2
  C1 --> C9
  C5 --> C6 & C7 & C8
  C3 --> F2892
  C1 --> F2892
  F2891 --> F2894
  C3 --> F2894
  F2892 --> F2894 --> F2896
  F2894 --> F2897 --> F2903
  C1 --> F2897
  F2892 --> F2895
  C5 --> F2895
  F2895 --> F2899 & F2904 & F2900 & F2901 & F2902
  C5 --> F2899 & F2904
  F2903 --> F2904 --> F2905
  C6 --> F2905
  C7 --> F2905
  C8 --> F2900
  F2894 --> F2898
  F2895 --> F2898
  C3 --> F2898
  C5 --> F2898
  F2903 & F2904 & F2905 & F2898 --> F2906
  C3 & C2 --> F2906
  F2906 --> F2907
  C9 & C10 & I2 --> F2907
  F2907 --> F2908
  C10 --> F2908
  classDef thisPr fill:#ffe08a,stroke:#b8860b,stroke-width:4px,color:#000
  class F2898 thisPr
```

- Blocked by: FE-2891 readers Comfy-Org#18874, FE-2894 Comfy-Org#18715, FE-2895 Comfy-Org#18716, C5
cloud#10555
- Unblocks: M2 billing-web checkout on the shared session

---------

Co-authored-by: mattmillerai <7741082+mattmillerai@users.noreply.github.com>
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
kashish00208 pushed a commit to kashish00208/ComfyUI_frontend that referenced this pull request Sep 28, 2026
…ession (Comfy-Org#18877)

> **Do not merge.** Gated on BE-17276 (`web_session_probe`) through the
readers in Comfy-Org#18874, and on the FE-2894 identity in Comfy-Org#18715. Base is the
readers branch; the diff also shows the FE-2894 merge. This PR's own
change is 5 files: 154 non-test lines and 390 test lines.

## Why

On the website, a visitor who is already signed in to Cloud through the
shared web session should see that account in the header, without
starting Firebase. Today the header always loads the Firebase account
island. FE-2896 lets the header take the account from the web session
when `unified_web_session` is on for that visitor, and changes nothing
when it is off.

## How

- **`resolveWorkshopAccountSource()`**
(`apps/website/src/config/workshop-web-session-identity.ts`) settles
once per page load to `'session'` or `'firebase'`.
- The probe (Comfy-Org#18874) is absent or false, or the per-user flag is off:
`'firebase'` at once. No session read is sent.
- The flag is on: the FE-2894 identity boots. A live session gives
`'session'` and a signed-out answer gives `'firebase'`.
- **Cap: at most 800 ms.** If the cap fires first, the answer is
`'firebase'` for the page load and the identity is disposed. A late
answer never swaps a mounted header, and a session read is never sent
after the cap.
- **`HeaderMain.vue`**: the async loaders for `HeaderAccount` and
`BuyCreditsDialog` wait for the source. On `'session'` they mount
`HeaderSessionAccount` (an initials chip labelled with the email) and an
empty dialog, so no Firebase island starts.
- **RememberedLogin port**: the proof comes from Firebase only if
Firebase is already loaded. The website never force-loads Firebase to
build a proof.
- **User id**: the Comfy user id is the Firebase uid today (`token.UID`
in cloud `firebase_auth.go`). This holds until Phase 2.5.

### Kept out of this PR
- **Session-mode header**: no menu, sign-out, credits or workspace
switcher. Sign-out is FE-2897. Credits (FE-2899) and the workspace come
next. Asking to buy credits in session mode does nothing until FE-2899.
- **Playground and `/login`**: these still start Firebase. A stale
Firebase login for a different user is signed out only if Firebase was
already loaded when the session answered.
- **SDK follow-up**: `readWebSession` sends no `X-Comfy-Client`. If C5
requires it on `/api/auth/session`, the fix belongs in account-core.

### /models/ script budget

`e2e/models-performance.spec.ts` caps the JavaScript that `/models/`
loads. This PR raises that ceiling from 1,810,000 to 1,815,000 bytes.

- main measures 1,808,088 bytes, 1.9 KB under the old ceiling.
- The header's once-per-page-load session decision ships even with the
flag off: the probe read, the flag read and the 800 ms cap.
- Two changes already moved code behind the flag:
  - the session boot now loads lazily;
- `COMFY_CLIENT`, which inlines the package manifest, now loads only for
the credentialed read.
- With both, this branch measures 1,811,181 bytes in CI (an extra ~3 KB,
down from ~8 KB).
- The catalogue-only delta check (900,000) is unchanged.

## Flag-off parity

- Probe absent or false: the same islands mount, and no
`/api/auth/session` request is sent (`HeaderMain.webSession.test.ts`).
- The header's only new wait is the probe read. It ends when the probe
answers, and it never lasts past 800 ms.
- `src/platform/auth/webSessionFlagOff.test.ts` passes. The cloud app is
not touched.
- Mutation checks: 10 mutations, all red. They include: the cap never
decides, the session boots after the cap, the flag-off path waits for
the cap, the header is ungated, and the boot ignores the flag.

## AS IS / TO BE

| | AS IS | TO BE |
| --- | --- | --- |
| Flag off | Firebase header | Firebase header, unchanged |
| Flag on, live session | Firebase header | Session chip (screenshot to
follow once testcloud serves the probe) |

Screenshots will be added by editing this description.

## Links

- TDD: https://app.notion.com/p/3de6d73d365081d7a4c8f808c0a0384b
- Action items:
https://app.notion.com/p/3e56d73d3650812d962decc97fbd9ea3
- Linear: https://linear.app/comfyorg/issue/FE-2896

## Where this PR sits in the plan

| Ticket | Scope | Blocked by | State |
| --- | --- | --- | --- |
| FE-2891 | flag (cloud) + website/billing-web readers | C11 cloud#10689
+ BE-17276 probe (readers) | Comfy-Org#18708 merged; readers Comfy-Org#18874, do not merge
|
| FE-2892 | web session client (+ revoke-all follow-up) | C2a
cloud#10589 for revoke-all | Comfy-Org#18710 merged; revoke-all Comfy-Org#18869, do not
merge |
| FE-2893 | ADR | none | Comfy-Org#18707 merged |
| FE-2894 | identity + boot rules | BE-17063 on testcloud | Comfy-Org#18715, do
not merge |
| FE-2895 | `authorize()` | C5 cloud#10555 | Comfy-Org#18716, do not merge |
| FE-2897 | lifecycle, heartbeat | FE-2894, C1 | Comfy-Org#18719, do not merge |
| FE-2900 | lazy token mint from the session | FE-2895, C8 cloud#10585 |
Comfy-Org#18870, do not merge |
| FE-2901 | non-web clients stay on tokens | — | Comfy-Org#18711 |
| FE-2903 | cloud app joins the lifecycle | FE-2897 | Comfy-Org#18871, do not
merge |
| FE-2904 | cloud API client on `authorize()` | FE-2903, FE-2895, C5 |
Comfy-Org#18875, do not merge |
| FE-2905 | socket + media carry workspace | FE-2904, C6, C7 | next |
| **FE-2896 (this PR)** / 2899 / 2898 | website header (this PR),
website credits, billing-web | FE-2891 readers, FE-2894/2895, C5, C11 |
next |
| FE-2906 | cross-origin E2E harness | — | Comfy-Org#18718 (harness only) |
| FE-2902 / 2907 / 2908 | platform, rollout, cleanup | other repo / ops
/ after ramp | not started |

```mermaid
flowchart LR
  subgraph BE["BE · cloud ingest and infra"]
    C0["BE-17071 C0 preview CORS gate"]
    C1["BE-17061 C1 sessions table + revocable cookie"]
    C3["BE-17063 C3 GET /session, trusted origins, flag"]
    C4["BE-17062 C4 shared workspace resolution"]
    C5["BE-17066 C5 cookie on API: CSRF, Origin, workspace header"]
    C2["BE-17064 C2 revoke-all, purge, caps"]
    C6["BE-17067 C6 WebSocket on session"]
    C7["BE-17068 C7 scoped media"]
    C8["BE-17069 C8 token mint from session"]
    C9["BE-17065 C9 Redis cache + load test"]
    C10["BE-17072 C10 prod config, cleanup"]
    C11["C11 flag before sign-in (OQ17)"]
    B135["BE-17135 serve unified_web_session (server AND)"]
    I2["BE-17070 I2 edge limit, log + DNS audit"]
  end
  subgraph SDK["FE · account-core"]
    F2891["FE-2891 flag"]
    F2892["FE-2892 web session client"]
    F2894["FE-2894 identity + boot rules"]
    F2897["FE-2897 lifecycle, heartbeat"]
    F2895["FE-2895 authorize()"]
    F2900["FE-2900 lazy token mint"]
    F2901["FE-2901 non-web stay on tokens"]
  end
  subgraph APPS["FE · apps"]
    F2896["FE-2896 website header"]
    F2903["FE-2903 cloud lifecycle"]
    F2899["FE-2899 website credits"]
    F2904["FE-2904 cloud API client"]
    F2905["FE-2905 socket + media"]
    F2898["FE-2898 billing-web joins session"]
    F2902["FE-2902 platform"]
  end
  subgraph QA["QA · rollout · docs"]
    F2906["FE-2906 cross-origin E2E"]
    F2893["FE-2893 ADR + docs"]
    F2907["FE-2907 ramp + rollback"]
    F2908["FE-2908 cleanup"]
  end
  C0 --> C1 --> C3 --> C5
  C3 --> C11 --> F2891
  B135 --> F2891
  C4 --> C5
  C1 --> C2
  C1 --> C9
  C5 --> C6 & C7 & C8
  C3 --> F2892
  C1 --> F2892
  F2891 --> F2894
  C3 --> F2894
  F2892 --> F2894 --> F2896
  F2894 --> F2897 --> F2903
  C1 --> F2897
  F2892 --> F2895
  C5 --> F2895
  F2895 --> F2899 & F2904 & F2900 & F2901 & F2902
  C5 --> F2899 & F2904
  F2903 --> F2904 --> F2905
  C6 --> F2905
  C7 --> F2905
  C8 --> F2900
  F2894 --> F2898
  F2895 --> F2898
  C3 --> F2898
  C5 --> F2898
  F2903 & F2904 & F2905 & F2898 --> F2906
  C3 & C2 --> F2906
  F2906 --> F2907
  C9 & C10 & I2 --> F2907
  F2907 --> F2908
  C10 --> F2908
  classDef thisPr fill:#ffe08a,stroke:#b8860b,stroke-width:4px,color:#000
  class F2896 thisPr
```

- Blocked by: FE-2891 readers Comfy-Org#18874 (BE-17276 probe), FE-2894 Comfy-Org#18715,
BE-17063 on testcloud
- Unblocks: FE-2899 website credits (next, stacked on this branch)

---------

Co-authored-by: mattmillerai <7741082+mattmillerai@users.noreply.github.com>
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
pull Bot pushed a commit to Penguinjanator/ComfyUI_frontend that referenced this pull request Sep 28, 2026
…mfy-Org#18871)

> **Stacked on Comfy-Org#18719 (FE-2897) → Comfy-Org#18715 (FE-2894). Do not merge** until
those merge and C1/C3 are on testcloud.

## Why

With `unified_web_session` on, the cloud app must join the shared
session. It creates the session only on a real sign-in, deletes it on
sign-out, boots and heartbeats from it, and resets a tab whose account
changed. It must also stop re-creating the old cookie on every token
refresh, which would undo a sign-out made on another site (TDD §12, §18,
F2). With the flag off, nothing may change.

## How

- New `useCloudWebSessionStore`
(`src/platform/auth/session/cloudWebSessionStore.ts`) wraps
account-core's `createWebSessionIdentity`. Its host adapters:
  - `RememberedLogin`, backed by the Firebase identity;
  - `createWebVisibilityPort()` for the heartbeat;
- `createWebCrossTabRefreshPort<WebSessionResult>()` for the cross-tab
leader.
- **`start()` is the only place that reads the flag.** It reads it once
per page load, on the first call, and returns whether the session is on.
- The first call comes from the workspace gate or the extension's
`onAuthUserResolved`, both of which run after the signed-in
`/api/features` read. So the flag is never read in its anonymous
default.
  - A later flag change applies on the next page load.
- **Flag on**, the existing `useSessionCookie` entry points switch over:
- `createSession` (called on user-resolved and on token refresh) starts
the lifecycle and sends nothing, so the re-create-on-refresh behaviour
is gone.
  - `ensureSessionCookie` waits for the lifecycle to be ready.
- `deleteSession` does nothing, because sign-out is owned by
`authStore.logout` → `signOut()` → DELETE.
- `createSessionOrThrow` (OAuth resume, consent redirect) waits only if
the lifecycle is already active.
- `login`, `register`, `loginWithGoogle` and `loginWithGithub` call
`signedInInteractively`, the only thing that creates a session.
- **Account change.** The store clears the workspace selection, resets
the team workspace store and the socket, and, only when the account
became a different user, shows the `auth.accountChanged` notice (a
notice, not a confirm, per open question 11).
- Until FE-2904 moves the API client onto the session, the app still
needs a Firebase login. So a different user ends in a signed-out page,
not an in-place switch, and the copy does not promise a switch.
- **Flag off.** `start()` returns false, every entry point falls through
to today's code, and `webSessionFlagOff.test.ts` is unchanged and passes
(4/4).
- **For review: user id equality.** `currentUserId` returns the Firebase
uid, which equals `comfy_user_id` today (cloud's Phase 2 invariant in
`identity_resolution.go`). Cloud names a Phase 2.5 where they can
diverge; the boot rule would then sign out a valid login, so the adapter
must change before that phase.

## AS IS / TO BE

No UI change with the flag off. With the flag on, the evidence is
`webSessionFlagOn.test.ts`:

| Scenario | Result |
| --- | --- |
| interactive sign-in | one session POST |
| token refresh | no session request |
| sign-out | one DELETE |
| boot, 200 same user | GET only |
| boot, 200 different user | local Firebase sign-out |
| boot, 401 `session_revoked` | signed out, no restore |
| boot, 401 `no_session` | one restore |
| heartbeat sees a different user | socket and workspace reset, plus the
notice |

Nine mutations, each reverted with the full suite rerun, all go red,
including "ignore the flag", which turns 4 flag-off rows red.

Checks:
- vitest over auth, stores, extensions, cloud and workspace: 5172 tests
pass.
- account-core: 1114 tests pass.
- typecheck, knip, lint and fallow are clean.

## Links

- TDD: https://app.notion.com/p/3de6d73d365081d7a4c8f808c0a0384b
(sections 12, 15 F2, 18)
- Action items:
https://app.notion.com/p/3e56d73d3650812d962decc97fbd9ea3
- Linear: https://linear.app/comfyorg/issue/FE-2903

## Where this PR sits in the plan

| Ticket | Scope | Blocked by | State |
| --- | --- | --- | --- |
| FE-2891 | flag (cloud) + website/billing-web readers | C11 cloud#10689
+ probe switch (readers) | Comfy-Org#18708 merged; readers in progress |
| FE-2892 | web session client (+ revoke-all follow-up) | C2a
cloud#10589 for revoke-all | Comfy-Org#18710 merged; revoke-all Comfy-Org#18869, do not
merge |
| FE-2893 | ADR | none | Comfy-Org#18707 merged |
| FE-2894 | identity + boot rules | BE-17063 on testcloud | Comfy-Org#18715, do
not merge |
| FE-2895 | `authorize()` | C5 cloud#10555 | Comfy-Org#18716, do not merge |
| FE-2897 | lifecycle, heartbeat | FE-2894, C1 | Comfy-Org#18719, do not merge |
| FE-2900 | lazy token mint from the session | FE-2895, C8 cloud#10585 |
Comfy-Org#18870, do not merge |
| FE-2901 | non-web clients stay on tokens | — | Comfy-Org#18711 |
| **FE-2903 (this PR)** | cloud app joins the lifecycle | FE-2897 |
Comfy-Org#18871, do not merge |
| FE-2904 | cloud API client on `authorize()` | FE-2903, FE-2895, C5 |
in progress |
| FE-2905 | socket + media carry workspace | FE-2904, C6, C7 | next |
| FE-2896 / 2899 / 2898 | website header, website credits, billing-web |
FE-2891 readers, FE-2894/2895, C5, C11 | next |
| FE-2906 | cross-origin E2E harness | — | Comfy-Org#18718 (harness only) |
| FE-2902 / 2907 / 2908 | platform, rollout, cleanup | other repo / ops
/ after ramp | not started |

```mermaid
flowchart LR
  subgraph BE["BE · cloud ingest and infra"]
    C0["BE-17071 C0 preview CORS gate"]
    C1["BE-17061 C1 sessions table + revocable cookie"]
    C3["BE-17063 C3 GET /session, trusted origins, flag"]
    C4["BE-17062 C4 shared workspace resolution"]
    C5["BE-17066 C5 cookie on API: CSRF, Origin, workspace header"]
    C2["BE-17064 C2 revoke-all, purge, caps"]
    C6["BE-17067 C6 WebSocket on session"]
    C7["BE-17068 C7 scoped media"]
    C8["BE-17069 C8 token mint from session"]
    C9["BE-17065 C9 Redis cache + load test"]
    C10["BE-17072 C10 prod config, cleanup"]
    C11["C11 flag before sign-in (OQ17)"]
    B135["BE-17135 serve unified_web_session (server AND)"]
    I2["BE-17070 I2 edge limit, log + DNS audit"]
  end
  subgraph SDK["FE · account-core"]
    F2891["FE-2891 flag"]
    F2892["FE-2892 web session client"]
    F2894["FE-2894 identity + boot rules"]
    F2897["FE-2897 lifecycle, heartbeat"]
    F2895["FE-2895 authorize()"]
    F2900["FE-2900 lazy token mint"]
    F2901["FE-2901 non-web stay on tokens"]
  end
  subgraph APPS["FE · apps"]
    F2896["FE-2896 website header"]
    F2903["FE-2903 cloud lifecycle"]
    F2899["FE-2899 website credits"]
    F2904["FE-2904 cloud API client"]
    F2905["FE-2905 socket + media"]
    F2898["FE-2898 billing-web joins session"]
    F2902["FE-2902 platform"]
  end
  subgraph QA["QA · rollout · docs"]
    F2906["FE-2906 cross-origin E2E"]
    F2893["FE-2893 ADR + docs"]
    F2907["FE-2907 ramp + rollback"]
    F2908["FE-2908 cleanup"]
  end
  C0 --> C1 --> C3 --> C5
  C3 --> C11 --> F2891
  B135 --> F2891
  C4 --> C5
  C1 --> C2
  C1 --> C9
  C5 --> C6 & C7 & C8
  C3 --> F2892
  C1 --> F2892
  F2891 --> F2894
  C3 --> F2894
  F2892 --> F2894 --> F2896
  F2894 --> F2897 --> F2903
  C1 --> F2897
  F2892 --> F2895
  C5 --> F2895
  F2895 --> F2899 & F2904 & F2900 & F2901 & F2902
  C5 --> F2899 & F2904
  F2903 --> F2904 --> F2905
  C6 --> F2905
  C7 --> F2905
  C8 --> F2900
  F2894 --> F2898
  F2895 --> F2898
  C3 --> F2898
  C5 --> F2898
  F2903 & F2904 & F2905 & F2898 --> F2906
  C3 & C2 --> F2906
  F2906 --> F2907
  C9 & C10 & I2 --> F2907
  F2907 --> F2908
  C10 --> F2908
  classDef thisPr fill:#ffe08a,stroke:#b8860b,stroke-width:4px,color:#000
  class F2903 thisPr
```

- Blocked by: Comfy-Org#18719 (FE-2897), Comfy-Org#18715 (FE-2894), C1/C3 on testcloud.
- Unblocks: FE-2904 (API client on the session), then FE-2905; FE-2906
rows E2E-02/05.

---------

Co-authored-by: mattmillerai <7741082+mattmillerai@users.noreply.github.com>
ksanislo pushed a commit to ksanislo/ComfyUI_frontend that referenced this pull request Sep 29, 2026
…e shared web session (2/2) (Comfy-Org#18881)

> **Do not merge.** Part 2 of 2 for FE-2898, stacked on part 1 Comfy-Org#18880
(identity and sign-in gating). Gated on C5 cloud#10555. 11 files, 224
non-test lines.

## Why

Part 1 recognises a Cloud session on billing-web. This part gives that
session a workspace scope and sends billing requests on the cookie, so
the flag-on path never mints a workspace token.

## How

- **Workspace lookup:** `GET /workspaces/current` is authorized with
`authorize()` from FE-2895.
- The request uses `credentials: 'include'`, `X-Comfy-Client`, and
`X-Comfy-Workspace-ID` from the entry link's bound workspace. Absent
means personal.
  - The phase is `authenticated` only once that lookup succeeds.
- **Refusals from C5:**
  - `workspace_access_denied` → `ACCESS_DENIED`
  - `workspace_id_invalid` → `WORKSPACE_NOT_FOUND`
  - 401 → `NOT_AUTHENTICATED`
  - Anything else maps to the existing `TOKEN_EXCHANGE_FAILED`.
- **Billing client:** `createWebSessionBillingClient` uses
`createCredentialedBillingTransport` (`@comfyorg/account-core/billing`,
opt-in `webSession` from Comfy-Org#18716). Its `getWorkspaceToken` rejects:
billing-web never mints on this path.
- **UI:** `BillingShell`, `HostedSurface` and `useBilledWorkspace` read
the scope from the decision point. On a refusal, `SignInView` shows the
refusal copy.

### Decisions for review
1. **A refused workspace hides the sign-in form.** The visitor is signed
in, but the entry names a workspace they can't use. Signing in again
wouldn't fix that, so the page shows only the refusal.
2. **The role defaults to `member`** when `/workspaces/current` omits
it. That is the least privilege; the server still enforces every write.
3. **The transport may re-read the session.** When the credentialed
transport has a request refused, it re-reads the session
(`readWebSession` with `expectedUserId`) before failing. That can add a
`GET /api/auth/session` on a refusal.

## Flag-off parity

The flag-off path doesn't reach any of this: the mode is
`session-client` and the existing token client is unchanged. The part 1
flag-off pin, including its timing tests, passes here unchanged, and so
does `src/platform/auth/webSessionFlagOff.test.ts`.

The flag-on tests (SS1, SS6, SO4) cover:
- the exact headers and credentials on the workspace lookup and on
billing requests;
- no `Authorization` header and no `/api/auth/token`;
- refusal copy per code.

## AS IS / TO BE

| Flag on | AS IS | TO BE |
| --- | --- | --- |
| Billing requests | `Authorization: Bearer <workspace token>` | cookie
+ `X-Comfy-Workspace-ID`, no token |
| Entry workspace refused | sign-in form | refusal copy, no form |

Screenshots will be added by editing this description once testcloud
serves C5.

## Links

- TDD: https://app.notion.com/p/3de6d73d365081d7a4c8f808c0a0384b
- Action items:
https://app.notion.com/p/3e56d73d3650812d962decc97fbd9ea3
- Linear: https://linear.app/comfyorg/issue/FE-2898

## Where this PR sits in the plan

| Ticket | Scope | Blocked by | State |
| --- | --- | --- | --- |
| FE-2891 | flag (cloud) + website/billing-web readers | C11 cloud#10689
+ BE-17276 probe (readers) | Comfy-Org#18708 merged; readers Comfy-Org#18874, do not merge
|
| FE-2892 | web session client (+ revoke-all follow-up) | C2a
cloud#10589 for revoke-all | Comfy-Org#18710 merged; revoke-all Comfy-Org#18869, do not
merge |
| FE-2893 | ADR | none | Comfy-Org#18707 merged |
| FE-2894 | identity + boot rules | BE-17063 on testcloud | Comfy-Org#18715, do
not merge |
| FE-2895 | `authorize()` | C5 cloud#10555 | Comfy-Org#18716, do not merge |
| FE-2897 | lifecycle, heartbeat | FE-2894, C1 | Comfy-Org#18719, do not merge |
| FE-2900 | lazy token mint from the session | FE-2895, C8 cloud#10585 |
Comfy-Org#18870, do not merge |
| FE-2901 | non-web clients stay on tokens | — | Comfy-Org#18711 |
| FE-2903 | cloud app joins the lifecycle | FE-2897 | Comfy-Org#18871, do not
merge |
| FE-2904 | cloud API client on `authorize()` | FE-2903, FE-2895, C5 |
Comfy-Org#18875, do not merge |
| FE-2905 | socket + media carry workspace | FE-2904, C6, C7 | Comfy-Org#18878,
do not merge |
| FE-2896 | website header | FE-2891 readers, FE-2894, C11 | Comfy-Org#18877, do
not merge |
| FE-2899 | website credits | FE-2896, FE-2895, C5 | in progress |
| **FE-2898 (this PR: B)** | billing-web on the session (A identity, B
transport) | FE-2891 readers, FE-2894, FE-2895, C5 | A + B, do not merge
|
| FE-2906 | cross-origin E2E harness | — | Comfy-Org#18718 (harness only) |
| FE-2902 / 2907 / 2908 | platform, rollout, cleanup | other repo / ops
/ after ramp | not started |

```mermaid
flowchart LR
  subgraph BE["BE · cloud ingest and infra"]
    C0["BE-17071 C0 preview CORS gate"]
    C1["BE-17061 C1 sessions table + revocable cookie"]
    C3["BE-17063 C3 GET /session, trusted origins, flag"]
    C4["BE-17062 C4 shared workspace resolution"]
    C5["BE-17066 C5 cookie on API: CSRF, Origin, workspace header"]
    C2["BE-17064 C2 revoke-all, purge, caps"]
    C6["BE-17067 C6 WebSocket on session"]
    C7["BE-17068 C7 scoped media"]
    C8["BE-17069 C8 token mint from session"]
    C9["BE-17065 C9 Redis cache + load test"]
    C10["BE-17072 C10 prod config, cleanup"]
    C11["C11 flag before sign-in (OQ17)"]
    B135["BE-17135 serve unified_web_session (server AND)"]
    I2["BE-17070 I2 edge limit, log + DNS audit"]
  end
  subgraph SDK["FE · account-core"]
    F2891["FE-2891 flag"]
    F2892["FE-2892 web session client"]
    F2894["FE-2894 identity + boot rules"]
    F2897["FE-2897 lifecycle, heartbeat"]
    F2895["FE-2895 authorize()"]
    F2900["FE-2900 lazy token mint"]
    F2901["FE-2901 non-web stay on tokens"]
  end
  subgraph APPS["FE · apps"]
    F2896["FE-2896 website header"]
    F2903["FE-2903 cloud lifecycle"]
    F2899["FE-2899 website credits"]
    F2904["FE-2904 cloud API client"]
    F2905["FE-2905 socket + media"]
    F2898["FE-2898 billing-web joins session"]
    F2902["FE-2902 platform"]
  end
  subgraph QA["QA · rollout · docs"]
    F2906["FE-2906 cross-origin E2E"]
    F2893["FE-2893 ADR + docs"]
    F2907["FE-2907 ramp + rollback"]
    F2908["FE-2908 cleanup"]
  end
  C0 --> C1 --> C3 --> C5
  C3 --> C11 --> F2891
  B135 --> F2891
  C4 --> C5
  C1 --> C2
  C1 --> C9
  C5 --> C6 & C7 & C8
  C3 --> F2892
  C1 --> F2892
  F2891 --> F2894
  C3 --> F2894
  F2892 --> F2894 --> F2896
  F2894 --> F2897 --> F2903
  C1 --> F2897
  F2892 --> F2895
  C5 --> F2895
  F2895 --> F2899 & F2904 & F2900 & F2901 & F2902
  C5 --> F2899 & F2904
  F2903 --> F2904 --> F2905
  C6 --> F2905
  C7 --> F2905
  C8 --> F2900
  F2894 --> F2898
  F2895 --> F2898
  C3 --> F2898
  C5 --> F2898
  F2903 & F2904 & F2905 & F2898 --> F2906
  C3 & C2 --> F2906
  F2906 --> F2907
  C9 & C10 & I2 --> F2907
  F2907 --> F2908
  C10 --> F2908
  classDef thisPr fill:#ffe08a,stroke:#b8860b,stroke-width:4px,color:#000
  class F2898 thisPr
```

- Blocked by: FE-2891 readers Comfy-Org#18874, FE-2894 Comfy-Org#18715, FE-2895 Comfy-Org#18716, C5
cloud#10555
- Unblocks: M2 billing-web checkout on the shared session

---------

Co-authored-by: mattmillerai <7741082+mattmillerai@users.noreply.github.com>
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
ksanislo pushed a commit to ksanislo/ComfyUI_frontend that referenced this pull request Sep 29, 2026
…fy-Org#18882)

> **Do not merge.** Stacked on FE-2896 (Comfy-Org#18877) with the FE-2895
(Comfy-Org#18716) merge, and gated on C5 cloud#10555. The diff also shows the
fe-2895 merge. This PR's own change is 7 files, about 160 non-test
lines.

## Why

In FE-2896's session mode, the website header shows the account but no
credit balance, because the balance read needs a minted workspace token.
This is the first consumer of `authorize()` on the session. It proves
the cookie path end to end on a read, with no workspace token in page
memory.

## How

- **`workshop-session-balance.ts`**: `readSessionBalance(session,
fetchImpl)` sends `GET /api/billing/balance` through
`createRequestAuthorizer(...)` → `authorize({ kind: 'session', session
}, { target: 'ingest', method: 'GET' })`.
- The request carries `credentials: 'include'` and `X-Comfy-Client`. It
has no `Authorization` and no workspace header, which means personal.
- The authorizer's `getWorkspaceToken` always rejects, so this path can
never mint a token.
- The result is one of `ok`, `unavailable`, `session_ended` or
`unknown`.
- **`useWorkshopSessionBalance`**: one shared state per page. It reads
once, again on window focus, and never again after a 401. The header
mounts twice (desktop and mobile) but sends one request.
- **`HeaderSessionAccount.vue`** shows a credits chip, styled like the
Firebase one, only when the state is `ok`.
- **The decision is FE-2896's.** `useWorkshopWebSession()` keeps the
whole `WebSession`, and this module is loaded only when
`resolveWorkshopAccountSource()` answered `'session'`. There is no new
flag read.
- **`X-Comfy-Client` is converged:** `webSessionFlag` (readers, Comfy-Org#18874)
now imports `COMFY_CLIENT` from requestAuth instead of keeping its own
copy.
- The Firebase balance reader (`workshop-balance.ts`) is untouched. The
session module keeps its own short copy of the balance-body parse, so
the Firebase path's code and requests are identical to main.

### Decisions for review
1. **Workspace.** Session mode reads the personal workspace. The session
header has no workspace picker, and the Firebase selection lives in a
minted token that doesn't exist here. Nothing is derived from other
server data.
2. **Refusals.** C5 403s (`origin_not_allowed`,
`workspace_access_denied`, `csrf_invalid`, `cross_site_request`), a 400
`workspace_id_invalid`, 5xx, and network or body errors all hide the
balance. It is read again on the next focus. A 401 hides it and stops
reading. Neither case signs anyone out; sign-out stays with the identity
module.
3. **Out of scope:**
- Buying credits and the top-up watch: `BuyCreditsDialog` is still empty
in session mode.
   - Workspace switching.
   - Refreshing the balance after a run.
- The balance on `ModelDetail`, which still calls `useWorkshopCredits`
and can start Firebase session state in session mode. That is a
follow-up, and it also touches FE-2896's "no Firebase on comfy.org"
criterion.

## Flag-off parity

- The request-table test (`it.for`) pins both sources:
- Firebase: exactly `{ authorization: 'Bearer …' }`, with no
`credentials`.
- Session: exactly `{ x-comfy-client }`, with `credentials: 'include'`,
one request and no workspace header.
- The HeaderMain request list now records `Authorization` and
`X-Comfy-Client` on every request. The flag-off rows are unchanged. The
live-session row adds only the balance read, with no `Authorization` and
no `/api/auth/token`.
- `src/platform/auth/webSessionFlagOff.test.ts` passes.
- Mutations, each red:
  - always use the session header;
  - drop `credentials`;
  - add `Authorization`;
  - mint a token;
  - send `X-Comfy-Workspace-ID`;
  - treat a 403 as a 401;
  - keep reading after a 401.

## End-to-end coverage

No `apps/website/e2e/` spec is added. The credits balance only renders
when `unified_web_session` is on and a real `__Host-comfy_session`
cookie from Cloud ingest is present. The website Playwright suite serves
a static build with no Cloud backend and blocks cross-origin requests,
so it cannot hold that session. The cross-origin session flow is covered
by the `playwright.session.config.ts` harness (Comfy-Org#18718), which runs
against staging. The flag-off path, which is what every visitor sees
today, is unchanged, and the existing website e2e suite covers it. The
balance behaviour itself (read on sign-in, clear on sign-out, stale
reads ignored across a same-user sign-out and sign-in) is pinned in
`workshop-session-balance.test.ts`.

## AS IS / TO BE

| Session mode | AS IS | TO BE |
| --- | --- | --- |
| Header | account chip, no balance | account chip + credits chip from
the cookie read |
| Flag off | Firebase header + balance | unchanged |

Screenshots will be added by editing this description once testcloud
serves C5.

## Links

- TDD: https://app.notion.com/p/3de6d73d365081d7a4c8f808c0a0384b
- Action items:
https://app.notion.com/p/3e56d73d3650812d962decc97fbd9ea3
- Linear: https://linear.app/comfyorg/issue/FE-2899

## Where this PR sits in the plan

| Ticket | Scope | Blocked by | State |
| --- | --- | --- | --- |
| FE-2891 | flag (cloud) + website/billing-web readers | C11 cloud#10689
+ BE-17276 probe (readers) | Comfy-Org#18708 merged; readers Comfy-Org#18874, do not merge
|
| FE-2892 | web session client (+ revoke-all follow-up) | C2a
cloud#10589 for revoke-all | Comfy-Org#18710 merged; revoke-all Comfy-Org#18869, do not
merge |
| FE-2893 | ADR | none | Comfy-Org#18707 merged |
| FE-2894 | identity + boot rules | BE-17063 on testcloud | Comfy-Org#18715, do
not merge |
| FE-2895 | `authorize()` | C5 cloud#10555 | Comfy-Org#18716, do not merge |
| FE-2897 | lifecycle, heartbeat | FE-2894, C1 | Comfy-Org#18719, do not merge |
| FE-2900 | lazy token mint from the session | FE-2895, C8 cloud#10585 |
Comfy-Org#18870, do not merge |
| FE-2901 | non-web clients stay on tokens | — | Comfy-Org#18711 |
| FE-2903 | cloud app joins the lifecycle | FE-2897 | Comfy-Org#18871, do not
merge |
| FE-2904 | cloud API client on `authorize()` | FE-2903, FE-2895, C5 |
Comfy-Org#18875, do not merge |
| FE-2905 | socket + media carry workspace | FE-2904, C6, C7 | Comfy-Org#18878,
do not merge |
| FE-2896 | website header | FE-2891 readers, FE-2894, C11 | Comfy-Org#18877, do
not merge |
| **FE-2899 (this PR)** | website credits | FE-2896, FE-2895, C5 | this
PR, do not merge |
| FE-2898 | billing-web on the session (A identity, B transport) |
FE-2891 readers, FE-2894, FE-2895, C5 | Comfy-Org#18880 + Comfy-Org#18881, do not merge |
| FE-2906 | cross-origin E2E harness | — | Comfy-Org#18718 (harness only) |
| FE-2902 / 2907 / 2908 | platform, rollout, cleanup | other repo / ops
/ after ramp | not started |

```mermaid
flowchart LR
  subgraph BE["BE · cloud ingest and infra"]
    C0["BE-17071 C0 preview CORS gate"]
    C1["BE-17061 C1 sessions table + revocable cookie"]
    C3["BE-17063 C3 GET /session, trusted origins, flag"]
    C4["BE-17062 C4 shared workspace resolution"]
    C5["BE-17066 C5 cookie on API: CSRF, Origin, workspace header"]
    C2["BE-17064 C2 revoke-all, purge, caps"]
    C6["BE-17067 C6 WebSocket on session"]
    C7["BE-17068 C7 scoped media"]
    C8["BE-17069 C8 token mint from session"]
    C9["BE-17065 C9 Redis cache + load test"]
    C10["BE-17072 C10 prod config, cleanup"]
    C11["C11 flag before sign-in (OQ17)"]
    B135["BE-17135 serve unified_web_session (server AND)"]
    I2["BE-17070 I2 edge limit, log + DNS audit"]
  end
  subgraph SDK["FE · account-core"]
    F2891["FE-2891 flag"]
    F2892["FE-2892 web session client"]
    F2894["FE-2894 identity + boot rules"]
    F2897["FE-2897 lifecycle, heartbeat"]
    F2895["FE-2895 authorize()"]
    F2900["FE-2900 lazy token mint"]
    F2901["FE-2901 non-web stay on tokens"]
  end
  subgraph APPS["FE · apps"]
    F2896["FE-2896 website header"]
    F2903["FE-2903 cloud lifecycle"]
    F2899["FE-2899 website credits"]
    F2904["FE-2904 cloud API client"]
    F2905["FE-2905 socket + media"]
    F2898["FE-2898 billing-web joins session"]
    F2902["FE-2902 platform"]
  end
  subgraph QA["QA · rollout · docs"]
    F2906["FE-2906 cross-origin E2E"]
    F2893["FE-2893 ADR + docs"]
    F2907["FE-2907 ramp + rollback"]
    F2908["FE-2908 cleanup"]
  end
  C0 --> C1 --> C3 --> C5
  C3 --> C11 --> F2891
  B135 --> F2891
  C4 --> C5
  C1 --> C2
  C1 --> C9
  C5 --> C6 & C7 & C8
  C3 --> F2892
  C1 --> F2892
  F2891 --> F2894
  C3 --> F2894
  F2892 --> F2894 --> F2896
  F2894 --> F2897 --> F2903
  C1 --> F2897
  F2892 --> F2895
  C5 --> F2895
  F2895 --> F2899 & F2904 & F2900 & F2901 & F2902
  C5 --> F2899 & F2904
  F2903 --> F2904 --> F2905
  C6 --> F2905
  C7 --> F2905
  C8 --> F2900
  F2894 --> F2898
  F2895 --> F2898
  C3 --> F2898
  C5 --> F2898
  F2903 & F2904 & F2905 & F2898 --> F2906
  C3 & C2 --> F2906
  F2906 --> F2907
  C9 & C10 & I2 --> F2907
  F2907 --> F2908
  C10 --> F2908
  classDef thisPr fill:#ffe08a,stroke:#b8860b,stroke-width:4px,color:#000
  class F2899 thisPr
```

- Blocked by: FE-2896 Comfy-Org#18877, FE-2895 Comfy-Org#18716, C5 cloud#10555
- Unblocks: Session-mode buy credits and workspace picker (follow-up)

---------

Co-authored-by: mattmillerai <7741082+mattmillerai@users.noreply.github.com>
Co-authored-by: GitHub Action <action@github.com>
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
ksanislo pushed a commit to ksanislo/ComfyUI_frontend that referenced this pull request Sep 29, 2026
…itch without a mint (Comfy-Org#18875)

> **Stacked on Comfy-Org#18871 (FE-2903) and includes a merge of Comfy-Org#18716 (FE-2895,
`authorize()`). Do not merge** until those merge and C5 (BE-17066,
cloud#10555) is on testcloud. My change is the last commit
(`e7085c16e7`); the diff also shows the FE-2895 merge until Comfy-Org#18716
lands.

## Why

With `unified_web_session` on, the cloud app should call ingest on the
session cookie instead of a token (TDD §9, §12, F4). That means the
headers come from `authorize()`, switching workspace changes a header
instead of minting a token, and the one automatic retry is tied to the
user and workspace the request started for. With the flag off, nothing
may change.

## How

- **One decision point.** `src/platform/auth/session/webSessionFetch.ts`
is a registration slot the cloud session store (FE-2903) fills in
`start()` when the session is on, and clears on dispose.
- `api.ts`, `workspaceAuthStore` and `authStore` check it synchronously.
When the slot is empty the code runs exactly as today.
- A slot rather than importing the store avoids two import cycles that
fallow flagged.
- **`api.fetchApi`.** When the session is on and signed in, the request
goes through `fetchOnWebSession`, which takes its headers from
`authorize()`:
  - `X-Comfy-Client` on every request.
- `X-Comfy-Workspace-ID` only for a team workspace (absent means
personal).
  - `X-CSRF-Token` on POST, PUT, PATCH and DELETE.
  - `credentials: 'include'` and no `Authorization` header.

Otherwise the unchanged token path runs; it is moved verbatim into
`addCloudAuthHeader` to keep `fetchApi` under fallow's complexity limit.
- **Retries.**
- `csrf_invalid`: one re-read of the session, pinned to the same user,
then one retry in the same workspace, only if the user and session epoch
are unchanged. Otherwise the original 403 is returned. Later requests
reuse the fresh token, and a streaming body is never replayed.
- `workspace_access_denied`: the selection is dropped through the
existing revoked-workspace path, and the request is never replayed in
another workspace.
- **Workspace switch.** With the session on, the switch calls `GET
/api/workspaces/current` with the workspace header and stores id, name,
type and role. It mints no token. With no signed-in session it falls
back to today's switch.
- **`authStore.getAuthHeader`.** With the session on, it returns the
user's Firebase or API-key header instead of minting a workspace token,
so the router's check on every navigation no longer mints.
- **Not in this PR:**
- Other ingest callers: `workspaceApi` (axios), remote widgets and agent
consent stay on today's tokens.
- With the flag on, remote widgets resolve to the personal workspace.
This is a flag-on-only gap; moving the axios clients onto `authorize()`
is a proposed follow-up.
- WebSocket and media URLs are FE-2905. The comfy-api session mint is
FE-2900.
  - `permissions` are not stored, since nothing reads them yet.

## AS IS / TO BE

Flag off: `src/platform/auth/webSessionFlagOff.test.ts` is
byte-identical to the base and passes. The full `src` and account-core
vitest run is 1620 files, 23152 tests.

Flag on: `webSessionFlagOn.test.ts` gains five cases.
- **Boot into a remembered team workspace.** The GET carries the client
and workspace headers with `include` and no `Authorization`. The POST
adds CSRF. `getAuthHeader` returns the Firebase header. Switching to
personal changes only the header, and `/api/auth/token` is never called.
- **`csrf_invalid`, same user.** One re-read, then one retry, and later
requests use the fresh token.
- **`csrf_invalid` after the user changed.** The request is abandoned.
- **`workspace_access_denied`.** The selection is dropped, and the
request is not replayed.
- **A switch into a refused workspace** throws.

Eleven mutations were each reverted with the full suites rerun, and all
went red:

| Mutation |
| --- |
| no CSRF retry |
| the re-read ignores the user |
| denied workspace not dropped |
| workspace header sent for the personal workspace |
| `fetchApi` ignores the session |
| request method dropped |
| fresh CSRF token not reused |
| the switch mints a token |
| `getAuthHeader` mints a token |
| session never registered |
| denied request replayed in another workspace |

Checks: typecheck, eslint, oxlint, oxfmt and knip are clean, and fallow
reports 0 new findings against the FE-2903 branch.

## Links

- TDD: https://app.notion.com/p/3de6d73d365081d7a4c8f808c0a0384b
(sections 9, 12, F4)
- Action items:
https://app.notion.com/p/3e56d73d3650812d962decc97fbd9ea3
- Linear: https://linear.app/comfyorg/issue/FE-2904
- Contract: Comfy-Org/cloud#10555 (C5)

## Where this PR sits in the plan

| Ticket | Scope | Blocked by | State |
| --- | --- | --- | --- |
| FE-2891 | flag (cloud) + website/billing-web readers | C11 cloud#10689
+ BE-17276 probe (readers) | Comfy-Org#18708 merged; readers Comfy-Org#18874, do not merge
|
| FE-2892 | web session client (+ revoke-all follow-up) | C2a
cloud#10589 for revoke-all | Comfy-Org#18710 merged; revoke-all Comfy-Org#18869, do not
merge |
| FE-2893 | ADR | none | Comfy-Org#18707 merged |
| FE-2894 | identity + boot rules | BE-17063 on testcloud | Comfy-Org#18715, do
not merge |
| FE-2895 | `authorize()` | C5 cloud#10555 | Comfy-Org#18716, do not merge |
| FE-2897 | lifecycle, heartbeat | FE-2894, C1 | Comfy-Org#18719, do not merge |
| FE-2900 | lazy token mint from the session | FE-2895, C8 cloud#10585 |
Comfy-Org#18870, do not merge |
| FE-2901 | non-web clients stay on tokens | — | Comfy-Org#18711 |
| FE-2903 | cloud app joins the lifecycle | FE-2897 | Comfy-Org#18871, do not
merge |
| **FE-2904 (this PR)** | cloud API client on `authorize()` | FE-2903,
FE-2895, C5 | Comfy-Org#18875, do not merge |
| FE-2905 | socket + media carry workspace | FE-2904, C6, C7 | next |
| FE-2896 / 2899 / 2898 | website header, website credits, billing-web |
FE-2891 readers, FE-2894/2895, C5, C11 | next |
| FE-2906 | cross-origin E2E harness | — | Comfy-Org#18718 (harness only) |
| FE-2902 / 2907 / 2908 | platform, rollout, cleanup | other repo / ops
/ after ramp | not started |

```mermaid
flowchart LR
  subgraph BE["BE · cloud ingest and infra"]
    C0["BE-17071 C0 preview CORS gate"]
    C1["BE-17061 C1 sessions table + revocable cookie"]
    C3["BE-17063 C3 GET /session, trusted origins, flag"]
    C4["BE-17062 C4 shared workspace resolution"]
    C5["BE-17066 C5 cookie on API: CSRF, Origin, workspace header"]
    C2["BE-17064 C2 revoke-all, purge, caps"]
    C6["BE-17067 C6 WebSocket on session"]
    C7["BE-17068 C7 scoped media"]
    C8["BE-17069 C8 token mint from session"]
    C9["BE-17065 C9 Redis cache + load test"]
    C10["BE-17072 C10 prod config, cleanup"]
    C11["C11 flag before sign-in (OQ17)"]
    B135["BE-17135 serve unified_web_session (server AND)"]
    I2["BE-17070 I2 edge limit, log + DNS audit"]
  end
  subgraph SDK["FE · account-core"]
    F2891["FE-2891 flag"]
    F2892["FE-2892 web session client"]
    F2894["FE-2894 identity + boot rules"]
    F2897["FE-2897 lifecycle, heartbeat"]
    F2895["FE-2895 authorize()"]
    F2900["FE-2900 lazy token mint"]
    F2901["FE-2901 non-web stay on tokens"]
  end
  subgraph APPS["FE · apps"]
    F2896["FE-2896 website header"]
    F2903["FE-2903 cloud lifecycle"]
    F2899["FE-2899 website credits"]
    F2904["FE-2904 cloud API client"]
    F2905["FE-2905 socket + media"]
    F2898["FE-2898 billing-web joins session"]
    F2902["FE-2902 platform"]
  end
  subgraph QA["QA · rollout · docs"]
    F2906["FE-2906 cross-origin E2E"]
    F2893["FE-2893 ADR + docs"]
    F2907["FE-2907 ramp + rollback"]
    F2908["FE-2908 cleanup"]
  end
  C0 --> C1 --> C3 --> C5
  C3 --> C11 --> F2891
  B135 --> F2891
  C4 --> C5
  C1 --> C2
  C1 --> C9
  C5 --> C6 & C7 & C8
  C3 --> F2892
  C1 --> F2892
  F2891 --> F2894
  C3 --> F2894
  F2892 --> F2894 --> F2896
  F2894 --> F2897 --> F2903
  C1 --> F2897
  F2892 --> F2895
  C5 --> F2895
  F2895 --> F2899 & F2904 & F2900 & F2901 & F2902
  C5 --> F2899 & F2904
  F2903 --> F2904 --> F2905
  C6 --> F2905
  C7 --> F2905
  C8 --> F2900
  F2894 --> F2898
  F2895 --> F2898
  C3 --> F2898
  C5 --> F2898
  F2903 & F2904 & F2905 & F2898 --> F2906
  C3 & C2 --> F2906
  F2906 --> F2907
  C9 & C10 & I2 --> F2907
  F2907 --> F2908
  C10 --> F2908
  classDef thisPr fill:#ffe08a,stroke:#b8860b,stroke-width:4px,color:#000
  class F2904 thisPr
```

- Blocked by: Comfy-Org#18871 (FE-2903) and Comfy-Org#18716 (FE-2895); C5 cloud#10555 on
testcloud.
- Unblocks: FE-2905 (socket and media), FE-2906 rows E2E-03/06 and
FS-13/14.

---------

Co-authored-by: mattmillerai <7741082+mattmillerai@users.noreply.github.com>
Co-authored-by: GitHub Action <action@github.com>
laurigates pushed a commit to laurigates/ComfyUI_frontend that referenced this pull request Sep 29, 2026
…space (Comfy-Org#18878)

> **Do not merge.** Stacked on FE-2904 (Comfy-Org#18875) and gated on C6
cloud#10583 (+Comfy-Org#10699) and C7 cloud#10584 (+Comfy-Org#10698). The diff is 6 files:
about 125 non-test lines.

## Why

With `unified_web_session` on, API requests already travel on the
session cookie with `X-Comfy-Workspace-ID` (FE-2904). Two surfaces can't
carry that header:
- the WebSocket handshake;
- media URLs loaded by `<img>` / `<video>` tags.

Without this PR they would still need a minted token in the URL, and
they would read the personal workspace in a team. C6 and C7 let both
accept the cookie and a `?workspace_id=` query parameter instead.

## How

Everything hangs off the single registration slot `webSessionRequests()`
from FE-2904. There is no second flag read.

- **`WebSessionRequests.workspaceId()`** returns the team workspace id
only while the tab is signed in on the session. Otherwise it returns
nothing, which means personal.
- **Socket (`api.ts`):** the auth params come from a private
`addSocketAuth(params)`.
- Signed in on the session: no `token`. `workspace_id` is set for a team
and left out for personal.
  - No session: today's token code, moved as is.
  - With the flag on, no session and no token, no socket opens.
- **Reconnect:**
- `api.reconnectSocket()` re-handshakes and keeps the client id.
`resetSocket()` still clears the ids, and both share `replaceSocket()`.
- `cloudWebSessionStore` watches the signed-in user and the team
workspace, and reconnects on any change while signed in. There is no
token mint.
- **Media URLs:** `apiURL()` passes the media routes through
`scopeMediaRoute`, which adds `workspace_id` for a team and never
duplicates it. The routes are `/view`, `/viewvideo`, `/vhs/viewvideo`,
`/vhs/viewaudio` and `/assets/:id/content`, with or without an `/api`
prefix.

### Decisions for review
1. **Flag on and signed out: no socket.** Today a tokenless `/ws` keeps
reopening. One gap is covered only by a reload: the flag is on, the
session was never created, and Firebase signs in again in the same page.
2. **A removed team member's socket retries every 300 ms.** It stops
when the next API call gets `workspace_access_denied`, which drops the
workspace and reconnects in personal. That matches today's token-socket
loop, and no probe request is added.
3. **A Cloud workspace switch may open one extra short-lived socket**
before the reload. The newer socket wins and the older one is closed.
4. **Not scoped:** literal `api/view` strings that don't go through
`apiURL` (`useWidgetSelectItems.getMediaUrl`, `LoaderManager`,
`BackgroundImageUpload`), and server-supplied `preview_url`s. These fall
back to C7's cross-workspace lookup. Moving them onto `apiURL` would
change the flag-off output, so it is left for a follow-up.
5. **Header or query, never both.** `fetchApi` names the workspace only
in `X-Comfy-Workspace-ID`, and its URL skips `scopeMediaRoute`. The
query is only for URLs that tags load without headers. A test pins that
a session media fetch sends the header and a bare URL, and it goes red
if `fetchApi` goes back to the scoped URL.

## Flag-off parity

- With the slot empty, `apiURL` returns the route unchanged, and the
socket runs today's token code. `addSocketAuth` returns true, as before.
- The shared harness `src/platform/auth/webSessionFlagOff.test.ts` is
extended, not loosened. It now also pins `/api/viewvideo…`,
`/api/vhs/viewaudio…` and `/api/assets/:id/content`, because `apiURL` is
on their path.
- Mutation checks, all red: drop `workspace_id` from the socket, keep
the token on the session, open a socket while signed out, remove the
workspace reconnect, leave media unscoped.

## AS IS / TO BE

| Flag on, team workspace | AS IS | TO BE |
| --- | --- | --- |
| Socket | `/ws?token=<minted>` | `/ws?workspace_id=<team>` on the
cookie |
| Media URL | `/api/view?filename=…` (personal) |
`/api/view?filename=…&workspace_id=<team>` |
| Flag off | unchanged | unchanged |

Network screenshots will be added by editing this description once
testcloud serves C6/C7.

## Links

- TDD: https://app.notion.com/p/3de6d73d365081d7a4c8f808c0a0384b
- Action items:
https://app.notion.com/p/3e56d73d3650812d962decc97fbd9ea3
- Linear: https://linear.app/comfyorg/issue/FE-2905

## Where this PR sits in the plan

| Ticket | Scope | Blocked by | State |
| --- | --- | --- | --- |
| FE-2891 | flag (cloud) + website/billing-web readers | C11 cloud#10689
+ BE-17276 probe (readers) | Comfy-Org#18708 merged; readers Comfy-Org#18874, do not merge
|
| FE-2892 | web session client (+ revoke-all follow-up) | C2a
cloud#10589 for revoke-all | Comfy-Org#18710 merged; revoke-all Comfy-Org#18869, do not
merge |
| FE-2893 | ADR | none | Comfy-Org#18707 merged |
| FE-2894 | identity + boot rules | BE-17063 on testcloud | Comfy-Org#18715, do
not merge |
| FE-2895 | `authorize()` | C5 cloud#10555 | Comfy-Org#18716, do not merge |
| FE-2897 | lifecycle, heartbeat | FE-2894, C1 | Comfy-Org#18719, do not merge |
| FE-2900 | lazy token mint from the session | FE-2895, C8 cloud#10585 |
Comfy-Org#18870, do not merge |
| FE-2901 | non-web clients stay on tokens | — | Comfy-Org#18711 |
| FE-2903 | cloud app joins the lifecycle | FE-2897 | Comfy-Org#18871, do not
merge |
| FE-2904 | cloud API client on `authorize()` | FE-2903, FE-2895, C5 |
Comfy-Org#18875, do not merge |
| **FE-2905 (this PR)** | socket + media carry workspace | FE-2904, C6,
C7 | this PR, do not merge |
| FE-2896 | website header | FE-2891 readers, FE-2894, C11 | Comfy-Org#18877, do
not merge |
| FE-2899 / 2898 | website credits, billing-web | FE-2896, FE-2895, C5 |
next |
| FE-2906 | cross-origin E2E harness | — | Comfy-Org#18718 (harness only) |
| FE-2902 / 2907 / 2908 | platform, rollout, cleanup | other repo / ops
/ after ramp | not started |

```mermaid
flowchart LR
  subgraph BE["BE · cloud ingest and infra"]
    C0["BE-17071 C0 preview CORS gate"]
    C1["BE-17061 C1 sessions table + revocable cookie"]
    C3["BE-17063 C3 GET /session, trusted origins, flag"]
    C4["BE-17062 C4 shared workspace resolution"]
    C5["BE-17066 C5 cookie on API: CSRF, Origin, workspace header"]
    C2["BE-17064 C2 revoke-all, purge, caps"]
    C6["BE-17067 C6 WebSocket on session"]
    C7["BE-17068 C7 scoped media"]
    C8["BE-17069 C8 token mint from session"]
    C9["BE-17065 C9 Redis cache + load test"]
    C10["BE-17072 C10 prod config, cleanup"]
    C11["C11 flag before sign-in (OQ17)"]
    B135["BE-17135 serve unified_web_session (server AND)"]
    I2["BE-17070 I2 edge limit, log + DNS audit"]
  end
  subgraph SDK["FE · account-core"]
    F2891["FE-2891 flag"]
    F2892["FE-2892 web session client"]
    F2894["FE-2894 identity + boot rules"]
    F2897["FE-2897 lifecycle, heartbeat"]
    F2895["FE-2895 authorize()"]
    F2900["FE-2900 lazy token mint"]
    F2901["FE-2901 non-web stay on tokens"]
  end
  subgraph APPS["FE · apps"]
    F2896["FE-2896 website header"]
    F2903["FE-2903 cloud lifecycle"]
    F2899["FE-2899 website credits"]
    F2904["FE-2904 cloud API client"]
    F2905["FE-2905 socket + media"]
    F2898["FE-2898 billing-web joins session"]
    F2902["FE-2902 platform"]
  end
  subgraph QA["QA · rollout · docs"]
    F2906["FE-2906 cross-origin E2E"]
    F2893["FE-2893 ADR + docs"]
    F2907["FE-2907 ramp + rollback"]
    F2908["FE-2908 cleanup"]
  end
  C0 --> C1 --> C3 --> C5
  C3 --> C11 --> F2891
  B135 --> F2891
  C4 --> C5
  C1 --> C2
  C1 --> C9
  C5 --> C6 & C7 & C8
  C3 --> F2892
  C1 --> F2892
  F2891 --> F2894
  C3 --> F2894
  F2892 --> F2894 --> F2896
  F2894 --> F2897 --> F2903
  C1 --> F2897
  F2892 --> F2895
  C5 --> F2895
  F2895 --> F2899 & F2904 & F2900 & F2901 & F2902
  C5 --> F2899 & F2904
  F2903 --> F2904 --> F2905
  C6 --> F2905
  C7 --> F2905
  C8 --> F2900
  F2894 --> F2898
  F2895 --> F2898
  C3 --> F2898
  C5 --> F2898
  F2903 & F2904 & F2905 & F2898 --> F2906
  C3 & C2 --> F2906
  F2906 --> F2907
  C9 & C10 & I2 --> F2907
  F2907 --> F2908
  C10 --> F2908
  classDef thisPr fill:#ffe08a,stroke:#b8860b,stroke-width:4px,color:#000
  class F2905 thisPr
```

- Blocked by: FE-2904 Comfy-Org#18875, C6 cloud#10583 (+Comfy-Org#10699), C7 cloud#10584
(+Comfy-Org#10698)
- Unblocks: FE-2907 rollout: the cloud app's socket and media are
covered

---------

Co-authored-by: mattmillerai <7741082+mattmillerai@users.noreply.github.com>
Co-authored-by: GitHub Action <action@github.com>
github-merge-queue Bot pushed a commit that referenced this pull request Sep 29, 2026
…e-all contract (#18869)

> cloud#10589 (BE-17064 C2a, `POST /api/auth/sessions/revoke-all`) is
merged and #18926 synced its generated schema; this PR validates against
it.

## Why

`revokeAllWebSessions` was held out of #18710 in review: the route had
no contract, and the old version accepted any 2xx, which is the worst
lie this client could tell (the caller would believe every device is
signed out). cloud#10589 now defines the route and its response, so it
comes back validated.

## How

- `revokeAllWebSessions(options, csrfToken, getIdentityProof)`: `POST
/auth/sessions/revoke-all` with `credentials: 'include'`,
`Authorization: Bearer <proof>` and `X-CSRF-Token`.
- The contract authenticates this route with the Firebase ID token only
(`security: BearerAuth`). Accepting the cookie is a listed backend
follow-up in cloud#10696.
- The CSRF header and credentials are sent now so the cookie path works
when that follow-up lands.
- The 200 body is validated against `RevokeAllSessionsResponse` (`{
revoked: integer }`), the generated `zRevokeAllSessionsResponse` from
`@comfyorg/ingest-types/zod` (cloud#10589, synced by #18926).
- A 2xx that fails the schema (empty 204, `{}`, wrong types, HTML) is
`SESSION_UNAVAILABLE` and retryable; it is never reported as ok.
  - Non-2xx goes through the existing classifier.
- The testing fake serves the route. It checks the bearer, then a dead
session, then CSRF; a successful call revokes the session.
- Nothing in any app calls it yet, so the flag-off request harness is
unchanged (4/4).

## AS IS / TO BE

No UI; the evidence is tests.

- AS IS: no revoke-all client.
- TO BE: status-mapping rows, credentials, bearer and CSRF headers, six
schema-failing 2xx bodies (all transient), a stale CSRF token →
`CSRF_STALE`, and a successful revoke followed by `SESSION_REVOKED` on
the next read.

Mutations (each reverted, full suite rerun):

| Mutation | Tests red |
| --- | --- |
| accept any 2xx without validation | 6 |
| drop CSRF | 2 |
| drop credentials | 4 |
| drop Bearer | 3 |

account-core 1083 tests pass; typecheck, lint, knip and fallow are
clean.

## Links

- TDD: https://app.notion.com/p/3de6d73d365081d7a4c8f808c0a0384b
(sections 7, 9)
- Action items:
https://app.notion.com/p/3e56d73d3650812d962decc97fbd9ea3
- Linear: https://linear.app/comfyorg/issue/FE-2892
- Contract: Comfy-Org/cloud#10589, Comfy-Org/cloud#10696

## Where this PR sits in the plan

| Ticket | Scope | Blocked by | State |
| --- | --- | --- | --- |
| FE-2891 | flag (cloud) + website/billing-web readers | C11 cloud#10689
+ probe switch (readers) | #18708 merged; readers in progress |
| **FE-2892 (this PR)** | web session client (+ revoke-all follow-up) |
C2a cloud#10589 (merged) | #18710 merged; revoke-all #18869 ready for
review |
| FE-2893 | ADR | none | #18707 merged |
| FE-2894 | identity + boot rules | BE-17063 on testcloud | #18715, do
not merge |
| FE-2895 | `authorize()` | C5 cloud#10555 | #18716, do not merge |
| FE-2897 | lifecycle, heartbeat | FE-2894, C1 | #18719, do not merge |
| FE-2900 | lazy token mint from the session | FE-2895, C8 cloud#10585 |
#18870, do not merge |
| FE-2901 | non-web clients stay on tokens | — | #18711 |
| FE-2903 | cloud app joins the lifecycle | FE-2897 | #18871, do not
merge |
| FE-2904 | cloud API client on `authorize()` | FE-2903, FE-2895, C5 |
in progress |
| FE-2905 | socket + media carry workspace | FE-2904, C6, C7 | next |
| FE-2896 / 2899 / 2898 | website header, website credits, billing-web |
FE-2891 readers, FE-2894/2895, C5, C11 | next |
| FE-2906 | cross-origin E2E harness | — | #18718 (harness only) |
| FE-2902 / 2907 / 2908 | platform, rollout, cleanup | other repo / ops
/ after ramp | not started |

```mermaid
flowchart LR
  subgraph BE["BE · cloud ingest and infra"]
    C0["BE-17071 C0 preview CORS gate"]
    C1["BE-17061 C1 sessions table + revocable cookie"]
    C3["BE-17063 C3 GET /session, trusted origins, flag"]
    C4["BE-17062 C4 shared workspace resolution"]
    C5["BE-17066 C5 cookie on API: CSRF, Origin, workspace header"]
    C2["BE-17064 C2 revoke-all, purge, caps"]
    C6["BE-17067 C6 WebSocket on session"]
    C7["BE-17068 C7 scoped media"]
    C8["BE-17069 C8 token mint from session"]
    C9["BE-17065 C9 Redis cache + load test"]
    C10["BE-17072 C10 prod config, cleanup"]
    C11["C11 flag before sign-in (OQ17)"]
    B135["BE-17135 serve unified_web_session (server AND)"]
    I2["BE-17070 I2 edge limit, log + DNS audit"]
  end
  subgraph SDK["FE · account-core"]
    F2891["FE-2891 flag"]
    F2892["FE-2892 web session client"]
    F2894["FE-2894 identity + boot rules"]
    F2897["FE-2897 lifecycle, heartbeat"]
    F2895["FE-2895 authorize()"]
    F2900["FE-2900 lazy token mint"]
    F2901["FE-2901 non-web stay on tokens"]
  end
  subgraph APPS["FE · apps"]
    F2896["FE-2896 website header"]
    F2903["FE-2903 cloud lifecycle"]
    F2899["FE-2899 website credits"]
    F2904["FE-2904 cloud API client"]
    F2905["FE-2905 socket + media"]
    F2898["FE-2898 billing-web joins session"]
    F2902["FE-2902 platform"]
  end
  subgraph QA["QA · rollout · docs"]
    F2906["FE-2906 cross-origin E2E"]
    F2893["FE-2893 ADR + docs"]
    F2907["FE-2907 ramp + rollback"]
    F2908["FE-2908 cleanup"]
  end
  C0 --> C1 --> C3 --> C5
  C3 --> C11 --> F2891
  B135 --> F2891
  C4 --> C5
  C1 --> C2
  C1 --> C9
  C5 --> C6 & C7 & C8
  C3 --> F2892
  C1 --> F2892
  F2891 --> F2894
  C3 --> F2894
  F2892 --> F2894 --> F2896
  F2894 --> F2897 --> F2903
  C1 --> F2897
  F2892 --> F2895
  C5 --> F2895
  F2895 --> F2899 & F2904 & F2900 & F2901 & F2902
  C5 --> F2899 & F2904
  F2903 --> F2904 --> F2905
  C6 --> F2905
  C7 --> F2905
  C8 --> F2900
  F2894 --> F2898
  F2895 --> F2898
  C3 --> F2898
  C5 --> F2898
  F2903 & F2904 & F2905 & F2898 --> F2906
  C3 & C2 --> F2906
  F2906 --> F2907
  C9 & C10 & I2 --> F2907
  F2907 --> F2908
  C10 --> F2908
  classDef thisPr fill:#ffe08a,stroke:#b8860b,stroke-width:4px,color:#000
  class F2892 thisPr
```

- Blocked by: none (cloud#10589 and #18926 merged).
- Unblocks: FE-2897 host wiring for "sign out of all devices"; FE-2906
E2E-07.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants