Skip to content

mobile: circular FAB, curved-edge insets, and cursor-paginated ledger - #39

Merged
srjn45 merged 2 commits into
mainfrom
fix/ledger-fab-cursor-pagination
Aug 11, 2026
Merged

mobile: circular FAB, curved-edge insets, and cursor-paginated ledger#39
srjn45 merged 2 commits into
mainfrom
fix/ledger-fab-cursor-pagination

Conversation

@srjn45

@srjn45 srjn45 commented Aug 11, 2026

Copy link
Copy Markdown
Owner

Three tester-driven fixes for the closed-testing track, bundled as one bug-fix update (does not reset the 14-day clock).

Changes

  • FAB (FAB.tsx): rewrite the add-expense button with explicit inline styles so its shape/color/size/position always land — it had been rendering as a tiny centered +. Now a proper 64pt indigo circular FAB pinned bottom-right. (Tester: "the add expense button is very small at the bottom.")
  • Curved-edge safe areas (Screen.tsx): honour left/right safe-area insets (default on) so header buttons and the FAB clear the curved glass on curved-edge / notched / landscape devices; no-op (0) on flat phones. (Tester: "buttons are not easily clickable on curved edge screens.")
  • Cursor (keyset) pagination (entriesRepo.ts, LedgerScreen.tsx): replace the growing-LIMIT offset read with keyset pagination. The on-screen window lives in state and load-more appends one O(page) keyset page via after = cursor(lastRow) instead of re-reading rows 0..N and re-attaching tags for the whole list on every scroll step — the cause of the scroll-more-lags-more jank. Cursor key is (occurred_on, created_at, id) with id as a strict tiebreak. Reactivity (native useLiveQuery, web onChanged, focus refresh) preserved; listEntries (offset) left intact for stats/backup.
  • Per-row category lookup (LedgerManager.tsx): resolve categories from one query into a memoized Map instead of a synchronous per-row SQLite read inside renderItem.

Tests

  • New keyset repo tests: pages every row once in unpaged order (no gaps/dupes); id-tiebreak when occurred_on and created_at collide; filter + soft-delete parity with listEntries.
  • Full suite: 245 passed (242 + 3 new). Lint + typecheck clean.

Verification

Web preview confirmed the new circular FAB, day-grouped rows, and full-window scroll. (Screenshots captured locally, not committed.)

Note: a react-native-web dev-only <button> cannot contain a nested <button> overlay appears in the web dev build; it comes from pre-existing LedgerRow structure, not these changes, and does not affect the native Android build.

🤖 Generated with Claude Code

srjn45 and others added 2 commits August 11, 2026 12:17
Ship three tester-driven fixes as one closed-track bug-fix update:

- FAB: rewrite the add-expense button with explicit inline styles so its
  shape/color/size/position always land (it was rendering as a tiny
  centered "+"); enlarge 56->64pt as a proper bottom-right circular FAB.
- Screen: honour left/right safe-area insets (default on) so header
  buttons and the FAB clear the curved glass on curved-edge/notched
  devices; no-op on flat phones.
- Ledger: switch from growing-LIMIT offset reads to keyset (cursor)
  pagination. The on-screen window lives in state and load-more appends
  one O(page) keyset page instead of re-reading rows 0..N and re-attaching
  tags for the whole list on every scroll step (the source of the
  scroll-more-lags-more jank). Reactivity (native useLiveQuery, web
  onChanged, focus refresh) preserved; listEntries (offset) left intact
  for stats/backup.
- LedgerManager: resolve categories from one query into a memoized Map
  instead of a synchronous per-row DB read inside renderItem.

Add keyset repo tests (pages every row once in unpaged order; id-tiebreak
when occurred_on AND created_at collide; filter/soft-delete parity).
Sync package-lock version field to 1.1.8.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
CI format:check flagged the new test block. No logic change.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
@srjn45
srjn45 merged commit 1b09553 into main Aug 11, 2026
2 checks passed
srjn45 added a commit that referenced this pull request Aug 11, 2026
#39 moved the FAB's paint props (background, shape, shadow, glyph colour) from
NativeWind classes into the inline Pressable style. On native release builds those
inline paint props silently don't render, so the button became invisible-but-
tappable. Restore the v1.1.8 implementation: visible styling via className (like
<Button>), inline style for layout/press feedback only.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
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