Skip to content

fix(mobile): stabilize composer and replace tray popovers - #909

Merged
nixuuu merged 1 commit into
devfrom
fix/mobile-chat-scroll-button
Nov 17, 2026
Merged

nixuuu merged 1 commit into
devfrom
fix/mobile-chat-scroll-button

Conversation

@nixuuu

@nixuuu nixuuu commented Nov 17, 2026

Copy link
Copy Markdown
Member

Change

Early mobile messages can end up behind the composer, repeated keyboard focus cycles can inflate the input, and tray popovers leave little room for queued messages and subagents.

  • Correct native anchor displacement on iOS while following latest, using the negative composer/keyboard inset. Keep intentional reading and disclosure anchoring intact, and make the latest button's pressed background round.
  • Measure text independently of the space transferred into the composer while writing. Recompute the resting height on focus, blur after keyboard dismissal, and keep blank input space tappable.
  • Open queue and subagent lists in shared scrollable sheets, with a centered card on wide windows. Show Steer beside its icon, keep actions beneath previews, and preserve selected subagent navigation when the last active agent disappears during dismissal.
  • Let the overlay body shrink to its height limit so the final list actions stay above the system navigation bar. Update the mobile behavior documentation.

Fixes: #730

Verification

  • Mobile typecheck, targeted oxlint/ESLint, scoped formatting and diff checks passed locally. Final code review found no actionable issues. The remaining repository checks and builds run in CI.
  • Android emulator: actual application components with isolated fixture data, light/dark themes, phone and wide layouts, long queue/subagent lists, menus and editor handoff. Verified four keyboard dismissal cycles, long draft growth/clearing, delayed early-message insertion, latest navigation and its round pressed state, and removal of the last subagent during dismissal. Rechecked the visible Steer label in phone light/dark and wide dark layouts.
  • No iOS simulator was available. iOS native scrolling still needs device validation. Fixture checks do not verify real gateway mutations, durable drafts or production destination rendering.

Copy audit (docs/copy.md §8): passed. Icon-only steer → icon plus Steer makes the action readable; the existing accessible description remains. Sheet titles and close labels use sentence case and established terms. Short and long text were checked at phone and wide widths; no new errors, empty states, dependencies or decorative copy.

Keep new turns above the composer on iOS while following latest, retain a round pressed state for Show latest, and prevent keyboard focus cycles from inflating the input. Use scrollable queue and subagent sheets with visible Steer labels and preserve navigation through dismissal.

Fixes: #730
@nixuuu
nixuuu enabled auto-merge (squash) November 17, 2026 06:29
@nixuuu
nixuuu merged commit 38433ef into dev Nov 17, 2026
15 checks passed
@nixuuu
nixuuu deleted the fix/mobile-chat-scroll-button branch November 17, 2026 06:35
nixuuu added a commit that referenced this pull request Nov 17, 2026
Opening or dismissing the iOS keyboard can synchronously re-enter the
scroll handler while `useFollowingList` is correcting native anchor
displacement. If UIKit reports a clamped offset, the nested handler
dispatches another `scrollTo` before the first command returns,
overflowing the UI-runtime stack. The reproduced iOS error contains
hundreds of repeated `track → scrollTo → onScroll` frames.

Guard automatic corrections for the lifetime of the native command.
Nested events retain the actual native offset and following intent
without dispatching another correction. Increment the existing
correction revision before dispatch so composer gesture tracking
discards corrected events; release the guard in `finally`. Update the
mobile behavior documentation.

Fixes: #909

Validation:
- Mobile TypeScript check, targeted oxlint and ESLint, formatting and
diff checks passed.
- Expo's iOS Babel transform successfully generated the edited worklets.
- A scratch probe using the actual callback source reproduced stack
overflow before the change (3,483 nested commands) and one command
afterward. Checked clamped/successful feedback, reader scrolling,
disclosure anchoring, cleanup after dispatch failure and subsequent
corrections. This probe does not execute UIKit or a native worklet
runtime; no probe artifacts are committed.
- The reporter verified the fix on their physical iPhone and confirmed
the application no longer crashes when reproducing the issue.
- All 15 CI checks passed for commit
0672d9a.
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