Skip to content

feat(mobile): open environment setup after pairing and save edits explicitly - #2839

Merged
DoodleBears merged 3 commits into
mainfrom
codex/2782-environment-setup
Oct 25, 2026
Merged

DoodleBears merged 3 commits into
mainfrom
codex/2782-environment-setup

Conversation

@DoodleBears

@DoodleBears DoodleBears commented Oct 25, 2026 •

Copy link
Copy Markdown
Contributor

Refs #2782 | Work claim

Task: codex/local/01a172ec-cdb4-7823-bf7d-546549ec6491.

Why the change

Let people name and distinguish a newly paired environment immediately, then apply appearance edits deliberately with a native Save action.

Special things to note

  • Merge risk: two-way door, revert this patch; medium blast radius, mobile pairing completion, workspace reset and local appearance persistence. Review scope-qualified navigation, draft isolation and storage failure handling. No Host API, schema, dependency or native build input changes.
  • Validation at 07c5bf0a816c: 259 mobile test files / 1,950 tests passed; 9 files / 11 tests skipped. Root/mobile typechecks, repository lint, changed-file format, CI-plan validation and bilingual Release Ledger checks passed. Tests cover wrapped navigation, batch completion, Back, deferred appearance writes, failed-save retry and native storage failure preservation.
  • Native/Human QA pending; Human explicitly requested merge after green CI. Android/iOS native appearance, keyboard, sheet gestures, text scaling and accessibility remain unverified. Account batches finish before opening the last newly added environment; existing pairings are not sent through setup again. Closing setup keeps the successful pairing and automatic defaults. A matched native Before/After pair is pending the shared device queue; Fix mobile environment labels and conversation navigation #2838 screenshots do not establish this change.

Change outline

- Pair success -> return to previous All filter
+ Pair success -> select new environment -> Chats + appearance sheet
+ Account batch -> finish all attempts -> setup last new environment
- Name/icon/color/reset -> write immediately
+ Name/icon/color/reset -> local preview only
+ Back / swipe dismiss -> discard draft, retain pairing/defaults
+ Save -> persist all fields -> close
+ Storage failure -> retain draft + retry

The sheet header keeps Back on the left and adds a Save checkmark on the right. iOS uses a native SwiftUI circular glassProminent button with an opaque fallback; Android uses native Compose FilledIconButton. The existing Expo Router form-sheet presentation is retained.

The pairing path resets the owning app stack to Chats plus the source-qualified host-look route in one dispatch, so Back cannot reopen the pairing ceremony. Saving refreshes the existing appearance authority and writes through its update operation. Native file failures now reach the editor instead of being silently swallowed.

Expo Web layout preview — 390 × 844, Chinese, default text size

Real Expo Web exports with matching browser conditions. Before: source 6cc30b5ace8e; After: source 07c5bf0a816c. A synthetic offline environment was seeded in browser session storage to reach the actual appearance screen. Layout/components were not mocked. This bypasses pairing and does not verify pairing, native storage or native controls. The round Save button shown here is the Web fallback; iOS Liquid Glass and Android M3 rendering still need native QA.

Light — Before / After: Close with no save action becomes Back with a primary Save checkmark.

Expo Web Before: light appearance editor without Save

Expo Web After: light appearance editor with Back and Save

Dark — Before / After: the same header change in dark theme.

Expo Web Before: dark appearance editor without Save

Expo Web After: dark appearance editor with Back and Save

Unsaved draft — light / dark: typing Research Lab and choosing Lab + Green updates the sheet preview; Save has not been pressed. These frames do not claim a successful persistence operation.

Expo Web draft: light Research Lab with green lab icon before Save

Expo Web draft: dark Research Lab with green lab icon before Save

Capture provenance and limits. Android capture is submitted to the shared Windows queue; iOS needs the Mac lane. Native/Human qualification remains tracked in #2782.
Runnable review: start in All with A paired, pair a fresh QA environment B, verify B is selected and the setup sheet opens. Change all three fields; Back/swipe must leave the allocated defaults intact. Reopen from B's drawer action, edit and Save; verify Chats and Activity update and survive restart. Capture matched light/dark Before/After views, keyboard open, default/large text, and platform Back/accessibility. Repeat single and batch account pairing and inject a controlled storage failure to check retry.

Summary by CodeRabbit

  • New Features

    • Newly paired environments are selected automatically, and their name, icon, and color settings open for customization.
    • Preview appearance changes before saving. Save applies them together; Back discards unsaved edits while keeping the pairing.
    • Save controls are tailored to iOS and Android.
  • Bug Fixes

    • If saving appearance changes fails, the editor stays open with your draft intact so you can retry.

