Skip to content

Show all worktrees across all hosts on mobile - #7500

Merged
AmethystLiang merged 5 commits into
mainfrom
mobile-show-all-workspace
Jul 6, 2026
Merged

AmethystLiang merged 5 commits into
mainfrom
mobile-show-all-workspace

Conversation

@AmethystLiang

Copy link
Copy Markdown
Contributor

Summary

Shows all worktrees across all hosts on mobile. Mobile lacks a host-scope UI, so honoring synced desktop settings (such as host scope or visible workspace hosts) was silently hiding worktrees from users with no way to unhide them. This change removes workspace host-scope filtering on mobile and ignores desktop-synced host scope settings so that mobile always displays all worktrees.

Additionally, this resolves a bug ("host page shows lots of worktrees, repo shows only a few") where worktrees were being filtered to those whose repoId was present in the repo.list result (which maps repo display names to IDs). Since same-named repos on different hosts collapsed to a single ID, worktrees under the other ID vanished. This filtering has been removed entirely.

Screenshots

No visual change

Testing

  • pnpm lint
  • pnpm typecheck
  • pnpm test
  • pnpm build
  • Added or updated high-quality tests that would catch regressions, or explained why tests were not needed

AI Review Report

The review verified that mobile-specific views should always show all workspaces. It checked cross-platform compatibility and concluded that since this is a mobile client change (React Native / Expo), desktop/Electron cross-platform features do not apply directly, but the change safely decouples mobile visibility settings from desktop settings so desktop-specific host scoping is ignored.

Security Audit

No security issues were identified. The changes only affect UI-level filtering of worktrees and ignore non-sensitive configuration keys from the synced desktop view settings. No input handling, command execution, auth, secrets, or IPC risks are introduced.

Notes

Mobile-specific change. This ensures complete visibility of all workspaces/worktrees on mobile by ignoring desktop-scoped host settings.

Avoid honoring desktop's host-filtering settings since mobile lacks the
UI to manage or unhide them. This prevents worktrees from being silently
hidden under certain host scopes.

Additionally, this removes worktree filtering based on repo metadata, which
previously caused worktrees to vanish when same-named repos on different
hosts collapsed to a single ID.
@coderabbitai

coderabbitai Bot commented Jul 6, 2026 •

Copy link
Copy Markdown
Contributor

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Repository UI

Review profile: CHILL

Plan: Pro

Run ID: 8e2dc42c-2b5c-4326-946d-5e341a11d54d

📥 Commits

Reviewing files that changed from the base of the PR and between 2fc564164d2fd0b5709d2f1e1d6fd36690b6f18a and efe95c5.

📒 Files selected for processing (2)
  • src/main/daemon/windows-hidden-console-children.test.ts
  • src/main/daemon/windows-hidden-console-children.ts

📝 Walkthrough

Walkthrough

This PR removes host-scoped repo visibility fields from mobile worktree state and view settings. useWorkspaceSections now consumes precomputed repoIdsByName and no longer accepts repo summary or host-visibility inputs. The host screen stops storing and passing the removed fields. Mobile tests were updated, and a new regression suite checks worktree visibility behavior. A daemon test was also adjusted to call a promisified wrapper through a typed variable.

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly matches the main change: showing all worktrees across all hosts on mobile.
Description check ✅ Passed The description includes all required sections and is mostly complete, but the AI Review Report could be more explicit about macOS/Linux/Windows and Electron-specific checks.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
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 docstrings
  • Create stacked PR
  • Commit on current branch

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.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🧹 Nitpick comments (1)
mobile/src/worktree/use-workspace-sections.ts (1)

18-34: 📐 Maintainability & Code Quality | 🔵 Trivial | ⚡ Quick win

Consider a brief "why" comment on the host-scope removal.

This hook silently dropped the entire host-scoping pipeline (repoSummaries, visibleWorkspaceHostIds, etc.) in favor of repoIdsByName/displayWorktrees. The design rationale ("mobile has no host-scope UI to manage/reveal hidden worktrees") is documented in the test files but not here, where the actual behavioral change lives.

As per coding guidelines, "When writing or modifying code driven by a design doc or non-obvious constraint, add a comment explaining why the code behaves the way it does. Keep comments short — one or two lines, capturing only the non-obvious reason."

