[PR #13155] fix(app): improve initial bottom scroll on iOS/iPad Safari #14534

Open
opened 2026-02-16 18:19:19 -05:00 by yindo · 0 comments
Owner

Original Pull Request: https://github.com/anomalyco/opencode/pull/13155

State: open
Merged: No


Fixes #13156

Problem

On initial session load without a hash, iOS/iPad Safari can land above the latest chat messages.

Cause

Mobile Safari can apply late layout/viewport adjustments after first paint, so the initial bottom scroll is not always final.

Fix

  • In packages/app/src/pages/session/use-session-hash-scroll.ts, keep existing initial scroll behavior.
  • Add a single delayed retry scroll-to-bottom for Apple mobile Safari only.
  • Run this only when there is no hash.

Safety

  • Hash deep links (#message-...) remain unchanged and still take priority.
  • No API or routing changes.
  • Change is localized to one file.

Manual verification

  • iPhone Safari: open session with no hash -> lands at bottom.
  • iPad Safari: open session with no hash -> lands at bottom.
  • Open with #message-... -> jumps to target message (not overridden).
**Original Pull Request:** https://github.com/anomalyco/opencode/pull/13155 **State:** open **Merged:** No --- Fixes #13156 ## Problem On initial session load without a hash, iOS/iPad Safari can land above the latest chat messages. ## Cause Mobile Safari can apply late layout/viewport adjustments after first paint, so the initial bottom scroll is not always final. ## Fix - In `packages/app/src/pages/session/use-session-hash-scroll.ts`, keep existing initial scroll behavior. - Add a single delayed retry scroll-to-bottom for Apple mobile Safari only. - Run this only when there is no hash. ## Safety - Hash deep links (`#message-...`) remain unchanged and still take priority. - No API or routing changes. - Change is localized to one file. ## Manual verification - iPhone Safari: open session with no hash -> lands at bottom. - iPad Safari: open session with no hash -> lands at bottom. - Open with `#message-...` -> jumps to target message (not overridden).
yindo added the pull-request label 2026-02-16 18:19:19 -05:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: anomalyco/opencode#14534