Skip to content

fix(mobile): the phone's host list falls back to the plain list when every feed read fails - #31309

Merged
Jinwoo-H merged 1 commit into
sidebar-flip-afrom
phone-host-list-feed-read-gave-up
Oct 21, 2026
Merged

Jinwoo-H merged 1 commit into
sidebar-flip-afrom
phone-host-list-feed-read-gave-up

Conversation

@Jinwoo-H

@Jinwoo-H Jinwoo-H commented Oct 21, 2026 •

Copy link
Copy Markdown
Contributor
Files Added Deleted Net
Test 2 $\color{#1a7f37}{\Huge{\mathbf{+}}}$​29 $\color{#cf222e}{\Huge{\mathbf{−}}}$​1 $\color{#1a7f37}{\Huge{\mathbf{+}}}$​28
Prod 4 $\color{#1a7f37}{\Huge{\mathbf{+}}}$​25 $\color{#cf222e}{\Huge{\mathbf{−}}}$​7 $\color{#1a7f37}{\Huge{\mathbf{+}}}$​18

ELI5

If the phone could not read a desktop's sidebar list after several tries, the workspace list stayed on a loading spinner. It stayed there even though the phone already had the desktop's workspaces from another query. Now, once the phone gives up, it shows those workspaces instead.

What Changed

  • Before: after fix(mobile): the phone's host list never flashes a list shaped unlike the desktop's #31301, the list waits on the spinner until the sidebar feed installs. The feed reader retries a failed read 5 times (1s up to 16s), then stops until the next connection-ready or app-foreground. On a connected desktop whose feed read keeps failing, the list spun indefinitely, although worktree.ps had rows.
  • After: when the reader stops retrying without having installed anything, the list draws the plain worktree.ps rows, which is the fallback an older desktop gets, and treats the list as loaded. If this page has the desktop's last installed feed, it keeps showing that instead. A later successful read replaces either one with the live feed.
  • Mechanism:
    • HostSidebarFeedReader reports gaveUp once its retry budget is spent with nothing installed.
    • readHostSidebarFeed maps that to a new failed feed state.
    • use-host-list-sections.ts draws the pre-feed rows for failed as well as reopen.
    • The list's loading rule uses worktree.ps's own loaded flag in that state.
    • The feed hook ignores gaveUp while it already holds an installed (remembered) feed.

Why

Nothing on this screen should be able to get stuck. The plain list already exists for desktops without the feed, so reusing it adds no new list shape. It shows up only after the reader has visibly failed for about 30 seconds, not as a first-frame flash. Two alternatives were considered:

  • Retrying forever: this would hammer a failing desktop, which is why the budget exists.
  • An error message instead of rows: this would hide workspaces the phone already has.

Linked Issue

N/A (review follow-up to #31301)

Visual Proof

N/A. This only changes what shows after every feed read has failed, which is covered by the tests below.

Testing

  • mobile/src/host-screen/host-list-first-frame.test.tsx:
    • when the reads give up, the list draws the worktree.ps rows and later switches to the feed;
    • a remembered feed survives a give-up.
  • host-sidebar-feed-reader.test.ts: the reader reports give-up once its retries are spent, including when a paged batch never completes, and failed maps from it. All 5 new or changed cases fail on the base branch.
  • Mobile typecheck, mobile tests, oxfmt, pnpm tc, and the static gate including both ratchets.

Notes

There is no wire change. An older desktop without the feed still shows "Reopen to update" with its rows.

…every feed read fails

Once the sidebar feed reader spent its retries without installing anything, the list stayed
on the spinner until the next stream-ready or foreground, though worktree.ps had rows. The
reader now says it gave up, and the list draws the worktree.ps rows (or keeps the host's
last installed feed) until a later read installs.
@Jinwoo-H
Jinwoo-H merged commit d8444d9 into sidebar-flip-a Oct 21, 2026
7 checks passed
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