fix(mobile): improve font-size slider performance and prevent maximum update depth errors - #7138
Conversation
Keep drag progress on the UI thread and commit the snapped preference once when the gesture finalizes. This avoids app-wide re-renders, lag, and maximum update depth failures during heavy slider scrubbing.
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Team Run ID: 📒 Files selected for processing (1)
Included review availability: Your plan provides up to 10 included reviews per hour; 9 remain after this review. 📝 WalkthroughWalkthroughThe font size slider now distinguishes cancelled and successful pan gestures. Cancelled gestures restore the current value. Successful gestures snap and commit the value derived from animated progress. ChangesFont size slider gesture handling
Estimated code review effort: 2 (Simple) | ~10 minutes Merge Risk: ⚪ Minimal · up to The slider now commits font-size changes only after successful drag completion while cancelled drags restore the saved value. The supplied checks indicate the intended mobile behavior is ready to merge. Suggested reviewers: 🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✨ Finishing Touches🧪 Generate unit tests (beta)
Comment |
ApprovabilityVerdict: Approved 5061496 Small, self-contained UX change that moves font size commit from continuous drag updates to only on slider release. Limited to a single mobile settings component with clear intent and low risk. You can customize Macroscope's approvability policy. Learn more. |
## What's Changed * fix(mobile): keep pending messages in the chat timeline by @juliusmarminge in pingdotgg/t3code#10449 * fix(mobile): show connection status in the floating pill instead of a second one by @juliusmarminge in pingdotgg/t3code#10440 * fix: use Pierre icons consistently for attachments by @juliusmarminge in pingdotgg/t3code#10475 * feat(mobile): open the thread screen as soon as a new task is submitted by @juliusmarminge in pingdotgg/t3code#10435 * fix(devcontainer): make repository setup work by @saphid in pingdotgg/t3code#7875 * fix(projects): prevent invalid script IDs from crashing threads by @saphid in pingdotgg/t3code#10019 * fix(mobile): hide changed-files navigator and restore refresh in raw diff fallback by @lnieuwenhuis in pingdotgg/t3code#9828 * fix(ios): scroll short source files from blank space by @juliusmarminge in pingdotgg/t3code#10178 * feat(mobile): start a new thread on an existing branch by @StiensWout in pingdotgg/t3code#10359 * fix(mobile): improve font-size slider performance and prevent maximum update depth errors by @bbernag in pingdotgg/t3code#7138 * fix(web): keep composer toolbar controls anchored during transitions by @juliusmarminge in pingdotgg/t3code#10478 * fix(web): resize the floating preview from any edge by @juliusmarminge in pingdotgg/t3code#10467 * fix(mobile): prevent chat from disappearing when scrolling by @juliusmarminge in pingdotgg/t3code#10479 * fix(mobile): smooth composer status pill resizing by @juliusmarminge in pingdotgg/t3code#10484 * fix(mobile): release initial scroll target after dragging by @juliusmarminge in pingdotgg/t3code#10483 * fix(mobile): animate thread lifecycle transitions consistently by @juliusmarminge in pingdotgg/t3code#10487 * fix(mobile): restore assistant message bottom padding by @juliusmarminge in pingdotgg/t3code#10491 * fix(mobile): preserve chat rows when toggling commands by @juliusmarminge in pingdotgg/t3code#10492 ## New Contributors * @bbernag made their first contribution in pingdotgg/t3code#7138 **Full Changelog**: pingdotgg/t3code@v0.0.39-nightly.20260907.1332...v0.0.40-nightly.20260907.1346 Upstream release: https://github.com/pingdotgg/t3code/releases/tag/v0.0.40-nightly.20260907.1346
* origin/main: (675 commits) fix(web): tolerate servers that predate git identity in project import (pingdotgg#10547) chore(mobile): bump app version to 1.1.0 fix(mobile): wait for native thread scroll before reveal (pingdotgg#10486) fix(mobile): match Working status color to desktop fix(web): remove inserted citations on cancel (pingdotgg#10518) feat(web): group onboarding project import by repository (pingdotgg#10493) fix(mobile): preserve chat rows when toggling commands (pingdotgg#10492) fix(mobile): restore assistant message bottom padding (pingdotgg#10491) fix(mobile): animate thread lifecycle transitions consistently (pingdotgg#10487) fix(mobile): release initial scroll target after dragging (pingdotgg#10483) fix(mobile): smooth composer status pill resizing (pingdotgg#10484) fix(mobile): prevent chat from disappearing when scrolling (pingdotgg#10479) fix(web): resize the floating preview from any edge (pingdotgg#10467) fix(web): keep composer toolbar controls anchored during transitions (pingdotgg#10478) fix(mobile): improve font-size slider performance and prevent maximum update depth errors (pingdotgg#7138) feat(mobile): start a new thread on an existing branch (pingdotgg#10359) fix(ios): scroll short source files from blank space (pingdotgg#10178) fix(mobile): hide changed-files navigator and restore refresh in raw diff fallback (pingdotgg#9828) fix(projects): prevent invalid script IDs from crashing threads (pingdotgg#10019) fix(devcontainer): make repository setup work (pingdotgg#7875) ... # Conflicts: # apps/server/src/provider/builtInDrivers.ts # docs/README.md # docs/user/install.md # packages/contracts/src/settings.test.ts # packages/contracts/src/settings.ts
What Changed
Why
The slider previously crossed to JavaScript and wrote mobile preferences for every intermediate pan value. Updating the base text size also reapplies app-wide typography variables, so rapid back-and-forth scrubbing could queue global renders, leave the slider replaying delayed values after release, and eventually trigger
Maximum update depth exceeded.With this change, only the slider thumb and fill move during a drag. The preview, value label, global typography, and persisted preference remain unchanged until release, when the final snapped value is committed once.
UI Changes
There is no visual redesign. The interaction now defers all font-size updates until the slider is released.
Before
Heavy scrubbing could repeatedly update global typography, lag behind the gesture, continue after release, and trigger the maximum update depth error.
Screen.Recording.2026-08-15.at.3.01.30.p.m.mp4
After
The thumb and fill track the gesture smoothly, and the selected font size is applied globally once on release.
Screen.Recording.2026-08-15.at.3.00.12.p.m.mp4
Validation
tsc --noEmitvp lint --report-unused-disable-directivesvp fmt --checkgit diff --checkUPChecklist
Built with GPT-5 using the Codex desktop harness.
Note
Low Risk
Localized interaction change in settings appearance sliders; main risk is any consumer expecting continuous
onChangeduring drag, which now only fires once on successful release (plus tap/a11y).Overview
Pan drags on the appearance font-size slider no longer call
onChangeon every move. While dragging, only Reanimatedprogressupdates so the thumb and fill track the finger without touching persisted preferences or global typography.On pan end, a successful gesture snaps
progressto the stepped value and callscommitonce (with haptics). A cancelled/failed pan animates back to the currentvalueand does not invokeonChange. Taps still commit immediately on end; accessibility increment/decrement is unchanged.Gesture
useMemonow depends onvalueso failed drags can reset to the latest committed size.Reviewed by Cursor Bugbot for commit acc6aac. Bugbot is set up for automated code reviews on this repo. Configure here.
Note
Fix font size slider to commit changes only on gesture release
onChangeand haptics are no longer fired continuously during a pan drag; they fire once when the gesture successfully finalizes with the snapped value.onChange.valuechanges.onChangecallbacks during drag will now only receive a single callback on release.Macroscope summarized acc6aac.
Summary by CodeRabbit