Skip to content

feat(apps): open the apps page that matches the Cloud Desktop signs in to - #2052

Closed
vqt123 wants to merge 4 commits into
vinh/apps-reuse-comfyfrom
vinh/apps-env-urls
Closed

vqt123 wants to merge 4 commits into
vinh/apps-reuse-comfyfrom
vinh/apps-env-urls

Conversation

@vqt123

@vqt123 vqt123 commented Nov 12, 2026

Copy link
Copy Markdown
Contributor

TL;DR: A released Desktop opens the app pages at https://comfy.org/apps/, and a Desktop signed in to staging Cloud opens the staging site's pages.

Why Released builds open https://apps.comfy.org/, which does not resolve (measured 2026-11-12), and they ignore COMFY_APPS_URL, so no released Desktop can be pointed at staging's pages.

Before / After

  • Before: a released Desktop's Apps tab loads apps.comfy.org and shows nothing; a staging-signed Desktop still opens the production address.
  • After: the address follows the Cloud Desktop signs in to: production Cloud opens https://comfy.org/apps/, staging Cloud opens the staging site. Dev builds keep COMFY_APPS_URL.

Seen in production by: curl https://apps.comfy.org/ fails to resolve.

Not run: Unit tests were written, not run locally (CI runs them). comfy.org/apps/ does not serve the pages yet; released builds keep the Apps tab off until the switch in the next PR goes on. Smoke-tested 2026-11-12 in a dev build of this chain merged into the Apps stack up to #2045: the Apps tab opened, Remove Background ran on This computer (on an existing ComfyUI 0.42.4) and on Comfy Cloud.

Rule bent: none.

Ref BE-26260

…n to

Production Cloud opens https://comfy.org/apps/ and staging Cloud opens the
staging-built website preview. A development build still takes COMFY_APPS_URL
or a .apps-url file over either.
@coderabbitai

coderabbitai Bot commented Nov 12, 2026 •

Copy link
Copy Markdown

Explain Change →

No actionable comments were generated in the recent review.

Walkthrough

The Apps URL now depends on the Cloud issuer. Apps navigation and frame checks use that URL, with hosted frame paths restricted to the Apps path.

Changes: Apps URL and frame validation

Layer / File(s) Summary
Apps URL selection and frame rules
src/main/apps/guards.ts, src/main/apps/guards.test.ts
The Cloud issuer selects the production or preview Apps URL. Frame checks enforce the Apps path on hosted sites and allow the matching origin on development sites. Tests cover URL selection and frame validation.
Apps URL integration
src/main/apps/appsView.ts, src/main/apps/wiring.test.ts
Navigation, sender-frame validation, and Apps page enumeration use APPS_URL. The wiring test checks that all three frame checks use this URL.

Sequence Diagram(s)

sequenceDiagram
  participant CLOUD_CONFIG
  participant appsUrl
  participant AppsView
  participant isAppsFrameUrl
  CLOUD_CONFIG->>appsUrl: Provide issuer
  appsUrl-->>AppsView: Return APPS_URL
  AppsView->>isAppsFrameUrl: Check frame URL against APPS_URL
Loading

Possibly related PRs

  • Comfy-Org/Comfy-Desktop#1994: Adds the Apps page structure and configurable hosted site that this change selects based on the Cloud environment.

Suggested reviewers: pablowiedemann, benceruleanlu

Merge Risk: Minimal · up to 4175b

The change points the Apps page at the address that matches the Cloud Desktop signs in to and tightens frame checks to the Apps path. No concrete merge-blocking defect was established. The production Apps page is not served yet, which the author disclosed.

Pre-merge checks: Passed 2

Check name Status Explanation
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.
Finishing Touches

Generate unit tests (beta)

  • Commit to this branch
  • Create a new PR
Simplify code

  • Commit to this branch
  • Create a new PR
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts
Recent review info

Run configuration

  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: Organization UI
  • Review profile: ASSERTIVE
  • Plan: Advanced
  • Run ID: 6807f825-9bf4-42c7-ba0a-25d2e606a4a3
Commits

Reviewing files that changed from the base of the PR and between 6478494 and 4175bda.

Files selected for processing: 4

  • src/main/apps/appsView.ts
  • src/main/apps/guards.test.ts
  • src/main/apps/guards.ts
  • src/main/apps/wiring.test.ts

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

@vqt123
vqt123 added this pull request to stack #2058 November 12, 2026 23:03
The Apps page now lives under /apps/ on the shared comfy.org site, so an
origin-only check let any comfy.org page (for example /hub/) stay in the
Apps view and call the Desktop bridge. isAppsFrameUrl now takes the Apps
URL and requires the same origin and a path at or under its base path;
navigation, bridge authorization and local event delivery all use it.
A development override at a site root still allows its whole origin.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants