Repository navigation
Conversation
|
Important Draft PR not reviewedDraft PRs are not automatically reviewed by default.
To automatically review draft PRs, update your CodeRabbit configuration: reviews:
auto_review:
drafts: true
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. Comment |
|
Thermo-nuclear review Reviewed by Codex gpt-6-luna (xhigh); verified and validated by Claude
|
|
Thermo-nuclear review follow-up All 3 findings fixed (commit "Address thermo review"); none left open. No user-visible change (Rust cleanup plus a comment header). Commands run: |
CUA proofBuild commit: fc9a0c1 (PR head). Debug build via Proof-only patches (never committed, restored after the build): root Commands:
Screenshots (local, not committed), in Not covered: converted cost rendering with live rates (unit tests cover conversion and zero-decimal formatting). |
|
Lane validation + #609 rebase 2026-10-02 (worktree W:/wcb-wt/lane-b, head fbec727): Merged current #609 head (1c24b7b, the thermo rework: Rust-owned currency model, single sanitizer, cache-backed tray conversion, typed PreferredCurrency, single settings subscription) into this branch as eedd635, then reconciled with the catalog work:
Validation: cargo fmt --check clean; clippy -D warnings clean for all changed files (the 3 pre-existing main drift sites outside the diff as recorded in QUEUE.md); cargo test codexbar 2145/0 fail (1 ignored, includes the new added_currencies_* and catalog-sync tests); desktop tests 466/1 fail = known #684 bootstrap host-settings baseline; pnpm check-locale 881 OK; vitest 413/413 (68 files); pnpm build clean. Branch pushed as fast-forward fc9a0c1..fbec727. UI status: the picker options change is UI-affecting; a browser-use proof of the Settings > General picker is queued after the #739 proof (one proof at a time under the lock). |
Proof plan: PR #679 twelve preferred currencies (upstream 0.67.0 item 15)Build commit: b0f0060 (port/micro-0.67.0-preferred-currencies; includes the bak-proof cleanup). Exe reused from the #739 kit bin (rebuilt at this head; pnpm run tauri:build:debug, target W:\cargo-target\lane-b). Proof-only patch: dirs shim via [patch.crates-io] — never committed. Environment
Assertions (browser-use, all PASS at capture)A0 Privacy: page scan — no emails/personal tokens. |
…from one shared catalog (stacked on #609; resolves presentation conflicts toward the release layout — currency display wiring tracked as an integration finding)
Summary
Stacked on #609 (preferred display currency). Adds twelve currencies to the preferred-display-currency catalog: NZD, SEK, NOK, DKK, PLN, BRL, MXN, ZAR, THB, IDR, VND, UAH, appended after TRY in that order with upstream fallback rates. Picker labels are now
CODE (symbol)for every entry (e.g.VND (₫),TRY (₺),USD ($)), matching upstreampickerLabel.Picker order, symbols, and offline rates now come from one catalog:
CURRENCIESinrust/src/currency.rs. The frontend imports a generated module (apps/desktop-tauri/src/lib/currencyCatalog.generated.ts) instead of the two hand-maintained lists #609 added. A Rust test regenerates the module text and fails if the checked-in file differs (UPDATE_CURRENCY_CATALOG=1 cargo test -p codexbar currency_catalogrewrites it), so the two sides cannot drift.Live rate refresh already filters to supported codes (
parse_exchange_rates,clean_rates), so live rates for the new codes follow from the catalog with no other change.Display formatting:
formatDisplayCurrencyno longer forcesmaximumFractionDigits: 2;Intl.NumberFormatnow uses each currency's own minor units. This keeps zero-decimal currencies (VND, JPY, KRW) from showing fractional units. Note that ICU treats IDR as a 2-decimal currency, so IDR keeps two decimals.Upstream reference
v0.67.0):Sources/CodexBarCore/CurrencyExchange.swift(currenciestable,pickerLabel);PreferencesGeneralPane.swift(PreferredCurrencyOption); testsUsageFormatterTests.swift,SettingsStoreCoverageTests.swift.currenciestable (open.er-api.com, 2026-09-24).Ported / Deferred
Ported: catalog extension,
CODE (symbol)labels, single source of truth, USD-pivot conversion for each new code,normalize_preferred_currencyacceptance, picker order, zero-decimal formatting.Deferred: nothing from the spec. The upstream Swift
requiresLiveRates/ UserDefaults caching has no local delta (already covered by #609'scurrency-rates.jsoncache).Validation
All cargo commands on
+1.98.0, E-core wrapper, slot-2.cargo +1.98.0 fmt --all: cleancargo +1.98.0 clippy --workspace --all-targets -- -D warnings: passcargo +1.98.0 test -p codexbar currency: 15 passed (includes new order/rate/pivot/normalize/live-parse tests and the generated-catalog sync test)cargo +1.98.0 test -p codexbar(full): 2143 passed, 0 failed, 1 ignoredcargo +1.98.0 test -p codexbar-desktop-tauri currency: 3 passedvitest run(full): 68 files, 413 tests passed (includeslib/currency.test.ts,GeneralTab.test.tsxpicker order and labels)pnpm run lint: no findings in touched files (existing warnings elsewhere unchanged)pnpm run build: passAffected areas
preferredCurrencyCodevalues)UI proof
Pending: coordinator will capture CUA proof on a fresh build (Settings > General preferred currency picker showing the new options, one selection such as VND applied to a cost amount).