Skip to content

feat(chores): follow-up chores — when one is done, hand the next one on - #243

Merged
jherforth merged 1 commit into
mainfrom
feat/chore-followups
Oct 8, 2026
Merged

jherforth merged 1 commit into
mainfrom
feat/chore-followups

Conversation

@jherforth

Copy link
Copy Markdown
Owner

Closes #241. The concept is from #233 by @adamecker, credited as co-author. This builds it from the spec in #241, with the decisions from its comments:

# Question Decision
1 Expiry None: stays until done, like any one-time task
2 Daily bonus Not on the day it appeared; counts from the next day
3 Due date or time None in v1 (a delay is still available)
4 Who gets it Named people only
5 Limit 3 follow-ups per chore

What it does. In Admin → Family → Chores → Edit chore → When it's done: "Then give Unload the dishwasher to Liam, Ava, right away / after 2 hours."

  • Hand-off: completing the chore today gives each named person an ordinary one-time schedule of the follow-up chore, so the widget, clams, transfer, snooze, history and nightly cleanup all apply unchanged. The completion and its follow-ups are written in one transaction.
  • Delay: a delay is a snooze, so the follow-up is hidden, and out of the bonus, until it ends. Follow-ups carry no due date or time, so they never show as overdue.
  • Fairness: a follow-up doesn't count toward the daily bonus, or get logged as missed, on the day it appeared. From the next day it counts, and it stays until done.
  • No stacking: completing the chore again doesn't give anyone a second open follow-up.
  • Undo: unticking the trigger removes the follow-ups it handed out that nobody has done.
  • Chains and loops: chains (A, then B, then C) work; loops are refused.
  • Deleting: either chore can be deleted, and the rule goes with it. Follow-ups already handed out stay until done.
  • Display:
    • the widget shows "↪ after Run the dishwasher" on a follow-up;
    • the definitions table shows a chip per follow-up;
    • the schedules table shows a "Follow-up" chip.

Server:

  • schema 27 (chore_followups, plus three columns on chore_schedules);
  • GET/PUT /api/chores/:id/followups, and followups on GET /api/chores;
  • followup_of on GET /api/chore-schedules;
  • followups_created and followups_removed on complete and uncomplete;
  • the first-day rule in getTodaysRegularChoresForUser, which drives both the bonus and missed-chore logging.

Client:

  • the dialog section, which is one button until used;
  • countsTowardDailyBonus (utils/choreHelpers.js), used for the widget's "day complete" (celebration and green card), so it agrees with the server;
  • the caption and chips;
  • en and es strings.

Checked:

  • Server tests: server/tests/choreFollowups.test.js, 9 tests covering rules and validation, hand-off with delay, no stacking, today-only, undo, chains, the bonus rule, the missed-logging rule, and deleting either chore. Disabling the first-day rule makes exactly the two fairness tests fail. Full suite 353/353.
  • Client tests: countsTowardDailyBonus unit tests; client suite 524/524; i18n check and build pass.
  • In a browser on the dashboard:
    • adding the follow-up in the dialog saved it and showed the definitions chip;
    • completing Run the dishwasher gave both kids Unload;
    • Liam still got "All Done! +2" (green) with the follow-up open and captioned;
    • the schedules row showed the Follow-up chip;
    • undo removed both;
    • a 2-hour delay kept it hidden;
    • undo and redo left one, not two.

🤖 Generated with Claude Code

…on (#241)

A chore can have up to 3 follow-ups, set in its edit dialog under "When
it's done": "then give Unload the dishwasher to Liam, after 2 hours".
Concept from #233 by @adamecker; spec and decisions in #241.

- Completing the chore today gives each named person an ordinary one-time
  schedule of the follow-up chore, so the widget, clams, transfer, snooze,
  history and nightly cleanup apply unchanged. The completion and its
  follow-ups are one transaction. Back-dated completions don't hand work
  on.
- A delay is a snooze: hidden, and out of the bonus, until it ends.
  Follow-ups have no due date or time.
- Fairness: a follow-up doesn't count toward the daily bonus, or get
  logged as missed, on the day it appeared; from the next day it counts
  and stays until done. One rule in getTodaysRegularChoresForUser covers
  both, and countsTowardDailyBonus keeps the widget in step.
- No stacking while a person still has an open follow-up from a rule.
- Undoing the trigger removes its follow-ups that nobody has done.
- Rules live on the chore. Self, duplicates, more than 3, unknown chores or
  people, no one picked, a delay over 7 days and loops are refused; chains
  are fine. Both chore references cascade, so either chore can still be
  deleted.
- The widget captions a follow-up "after Run the dishwasher"; the
  definitions table shows a chip per follow-up; the schedules table marks
  follow-up schedules. en and es strings.

Schema 27: chore_followups, plus followup_rule_id, triggered_by_schedule_id
and triggered_on on chore_schedules.

Co-Authored-By: adamecker <eckerpad@gmail.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@jherforth
jherforth merged commit a27c47a into main Oct 8, 2026
6 checks passed
@jherforth
jherforth deleted the feat/chore-followups branch October 8, 2026 12:22
@jherforth jherforth self-assigned this Oct 8, 2026
@jherforth jherforth added the enhancement New feature or request label Oct 8, 2026
@jherforth jherforth added this to the 1.10 milestone Oct 8, 2026
adamecker pushed a commit to adamecker/HomeGlow that referenced this pull request Oct 8, 2026
adamecker pushed a commit to adamecker/HomeGlow that referenced this pull request Oct 8, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

Spec: follow-up chores — when one chore is done, hand the next one on (concept from #233)

1 participant