Skip to content

Add overwhelm metric with optional keyword tags#5

Merged
isAdamBailey merged 3 commits into
mainfrom
feat/overwhelm-metric
Jul 17, 2026
Merged

Add overwhelm metric with optional keyword tags#5
isAdamBailey merged 3 commits into
mainfrom
feat/overwhelm-metric

Conversation

@isAdamBailey

Copy link
Copy Markdown
Owner

Summary

  • Add a day-keyed overwhelm rating (1–10, baseline 3) with upsert-by-day API, chart mode, and a tabbed Log card that opens on whichever manual metric is still outstanding today
  • Add a user-editable tag vocabulary (create/rename/archive) so entries can optionally record why a day felt overwhelming, surfaced in chart tooltips
  • Fix LogCard tab seeding (wait for first fetch), preserve overwhelm date after save, correct renameTag 409 handling, and extract shared SegmentedControl / LogSubmitButton / date-input / baseline helpers

Test plan

  • Log weight and overwhelm for today; confirm the Log card defaults to the outstanding metric after entries load
  • Log overwhelm for a past date; confirm the date field stays on that day after save
  • Create, rename (including duplicate-name 409), and archive tags in Settings; tag an overwhelm entry and confirm tooltip shows tags (daily) / top 3 (weekly)
  • Switch MetricChart between weight / BMI / active energy / overwhelm and daily / weekly
  • go test ./... in backend/ and npm test / npm run lint in frontend/

Made with Cursor

isAdamBailey and others added 3 commits July 16, 2026 18:34
…d entry

Adds a manually-logged, day-keyed overwhelm scale (1-10, baseline 3)
alongside weight and active energy: a new internal/overwhelm service with
upsert-by-day semantics, a 4th MetricChart mode with a fixed 1-10 axis and
a quiet baseline reference line, and a tabbed LogCard that defaults to
whichever metric hasn't been logged yet today.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Adds an overwhelm_tags/overwhelm_entry_tags pair so overwhelm entries can
be optionally tagged with why a day felt overwhelming. Tags are managed
in Settings (create/rename/archive - archiving is a soft delete so past
entries keep their tags), attached via a Settings-driven chip picker on
the Log card, and surfaced in the chart tooltip (a day's tags, or a
week's top 3 by frequency). Upsert attaches/detaches tags atomically via
data-modifying CTEs rather than a transaction, since no package in this
codebase uses pgx.Tx yet.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Wait for the first fetch to finish before choosing the default log tab,
keep the overwhelm date after save, and only show the duplicate-tag
message on 409. Pull SegmentedControl, LogSubmitButton, date-input
helpers, and OVERWHELM_BASELINE into shared modules so MetricChart and
LogCard stop reimplementing the same patterns.

Co-authored-by: Cursor <cursoragent@cursor.com>
@isAdamBailey
isAdamBailey merged commit f29c321 into main Jul 17, 2026
5 checks passed
@isAdamBailey
isAdamBailey deleted the feat/overwhelm-metric branch July 17, 2026 02:26
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