Repository navigation
Show all worktrees across all hosts on mobile - #7500
Conversation
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.
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Repository UI Review profile: CHILL Plan: Pro Run ID: 📥 CommitsReviewing files that changed from the base of the PR and between 2fc564164d2fd0b5709d2f1e1d6fd36690b6f18a and efe95c5. 📒 Files selected for processing (2)
📝 WalkthroughWalkthroughThis PR removes host-scoped repo visibility fields from mobile worktree state and view settings. 🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches📝 Generate docstrings
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. Comment |
There was a problem hiding this comment.
🧹 Nitpick comments (1)
mobile/src/worktree/use-workspace-sections.ts (1)
18-34: 📐 Maintainability & Code Quality | 🔵 Trivial | ⚡ Quick winConsider a brief "why" comment on the host-scope removal.
This hook silently dropped the entire host-scoping pipeline (
repoSummaries,visibleWorkspaceHostIds, etc.) in favor ofrepoIdsByName/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
📒 Files selected for processing (6)
mobile/app/h/[hostId]/index.tsxmobile/src/worktree/use-workspace-sections.test.tsmobile/src/worktree/use-workspace-sections.tsmobile/src/worktree/workspace-view-settings.test.tsmobile/src/worktree/workspace-view-settings.tsmobile/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
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]>
2fc5641 to
efe95c5
Compare
…pace # Conflicts: # src/main/daemon/windows-hidden-console-children.test.ts # src/main/daemon/windows-hidden-console-children.ts
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]>
* 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]>
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]>
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 lintpnpm typecheckpnpm testpnpm buildAI 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.