feat(split-meow): 每筆支出保存幣別與匯率快照,KRW 顯示對應 TWD#443
Conversation
- ExpenseRecord 新增 currency 與 exchangeRateKrwPerTwd 快照欄位 - HistoryTab 依快照顯示幣別,KRW 支出附 TWD 換算副標 - 新增 formatKrwAsTwd 與對應單元測試 測試:split-meow typecheck 與 currencies、useStore vitest 全通過 Co-authored-by: Cursor <cursoragent@cursor.com>
Dependency Review✅ No vulnerabilities or license issues or OpenSSF Scorecard issues found.Scanned FilesNone |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: fd146e2cc4
ℹ️ 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".
| <div className="shrink-0"> | ||
| <p className="font-bold text-on-surface whitespace-nowrap text-base sm:text-lg"> | ||
| {formatAmount(exp.totalAmount, currency)} | ||
| {formatAmount(exp.totalAmount, expenseCurrency(exp))} |
There was a problem hiding this comment.
Keep edit inputs on the expense snapshot currency
當使用者先以 KRW 記一筆、之後在設定切到 TWD 再編輯該筆時,列表現在會依 expenseCurrency(exp) 仍顯示 ₩,但下方 EditExpenseSheet 仍讀取目前全域 currency 來顯示輸入符號,而且 updateExpense 只更新金額欄位不更新幣別快照;使用者會在 NT$ 標示下輸入金額,儲存後卻被當成 KRW 顯示與結算。請讓編輯 sheet 使用該筆 expense 的 snapshot 幣別(或在編輯時同步更新 currency/exchangeRate)。
Useful? React with 👍 / 👎.
摘要
收編 split-meow 每筆支出幣別快照功能至 baseline,向後相容。
變更
ExpenseRecord加 optionalcurrency+exchangeRateKrwPerTwd,記帳當下寫入快照formatKrwAsTwd嚴格 guard;歷史頁 KRW 列顯示≈ NT$測試
注意
governance-v2(stacked PR)🤖 Generated with Claude Code