Dashboard income mini: multi-currency + smart 2-col layout#176
Merged
Conversation
Two related fixes on the post-#175 dashboard: **Multi-currency income mini.** The mini previously picked a single currency (preferred, with a fallback to the first available) and ignored the rest — so a user with EUR + USD dividends only saw one of them. Rewrote to render one row per currency the user has actual income in, sorted by 12-month total, capped at 3 rows with a "+N more currencies" overflow hint. Each row shows the currency code, "This month" + "Last 12 months" totals on the header line, and a full-width 12-bar sparkline below with the current month highlighted. **Smart 2-col upcoming + income layout.** When both blocks have data the row uses `lg:grid-cols-2` (income on the left, upcoming ex-divs on the right). When only one has data the wrapper drops the grid-cols class so the surviving block spans full width instead of leaving a blank column. Empty-state checks are lifted to the parent (mirrors UpcomingExDividends' in-window filter; checks any past-month actual > 0 across currencies for the mini) and the whole row is omitted when both are empty. i18n: `incomeMini.thisMonth` kept, added pluralised `incomeMini.moreCurrencies_one/_other` in en + es. Co-Authored-By: Claude Opus 4.7 (1M context) <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.
Two follow-ups on the dashboard polish from #175 — reported during a live walkthrough with multi-currency data.
Multi-currency income mini
Bug.
DividendIncomeMinipicked a single currency (preferred, fallback to first) and ignored the rest. A user with EUR + USD dividends only saw one currency's data.Fix. One row per currency the user has actual income in, sorted by 12-month total, capped at 3 with a "+N more currencies" overflow note. Each row shows currency code, both "This month" and "Last 12 months" totals on the header line, and a full-width 12-bar sparkline with the current month highlighted.
Smart 2-col upcoming + income layout
Bug. The dashboard had
<UpcomingExDividends>and<DividendIncomeMini>stacked vertically (a defensive choice from the first review pass because a missing sibling in a 2-col grid was leaving a blank gap).Fix. Lifted the empty-state checks into
DashboardHome(mirrors the in-window filter insideUpcomingExDividends; counts any past-month actual > 0 across currencies for the mini), then toggles the grid class:lg:grid-cols-2(income left, upcoming ex-divs right)Verified visually in both states (faked a near ex-div temporarily to evaluate the side-by-side, removed before commit).
Test plan
npx tsc --noEmit— clean🤖 Generated with Claude Code