Skip to content

Show per-visit amounts on the shopping page with W1/W2 labels and tooltips - #38

Closed
guplem wants to merge 1 commit into
mainfrom
23-per-visit-split-on-page
Closed

Show per-visit amounts on the shopping page with W1/W2 labels and tooltips#38
guplem wants to merge 1 commit into
mainfrom
23-per-visit-split-on-page

Conversation

@guplem

@guplem guplem commented Jul 22, 2026

Copy link
Copy Markdown
Owner

Summary

Closes #23

The shopping page already splits a product's buy count per shop visit (shipped by #25 / PR #33). What was missing was clear labeling. This PR adds the short per-visit labels and tooltips the issue asks for.

  • Each split line now reads Buy 6 packs (W1) / Buy 3 packs (W2) (before: Buy 6 packs now / + 3 packs week 2). Every line starts with "Buy", matching the issue example.
  • Each label has a tooltip in full words: W1 = first shop visit, the day before week 1 starts.
  • When the whole amount is bought on one visit, the row still shows a single amount (no redundant split).
  • Amounts are unchanged: the page and the copied list both come from planShoppingTrips (ADR 0014) with identical rounding, so they still match.

Test plan

  • flutter analyze passes
  • flutter test test/ passes (619 tests)
  • On a multi-week menu, split rows show (W1) / (W2) with working tooltips, and match the copied list amounts

🤖 Generated with Claude Code

The shopping row already showed the buy amount split per shop visit,
but it used the wording "Buy 6 packs now" and "+ 3 packs week 2" with
no explanation. Issue #23 asks for a short label per visit ("W1", "W2")
and a tooltip that spells the label out in full words.

Now each split line reads "Buy 6 packs (W1)" and has a tooltip like
"W1 = first shop visit, the day before week 1 starts." "W1" matches the
"Week 1" section header in the copied list, so the page and the copy use
the same visit names. A single-visit product still shows one plain total.

Only the on-screen labels and tooltips change; the per-visit amounts
still come from the same planShoppingTrips data as the copied list, so
the numbers on the page and in the copy stay equal.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
@guplem guplem added the waiting-for-human-check No human has verified this yet -- direct AI output label Jul 22, 2026
@guplem guplem self-assigned this Jul 22, 2026

@guplem guplem left a comment

Copy link
Copy Markdown
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reviewed by an automated pass. Clean and ready for a human check.

What is done well

  • Focused, display-only change. The per-visit split itself already shipped (#25); this adds exactly the missing part from the issue: the short (W1)/(W2) labels and a full-words tooltip for each.
  • Amounts are untouched. Both the page and the copied list still derive from planShoppingTrips with the same rounding, so they stay equal.
  • Tests updated to match the new wording, plus a new test that checks each line's tooltip message. Good coverage of split vs single-total cases.

Findings

  • None blocking. All acceptance criteria met.
  • Note: the page label uses W1 while the copied list uses Week 1 section headers. The amounts match (the acceptance criterion), only the label format is shorter on the page, which is what the issue asked for.

Verdict: approved pending human review. CI analyze-and-test gate must be green before merge.

@guplem

guplem commented Jul 23, 2026

Copy link
Copy Markdown
Owner Author

Closing without merge. This PR only changed the per-visit line label (to "(W1)"/"(W2)") and added tooltips. The per-visit split itself already shipped in #25 (PR #33). The maintainer does not want the label rewording or tooltips, so there is nothing left to merge here.

@guplem guplem closed this Jul 23, 2026
@guplem
guplem deleted the 23-per-visit-split-on-page branch July 23, 2026 06:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

waiting-for-human-check No human has verified this yet -- direct AI output

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Show the shopping amount split per shop visit on the shopping list page

1 participant