Skip to content

feat(mobile): native iOS Balances home - #51

Merged
KMKoushik merged 2 commits into
mainfrom
feat/native-balances-home
Nov 10, 2026
Merged

KMKoushik merged 2 commits into
mainfrom
feat/native-balances-home

Conversation

@KMKoushik

@KMKoushik KMKoushik commented Nov 10, 2026 •

Copy link
Copy Markdown
Contributor

Ports only the prototype's iOS Balances home: SwiftUI list, totals, large title and native search. Adds native Liquid Glass header buttons, long-press balance previews (View balance, Add expense, Settle up), light action haptics, Dynamic Type layout and VoiceOver labels. No swipe actions.

Rows use SDK 58 List.ForEach recycling, stable friend keys, a memoized renderer/row and memoized search results. Avatar state resets when the recycled friend/image changes. Add expense, split editor, layouts, mutations, Android Balances and EAS configuration stay as on main; no guards or dependencies added.

Verified locally on iPhone 18 Pro with 200 fictional friends. Only 13 home avatars initially mounted, 28 after scrolling. Development React profiling: scrolling 56ms over 23 commits (max 23ms); typing 208ms over 24 commits (max 62ms on broad result changes, later updates 1.5–6.1ms). No sustained stalls observed; native FPS sampling is unavailable on the simulator. Typecheck, lint, formatting and all 65 tests pass. Earlier real save/refresh checks, iOS build and Android export also passed; physical haptics and spoken VoiceOver need device testing.

Refreshed screenshots in ~/git/personal/notes/splitpro/native-home/: top-light.png shows the native header and full-width rows; context-dark.png shows the retained balance preview and three actions. Also retook collapsed titles, search and larger text; deleted swipe screenshots. Detailed observations are in verification.md.

Summary by CodeRabbit

  • New Features
    • Added an iOS-native balances screen with friend search, balance totals, and quick actions for adding expenses and settling up.
    • Search matches friend names and email addresses, ignoring capitalization and surrounding whitespace.
    • Added clear loading, error, empty, and no-results states, with a retry option when loading fails.

@coderabbitai

coderabbitai Bot commented Nov 10, 2026 •

Copy link
Copy Markdown

Explain Change →

Warning

Review limit reached

You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository.

Next included review available in 47 minutes.

Check out review usage here.

View limit details

Limit details: You’ve used the included review currently available.

Learn how review limits work.

Review configuration:

Run configuration

  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: defaults
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: d8e430da-5e91-4a00-aee6-cb99a5e29a0a
Commits

Reviewing files that changed from the base of the PR and between 273e606 and d0fa5d2.

Files selected for processing: 1

  • mobile/src/components/friend/NativeBalances.ios.tsx

No actionable comments were generated in the recent review.

Walkthrough

The balances screen now uses an iOS-native view with search, totals, friend actions, and loading or empty states. Other platforms keep the existing list. The new search helper matches friend names and email addresses.

Changes: Balances screen

Layer / File(s) Summary
Balance search filtering
mobile/src/components/friend/balanceSearch.ts, mobile/src/components/friend/balanceSearch.test.ts
The new helper filters by friend name or email after trimming and lowercasing the query. Tests cover whitespace, missing profile fields, matches, and empty results.
Native balance presentation
mobile/src/components/friend/NativeBalances.ios.tsx, mobile/src/components/friend/NativeBalances.tsx, mobile/src/i18n/locales/en.json
The iOS view displays balance totals and friend rows with navigation, add-expense, and settle-up actions. It handles loading, errors, no results, and empty data. English locale strings support search and empty states.
Platform-specific screen wiring
mobile/src/app/(app)/(tabs)/(balances)/balances.tsx
The balances route passes balance data, search, loading, error, and refresh state to the iOS view. Other platforms retain the existing list and add-expense action.

Estimated code review effort: 3 (Moderate) | ~20 minutes

Change: Feature

Sequence Diagram(s)

sequenceDiagram
  actor User
  participant Balances
  participant NativeBalances
  User->>Balances: Enter a search query
  Balances->>NativeBalances: Pass search and balance state
  NativeBalances->>NativeBalances: Filter balances and render results
  User->>NativeBalances: Request refresh after an error
  NativeBalances->>Balances: Invoke onRefresh
  Balances->>Balances: Await refetch
Loading

Possibly related PRs

Merge Risk: Minimal · previous review 273e6

The change adds an iOS-native Balances screen and leaves other platforms on the existing list. No actionable merge-blocking risk remains. Physical haptics and VoiceOver still need device testing, as the author notes.

Pre-merge checks: Passed 5

Check name Status Explanation
Description Check Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check Passed The title clearly identifies the main change: a native iOS Balances home screen.
Docstring Coverage Passed No eligible functions found in the changed files. Skipping docstring coverage check. Docstring coverage is scoped to functions touched by this diff with cyclomatic complexity of at least 2. Documentat…
Linked Issues check Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check Passed Check skipped because no linked issues were found for this pull request.
Full details: Docstring Coverage

Explanation

No eligible functions found in the changed files. Skipping docstring coverage check. Docstring coverage is scoped to functions touched by this diff with cyclomatic complexity of at least 2. Documentation-only edits and deletions within surviving functions are included; unchanged diff context and fully deleted functions are excluded. Analyzed 0 functions across 5 files. (1 skipped: 1 unsupported.)

Finishing Touches

Generate docstrings

  • Commit to this branch
  • Create a new PR
Generate unit tests (beta)

  • Commit to this branch
  • Create a new PR
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

Share

Recent review info

Run configuration

  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: defaults
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: 2c37872e-5710-4aaf-9df8-1e6ec40e237b
Commits

Reviewing files that changed from the base of the PR and between f58c8f9 and 273e606.

Files selected for processing: 6

  • mobile/src/app/(app)/(tabs)/(balances)/balances.tsx
  • mobile/src/components/friend/NativeBalances.ios.tsx
  • mobile/src/components/friend/NativeBalances.tsx
  • mobile/src/components/friend/balanceSearch.test.ts
  • mobile/src/components/friend/balanceSearch.ts
  • mobile/src/i18n/locales/en.json

Included review availability: This review used your included allowance. Your plan provides up to 1 included review per hour; 0 remain after this review.

@KMKoushik
KMKoushik merged commit 95c791d into main Nov 10, 2026
2 checks passed
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