Skip to content

Flexible savings, activity timeline, CSV export, theme - #472

Merged
nayt9 merged 1 commit into
stowp:mainfrom
ussyalfaks:handsoff/issues-117-348-349-351-ef2511
Oct 18, 2026
Merged

nayt9 merged 1 commit into
stowp:mainfrom
ussyalfaks:handsoff/issues-117-348-349-351-ef2511

Conversation

@ussyalfaks

Copy link
Copy Markdown
Contributor

Closes #117, closes #348, closes #349, closes #351

#117 — Flexible savings screen

  • New page frontend/src/app/(app)/savings/flexible/page.tsx:
    • Shows the flexible balance (USDC) from GET /api/savings/accounts/:address, via a new useFlexibleBalance hook. A 404 (no account yet) is treated as a zero balance, not an error.
    • Deposit opens the existing DepositModal. Withdraw goes to /ramps/withdraw and is disabled while the balance is zero.
    • Recent activity lists the latest 5 deposits and withdrawals, with a link to the full activity timeline.
    • Has loading (skeleton/spinner), empty (with a deposit CTA) and error (ErrorRetry) states for both the balance and the activity list.
  • Tests in page.test.tsx cover: balance rendering, the deposit and withdraw buttons, the zero-balance/404 case, recent activity, the empty state and the error state.

#348 — Dark mode toggle in user preferences

  • New AppearanceSettings component on the settings page with a Light / Dark / System radio group. It uses the existing ThemeProvider, which already saves the choice to local storage (stow-theme). Choosing "System" clears the saved value so the page follows the device setting again.
  • The settings page heading is now "Settings", since the page covers more than notifications.
  • Theme support across components:
    • Skeletons and hover backgrounds used bg-white/5, which can't be seen on the light theme. They now use bg-foreground/5. The navbar is the exception, because its test asserts the class name.
    • In globals.css, the light theme remaps the pale status text shades (red/green/emerald/amber/yellow/blue 300–400) to darker ones, so error, success and warning text stays readable.
  • The settings test now mocks useTheme, because the page renders inside ThemeProvider in the app.

#349 — Account activity timeline

  • Backend: new ActivityModule, which serves GET /api/savings/activity?address=&from=&to=&types=&limit=.
    • Builds the timeline from processed contract events: deposits, withdrawals, goal created, goal contributions and goal reached.
    • Goal events don't carry the owner, so they are matched through the goals the address owns.
    • Results are newest first and can be filtered by date range and by a comma-separated list of types.
  • Frontend:
    • New /activity page with a vertical timeline grouped by day (ActivityTimeline component) and a useActivity hook.
    • Filters: from/to date pickers (an invalid range is flagged) and toggle chips for each activity type, plus "Clear filters".
    • Loading, empty and error states.

#351 — CSV export for transaction history

  • Backend: GET /api/savings/activity/export takes the same filters and returns a text/csv attachment (capped at 10,000 rows).
    • Columns: date, type, amount (decimal), amount_stroops, goal_id, goal_name, tx_hash, ledger, event_id.
    • Fields are quoted as CSV needs. Values that start with formula characters get a leading ' to block spreadsheet formula injection, for example through goal names.
  • Frontend: an "Export CSV" button on the activity page downloads the export using the current date-range and type filters.

Notes

  • Nothing was built or run, and no tests were run, as this task requires.

Closes #117
Closes #348
Closes #349
Closes #351

@drips-wave

drips-wave Bot commented Oct 18, 2026

Copy link
Copy Markdown

@ussyalfaks Great news! 🎉 Based on an automated assessment of this PR, the linked Wave issue(s) no longer count against your application limits.

You can now already apply to more issues while waiting for a review of this PR. Keep up the great work! 🚀

Learn more about application limits

@vercel

vercel Bot commented Oct 18, 2026 •

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated
stow Error Error Oct 18, 2026 6:04am UTC

@nayt9
nayt9 merged commit 6025896 into stowp:main Oct 18, 2026
1 of 9 checks passed

This branch had an error being deployed

1 failed deployment
Preview — b04306d8 Deployed Oct 18, 2026 by vercel[bot]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

2 participants