Skip to content

Add savings goals tracking - #52

Merged
derekl-beep merged 2 commits into
mainfrom
claude/savings-goals
Jul 16, 2026
Merged

Add savings goals tracking#52
derekl-beep merged 2 commits into
mainfrom
claude/savings-goals

Conversation

@derekl-beep

Copy link
Copy Markdown
Owner

Summary

Adds the "actually improves finances" feature flagged as missing beyond budgets — a savings goal (target amount, optional target date) with a manually-tracked contribution total, separate from expense/income math on purpose: the household's net cash flow can go negative some months, which would make goal progress swing negative too and mean nothing to someone who never touched that money.

  • Ships the same phased shape income tracking used: chat-driven creation and contribution (create_savings_goal, contribute_to_savings_goal, delete_savings_goal, get_savings_goals), a read-only progress section in the Expenses view for now, no edit dialog yet.
  • savings_goals is household-shared like budgets (no user_id).
  • New GET /savings-goals endpoint + a SavingsGoalsSection component mirroring CategoryBreakdown/RecurringSection's visual style.

Two real bugs caught in verification, not design gaps:

  • tests/conftest.py's TRUNCATE list didn't include the new table, so goals leaked across tests until the first run's failures pointed at it.
  • vite.config.js's dev proxy is an explicit path allowlist and /savings-goals was missing from it — the frontend fetch was silently hitting Vite itself instead of the backend, so the section never rendered in dev/e2e despite the API working correctly on its own (confirmed via direct curl against the backend).

Test plan

  • uv run pytest tests/ — 182 passed (new db/api/tools coverage: CRUD, contribution clipping at 0, soft-delete, pct-complete capping at 100%)
  • uv run ruff check . — clean
  • npm run build / npm run lint — clean
  • Full npx playwright test — 82 passed, mobile + desktop, including a new savings-goals.spec.js

🤖 Generated with Claude Code

https://claude.ai/code/session_01Qz6JBNFwhgem5GY3i2BEMY


Generated by Claude Code

claude added 2 commits July 16, 2026 02:04
Adds the "actually improves finances" feature the review flagged as
missing beyond budgets — a savings goal (target amount, optional target
date) with a manually-tracked contribution total, separate from expense/
income math on purpose: the household's net cash flow can go negative
some months, which would make goal progress swing negative too and mean
nothing to someone who never touched that money.

Ships the same phased shape income tracking used: chat-driven creation
and contribution (create_savings_goal, contribute_to_savings_goal,
delete_savings_goal, get_savings_goals), a read-only progress section
in the Expenses view for now, no edit dialog yet.

savings_goals is household-shared like budgets (no user_id). Two real
bugs caught in verification, not design gaps:
- tests/conftest.py's TRUNCATE list didn't include the new table, so
  goals leaked across tests until the first run's failures pointed at it.
- vite.config.js's dev proxy is an explicit path allowlist and
  /savings-goals was missing from it — the frontend fetch was silently
  hitting Vite itself instead of the backend, so the section never
  rendered in dev/e2e despite the API working correctly on its own.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Qz6JBNFwhgem5GY3i2BEMY
main moved forward with PRs #50 (usage instrumentation + session
persistence) and #51 (proactive nudges) since this branch was cut.
Conflicts were both cases of two features adding adjacent schema/config
blocks — resolved by keeping both sides, not choosing one:

- agent/db.py: usage_events + chat_sessions table creation (from main)
  alongside savings_goals (from this branch).
- tests/conftest.py and scripts/seed_e2e_data.py: TRUNCATE lists needed
  every new table name from both sides, not just one.

No logic changes beyond the merge itself.
@derekl-beep
derekl-beep merged commit b96e456 into main Jul 16, 2026
3 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.

2 participants