Skip to content

Add left/right/both breast selection to pumping sessions - #289

Merged
mike12806 merged 1 commit into
mainfrom
claude/pumping-breast-selection-0hk89e
Aug 5, 2026
Merged

Add left/right/both breast selection to pumping sessions#289
mike12806 merged 1 commit into
mainfrom
claude/pumping-breast-selection-0hk89e

Conversation

@mike12806

Copy link
Copy Markdown
Owner

Pumping entries can now record which breast the session was for: Left, Right, or Both.

Database

  • New migration 0009_add_pumping_side.sql adds a nullable side TEXT CHECK(side IN ('left', 'right', 'both')) column to pumping. Existing entries keep a NULL side and render as , so nothing needs backfilling.
  • server/test/helpers.ts picks up the new migration so the test schema stays in sync.
  • Seed data now sets a mix of sides.

API

  • side added to the pumping route's column list, so it round-trips through POST/PUT/GET like any other field.

UI

  • Pumping page — a "Breast" select in the add/edit dialog (defaults to "Both"); the side shows in the mobile row summary (Both · 5 oz) and in a new "Breast" column in the desktop table.
  • Quick log dialog — the same select for the pump category.
  • Dashboard — recent-activity pump entries read Pump · Left · 4 oz.

Reporting

  • Activity history and the daily summary email include the side (pumped 4 oz · left breast).

Testing

  • npm test -w server — 74 passed, including four new Pumping API tests covering side round-trip on create, omitted side staying NULL, updating the side via PUT, and the CHECK constraint rejecting an unknown value.
  • npm test -w client — 84 passed.
  • npm run build -w client and npm run build -w server both clean.

One thing worth flagging: an invalid side surfaces as a 500, not a 400. That's pre-existing behavior of the shared createChildScopedCrud helper for every CHECK constraint (feeding type behaves the same way), so I left the error semantics alone rather than changing the shared helper as part of this feature — happy to fix that separately if you want.


Generated by Claude Code

Pumping entries now record which breast the session was for. A new
nullable `side` column (left/right/both) is added to the pumping table;
existing entries keep a NULL side and render as "—".

The selector appears in both the Pumping page dialog and the quick-log
dialog, defaulting to "Both". The side is surfaced in the pumping list,
the desktop table, the dashboard activity feed, the activity history,
and the daily summary email.

Co-Authored-By: Claude Opus 5 <[email protected]>
Claude-Session: https://claude.ai/code/session_016GhkdnFqiYsGPAkDNsHa4W
@mike12806
mike12806 marked this pull request as ready for review August 5, 2026 01:21
@mike12806
mike12806 merged commit 9f55cef into main Aug 5, 2026
6 checks passed
@mike12806
mike12806 deleted the claude/pumping-breast-selection-0hk89e branch August 5, 2026 01:22
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