Conversation
Adds a new Health feature that gives users at-a-glance financial health
signals across their buckets, replacing the Classify tab in the nav.
- New `HealthService` in `go/service/health.go` that computes per-bucket
health metrics: spend percentage through the current trickle cycle,
daily allowance until next trickle, at-risk projection (will the bucket
hit $0 before the trickle replenishes?), and an overall health score
(0-100) rolled up across all buckets.
- New API endpoints:
- `GET /api/health` — returns full HealthSummary with per-bucket data
- `PUT /api/buckets/:id/trickle/apply-suggestion` — one-tap trickle
adjustment from a health recommendation
- Migration `00010_health_notifications.sql` — tracks per-bucket
notification cooldown so push alerts fire at most once per day per bucket.
- Webhook handler now calls health check after transaction classification;
sends push notification if a bucket crosses into at-risk state.
- **Health page** (`/health`) — full dashboard with overall score card,
30-day SVG forecast chart, buckets ranked worst-to-best, and trickle
adjustment recommendations with a one-tap Apply button.
- **Bucket cards** on the dashboard now show:
- Smooth health gradient background (green → amber → red) based on
spend percentage through the current trickle cycle
- Spend-fill progress bar (fills left→right as budget is used)
- "Budget: $X/day" on healthy buckets, "Recovery: $X/day" on at-risk ones
- Stale badge for buckets with no active trickle
- **Bucket detail** — health banner above the trickle card showing daily
allowance, days until next trickle, and a per-bucket alerts toggle
(replaces old bell icon with a proper sliding toggle).
- **Nav** — Classify tab replaced with Health tab (ECG heart icon).
Classification rules moved inline into bucket edit flow.
- Added `.dockerignore` to prevent macOS node_modules leaking into the
Linux build container.
Updated seed scenario to today (9 Apr 2026) with four distinct health
states: Groceries (critical), Eating Out (warning), Transport (ok),
Japan Trip (great), Savings (stale — no trickle).
The health notification DB methods were written by hand, causing go generate to produce drift detected by CI. Moved the queries into db/queries/health_notifications.sql and regenerated via sqlc.
Changed to 8081 locally to avoid a port conflict but that broke the screenshots CI check which curls localhost:8080.
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.
What's this?
Adds a Health feature to Float — real-time financial health signals across all budget buckets, with projections, notifications, and actionable recommendations.
Changes
Backend
HealthServicecomputes per-bucket metrics each time they're requested:GET /api/health— returns the fullHealthSummaryPUT /api/buckets/:id/trickle/apply-suggestion— one-tap trickle update from a recommendation00010—bucket_health_notificationstable tracks last-notified timestamp per bucket so push alerts fire at most once per dayFrontend
/healthpage — overall score card, 30-day SVG forecast chart, buckets ranked worst-to-best, trickle recommendations with one-tap ApplyBudget: $X/daylabel on healthy buckets,Recovery: $X/dayon at-risk ones.dockerignoreto stop macOSnode_modulesfrom breaking the Linux buildDemo data
Seed scenario updated to 9 Apr 2026 with four distinct health states so the feature is immediately visible in demo mode: