Skip to content

feat(mobile): turn a pair on and off from the phone - #663

Merged
rynfar merged 3 commits into
pylonfrom
feat/pair-mobile-toggle
Sep 18, 2026
Merged

rynfar merged 3 commits into
pylonfrom
feat/pair-mobile-toggle

Conversation

@rynfar

@rynfar rynfar commented Sep 18, 2026 •

Copy link
Copy Markdown
Collaborator

What

A pair can be turned on and off from the phone. The thread's settings sheet gets a Pair section with one switch, "Pair with an executor", and a line under it that says what it will do or why it cannot.

  • Off, with a default: "Pairs this thread with ."
  • On: "Paired with · ".
  • No default delegation model: the switch is disabled and says where to set one.
  • The lead is mid-turn, or is an Antigravity thread: disabled with the same reasons the web control gives.

The phone has no executor picker. It pairs with the project's default delegation model; the web and desktop control stays the place to choose another. The section is not shown in the new-task flow or on a delegated thread.

How

  • The toggle's decisions (pairLockedReason, pairToggleStep, resolveExecutorSelection, shouldRestartLeadSession) moved from apps/web/.../pairControl.logic.ts to packages/client-runtime/src/state/pairControl.ts (subpath ./state/pair-control), with their tests, so both clients run the same rules. The web hook only changed its import.
  • pairSettingsRow (pure, new) turns pair state into the switch's value, disabled flag and detail line.
  • usePairToggle is the phone's port of the web hook: create, or unarchive an executor that was archived by an earlier pair; delete a never-briefed executor or archive one with history; stop an idle lead's session afterwards so its next turn starts with the right tools. Failures show an alert.
  • SwitchRow gained an optional disabled.

Verification

  • vp test run on packages/client-runtime/src/state, apps/mobile/src/features and apps/web/src/components/chat: 2292 passed. Three new tests for pairSettingsRow were written first and seen failing; the moved tests pass unchanged.
  • Typecheck @t3tools/client-runtime, @t3tools/mobile, @t3tools/web: 0 errors. vp check on every changed file and vp run knip:check: clean.
  • Not run on a simulator or a device.

How it was built

Through pair mode on a real install: Claude lead, Antigravity executor, shared worktree, three test files protected (checked 3, changed []). The lead did the file move and the contract; the executor wrote the hook and the sheet section in one turn, no corrections.

Part of #622.

Model: Claude Fable 5.1 (lead) with an Antigravity executor, paired in Pylon via the Claude Code harness.


View with [code]smith Autofix with [code]smith
Need help on this PR? Tag @codesmith-bot with what you need. Autofix is disabled.

@vercel

vercel Bot commented Sep 18, 2026

Copy link
Copy Markdown

Deployment failed for project pylon-marketing with the following error:

Resource is limited - try again in 24 hours (more than 100, code: "api-deployments-free-per-day").

Learn More: https://vercel.com/pylon-code?upgradeToPro=build-rate-limit

@github-actions github-actions Bot added vouch:trusted PR author is trusted by repo permissions or the VOUCHED list. size:L labels Sep 18, 2026
@github-actions

github-actions Bot commented Sep 18, 2026 •

Copy link
Copy Markdown
Contributor

Thread transfer impact

✅ Thread transfer remains within every enforced ceiling.

Provider Metric Main baseline This PR Impact PR ceiling
Codex Total thread wire 13.9 KiB 14.0 KiB +41 B (+0.3%) 15.1 KiB ✅
Codex Thread snapshot wire 7.2 KiB 7.2 KiB −13 B (−0.2%) 7.3 KiB ✅
Codex Live turn WebSocket wire 6.7 KiB 6.8 KiB +54 B (+0.8%) 7.8 KiB ✅
Codex Live turn WebSocket decoded 58.0 KiB 58.0 KiB +44 B (+0.1%) 66.4 KiB ✅
Codex Live turn messages 9 10 +1 (+11.1%) 21 ✅
Claude Total thread wire 14.0 KiB 14.0 KiB +18 B (+0.1%) 15.1 KiB ✅
Claude Thread snapshot wire 7.2 KiB 7.2 KiB −5 B (−0.1%) 7.3 KiB ✅
Claude Live turn WebSocket wire 6.7 KiB 6.8 KiB +23 B (+0.3%) 7.8 KiB ✅
Claude Live turn WebSocket decoded 58.9 KiB 58.9 KiB +44 B (+0.1%) 66.4 KiB ✅
Claude Live turn messages 9 10 +1 (+11.1%) 21 ✅

Baseline: a3bb71b · PR result: c61d1b2 · Source CI: success

Scenario and decoded snapshot size

10 historical turns, 5 command tools per turn, 878.9 KiB retained MCP result per historical turn, and a 1.05 MiB retained result in the measured turn.

  • Codex decoded thread snapshot: 115.6 KiB
  • Claude decoded thread snapshot: 116.3 KiB

Updated in place by a trusted workflow. PR artifacts are strictly validated and never executed.

@rynfar

rynfar commented Sep 18, 2026

Copy link
Copy Markdown
Collaborator Author

Simulator check (iPhone 17 Pro, iOS 26.3, installed Pylon Dev client loading this branch's bundle, paired to a disposable backend):

  • The home list shows none of the eight live pair executors on that backend.
  • A paired lead shows the notice above the composer with the right text; an unpaired thread shows nothing.
  • From what that showed, this push makes the notice its own accessible element (it had been folded into the screen's container, so VoiceOver and UI automation could not target it), gives it the composer's side margins instead of running edge to edge, and moves it beside the dock's other cards.

Not verified: tapping Open executor, and the Pair with an executor switch in thread settings. The automation could not deliver taps to any React Native touchable on the thread screen, including a plain work-log row used as a control, so this is a tooling limit, not a result. Both need a finger.

@vercel

vercel Bot commented Sep 18, 2026 •

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

1 Skipped Deployment
Project Deployment Actions Updated
pylon-marketing Ignored Ignored Preview Sep 18, 2026 11:29pm UTC

@rynfar
rynfar merged commit 8a3bf96 into pylon Sep 18, 2026
20 checks passed
@rynfar
rynfar deleted the feat/pair-mobile-toggle branch September 18, 2026 23:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

size:L vouch:trusted PR author is trusted by repo permissions or the VOUCHED list.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant