fix: amount precision, icon upload FormData error, and unsaved-edit guard#41
Conversation
Amounts above Number.MAX_SAFE_INTEGER are silently rounded by IEEE 754 doubles (e.g. 1145141919364364810 became ...800), so validate against MAX_AMOUNT in the add/edit forms and show a dedicated error instead of storing a corrupted value. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Expo SDK 54+ replaces global fetch with its WinterCG implementation,
which rejects React Native's legacy { uri, name, type } FormData parts
with "Unsupported FormDataPart implementation". Icon uploads after
cropping hit this on every submit.
Append an expo-file-system File (native) or a Blob read back from the
picker URI (web) instead, and let the file's own name/mime metadata
replace the manual extension-to-mime mapping.
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Closing the edit screen with the x button (or back gesture) silently dropped any edits. Intercept beforeRemove while the form differs from the stored subscription and ask the user to keep editing or discard; a successful save skips the guard. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
|
@codex review |
|
@claude review |
|
@gemini-code-assist review |
|
To use Codex here, create a Codex account and connect to github. |
There was a problem hiding this comment.
Code Review
This pull request introduces several key improvements, including a validation check to reject subscription amounts exceeding the safe integer limit (MAX_AMOUNT) and a confirmation dialog in the edit screen to prevent users from accidentally discarding unsaved changes. Additionally, the file upload mechanism in lib/api.ts has been refactored to support both web and native platforms correctly using expo-file-system. The review feedback suggests optimizing the isDirty check in the edit form by using useMemo to cache the initial next payment date timestamp, which avoids redundant Date object instantiations on every keystroke.
Important
The consumer version of Gemini Code Assist on GitHub is being sunset. Starting June 18, 2026, new organization installations will be blocked, and all code review activity will officially cease on July 17, 2026.
For more details on the timeline and next steps, please review the Help Documentation.
|
@codex review |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 19d3b65baf
ℹ️ 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".
|
@claude review |
|
Claude finished @darui3018823's task in 3m 44s —— View job Review complete ✅
SummaryGood news first: both prior automated review comments are already resolved by follow-up commits on this branch, not just left open:
Amount validation (
|
Summary
Three user-reported issues fixed, one commit each:
fix(form): reject amounts that exceed the safe integer range — Amounts above
Number.MAX_SAFE_INTEGERwere silently rounded by IEEE 754 doubles (e.g.1145141919364364810was stored as…800). The add/edit forms now validate againstMAX_AMOUNTand show a dedicated error message (en/ja) instead of saving a corrupted value.fix(upload): replace uri-based FormData part with expo-file-system File — Expo SDK 54+ replaces global
fetchwith its WinterCG implementation, which rejects React Native's legacy{ uri, name, type }FormData parts with "Unsupported FormDataPart implementation", breaking icon upload after cropping. Uploads now append anexpo-file-systemFileon native (Blob on web). Addsexpo-file-systemas a direct dependency (native module already bundled via theexpopackage, so no new native build is required); lockfile regenerated with pnpm 10 and verified with frozen installs on both pnpm 10 and 11.feat(edit): confirm before discarding unsaved changes — Closing the edit screen via the × button / back gesture / swipe-down with unsaved edits now asks for confirmation (
beforeRemoveguard); saving skips the guard.Test plan
1145141919364364810in add/edit → "amount too large" error, value not saved🤖 Generated with Claude Code