Skip to content

fix(apps): show an app page as not loaded, never as loading forever, when it is sent off the site or retried with nothing to reload - #2085

Merged
benceruleanlu merged 3 commits into
mainfrom
bl/apps-desktop-qa-ec01bc
Nov 15, 2026
Merged

benceruleanlu merged 3 commits into
mainfrom
bl/apps-desktop-qa-ec01bc

Conversation

@benceruleanlu

@benceruleanlu benceruleanlu commented Nov 14, 2026 •

Copy link
Copy Markdown
Member

Two ways an opened app could leave someone on the loading placeholder forever. Neither happens with comfy.org as it answers today, but desktop_apps_enabled is at 100%, so the next release turns Apps on for everyone.

ELI5

When an app page can't load, Desktop is supposed to say "Remove Background didn't load" and offer Try again. In two cases it showed the grey loading boxes forever instead:

  1. The site moved the page somewhere else while it loaded. A www. or language redirect on comfy.org would do this. Desktop stopped the redirect and opened the new address in the browser without being asked. Then it waited forever for a page that was never coming.
  2. Try again on an app the window never opened. This happens when opening was refused, for example because Apps was switched off mid-session or the app left the list. Desktop had nothing to reload and said nothing back. If the window still held a different app, Desktop reloaded that one out of sight and the panel went blank.

What changed

  • A redirect off the apps site while the page loads is now stopped, and the page is reported as not loaded. The telemetry reason is the new redirected, so the team can see it. The panel shows Try again and All apps. Nothing opens in the browser. A redirect after the page is up still opens in the browser, as before.
  • Try again opens the app again. It goes through showAppPage with retry: true, not through a separate reload channel. That path already checks that Apps is on and that the app is still listed, and it already reloads a failed page. So Try again loads nothing once Apps is switched off. An app refused earlier loads if the reason has cleared, and otherwise says again that it did not load. A retry is not counted as app_opened. The apps:reload-page channel is removed.
  • Each page status names its app. The panel uses only the status of the app it shows. Before, if you left an app while it was still loading and then opened one that was refused, the first app finishing set the second app's panel to ready, and the panel went blank.

