Skip to content

Release: develop -> main#1107

Merged
TaprootFreak merged 1 commit into
mainfrom
develop
May 19, 2026
Merged

Release: develop -> main#1107
TaprootFreak merged 1 commit into
mainfrom
develop

Conversation

@github-actions
Copy link
Copy Markdown

Automatic Release PR

This PR was automatically created after changes were pushed to develop.

Commits: 1 new commit(s)

Checklist

  • Review all changes
  • Verify CI passes
  • Approve and merge when ready for production

* feat(dashboard): add financial overview screen

- New screen at /dashboard/financial/overview with summary cards
  (total/plus/minus balance + age of latest log entry)
- Auto-refresh every 60s, age ticks every 1s in isolated subcomponent
  so chart re-renders are not triggered
- Adds total balance card to liquidity screen for consistency
- Registers route and hub entry in financial dashboard

* refactor(dashboard): extract shared SummaryCard component

Deduplicate SummaryCard, formatChf and AgeBadge across the financial
live, liquidity and overview screens by extracting them into
components/dashboard/summary-card.tsx. Also normalize missing-data
handling to show '-' instead of '0 CHF' on all three screens.

* refactor(dashboard): move TimeRange to util/chart and format helpers to util/utils

TimeRange was exported from dashboard-financial-history.screen and
imported by 5 chart components and 2 screens. Move it to src/util/chart.ts
so chart components no longer depend on a screen module.

Also move formatChf / formatChfOrDash from summary-card.tsx to util/utils.ts
to keep the component file free of format helpers.

* refactor(dashboard): split AgeBadge into its own file and use max-w-xs

Move AgeBadge out of summary-card.tsx so summary-card.tsx only contains
SummaryCard. Replace the inline-block wrapper on the liquidity screen's
total balance card with max-w-xs for a cleaner constraint.

* style(dashboard): sort imports and use named ReactNode/AgeBadgeProps

- Sort imports alphabetically in dashboard-financial-overview.screen.tsx
- Replace React.ReactNode with destructured ReactNode import in SummaryCard
- Extract AgeBadgeProps interface for consistency with SummaryCardProps

* chore(dashboard): remove dead getLatestChanges call and improve hub copy

- Live screen called getLatestChanges() inside Promise.all but the
  destructured result discarded its payload, leaving an unused API call.
  Drop it and simplify to a single getLatestBalance() call.
- Reword the Overview hub description: 'Summary cards, balance history
  and liquidity' is closer to what the screen actually shows.

* feat(dashboard): dark theme on financial overview screen

- Overview container uses dfxBlue-800 background with white text
- SummaryCard supports optional dark variant (dfxBlue-700 card on dark page)
- TotalBalanceLongChart and BalanceBarChart accept optional dark prop and
  switch ApexCharts theme.mode + grid color accordingly
- Timeframe selector restyled for the dark surface

Other screens (Live, Liquidity, History) continue to render in light mode.

* fix(layout): apply layout config synchronously to avoid width flash

useLayoutOptions used useEffect, which runs after paint. Pages with
noMaxWidth: true rendered for one frame with max-w-screen-md before the
config update came through, producing intermittent width flashes
(especially noticeable on the Overview screen during auto-refresh).

Switching to useLayoutEffect applies the config before the browser
paints, so the wider layout is in effect from the first frame.

Also add 1D and 3D timeframe options to the Overview screen (3D default)
with hourly sampling for sub-week ranges.

* feat(dashboard): semantic asset colors in liquidity bar chart

Map asset names to semantic colors instead of palette-by-index:
  - BTC family (BTC, WBTC, cBTC) → orange
  - USD family (USDT, USDC, JUSD)  → green
  - EUR family (EUR, dEURO, DEURO) → blue
  - CHF family (CHF, ZCHF) → red
  - everything else cycles a fallback palette

Applies to BalanceBarChart's stacked variant (liquidity by provider
+ balance by type). Same palette for light and dark modes.

* refactor(dashboard): centralize isDailySample helper + cover format/sample helpers with tests

- Extract isDailySample(timeframe) into util/chart.ts. History screen
  had a local helper (WEEK/MONTH = daily), Overview had a local Set
  (DAY/THREE_DAYS = hourly) for the inverse predicate. Both now share
  the same logic.
- Add unit tests for isDailySample, formatChf and formatChfOrDash next
  to the existing format helper tests.

* polish(dashboard): age-badge robustness + theme-aligned chart grid color

- AgeBadge: stop the 1s tick when no timestamp is bound, and guard
  against invalid date strings (NaN getTime) by falling back to '-'.
- Chart grid border in dark mode now uses dfxBlue-500 (#0A355C) from
  the Tailwind theme instead of the ad-hoc #1f3a5c.
@TaprootFreak TaprootFreak merged commit 8c49b62 into main May 19, 2026
6 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant