Skip to content

fix: make manual friend creation durable - #34

Merged
AnganSamadder merged 6 commits into
mainfrom
fix/friend-addition-consistency
Aug 25, 2026
Merged

fix: make manual friend creation durable#34
AnganSamadder merged 6 commits into
mainfrom
fix/friend-addition-consistency

Conversation

@AnganSamadder

Copy link
Copy Markdown
Owner

Summary

  • persist a manual friend remotely before reporting success or creating its direct group
  • reuse a unique group-only identity when explicitly repairing an earlier partial add
  • replace invalid paginated Convex mutation reads in friend upsert and settlement visibility reconciliation
  • sanitize settlement failures shown to users
  • prepare TestFlight beta 0.1.12

Verification

  • bun run ci: 573 backend tests passed; web build/checks passed
  • canonical iOS CI: 2,790 tests passed; 0 warnings; 56.84% coverage
  • Thread Sanitizer: 2,748 tests passed; no reports; 0 warnings
  • Address Sanitizer: 2,790 tests passed; no reports; 0 warnings
  • manual simulator pass: friend add via Return, relaunch persistence, group picker identity reuse, direct expense, settlement/unsettlement, activity, groups, profile/settings, merge UI, clear/delete confirmations

@vercel

vercel Bot commented Aug 25, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
payback Ready Ready Preview Aug 25, 2026 9:30am

Copilot AI lite review requested due to automatic review settings August 25, 2026 09:30

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 82dbdcdbe9

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment on lines +1752 to +1755
try await accountService.syncFriends(
accountEmail: session.account.email.lowercased(),
friends: friends + [newFriend]
)

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1 Badge Fence the friend sync to the initiating account

When a user signs out or switches accounts while this await is running, ConvexAccountService.syncFriends sends one authenticated friends:upsert mutation per element in this full snapshot. This task is not tracked by friendSyncTask, and the account/data-epoch check happens only after every mutation completes; because the backend derives ownership from the current authentication rather than accountEmail, later mutations can write the previous user's friends into the newly authenticated account. Use an account-fenced single-friend upsert or revalidate/cancel between mutations instead of sending the whole snapshot.

AGENTS.md reference: AGENTS.md:L802-L805

Useful? React with 👍 / 👎.

@AnganSamadder
AnganSamadder merged commit 9a9574f into main Aug 25, 2026
11 checks passed
@AnganSamadder
AnganSamadder deleted the fix/friend-addition-consistency branch August 25, 2026 09:47
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.

2 participants