Tests

  • appPageView.test.ts: two new journeys:
    • A load that redirects to https://www.comfy.org/apps/ ends as failed with reason redirected, the view stays hidden, and the browser is not opened.
    • Try again on a refused app asks again: still refused answers failed and loads nothing; once listed it loads.
    • Try again on a failed app after Apps is switched off loads nothing.
    • A status names its app, so a hidden app's page finishing does not reach the panel as the shown app's status.
    • A redirect within the apps site while the page loads is still followed.
  • AppPageHost.test.ts: Try again asks to show the app with retry: true, only once. The panel keeps saying failed when another app's page reports ready.
  • Mutation checks: I took out each fix on its own (the redirect stop, the in-site check, the retry flag, the panel's app filter), and the matching test failed every time.
  • Unit tests: src/main/apps + src/main/lib/ipc (627) and the panel's Apps suites (127) pass. Typecheck, lint and prettier pass.
  • E2E runs in CI.

Found while checking Apps for the release

I ran the website's app pages in headless Chromium against Desktop's real localComfy.ts and a real ComfyUI 0.45:

  • Remove Background: the build was started, BiRefNet downloaded, and the run finished.
  • SDR to HDR: ran on the build that was already running.
  • No build, or a build too old: This computer is turned off, and the page shows Desktop's reason.

Three bugs on the website side of the same journey are fixed on Comfy-Org/comfy-website#457:

  • The first Cloud run after signing in from the page failed.
  • Remove Background re-requested BiRefNet on every run.
  • The page showed the wrong sign-in label.

…when it is sent off the site or retried with nothing to reload

Two ways an opened app could leave the person looking at the loading
placeholder with no way out but All apps:

- The site redirects the app's page to another site while it loads,
  as a www or locale redirect on comfy.org would. Desktop stopped the
  redirect, opened the other address in the browser unasked, and kept
  the status at loading, because the stopped load ends as an aborted
  navigation, which is ignored. Now a redirect off the apps site while
  the page loads stops it and reports the page as not loaded (telemetry
  reason "redirected"), so the panel offers Try again. A redirect after
  the page is up still opens in the browser, as before.
- Try again on an app the window never loaded, because opening it was
  refused (Apps switched off, or the app gone from the list). Desktop
  had no page to reload and answered nothing. If the window still held
  another app, it reloaded that one out of sight and the panel showed a
  blank page. Try again now names the app it is for. Desktop reloads
  only that app's page, and otherwise tells the panel the app still
  did not load.

Found in a read-through of the Apps hosting code before the release
that turns Apps on (desktop_apps_enabled is at 100%). Neither happens
with comfy.org as it answers today.
@benceruleanlu
benceruleanlu requested review from a team as code owners November 14, 2026 04:10
@coderabbitai

coderabbitai Bot commented Nov 14, 2026 •

Copy link
Copy Markdown

Explain Change →

No actionable comments were generated in the recent review.

Walkthrough

App-page retries now use the normal page-placement path. Status notifications include the app ID, and the panel applies them only to the matching app. During loading, main-frame redirects outside the apps scope are prevented and reported as redirected.

Changes: App-page navigation and retry

Layer / File(s) Summary
Carry retry and app identity through the renderer
src/types/ipc.ts, src/preload/api.ts, src/renderer/src/panel/AppPageHost.vue, src/renderer/src/panel/AppPageHost.test.ts, src/renderer/src/panel/AppsView.test.ts, src/renderer/src/panel/PanelApp.test.ts
Page placements now include a retry flag, and status callbacks receive the affected app ID. The panel sends retries through the normal page-placement path and ignores status updates for other apps.
Handle retries and redirects in the main process
src/main/apps/appPageView.ts, src/main/lib/ipc/registerAppsHandlers.ts
The main process retries failed pages through showAppPage. It prevents loading-time main-frame redirects outside the apps scope and reports the redirected failure reason. The separate reload IPC handler and function are removed.
Test retry, redirect, and app-specific status behavior
src/main/apps/appPageView.test.ts
Tests cover allowed and prevented redirects, retries when an app is absent from the listing or Apps is disabled, and status notifications that identify the app.

Sequence Diagram(s)

sequenceDiagram
  participant AppPageHost
  participant showAppPage
  participant appPageView
  participant onAppPageStatusChanged
  AppPageHost->>showAppPage: send placement with retry flag
  showAppPage->>appPageView: load or retry hosted app page
  appPageView->>onAppPageStatusChanged: send app ID and page status
  onAppPageStatusChanged->>AppPageHost: forward app ID and page status
Loading

Possibly related PRs

Merge Risk: Minimal · up to 99ce6

App retries now reopen the requested app through the normal path, and off-site redirects during loading are reported as failures instead of opening the browser. No merge-blocking risk was found.

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: 316918b8-e121-4909-b726-1d2b9d61daed
Commits

Reviewing files that changed from the base of the PR and between a00b2cb and 99ce695.

Files selected for processing: 9

  • src/main/apps/appPageView.test.ts
  • src/main/apps/appPageView.ts
  • src/main/lib/ipc/registerAppsHandlers.ts
  • src/preload/api.ts
  • src/renderer/src/panel/AppPageHost.test.ts
  • src/renderer/src/panel/AppPageHost.vue
  • src/renderer/src/panel/AppsView.test.ts
  • src/renderer/src/panel/PanelApp.test.ts
  • src/types/ipc.ts
Files with no reviewable changes: 2

  • src/renderer/src/panel/AppsView.test.ts
  • src/renderer/src/panel/PanelApp.test.ts

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

…n every page status

Review fixes on top of the redirect and retry change:

- Try again now asks to show the app again, with a retry flag, instead
  of a separate reload channel. Opening the app already checks that
  Apps is on and the app is still listed, and it already reloads a
  failed page. So Try again no longer loads a page after Apps is
  switched off. An app refused for a reason that has since cleared now
  loads on Try again, instead of saying it failed every time. The retry
  is not counted as an app_opened event. The reload-page channel is
  gone.
- Each page status sent to the panel names its app, and the panel uses
  only the status of the app it shows. Before this, if you left an app
  while it was still loading and then opened one that was refused, the
  first app finishing set the second app's panel to ready. The panel
  went blank with no Try again.
- Adds a test that a redirect within the apps site while the page loads
  is still followed.
@benceruleanlu
benceruleanlu merged commit ad751ed into main Nov 15, 2026
22 checks passed
@benceruleanlu
benceruleanlu deleted the bl/apps-desktop-qa-ec01bc branch November 15, 2026 22:02
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.

1 participant