Skip to content

feat(mobile): show linked computers and worktrees in new threads - #238

Merged
nixuuu merged 1 commit into
feat/mobile-parity-2from
feat/mobile-parity-3
Nov 6, 2026
Merged

nixuuu merged 1 commit into
feat/mobile-parity-2from
feat/mobile-parity-3

Conversation

@nixuuu

@nixuuu nixuuu commented Nov 6, 2026 •

Copy link
Copy Markdown
Member

Stage 3 of 4, mobile parity round 2: where a thread runs.

Changed

  • Linked computers: the overview state keeps computers and handles computer, computer_removed and computer_snapshot. The phone's snapshot already carries the linked computers' workers, projects and threads.
  • Worker picker of a new thread, as on the web:
    • workers grouped by computer: "This computer" first, then linked computers by name;
    • a worker on a linked computer this one cannot reach is greyed out with its status ("Unreachable") and reason ("Studio Mac is unreachable since 6:45 AM.");
    • the worker pill shows "worker · computer" for a linked one, and the blocker uses the same reason.
    • The presence rules (computerName, sharesThreads, awayReason, …) move from the web to @canopy/domain/computer-presence, and the web imports them from there. The web formats times with its own clock settings.
  • Worktrees (as feat(worktrees): create threads in git worktrees #74, feat(worktrees): clean up worktrees by policy and manage them per thread #82, feat(worktrees): use worktrees for agents, bots and schedules #90): when the worker offers worktrees and the folder is a git repository (ListGitRefs), the new thread shows:
    • a workspace pill: Current checkout, New worktree, or a previous worktree;
    • the branch: read-only for the checkout and earlier worktrees, a base ref picker (Branches, Remote branches) for a new worktree.
    • The worktree settings' default mode applies until you pick. CreateThread gets workspace_mode, base_ref and worktree_id.

Checked

  • Gates clean, as in stage 1. Web typecheck covers the moved presence rules.
  • Android emulator, light and dark, unfolded and phone width:
    • workspace and base ref pickers with a long branch name, against a scripted worker that lists refs;
    • the worker picker grouped by computer, with one reachable and one unreachable linked computer. These came from overview data injected locally for the check; no real link between two gateways.
  • Not checked on the device: creating a thread in a new worktree end to end (the scripted worker reports no agents for new threads).

Copy audit (§8)

  • "This computer", "Unreachable" and the reasons ("‹Name› is unreachable since 7:42 PM."): the web's text.
  • "Workspace", "Current checkout", "Works in the project's directory", "New worktree", "A new branch in its own directory", "Previous worktrees", "Created 2 days ago", "Base ref", "Branches", "Remote branches", "Default", "Current": from the web pickers.

The worker picker groups workers by computer and greys out the ones on a linked computer that is not reachable, with the web's reason; the presence rules move to @canopy/domain/computer-presence. A new thread can work in the checkout, a new worktree from a base ref or a previous worktree.
@nixuuu
nixuuu added this pull request to stack #240 November 6, 2026 07:36
@nixuuu
nixuuu marked this pull request as ready for review November 6, 2026 07:44
@nixuuu
nixuuu merged commit 377a81b into dev Nov 6, 2026
10 checks passed
@nixuuu
nixuuu deleted the feat/mobile-parity-3 branch November 6, 2026 07:44
nixuuu added a commit that referenced this pull request Nov 20, 2026
## Change

Reserve one row under the native New thread composer for the worktree
and branch controls. Delayed Git discovery fills the row in place,
keeping the heading and message field steady. Long labels truncate on
one line.

## Verification

- On an Android 16 emulator with deliberately delayed Git refs, the
heading and message field moved 0 px. Checked light mode at 411 dp and
dark mode at 300 and 411 dp, including system text scaled to 150% and
200% and a non-Git workspace.
- Selected a base branch and an existing worktree through their pickers.
Long worktree and branch names stayed on one line at 300 dp. The worker
and model labels elsewhere in the composer clipped at 300 dp with 150%
text.
- The copy audit (§8) covered the removal of the standalone “Manage
projects” shortcut from New thread. Project management is available in
Settings → Projects.
- The mobile typecheck, lint on both edited files, and `git diff
--check` passed locally. Repository-wide checks are left to CI. iOS
verification remains open.

Fixes: #238
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