Skip to content

fix(mobile): keep wide tables scrolling inside the timeline - #571

Merged
nixuuu merged 1 commit into
devfrom
fix/mobile-table-scroll
Nov 12, 2026
Merged

nixuuu merged 1 commit into
devfrom
fix/mobile-table-scroll

Conversation

@nixuuu

@nixuuu nixuuu commented Nov 12, 2026

Copy link
Copy Markdown
Member

Wide Markdown tables can lose horizontal drags to navigation on iOS, while Android readers can be left with clipped columns. Tables, unwrapped code, display math and diffs now share a native Gesture Handler scroller with Android nested scrolling, a horizontal indicator and an overflow shadow. Main-stack back navigation starts at the screen edge; dragging inside a block keeps the conversation open.

Diagnosis and change

  • The main Expo Router stack left fullScreenGestureEnabled unset. The installed react-native-screens 4.30.1 explicitly treats that state as enabled on iOS 26 (RNSScreen.mm, isFullScreenSwipeEffectivelyEnabled), despite the router documentation describing a false default. Set it to false in the main stack, preserving the native edge recognizer and leaving gestureEnabled intact. This covers threads, side threads and bot conversations.
  • The timeline is an inverted Reanimated FlatList, with a native iOS scroll view and KeyboardChatScrollView on Android. Embedded tables/code/diffs used React Native horizontal ScrollViews without Android nested scrolling. Replace them with one HorizontalScroll using Gesture Handler's installed v3 ScrollView, nestedScrollEnabled and iOS directional locking; also enable nesting on the timeline. Its local gesture root supports blocks rendered inside Android modal viewers. No competing pan was found on timeline rows. Native reproduction was unavailable, so Android interception and the exact failing gesture sequence remain device checks.
  • The sidebar is a column toggled by a button, without a screen-wide drawer pan. feat(threads): archive threads from the sidebar with one click #549's archive PanResponder is attached only to sidebar thread rows. fix(mobile): expand turn summaries smoothly without scroll jumps #554's disclosure changes animate height and anchoring without adding a pan recognizer. Neither introduced this conflict. fix(mobile): render code blocks and tables in markdown #281 introduced the table/code scroll containers with the current screens version and missing nesting/navigation restriction.
  • Bound both header and body column widths to 72–224 dp plus padding; long headings wrap too. Memoize width estimates and avoid spreading every row into Math.max. Tall tables retain natural height so vertical drags scroll the timeline. The 16 dp right-edge overflow shadow disappears at the right end and when content fits. Scroll offsets and shadow opacity stay on the UI thread through Reanimated; no per-frame JS callback, pan loop, list reconfiguration or item-height estimate is added.
  • Gesture Handler 3.3.0 was already locked, installed and autolinked on both platforms through the existing dependency graph. Declare that exact version directly in mobile; the lock change only adds the workspace dependency entry. No native package version, native source, app config or EAS profile changes. Polish mobile documentation updated. Copy audit (docs/copy.md §8): no UI strings changed. No UI tests or diagnostic artifacts added.

Verification

  • bun install --frozen-lockfile passed, followed by bunx expo install [email protected] --bun using the already installed version.
  • Mobile bun run typecheck, root bun run lint apps/mobile, bun run format:check apps/mobile docs/mobile.md, and git diff --check pass. Expo ESLint passes for all six changed TSX files, including the new scroller.
  • Mobile bun run lint (Expo ESLint) reports 63 errors and 10 warnings in existing source files. An independent archive of untouched dev with the same installed tooling reports the same 63 source errors and 10 warnings (direct eslint . additionally checks metro.config.cjs and reports its existing __dirname diagnostic). All six changed TSX files have zero ESLint errors/warnings. Repository oxlint is clean. No lint rules were disabled.
  • Production fingerprints generated before and after in the same checkout/environment with bunx [email protected] fingerprint:generate --platform <ios|android> --build-profile production --json --non-interactive are byte-for-byte identical: iOS 6ddec9ef559ee0095ac33e94ff9418a942053b17; Android 5f6eae3ab278f1cd543e9ed763f923a319b65ec9. These match the prior production-compatible baseline; this remains JS-only.
  • No device session, native frame-time/memory measurement, UI test, full check:tmp, web build, CNG prebuild or bundle export was run. Device behavior/performance is unverified, not inferred from static checks. CI owns the full repository checks, as requested.

Maintainer device checklist

