Repository navigation
fix(app): settings/digest UX — currency default, region All/None, history-days twitch, edit-time jank - #47
Merged
Merged
Conversation
Fresh installs now show per-region currency rates out of the box; baseCurrency was already USD. Existing users keep their saved setting. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
The reorder-mode pill again toggles All <-> None; per the keep-at-least-one invariant, None reduces to a single region instead of clearing all. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Three sources of jank while editing in Settings: - SettingsScreen subscribed to the whole prefs object, re-rendering the entire tree on every setPref. Now subscribes per field, so a region toggle (which only changes selectedRegions, read by RegionPicker) no longer re-renders it. - The mounted-but-hidden digest pages refetched on every region/count change. useSettledWhileSettings freezes those inputs until the user leaves Settings, mirroring the existing currency-query pause. - Prefs auto-save debounce raised 900ms -> 5000ms; leave/background/unmount flushes still persist immediately. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
History-days lives on the settings page; changing it reflowed the pager (day pages added/removed on the left), shifting the settings page index out from under the user and twitching the view. Freeze maxDayIndex in state while Settings is open and apply the new count on leave, when the user is already on a day page so the reflow stays off-screen; onContentSizeChange re-pins the offset once the new width is committed. Also derive canJump as a boolean so a region toggle no longer rebuilds every day page. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
onContentSizeChange read live historyDays while the pages render from the frozen maxDayIndex; they diverge if width changes for another reason (rotation) while a history-days edit is pending in Settings, re-pinning to the wrong page. Use the rendered value. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes a batch of settings/digest issues reported from device testing.
Changes (focused commits)
#6) —DEFAULT_PREFERENCES.showCurrencyRates: true(USD was already the base). Fresh installs only; existing saved prefs are untouched.#5) — reorder-mode pill togglesAll ↔ Noneagain. Per the keep-at-least-one invariant, None reduces to a single region rather than clearing all (legacy cleared all).#4) — the Settings screen is the rightmost page of the horizontal pager, so changing history-days reflowed the pager (day pages added/removed on the left), shifting the settings page index out from under the user. Now the page count is frozen while Settings is open and applied on leave (when the user is on a day page, so the reflow is off-screen);onContentSizeChangere-pins the offset once the new width is committed.#2/#3):SettingsScreensubscribed to the wholeprefsobject → re-rendered the entire tree on everysetPref. Now subscribes per field.useSettledWhileSettingsfreezes those inputs until the user leaves Settings (mirrors the existing currency-query pause).DigestPagerderivescanJumpas a boolean so a region toggle no longer rebuilds every day page.Verification
tsc --noEmit, eslint, prettier: cleanjest: 503/503 passing (added a region All/None test; updated two debounce tests to readconfig.prefsDebounceMs)/code-review(high effort) run before opening; surfaced one consistency bug (resize re-pin using live vs frozenmaxDayIndex), fixed in the last commit.Notes
linkDeviceToUser0-row warnings seen in testing are resolved by the separatefeat/devices-rls-lockdownbranch (DB lockdown is live but the matching RPC app code ships there); and the account-deletion → re-signup confirmation deep link (#1) is a separate auth/deep-link change needing a Supabase redirect-allowlist entry +/security-review.🤖 Generated with Claude Code