feat(slice-014): currency selection with correct price display#15
Open
fredericomozzato wants to merge 4 commits into
Open
feat(slice-014): currency selection with correct price display#15fredericomozzato wants to merge 4 commits into
fredericomozzato wants to merge 4 commits into
Conversation
- Add currency parameter to FmtPrice/FmtMoney for currency-aware formatting - Update CoinGeckoClient interface with currency parameter for FetchMarkets/FetchPrices - Add currency support to MarketsModel with dynamic price header and formatting - Add currency support to PortfolioModel with proper value display - Implement currencyChangedMsg propagation through AppModel - Wire up Enter key in Settings picker to persist currency and trigger refresh - Update all tests for new function signatures - Add currency code helper for uppercase formatting
- F1 (BLOCKER): Implement Enter key handler in settingsPicking mode to select currency, persist to DB, and emit currencyChangedMsg - F2 (HIGH): Replace TestSettingsPickEnterNoOp with TestSettingsPickEnterSelectsCurrency verifying real selection behavior - I1 (MED): Add currency propagation tests: AppInitCurrencyDefault, AppInitCurrencyFromDB, CurrencyChangedPropagates, MarketsCurrencyChanged, MarketsViewShowsCurrencyHeader, PortfolioCurrencyChanged, PortfolioPricesUpdatedReloadsHoldings, PortfolioViewShowsCurrency Closes findings F1, F2, I1 in docs/reviews/014-currency-selection-correct-price-display/revision-1.md
Cells now use FmtPriceValue/FmtMoneyValue (no currency prefix). Headers show currency in parentheses: Price (BRL), Value (BRL). Added FmtPriceValue and FmtMoneyValue to format package.
… width - Route key messages only to the active tab (never broadcast) so that Enter pressed in the Settings currency picker no longer triggers the Portfolio edit dialog in the background. - Narrow left panel from 30 to 22 chars so the right panel has enough room (≥ 77 chars) to display all 7 holdings columns without wrapping. - Clip/pad the highlighted holdings row to the panel width before applying ANSI reverse styling, preventing mid-value line breaks caused by lipgloss word-wrapping ANSI-decorated strings differently. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Test Plan
make testpasses with race detector clean