Use the same installed native build and same thread for baseline versus this branch's JS. Record OS/device, app version/runtime/update ID and channel. Include an iPhone on iOS 26 and an Android phone; check an older supported iOS version if available. Test light/dark, portrait/landscape and a wide layout with the sidebar open/closed.

  1. Horizontal ownership: open a three-column table like Zgłoszenie | Nowy status | Dlaczego…, with enough text to overflow. Start 20 alternating horizontal drags on header text, body text and blank cell padding, away from the left screen edge. Drag left to reveal the last column, right from halfway to recover the first, then right again at offset zero. Every interior drag should stay in the conversation; every column must be reachable. Repeat in an assistant answer, a human message, a bot bubble and expanded tool/summary content. Include short cells, a very long heading, long unbroken text, and a table that fits entirely.
  2. Back/sidebar: from a thread with a previous screen, swipe right starting within the leftmost 16 dp of the display; native back must still work. Cancel one edge swipe and complete another. Interior swipes must never navigate, including when already at the table's left end. Repeat in a side thread and bot conversation. Toggle the wide sidebar, scroll its list vertically, and confirm its archive swipe still works only on sidebar rows.
  3. Tall tables and vertical feed: use a table at least two screen-heights tall. Drag vertically starting over header/body/padding and diagonally with mostly vertical movement, including while horizontally offset. The outer inverted timeline should move through the full table without trapping the gesture, clipping the settled content or folding the composer from a horizontal-only drag. Repeat with keyboard open/closed, during a streaming response, after loading older history, and after closing/reopening a work disclosure. Confirm jump-to-latest still works.
  4. Other blocks and affordance: repeat interior horizontal drags on a long code line, display math, stacked and split diffs, and a full-diff modal viewer. Toggle Wrap code/Wrap diffs and confirm wrapped content still scrolls vertically. The horizontal indicator should appear during scrolling; the subtle right shadow should show only while content remains to the right, disappear at the end, and update after rotation/font-size changes. Check both themes and Reduce Motion; no content or controls should move when the shadow changes. Check VoiceOver/TalkBack can reach all content and ignores the decorative edge.
  5. Long-thread performance: on the same device/build mode, compare baseline and changed JS on the same 1,000-turn thread with multiple tables/code/diffs. After warmup, record three 30-second vertical flings and 20 horizontal table drags in the native profiler. Compare dropped frames/UI frame time, JS activity and settled memory after opening/closing many summaries. Expect no new React render or JS callback per horizontal-scroll frame and no repeatable frame-pacing/memory regression; record the measured result before merging. Restore normal settings afterward.

Fixes: #281
Related: #549
Related: #554

Use the installed gesture-handler scroll view for tables, code and diffs, enable Android nesting, and restrict iOS back navigation to the edge. Keep column widths bounded and show overflow without per-frame JS.

Fixes: #281

Related: #549

Related: #554
@nixuuu
nixuuu merged commit b6dca61 into dev Nov 12, 2026
9 checks passed
@nixuuu
nixuuu deleted the fix/mobile-table-scroll branch November 12, 2026 14:01
nixuuu added a commit that referenced this pull request Nov 15, 2026
Android can open the IME over the floating composer without moving the
latest content. Wide Markdown blocks also need to share gesture
ownership with the vertical thread list. This adds JS-only recovery for
settled keyboard bounds and moves Android gesture roots to each native
window.

- Keep native keyboard frames for animation. Reconcile show, hide, and
height changes through React Native's independent Keyboard events,
including a keyboard already open at mount. Defer reconciliation during
a native animation and normalize the navigation-bar inset.
- Add only the difference between reconciled bounds and the keyboard
inset already supplied by KeyboardChatScrollView. Retain #759's stable
composer reserve and anchoring, without restoring Android
autoscroll-to-zero.
- Put the Android GestureHandlerRootView above both vertical and
horizontal scroll views, including modal windows. Keep native
directional arbitration and nestedScrollEnabled for tables, code, and
diffs. The iOS root hierarchy and scroll adapter remain unchanged.

Related: #759
Related: #359
Related: #571

### Recording and history

Inspected the supplied 16.05-second recording using a full 4 fps frame
strip and separate keyboard/table strips. Around 0.75–1.75 s and again
after 2.5 s, the keyboard covers a stationary composer and message
content. The later table gestures move the feed vertically without
exposing more columns. The recording cannot establish native callback
delivery or exact gesture direction.

Compared git log -p and the parent of b99ac10. #759 changed the
reserve, fold intent, clipping, and Android autoscroll threshold; it did
not change KeyboardWindow, FloatingComposer, ChatKeyboard, or
HorizontalScroll. The frame-only keyboard path dates to 49db26e (#359);
the block-local gesture roots date to b6dca61 (#571). These are the
code paths addressed here, but the native trigger and introducing commit
for the reported failures are not confirmed. There is no evidence
sufficient to label #759 as the introducing regression, so this uses
Related rather than Fixes.

### Verification

- Passed with nice and TMPDIR=/var/tmp: bun install, repository
typecheck, mobile typecheck, repository lint, format, and format:check.
Changed-file Expo ESLint also passes. No UI tests added.
- Full mobile Expo lint reports 112 errors and 25 warnings outside the
changed files. This additional check is not claimed as passed.
- Nightly fingerprints generated before/after with expo-updates
fingerprint:generate are byte-for-byte identical: Android
141ef4e8c825ee4fc5d22c499402b284741b0970; iOS
83794f069934a7374461427d89b8d008cec19d97. No native module, dependency,
config, plugin, or native setting changed.
- Device acceptance remains unverified. Local discovery reports no
Android SDK. MacStudio discovery timed out twice with no devices
returned. EAS device_open failed because frameAncestors/corsOrigins
require Production or Enterprise and the account has Starter. No
emulator was driven, no existing AVD was modified, and no after-shots
are claimed.
- No EAS update/build, tags, releases, production services, reserved
ports, web build, native generation, or full integration/E2E suite was
run. Source and documentation are the only committed artifacts.

### Outstanding acceptance

Keep this PR draft until the same installed Android Nightly native build
can run this JS: check IME open/close, suggestions/emoji and IME height
changes, writing visibility and latest content, fold/expand without feed
displacement, horizontal/vertical drags from table text and padding,
long code/diffs, and modal viewers. Repeat the existing iOS flow for
parity. The fallback repairs missing animation updates; it does not
change a native soft-input setting. A demonstrated need to change that
setting must be reported separately.

### Copy audit (§8)

No UI text changed. The change affects keyboard bounds and gesture
ownership; device layout and accessibility acceptance remain open.
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