docs: add staging environment setup instructions to CONTRIBUTING.md#10775
Conversation
Document how to test partner/API nodes that require cloud backend authentication. Add two approaches: - Frontend: pnpm dev:cloud or custom DEV_SERVER_COMFYUI_URL - Backend: --comfy-api-base flag for staging API
📝 WalkthroughWalkthroughAdded documentation describing two testing approaches for cloud and staging environments: using Changes
Estimated code review effort🎯 1 (Trivial) | ⏱️ ~2 minutes Poem
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Comment |
🎨 Storybook: ✅ Built — View Storybook |
📦 Bundle: 5.1 MB gzip 🟢 -99 BDetailsSummary
Category Glance App Entry Points — 22.3 kB (baseline 22.3 kB) • ⚪ 0 BMain entry bundles and manifests
Status: 1 added / 1 removed Graph Workspace — 1.17 MB (baseline 1.17 MB) • ⚪ 0 BGraph editor runtime, canvas, workflow orchestration
Status: 1 added / 1 removed Views & Navigation — 76.6 kB (baseline 76.6 kB) • ⚪ 0 BTop-level views, pages, and routed surfaces
Status: 9 added / 9 removed / 2 unchanged Panels & Settings — 484 kB (baseline 484 kB) • ⚪ 0 BConfiguration panels, inspectors, and settings screens
Status: 10 added / 10 removed / 12 unchanged User & Accounts — 17.1 kB (baseline 17.1 kB) • ⚪ 0 BAuthentication, profile, and account management bundles
Status: 5 added / 5 removed / 2 unchanged Editors & Dialogs — 109 kB (baseline 109 kB) • ⚪ 0 BModals, dialogs, drawers, and in-app editors
Status: 2 added / 2 removed UI Components — 60.3 kB (baseline 60.3 kB) • ⚪ 0 BReusable component library chunks
Status: 5 added / 5 removed / 8 unchanged Data & Services — 2.96 MB (baseline 2.96 MB) • ⚪ 0 BStores, services, APIs, and repositories
Status: 13 added / 13 removed / 4 unchanged Utilities & Hooks — 338 kB (baseline 338 kB) • ⚪ 0 BHelpers, composables, and utility bundles
Status: 13 added / 13 removed / 13 unchanged Vendor & Third-Party — 9.8 MB (baseline 9.8 MB) • ⚪ 0 BExternal libraries and shared vendor chunks Status: 16 unchanged Other — 8.44 MB (baseline 8.44 MB) • ⚪ 0 BBundles that do not match a named category
Status: 55 added / 55 removed / 79 unchanged ⚡ Performance
|
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Inline comments:
In `@CONTRIBUTING.md`:
- Around line 86-95: Update the Option 2 description to be more precise: change
the phrase "routes backend API calls through staging" to explicitly state that
the --comfy-api-base flag routes Comfy API calls (assets, models, and API nodes
when enabled) to the specified base URL; keep the example command using
--comfy-api-base and mention that the frontend remains local while Comfy API
requests are pointed at staging (reference the --comfy-api-base flag and ComfyUI
backend wording to locate the text).
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Path: .coderabbit.yaml
Review profile: CHILL
Plan: Pro
Run ID: 7ce8e4f5-6d1e-4b1a-bcd1-02c5ed5285b7
📒 Files selected for processing (1)
CONTRIBUTING.md
| **Option 2: Backend — `--comfy-api-base`** | ||
|
|
||
| Alternatively, launch the ComfyUI backend pointed at the staging API: | ||
|
|
||
| ```bash | ||
| python main.py --comfy-api-base https://stagingapi.comfy.org --verbose | ||
| ``` | ||
|
|
||
| Then run `pnpm dev` as usual. This keeps the frontend in local mode but routes backend API calls through staging. | ||
|
|
There was a problem hiding this comment.
🧩 Analysis chain
🌐 Web query:
In the ComfyUI backend (main branch), is python main.py --comfy-api-base a valid CLI flag, and what exact request paths/behaviors does it affect? Please provide official docs or source references for the argparse/typer definition and usage.
💡 Result:
Yes, --comfy-api-base <url> is a valid CLI flag in the ComfyUI main branch (Comfy-Org/ComfyUI). It is defined in comfy/cli_args.py using argparse: parser.add_argument( "--comfy-api-base", type=str, default="https://api.comfy.org", help="Set the base URL for the ComfyUI API. (default: https://api.comfy.org)", ) This flag sets the base URL used by ComfyUI's "assets system" (enabled with --enable-assets), which handles API routes for assets, database synchronization, and background scanning. It affects requests to external Comfy API services (e.g., https://api.comfy.org by default) for features like asset management, model handling, and API nodes (disabled with --disable-api-nodes). Specific request paths are not detailed in available sources but are under /api/assets/* endpoints (e.g., POST/GET /api/assets for upload/list), adapted to the provided base URL. The flag appears in the "Multi-User and Database" section of command-line docs alongside --database-url and --enable-assets. It is also documented in third-party references like Mintlify docs for Comfy-Org/ComfyUI.
Citations:
- 1: https://www.mintlify.com/Comfy-Org/ComfyUI/configuration/command-line-args
- 2: https://github.com/comfyanonymous/ComfyUI/blob/master/comfy/cli_args.py
- 3: https://github.com/Comfy-Org/ComfyUI/blob/master/main.py
- 4: https://deepwiki.com/comfyanonymous/ComfyUI/11.2-configuration-and-command-line-arguments
- 5: https://github.com/Comfy-Org/comfy-cli
- 6: https://huggingface.co/mitek/comfyui_ai_repo/blob/main/ComfyUI/comfy/cli_args.py
- 7: Add support for Comfy API keys ComfyUI#8041
- 8: https://docs.comfy.org/api-reference/cloud/asset/upload-a-new-asset
- 9: https://docs.comfy.org/api-reference/cloud/asset/list-user-assets
- 10: [Assets] Initial implementation ComfyUI#9545
- 11: Add models as first supported 'asset' type ComfyUI#10045
Tighten Option 2 wording for accuracy.
Line 94 states "routes backend API calls through staging," but --comfy-api-base specifically routes Comfy API requests (assets, models, and API nodes when enabled) to the specified base URL—not all backend API calls. Narrow the description to "routes Comfy API calls (assets, models, API nodes) through staging" or similar for clarity.
The flag is supported and documented in the ComfyUI main branch (comfy/cli_args.py), so no verification of support is needed.
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.
In `@CONTRIBUTING.md` around lines 86 - 95, Update the Option 2 description to be
more precise: change the phrase "routes backend API calls through staging" to
explicitly state that the --comfy-api-base flag routes Comfy API calls (assets,
models, and API nodes when enabled) to the specified base URL; keep the example
command using --comfy-api-base and mention that the frontend remains local while
Comfy API requests are pointed at staging (reference the --comfy-api-base flag
and ComfyUI backend wording to locate the text).
Summary
Add a "Testing with Cloud & Staging Environments" section to CONTRIBUTING.md documenting how to test partner/API nodes that require cloud backend authentication.
Changes
pnpm dev:cloudor customDEV_SERVER_COMFYUI_URLin.env--comfy-api-base https://stagingapi.comfy.orgflagReview Focus
--comfy-api-basebackend flag documentation (sourced from internal Slack discussion)┆Issue is synchronized with this Notion page by Unito