Skip to content

feat: dark mode & accessibility contrast improvements (closes #104)#476

Open
TallowX92 wants to merge 4 commits intorohitdash08:mainfrom
TallowX92:feat/dark-mode-accessibility
Open

feat: dark mode & accessibility contrast improvements (closes #104)#476
TallowX92 wants to merge 4 commits intorohitdash08:mainfrom
TallowX92:feat/dark-mode-accessibility

Conversation

@TallowX92
Copy link

@TallowX92 TallowX92 commented Mar 16, 2026

Dark mode implementation with system preference detection, persistent toggle, and full accessibility contrast compliance.

Changes:

  • theme-provider.tsx — ThemeProvider with localStorage persistence and system preference detection (prefers-color-scheme)
  • mode-toggle.tsx — Toggle component (light/dark/system)
  • Navbar.tsx — Toggle integrated into navigation bar, visible before and after sign-in
  • index.css — Full HSL CSS variable palette for light and dark themes, WCAG AA contrast ratios
  • App.tsx — ThemeProvider wrapping entire app
  • theme.test.tsx — Unit tests for theme toggle behavior
  • README.md — Documentation updated

Demo updated — improved color palette for better contrast ratios.
https://github.com/user-attachments/assets/c31a9cc6-81a0-46a4-aca2-82bcebd74149

/claim #104

…#121)

Adds a weekly financial summary endpoint and frontend page showing
spending totals, category breakdowns, week-over-week changes, upcoming
bills, and auto-generated insights.

Backend (GET /digest/weekly):
- Aggregates current and previous week expenses by category
- Computes total_spent, total_income, net_flow, wow_change_pct
- Category breakdown with delta and delta_pct vs previous week
- Upcoming bills due within the next 7 days
- insights[] — human-readable trend sentences (top category, WoW
  changes ≥5%, biggest category increase/decrease ≥20%, bill alerts)
- Redis cache with 1-hour TTL, graceful fallback if Redis unavailable
- Optional ?week_start=YYYY-MM-DD param (defaults to current Monday)

Frontend:
- api/digest.ts — typed API client
- pages/Digest.tsx — summary cards, category bar chart with WoW delta
  badges, insights list, upcoming bills panel, prev/next week navigation
- /digest route registered in App.tsx and Navbar

Tests (tests/test_digest.py — 10 tests):
- Empty week returns zero summary
- Expenses appear in category breakdown
- Income excluded from spending totals
- Custom week_start param
- Upcoming bills included
- Top spending category is highest spend
- WoW change computed correctly
- Cache hit returns cached response
- Auth required (401 without JWT)
- Insights list is non-empty when data present
@TallowX92 TallowX92 force-pushed the feat/dark-mode-accessibility branch from a559591 to e7e4283 Compare March 17, 2026 01:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants