Repository navigation
fix(mobile): swap screens in place beside the sidebar - #234
Merged
Merged
Conversation
On wide windows the stack slid screens in from the side, so the old screen moved left over the thread list for a moment. Beside the sidebar screens now fade in place, and the stack is clipped to its own area. Phones keep the default slide; reduced motion turns it off. Fixes: #230
nixuuu
force-pushed
the
fix/mobile-wide-transition
branch
from
November 6, 2026 07:45
1a56ec2 to
795e9fb
Compare
nixuuu
added a commit
that referenced
this pull request
Nov 6, 2026
Stage 2 of 2 (stack: #297 → this PR). Merge the stack together. Applies the motion layer from #297 to the screens. Rebased onto #287 (UI kit) and #292 (floating composer). The composer's compact/expand is untouched. ## Transitions per screen - **Thread timeline** (inverted list held by the fold anchor): a new turn (sent or queued message) fades in; rows that arrive later inside a turn fade in (work rows, notices, the answer when it leaves the fold); an opened fold's rail fades in; fold, group, reasoning, code, file-change and failure chevrons turn; pending steers fade in and out. No height animation in the feed, so anchoring and following still hold. - **Bottom of a conversation:** approval/question cards pop in and out; "Show latest messages" pops in and out (in `FloatingComposer`, appearance only). - **Bot chat:** new messages fade in; the approval card fades its answer block out on expiry and swaps the actions for the expiry note. - **Sidebar:** the Threads/Bots lists cross-fade while the pill slides. Thread rows glide on reorder (`GlidingCell`) and fade in when new, and the row status (Working → Completed …) swaps. The "Working" section and "Archived" get chevrons, and "Archived" expands as an accordion. In the bot list, rows glide on reorder (`itemLayoutAnimation`), new bots fade in, and unread counts pop and swap. The connection label swaps and its dot eases. - **Wide layout:** the sidebar slides in from the edge and fades (`slow`) and slides out (`medium`). The column takes its width before the slide in and gives it up after the slide out, so the screen beside it lays out once, not on every frame. Rotation, folding, sign-in and Settings switch at once. Screens keep the in-place swap from #234. Screen transitions stay the native stack defaults. - **Settings:** disclosures expand and collapse; connector error details expand. The kit's `Switch` already animates its thumb. - **Lists:** composer attachment chips pop in and out and their neighbours glide. Bot approval rules resolve in when loaded, and a removed rule fades out while the rest glide up. - **In-app alert:** comes down from the top edge and leaves the same way; a newer alert replaces it. - A screen's first render and its removal do not animate (`LayoutAnimationConfig` in the Stack's `screenLayout`, sheets and overlays). ## Reduced motion Fades only (rows, sheets, alerts, cards). Slides, pill, chevrons, text swaps, layout glides and the sidebar are instant. Checked on iOS (Reduce Motion) and Android ("Remove animations"). ## Performance - Every animation runs on the UI thread (Reanimated shared values, layout animations). - Long lists: virtual lists animate only real arrivals (`useArrivals`). Rows that remount while scrolling appear at once, and virtualized rows have no exit animations. The timeline animates opacity only, never height. - The sidebar no longer animates the column width. A width animation re-laid out a 40-turn thread on every frame on the iPad and dropped the motion; the column now changes width once, outside the motion. - Checked with a 40-turn seeded thread on the iPhone 17 Pro simulator (dev and production JS bundles), the iPad Pro 13" simulator and a Pixel 7 class Android 16 emulator. ## Verification - Gates: `bun install`, `bun run gen:check`, `bun run typecheck`, `bun run lint`, `bun run format:check`, `bunx expo lint`, `bun run check:tmp` (1548 pass, 0 fail, nothing left in temp) and the web build are all clean on the rebased stack. - EAS dev builds (iOS simulator, Android APK) with the new native modules were installed. The app was paired with a throwaway local gateway that had seeded threads. - iOS (iPhone simulator), light and dark, reduced motion on and off: segmented pill, sheet open/close, live turn (rows arriving, fold closing, answer out), fold toggle with the header anchored, "Show latest", settings segments. After the rebase onto #292, a smoke test of a live turn with the floating composer passed. - iPad (wide layout): sidebar close and reopen end states, and pill. - Android emulator: pill, live turn, dark mode, reduced motion (sheet and scrim fade only). ## Unverified / known - Frame-level timing on the iPad: simulator recordings at that resolution drop frames, and frame stats need a physical device. The sidebar design avoids per-frame layout, but it was not measured on hardware. - Not checked on a physical phone or a mid-range physical Android device. - Pre-existing and not changed here: on Android, after sending in a long thread the feed stops just above the bottom and shows "Show latest messages" instead of following. It reproduces with every animation disabled, so `maintainVisibleContentPosition` on Android is the likely cause. ## Copy audit No UI text changed.
nixuuu
added a commit
that referenced
this pull request
Nov 8, 2026
Settings now covers the workspace with an opaque native transition. Back gestures return from a Settings section to its list before dismissing Settings. ### Causes and changes - The wide root stack faded Settings over the thread while also removing/recreating the workspace sidebar. Move workspace routes into `(main)` and present Settings above that complete, stable surface. Android slides from the bottom; iOS uses its native stack transition. Reduced motion disables navigation animation. Wide thread/bot changes still swap in place inside the clipped panel, preserving #234's sidebar protection. - Settings sections lived in component state, so iOS only knew about the outer Settings route. Give sections their own native stack and disable the outer iOS gesture while a section owns Back. Shortcuts anchor the Settings list beneath their section; X dismisses all Settings. - Split view: Back from a selected section returns to the list + General, then closes Settings. Selecting another section replaces the current section, so sidebar browsing does not accumulate history. Documented in `docs/mobile.md`. - Audit: side threads opened from thread details/subagent panels and bot exchanges already push real routes. Bot settings/details sheets already unwind through `onRequestClose`; Android device checks confirm settings → details → chat. Fix the pairing scanner's missing Android Back handling and protect paired/unpaired route history. No dependency changes. ### Device evidence Recorded before and after with T3 device tools on Android 16 phone and unfolded Fold, in light and dark mode. Extracted transition frames show Settings sliding as a solid surface, with no thread/settings text double exposure and no sidebar resize. Before/after recordings and frame sheets are retained in the implementation worktree under `.tmp/mobile-settings/`; they are deliberately not committed and are not hosted GitHub attachments: | Check | Evidence | | --- | --- | | Before, phone/Fold × light/dark | `before-{phone,fold}-{light,dark}.mp4` and corresponding `*-frames.png` | | Final open/close, phone/Fold × light/dark | `final-{phone,fold}-{light,dark}.mp4` and `*-open.png` / `*-close.png` | | Android section → Settings root → thread, button + edge gesture | `after-phone-light.mp4`, `after-fold-light.mp4`, dark counterparts | | iOS General → list → thread, left-edge swipe | `ios-final-swipe.mp4` (fresh simulator dev client) | | Side thread → parent by gesture | `android-nested-back.mp4`, `ios-nested-back.mp4` | | Bot settings → details → chat; scanner → form | `android-nested-back` recording chunks, `android-pairing-back.mp4` | | Reduced motion | `android-reduced-motion.mp4` | Cold starts on Android and iOS were checked after removing unused explicit workspace screen ordering; no route-reconciliation warning remained. Native clients were built locally (private Linux Android SDK/Gradle, arm64, two workers, 3 GB heap; private Mac simulator build with ≥12 GB free at build start). No store/EAS builds. Device recordings/native builds precede an unchanged rebase onto `61882593` (#357). Installation and static checks were repeated afterward; this PR changes no dependencies or workflows. ### Verification and gaps - Passed: `bun install`, `bun run gen:check`, `bun run typecheck`, `bun run lint`, `bun run format:check`, web build, mobile typecheck and `bunx expo lint`. No UI tests added. - Full `bun run check:tmp` did not finish cleanly: it ended with signal 143 during worker tests, after three linked-project failures and one shell timeout. Targeted rerun: shell passed; the same three project assertions failed identically on untouched base `f583c5ca` (10 passed / 3 failed across the three files). Both targeted runs reported nothing left in their temp dir. Separate worker run passed: 264 passed, 19 skipped, 0 failed across 47 files; temp cleanup passed. - The three baseline failures are `add-project.test.ts` (local folder unexpectedly attached) and `linked-projects.test.ts` (owner-scoped origin metadata and shutdown-home merged identity). They are outside the mobile change. Full-suite gate remains unverified/failed; this PR stays draft for that gap. - Device checks used emulators/simulator, not physical hardware. iOS split-width gestures, an actual fold/rotation during navigation, and frame-by-frame predictive-back progress were not separately verified; completed Android edge gestures and Back events were verified. The split behavior uses the same documented native section history on both platforms. Copy audit: no UI text changed. Fixes: #234 Related: #245
This was referenced Nov 13, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
On wide windows (unfolded foldables, tablets) the stack slid screens in from the side. The old screen moved left over the thread list and stayed visible there for about half a second after switching threads, bots or opening settings.
Change (
apps/mobile/src/app/_layout.tsx)overflow: hidden), so a transition never draws over the sidebar.Checked:
gen:check,typecheck,lint,format:check,expo lint. Both Mac emulators are in use by other work, so the device check is on a preview APK on a Galaxy Z Fold.Copy audit (§8): no UI text changes.
Fixes: #230