Issue: #2782

Agent-Task: codex/local/01a172ec-cdb4-7823-bf7d-546549ec6491
@coderabbitai

coderabbitai Bot commented Oct 25, 2026 •

Copy link
Copy Markdown

Review in Change Stack →

Caution

Review failed

The pull request is closed.

Walkthrough

Pairing now selects newly added mobile environments and can open their appearance editor. Appearance edits remain local until saved. Save failures leave the editor open with the draft available for retry.

Changes: Mobile environment setup

Layer / File(s) Summary
Pairing completion and setup navigation
apps/mobile/DESIGN.md, apps/mobile/src/ui/shell/workspace-navigation.ts, apps/mobile/src/ui/shell/use-pairing.ts, apps/mobile/app/pair/account.tsx, apps/mobile/test/channel-navigation-harness.tsx, apps/mobile/test/pairing-verification.test.tsx, changes/2782-environment-setup.md
Pairing can select a newly added environment and reset navigation to its host-look route. Account pairing calls finishSetup() when the operation has not been aborted. Tests cover setup navigation and filter timing. The design notes and changelog describe the pairing and appearance flow.

Appearance editing and saving

Layer / File(s) Summary
Draft editing and save controls
apps/mobile/src/ui/primitives/sheet-save-button*, apps/mobile/src/ui/primitives/drawer-header.tsx, apps/mobile/src/ui/shell/host-look-editor.tsx, apps/mobile/src/ui/strings.ts, apps/mobile/test/host-look.test.tsx, .agents/skills/verify-deepseekbot/features/phone-multiple-hosts.md, .github/pr-screenshots/2839/README.md
The editor keeps name, icon, and color changes in local state and submits them together through Save. The platform-specific save buttons show busy state and disable interaction when busy or disabled. Tests cover dismissal without saving, failed-save retry, and draft retention after a stored-look refresh. Verification instructions and screenshot notes describe the tested preview scope.
Persistence and save completion
apps/mobile/app/host-look.tsx, apps/mobile/src/host/native-host-look.ts, apps/mobile/test/native-persistence.test.ts
The save action refreshes host looks before updating the selected host. Storage write failures now propagate. Persistence tests cover failure and recovery after refresh.

Priority: Not assessed

Estimated code review effort: 3 (Moderate) | ~20 minutes

Change: Feature

Sequence Diagram(s)

sequenceDiagram
  participant PairAccountScreen
  participant usePairing
  participant conversationFilter
  participant workspaceNavigation
  participant HostLookEditor
  PairAccountScreen->>usePairing: finishSetup()
  usePairing->>conversationFilter: select the computer environment
  usePairing->>workspaceNavigation: resetWorkspaceRoot with setupHostId
  workspaceNavigation->>HostLookEditor: open the host-look route
Loading

Possibly related issues

  • Issue 2186 — The pairing flow changes navigation and opens setup for a newly paired environment; native acceptance remains noted as pending.
  • Issue 2784 — The flow opens editable setup for a newly paired environment.
  • Issue 2782 — Pairing resets navigation to Chats and opens a source-qualified host route for the newly added environment.
  • Issue 2193 — Pairing completion changes navigation to Chats and the source-qualified host route.
  • Issue 2178 — The flow navigates to a source-qualified host route after pairing.
  • Issue 2662 — Appearance persistence includes the environment name and other appearance fields.
Merge Risk: Low · up to 5c639

In a narrow case, editing one appearance field before the saved look has loaded can overwrite the saved name or color on Save. The impact is limited to appearance settings, and the main pairing, setup and save flows look sound. This can be merged with awareness, ideally after the draft is merged field by field. Native QA is still pending.

Finishing Touches
📝 Generate docstrings
  • Commit to this branch
  • Create a new PR
🧪 Generate unit tests (beta)
  • Commit to this branch
  • Create a new PR
  • 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.

Issue: #2782

Agent-Task: codex/local/01a172ec-cdb4-7823-bf7d-546549ec6491
Refs #2782; task codex/local/01a172ec-cdb4-7823-bf7d-546549ec6491
@DoodleBears
DoodleBears marked this pull request as ready for review October 25, 2026 21:13
@DoodleBears
DoodleBears merged commit e494bd4 into main Oct 25, 2026
12 of 13 checks passed
@DoodleBears
DoodleBears deleted the codex/2782-environment-setup branch October 28, 2026 04:25
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