Skip to content

fix(sidebar): phone feed list leftovers before the flip (dark) - #30631

Merged
Jinwoo-H merged 3 commits into
mainfrom
flip-phone-page
Oct 19, 2026
Merged

Jinwoo-H merged 3 commits into
mainfrom
flip-phone-page

Conversation

@Jinwoo-H

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

Copy link
Copy Markdown
Contributor
Files Added Deleted Net
Test 13 $\color{#1a7f37}{\Huge{\mathbf{+}}}$​287 $\color{#cf222e}{\Huge{\mathbf{−}}}$​51 $\color{#1a7f37}{\Huge{\mathbf{+}}}$​236
Prod 22 $\color{#1a7f37}{\Huge{\mathbf{+}}}$​268 $\color{#cf222e}{\Huge{\mathbf{−}}}$​77 $\color{#1a7f37}{\Huge{\mathbf{+}}}$​191

ELI5

The phone can build its workspace list from the same inputs the desktop sidebar uses, but only in test builds that turn on a build switch. Before that switch becomes the default, five gaps needed fixing: an older phone page talking to a newer host (or the reverse) could quietly build a different list; nothing stopped a test-only phone page from shipping; the list was blank until the host first answered; workspaces being created did not show; and the desktop's own host could be named after the phone's operating system. This PR fixes all five. Normal builds are unchanged.

What Changed

All of it is behind the build switch ORCA_SIDEBAR_INPUTS=main. With the switch off, the desktop and the phone behave as before.

  1. Version check. The feed's meaning version (SIDEBAR_INPUTS_SEMANTICS_VERSION) goes from 1 to 2, because feat(sidebar): the phone reads its workspace list from the sidebar inputs (dark) #30462 added the desktop's focused host, its host names and the "show pinned in groups" setting to what the feed carries. A phone page and host that disagree now show the existing "Reopen to update" screen instead of a list that only looks like the desktop's.
  2. Packaging. A switch-on phone page build now leaves the same marker file the desktop build already leaves, next to the page's manifest (it is not listed in the manifest, so the page's bytes and build id do not change). Desktop packaging refuses a marked page. Server (orcad) staging refuses a page marked for a switch that build has off, so a switch-on server test build can still carry its switch-on page, and the release server template (which refuses the switch itself) can never take one.
  3. Offline list. Before the host's first feed answer, the phone shows the rows it already has (the last worktree list, or the cached one the screen opened with), filtered and searched with the view's settings, under no header. Before: a spinner until the feed answered.
  4. Workspaces being created. The shared list builder already places the host's creations. The phone now draws them as a "Creating workspace…" row with a spinner where the desktop draws its pending row: at the top of the project group, or at the top of the list when not grouped by project (there it also shows the project name).
  5. Host names. The host-section builder and the feed's host list took the local host's name from the platform of the device running the code. That device is the phone when the phone builds the list. Both now take the name as an argument: the desktop passes its own platform's name, and the phone passes the desktop's reported platform, or "This computer" when it is not known.

Why

  • Bumping the version uses the compatibility check feat(sidebar): the phone reads its workspace list from the sidebar inputs (dark) #30462 already built. A page served by the host matches it, and the only mismatch left is a cached page after a failed download, which shows "Reopen to update".
  • The page marker reuses the desktop's dark-build guard (config/dark-build-switches.cjs) instead of adding a new field to the manifest. Shipped phone shells parse that manifest strictly, so a new field would have broken them.
  • The offline list reuses the screen's existing row cache and the phone's row filter, so no new store is added. It is a plain list because the sections need the feed.
  • Pending creations come from the shared builder, so the phone places them where the desktop does.

Linked Issue

N/A (maintainer, sidebar list series; leftovers from #30462)

Visual Proof

No visible change in normal builds. Switch-on screenshots of the new pending row were rendered with react-native-web (component frames, not a simulator; the workspace rows beside it are stand-ins). They are kept locally:

  • Under a project header: spinner, then "Creating workspace…".
  • Not grouped by project: "Creating workspace…" with the project name under it, above the first group.

New phone text needing owner sign-off: "Creating workspace…".

Testing

  • I manually tested these changes locally

  • Automated tests added/updated, or explained why not below

  • Unit tests:

    • A host on version 1 shows "Reopen to update".
    • A creation is drawn under its project until the host lists the workspace, and above every group when not grouped by project. Search drops it from a section narrowed to matching rows.
    • The list before the first feed answer keeps its order, hides archived rows and follows search.
    • The desktop's host is named "Local Mac", "Local Windows" or "This computer" from the desktop's platform, never the test machine's. A local host missing from the host list gets the name it is given.
    • The bundle writer marks a switch-on tree and keeps the same build id. Packaging refuses a marked page. Server staging takes a page marked by its own switch and refuses one marked by another switch or with the switch off.
  • Real builds: ORCA_SIDEBAR_INPUTS=main pnpm build:mobile-web writes the marker and passes its own verification. The dark-build guard then refuses that out/mobile-web. A switch-off rebuild clears the marker.

  • Full mobile suite passes, along with pnpm tc, mobile tsc, the mobile test typecheck ratchet, lint, the anti-slop lint, the changed-code quality gate, the focus-read ratchet and format checks.

  • config/scripts/build-mobile-web-app-bundle.test.mjs has 5 failures on this machine. They fail the same way on the base commit, so they come from this machine's setup, not this change.

  • macOS only. I did not run an emulator, because every item is covered by unit tests on the shared builder and the phone's section mapping.

Review

I ran an elegance and bug review on the change and then on the fixes, and applied the findings that held up. That review led to: switch-on server builds may carry their own page; the offline list keeps the view's filters; the marker is written where the tree is written; a creation decides in the builder whether to name its project; one resolved desktop platform feeds both the row labels and the host headers.

Agent skill upstream boundary

  • Not applicable, or this change copies or mechanically translates no upstream skill-installer source, tests, fixtures, registry entries, path tables, comments, or documentation.

Notes

  • The offline list uses the phone's existing row filter (filterWorktrees in workspace-list-sections.ts). When the switched-off phone list code is deleted at the flip, that filter should move rather than go.
  • The pending row copies the workspace row's padding and indicator width so the finished row lands in place. A shared constant can follow if the row's metrics change.
  • The SSH mirror end-to-end test still needs a machine with docker or sshd.

Checklist

  • This PR is small and focused
  • I explained what changed and why (ELI5, the user-facing before/after, the mechanism, and why over the alternatives)
  • Before/after screenshots or videos attached for UI changes, or N/A with reason
  • Self-reviewed for correctness, security, and performance
  • Cross-platform, SSH/remote, and path/shortcut impact considered (or N/A)
  • pnpm lint, pnpm typecheck, pnpm test, and pnpm build pass (or CI will cover; local preferred)

Bump the feed's semantics version for P11's desktop facts; mark switch-on phone page bundles so packaging and orcad staging refuse them; show the page's last-listed rows before the first feed read; draw the host's pending creations; pass the listed host's own label into host sections instead of the running device's platform.
A dark orcad may stage the dark page (only a marker of an off switch is refused); the bundle tree writer leaves the marker; the pre-feed list keeps the view's filters; a creation names its project only outside that project's header and survives search when its project matches; the feed view and row labels read one resolved desktop platform.
Test the off-switch marker check across switches; resolve the desktop platform once for rows and headers; a section search narrows keeps only matching rows.
@coderabbitai

coderabbitai Bot commented Oct 19, 2026

Copy link
Copy Markdown
Contributor

Warning

Review limit reached

You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository.

Next included review available in 1 minute.

Check out review usage here.

View limit details

Limit details: You’ve used all 10 included reviews currently available.

Learn how review limits work.

Review configuration:

⚙️ Run configuration
  • Configuration used: Repository UI
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: 19322ff4-0d74-4954-8eea-b9fe2bbb0d22
📥 Commits

Reviewing files that changed from the base of the PR and between 5f2bb93 and c75e6db.

📒 Files selected for processing: 35
  • config/dark-build-switches.cjs
  • config/electron-builder.config.cjs
  • config/scripts/dark-build-switches.test.mjs
  • config/scripts/mobile-web-bundle-manifest.mjs
  • config/scripts/mobile-web-bundle-manifest.test.mjs
  • config/scripts/orcad-mobile-web-bundle.mjs
  • config/scripts/orcad-mobile-web-bundle.test.mjs
  • config/scripts/verify-packaged-mobile-web-bundle.cjs
  • config/scripts/verify-packaged-mobile-web-bundle.test.mjs
  • mobile/src/host-screen/host-pending-creation-row.tsx
  • mobile/src/host-screen/host-server-workspaces-wiring.test.ts
  • mobile/src/host-screen/host-sidebar-feed-inputs.ts
  • mobile/src/host-screen/host-sidebar-feed-reader.test.ts
  • mobile/src/host-screen/host-sidebar-feed-sections.test.ts
  • mobile/src/host-screen/host-sidebar-feed-sections.ts
  • mobile/src/host-screen/host-ssh-health-badge-wiring.test.ts
  • mobile/src/host-screen/host-workspace-list.tsx
  • mobile/src/host-screen/use-host-display-worktrees.ts
  • mobile/src/host-screen/use-host-list-sections.ts
  • mobile/src/host-screen/use-host-screen-controller.ts
  • mobile/src/worktree/workspace-list-types.ts
  • src/renderer/src/components/sidebar/host-section-collapse-folders.test.ts
  • src/renderer/src/components/sidebar/host-section-collapse.test.ts
  • src/renderer/src/components/sidebar/host-section-folder-workspace-counts.test.ts
  • src/renderer/src/components/sidebar/host-section-local-label.test.ts
  • src/renderer/src/components/sidebar/host-section-rows.test.ts
  • src/renderer/src/components/sidebar/rendered-sidebar-worktree-order.ts
  • src/renderer/src/components/sidebar/sidebar-list-parity.test-fixture.ts
  • src/renderer/src/components/sidebar/worktree-list/listing/use-main-list-model.ts
  • src/renderer/src/components/sidebar/worktree-list/listing/use-section-rows.ts
  • src/shared/execution-host-registry.ts
  • src/shared/sidebar-list/host-section-rows.ts
  • src/shared/sidebar-list/sidebar-feed-index.ts
  • src/shared/sidebar-list/sidebar-feed-rows.ts
  • src/shared/sidebar-list/sidebar-inputs-feed-contract.ts
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

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

@Jinwoo-H
Jinwoo-H merged commit cf13e0c into main Oct 19, 2026
41 checks passed
stasmarkin added a commit to stasmarkin/orca that referenced this pull request Oct 25, 2026
addHostSectionRows now requires localHostLabel (stablyai#30631); also cover the
fallback local host so per-host counted workspace ids stay split.
stasmarkin added a commit to stasmarkin/orca that referenced this pull request Nov 1, 2026
addHostSectionRows now requires localHostLabel (stablyai#30631); also cover the
fallback local host so per-host counted workspace ids stay split.
stasmarkin added a commit to stasmarkin/orca that referenced this pull request Nov 3, 2026
addHostSectionRows now requires localHostLabel (stablyai#30631); also cover the
fallback local host so per-host counted workspace ids stay split.
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