📝 Proposed comment addition
+// Why: mobile has no host-scope UI to reveal/manage hidden worktrees, so
+// unlike desktop we deliberately show every worktree regardless of host —
+// see mobile-show-all-workspace. repoIdsByName/displayWorktrees are already
+// the full, unfiltered set.
 export function useWorkspaceSections(args: {

Source: Coding guidelines


ℹ️ Review info
⚙️ Run configuration

Configuration used: Repository UI

Review profile: CHILL

Plan: Pro

Run ID: 10c116b5-1d92-4217-85c2-3290aadcdd53

📥 Commits

Reviewing files that changed from the base of the PR and between 638a8f7 and 53e63fa.

📒 Files selected for processing (6)
  • mobile/app/h/[hostId]/index.tsx
  • mobile/src/worktree/use-workspace-sections.test.ts
  • mobile/src/worktree/use-workspace-sections.ts
  • mobile/src/worktree/workspace-view-settings.test.ts
  • mobile/src/worktree/workspace-view-settings.ts
  • mobile/src/worktree/worktree-list-completeness.test.ts
💤 Files with no reviewable changes (2)
  • mobile/src/worktree/use-workspace-sections.test.ts
  • mobile/src/worktree/workspace-view-settings.ts

AmethystLiang and others added 2 commits July 5, 2026 22:25
CI test-merges main, which carries the windows-hidden-console-children
test from #7499 (admin-merged with a failing verify). promisify(wrapped)
resolved to its zero-arg overload; cast to the promisify.custom signature
so tsgo accepts the two-arg call.

Co-authored-by: Orca <[email protected]>
The windows-hidden-console-children test (from #7499, admin-merged with a
failing verify) failed tsgo: promisify(wrapped) resolved to its zero-arg
overload because the wrapper erased its argument to a bare variadic function
and the fake never statically carried promisify.custom. Preserve the wrapped
type via a generic overload (accurate: the wrapper copies the call signature
and symbols verbatim) and build the fake as a real CustomPromisify, so
promisify routes through the custom overload as it does in production.

Co-authored-by: Orca <[email protected]>
@AmethystLiang
AmethystLiang force-pushed the mobile-show-all-workspace branch from 2fc5641 to efe95c5 Compare July 6, 2026 05:39
…pace

# Conflicts:
#	src/main/daemon/windows-hidden-console-children.test.ts
#	src/main/daemon/windows-hidden-console-children.ts
@AmethystLiang
AmethystLiang merged commit 430d4b9 into main Jul 6, 2026
2 checks passed
AmethystLiang added a commit that referenced this pull request Jul 6, 2026
Bump marketing version 0.0.22 -> 0.0.24 and Android versionCode 4 -> 5.

The 0.0.22 base was never committed after prior releases, so the Jul 6
builds carrying the show-all-worktrees fix (#7500) regressed below the
0.0.23 already on TestFlight (iOS) and collided with the existing
0.0.22/versionCode 4 APK (Android, no upgrade signal). Committing the
bump makes app.json authoritative again so 0.0.24 supersedes both.

Co-authored-by: Orca <[email protected]>
enrick-dev pushed a commit to enrick-dev/orca that referenced this pull request Oct 15, 2026
* Show all worktrees across all hosts on mobile

Avoid honoring desktop's host-filtering settings since mobile lacks the
UI to manage or unhide them. This prevents worktrees from being silently
hidden under certain host scopes.

Additionally, this removes worktree filtering based on repo metadata, which
previously caused worktrees to vanish when same-named repos on different
hosts collapsed to a single ID.

* fix(daemon): preserve promisify.custom type through wrapChildProcessApi

The windows-hidden-console-children test (from stablyai#7499, admin-merged with a
failing verify) failed tsgo: promisify(wrapped) resolved to its zero-arg
overload because the wrapper erased its argument to a bare variadic function
and the fake never statically carried promisify.custom. Preserve the wrapped
type via a generic overload (accurate: the wrapper copies the call signature
and symbols verbatim) and build the fake as a real CustomPromisify, so
promisify routes through the custom overload as it does in production.

Co-authored-by: Orca <[email protected]>

---------

Co-authored-by: Orca <[email protected]>
enrick-dev pushed a commit to enrick-dev/orca that referenced this pull request Oct 15, 2026
Bump marketing version 0.0.22 -> 0.0.24 and Android versionCode 4 -> 5.

The 0.0.22 base was never committed after prior releases, so the Jul 6
builds carrying the show-all-worktrees fix (stablyai#7500) regressed below the
0.0.23 already on TestFlight (iOS) and collided with the existing
0.0.22/versionCode 4 APK (Android, no upgrade signal). Committing the
bump makes app.json authoritative again so 0.0.24 supersedes both.

Co-authored-by: Orca <[email protected]>
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