Skip to content

perf(mobile): avoid reflowing conversations during sidebar gestures - #1454

Merged
nixuuu merged 5 commits into
devfrom
perf/mobile-sidebar-performance
Nov 29, 2026
Merged

nixuuu merged 5 commits into
devfrom
perf/mobile-sidebar-performance

Conversation

@nixuuu

@nixuuu nixuuu commented Nov 29, 2026 •

Copy link
Copy Markdown
Member

Change

The native split view was changing the width of a conversation on every animation frame. On a landscape phone, the transcript repeatedly wrapped and measured its text as the sidebar moved.

  • Slide the sidebar and the conversation together with one horizontal transform. The conversation takes its full width at the start of a close and its split width at the end of an open.
  • Show a vertical guide under the resize handle. Releasing the handle applies and saves the width once. Cancelling keeps the previous width.
  • Size both panes from the same window frame when rotating. The split follows the system layout direction and keeps the transcript and composer inside the outer safe edges, including on Android's inverted list.

Verification

  • Compared the original and revised Android API 36 development client on a landscape phone emulator with a populated conversation and an isolated gateway. Its conversation container reported 2–4 width changes per toggle before the fix and one after. A 700 ms drag went from 11 width changes to one on release. Holding or cancelling the drag produced no width change.
  • On the final revision, four collapsed landscape → portrait → landscape rotations each went directly from 862.48 to 411.43 and back to 862.48 dp. With the sidebar open the corresponding widths were 542.48 and 411.43 dp.
  • Also checked persistence after reopening and restarting, double-tap reset, reduced motion, portrait and landscape rotation, and the mirrored split with forced RTL. Frame pacing on a physical iPhone remains unverified.
  • Mobile TypeScript check, formatting and scoped lint passed for the edited TSX files.

Two CI attempts reproduced a race in the worker’s Claude rewind fixture. The fixture correction is in #1457.

Fixes: #1089

@nixuuu
nixuuu marked this pull request as ready for review November 29, 2026 07:04
@nixuuu
nixuuu enabled auto-merge (squash) November 29, 2026 07:04
@nixuuu
nixuuu merged commit e40c6dd into dev Nov 29, 2026
24 checks passed
@nixuuu
nixuuu deleted the perf/mobile-sidebar-performance branch November 29, 2026 07:38
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