Skip to content

Phase 3-D: retrospectives / insights - #41

Merged
eigger merged 3 commits into
masterfrom
feat/phase3-insights
Aug 5, 2026
Merged

Phase 3-D: retrospectives / insights#41
eigger merged 3 commits into
masterfrom
feat/phase3-insights

Conversation

@eigger

@eigger eigger commented Aug 5, 2026

Copy link
Copy Markdown
Owner

Summary

  • Pure @stash/shared helpers for untouched (≥365d), top CONSUME, duplicate RESTOCK (≥2), and purchased-in-range totals (purchaseDate ?? createdAt)
  • GET /api/insights?from=&to= (client local month bounds; max ~3 months); soft-deleted excluded; ADJUST never counts as consume/purchase
  • /insights UI + dashboard link + More menu; factual copy only; ROADMAP notes

Test plan

  • Open /insights — month pager works; empty states are factual
  • Consume/restock via scan — top consumed / duplicates update for current month
  • Item with old createdAt and no recent audit appears under untouched
  • npm run lint && npm run test && npm run build green
  • Confirm no judgmental “waste” wording in ko/en strings

Surface untouched items, monthly consume/restock duplicates, and purchase totals from existing StockMovement and Item fields — facts only, no new tables or judgmental copy.

Co-authored-by: Cursor <cursoragent@cursor.com>
eigger and others added 2 commits August 5, 2026 15:26
Sum purchased totals over all matches before list limit; count distinct UTC restock days so continuous scans are not noise; clarify untouched is as-of-now and unit-price vs inventory value. Also show app version in the More sheet.

Co-authored-by: Cursor <cursoragent@cursor.com>
Pass tzOffsetMinutes with from/to so localDayKey matches the household calendar; covers KST morning/evening same-day false splits.

Co-authored-by: Cursor <cursoragent@cursor.com>
@eigger
eigger merged commit 0c6489c into master Aug 5, 2026
3 checks passed
@eigger
eigger deleted the feat/phase3-insights branch August 5, 2026 06:33
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