Add left/right/both breast selection to pumping sessions - #289
Merged
Conversation
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
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.
Pumping entries can now record which breast the session was for: Left, Right, or Both.
Database
0009_add_pumping_side.sqladds a nullableside TEXT CHECK(side IN ('left', 'right', 'both'))column topumping. Existing entries keep aNULLside and render as—, so nothing needs backfilling.server/test/helpers.tspicks up the new migration so the test schema stays in sync.API
sideadded to the pumping route's column list, so it round-trips throughPOST/PUT/GETlike any other field.UI
Both · 5 oz) and in a new "Breast" column in the desktop table.pumpcategory.Pump · Left · 4 oz.Reporting
pumped 4 oz · left breast).Testing
npm test -w server— 74 passed, including four newPumping APItests covering side round-trip on create, omitted side stayingNULL, updating the side viaPUT, and theCHECKconstraint rejecting an unknown value.npm test -w client— 84 passed.npm run build -w clientandnpm run build -w serverboth clean.One thing worth flagging: an invalid
sidesurfaces as a500, not a400. That's pre-existing behavior of the sharedcreateChildScopedCrudhelper for everyCHECKconstraint (feedingtypebehaves 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