Skip to content

FE-2893 docs(website): describe how the website signs in on the shared web session - #19756

Merged
dante01yoon merged 1 commit into
mainfrom
dante01yoon/fe-2893-website-auth-docs
Oct 1, 2026
Merged

dante01yoon merged 1 commit into
mainfrom
dante01yoon/fe-2893-website-auth-docs

Conversation

@dante01yoon

Copy link
Copy Markdown
Collaborator

Why

FE-2893 asks for an auth section in each README the shared web session touches. The account-core doc (packages/account-core/docs/web-session.md) and the billing-web README are already merged (#19449). The website README is the last one: it doesn't yet say where the website gets its account, what changes with unified_web_session on, or why Run still uses the comfy.org login.

How

A new ## Authentication section in apps/website/README.md, after "Which Cloud the Workshop talks to". It records what a maintainer can't read off the code quickly:

  • Flag off (default): the Firebase login exchanged at /api/auth/token, plus the one anonymous /api/features probe the flag costs.
  • Flag on:
    • the credentialed flag read with X-Comfy-Client;
    • the 800 ms cap before falling back to Firebase;
    • the GET /api/auth/session identity read on the host-only __Host-comfy_session cookie;
    • the balance read on the cookie;
    • the restore through POST /api/auth/session;
    • the fact that the website never sends X-CSRF-Token or calls DELETE.
  • Not wired yet (F3b): Run still sends the Firebase-exchanged Bearer token to the Router with credentials: 'omit'. It's blocked on the backend: the Router must accept session tokens, and comfy.org must be trusted for credentialed POST.
  • Unchanged clients: CLI, MCP, Desktop, API keys and localhost keep their tokens.

It links the ADR and the account-core doc instead of restating them. Every relative link resolves.

The docs.comfy.org suggestion (one sign-in across comfy.org, Cloud and billing; Desktop, CLI and API keys unchanged) is drafted separately for the docs team. It holds back "sign out everywhere" until that has a button: today only the account-core revokeAllWebSessions call exists, with no UI.

AS IS / TO BE

Docs only, no UI change.

Plan position

Item PR Status
ADR: shared web session on a host-only cookie #18707 merged
account-core doc, billing-web README #19449 merged
website README auth section this PR in review
docs.comfy.org suggestion handed to docs drafted
graph LR
  ADR["ADR #18707 merged"] --> AC["account-core + billing-web docs #19449 merged"]
  AC --> WEB["website README (this PR)"]
  WEB --> DOCS["docs.comfy.org suggestion"]
  style WEB fill:#f9d71c,stroke:#333,stroke-width:2px
Loading

Fixes FE-2893

@vercel

vercel Bot commented Oct 1, 2026

Copy link
Copy Markdown

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

2 Skipped Deployments
Project Deployment Actions Updated
billing-web Ignored Ignored Oct 1, 2026 1:33pm UTC
billing-web-test Ignored Ignored Oct 1, 2026 1:33pm UTC

Request Review

@github-actions

github-actions Bot commented Oct 1, 2026 •

Copy link
Copy Markdown
Contributor

🌐 Website E2E

Tip

All tests passed.

Status ✅ Passed
Report View Report

🌾 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 4d6f2a21f324d2ed19522934dfe33a3778a7415f

Full docs: ADR-DEVEX-LINT-0015

🔗 Website Preview

Website Preview: https://comfy-website-preview-pr-19756.vercel.app

Models is built and gated by PostHog (workshop-enabled), using staging Cloud.

This commit: https://website-frontend-7jbq9k9ov-comfyui.vercel.app

Last updated: 2026-10-01T13:35:05Z for 21e7e07

🧩 Custom Nodes Ecosystem Matrix: 🟡 Withheld — could not measure

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.

This candidate changes nothing the matrix measures, so every expensive stage was 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

@coderabbitai

coderabbitai Bot commented Oct 1, 2026 •

Copy link
Copy Markdown
Contributor

Review in Change Stack →

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

🧰 Additional context used
📚 Code guidelines (1)
apps/website/AGENTS.md — auto-discovered

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Repository: Comfy-Org/ComfyUI_frontend/.coderabbit.yaml

Review profile: ASSERTIVE

Plan: Advanced

Run ID: 2b751031-fa02-4832-acd0-42e48d25482a

📥 Commits

Reviewing files that changed from the base of the PR and between 4d6f2a2 and 21e7e07.

📒 Files selected for processing (1)
  • apps/website/README.md

Included review availability: This review used your included allowance. Your plan provides up to 8 included reviews per hour; 3 remain after this review.


📝 Walkthrough

Walkthrough

The website README adds an Authentication section. It documents browser account-source selection, Firebase and shared-session flows, fallback behavior, the current Run authentication path, and unaffected clients.

Changes

Browser authentication documentation

Layer / File(s) Summary
Document browser authentication flows
apps/website/README.md
Documents the Firebase and shared-session paths, including probe conditions, timeout, session identity and balance behavior, fallback handling, and the current Firebase-token Run path. It also lists unaffected clients and alternate-host flows.

Priority: ⬇️ Low

Estimated code review effort: 1 (Trivial) | ~5 minutes

Change: Other

Merge Risk: ⚪ Minimal · up to 21e7e

This change documents existing authentication behavior without changing runtime behavior. No actionable merge-blocking risk is established by the supplied evidence.

Security Architecture Review

Security architecture risk: 🔵 Low · up to 21e7e

This documentation does not change authentication behavior. However, its assurance about preview and localhost session isolation depends on origin controls whose deployed behavior has not been verified. No new exposure or exploitable vulnerability was established.

Retained concerns
No architecture-level concerns identified.

Security review details

Security Blast Radius

  • inferred — The unresolved exposure question concerns whether a preview or localhost page could read existing Cloud session identity or balance responses. Host-only scope prevents delivery to the frontend host itself; cross-origin readability additionally depends on browser cookie rules and effective Cloud origin enforcement.

Security Findings and Attack Paths

  • observed — The supplied security assessment retains no verified findings. The credentialed cross-origin candidate remains deferred because deployed preview and localhost CORS behavior is unavailable; attacker reachability and response disclosure are not established.

Trust Boundaries and Controls

  • observed — Website build validation rejects Cloud-family choices outside the permitted environment family. This supports environment separation but does not establish the backend's deployed CORS allowlist or trusted-origin enforcement.

Hardening Proposals

  • proposed — Describe preview and localhost fallback as dependent on the configured Cloud environment and effective origin controls, rather than as a consequence of host-only cookie scope alone. Validate deployed origin rejection and credentialed response headers before treating the no-session assertion as an operational guarantee.
🚥 Pre-merge checks | ✅ 7
✅ Passed checks (7 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly identifies a documentation change for the website and accurately describes the shared web-session authentication behavior.
Description check ✅ Passed The description clearly explains the purpose, documentation changes, authentication behavior, unchanged clients, backend dependency, and docs-only scope. Although it uses custom headings instead of th…
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 title and commit subject use documentation language and contain no bug-fix signal such as “fix” or “fixes.” The PR changes only apps/website/README.md and describes a documentation-only chang…
Website End-To-End Regression Coverage ✅ Passed The PR changes only apps/website/README.md. It does not change website runtime files under apps/website/src/ or apps/website/public/, so this check is not applicable. The documentation-only chan…
Adr Compliance For Entity/Litegraph Changes ✅ Passed The pull request changes only apps/website/README.md. It does not modify src/lib/litegraph/, src/ecs/, or files related to graph entities. The check is not applicable.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Commit to this branch
  • Create a new PR
  • Autopilot · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Autopilot is currently an internal CodeRabbit preview.


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

@codecov

codecov Bot commented Oct 1, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.

@@            Coverage Diff             @@
##             main   #19756      +/-   ##
==========================================
- Coverage   84.71%   84.60%   -0.12%     
==========================================
  Files        3397     3319      -78     
  Lines      163004   160641    -2363     
  Branches    42486    41689     -797     
==========================================
- Hits       138084   135905    -2179     
+ Misses      22996    22929      -67     
+ Partials     1924     1807     -117     
Flag Coverage Δ
billing-web-unit ?
website-unit 79.78% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.
see 78 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 Oct 1, 2026

@christian-byrne christian-byrne left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Verified at 21e7e07e4c4e25ed2664c56522b40ae1bb5eab1e.

  • The website authentication documentation matches the current flag, cookie, balance, and Firebase fallback behavior.
  • It correctly states that Run remains on the tab-local Firebase token path for now.
  • Exact-head CI is settled green and all review threads are resolved.
Full context for agent readers

The description accurately separates the anonymous rollout probe from the credentialed feature read, documents the host-only session cookie and read-only personal balance path, and preserves CLI, MCP, Desktop, API-key, localhost, and preview-host behavior.

@dante01yoon
dante01yoon added this pull request to the merge queue Oct 1, 2026
Merged via the queue into main with commit 4d149a2 Oct 1, 2026
97 checks passed
@dante01yoon
dante01yoon deleted the dante01yoon/fe-2893-website-auth-docs branch October 1, 2026 17:29
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.

2 participants