Skip to content

feat(chores): reassign chores between users via dropdown#110

Closed
eemersonrosa wants to merge 2 commits into
jherforth:mainfrom
eemersonrosa:feature/chore-reassign-dropdown
Closed

feat(chores): reassign chores between users via dropdown#110
eemersonrosa wants to merge 2 commits into
jherforth:mainfrom
eemersonrosa:feature/chore-reassign-dropdown

Conversation

@eemersonrosa

Copy link
Copy Markdown
Contributor

Summary

Adds the ability to reassign a chore to another person directly from the main dashboard, without opening settings or editing the chore.

The per-chore row now shows two controls:

  • a check / undo button to mark the chore done (unchanged behavior), and
  • a swap-arrow button that opens a dropdown to move the chore to a different user.

Keeping the daily bonus consistent

Reassigning is careful with the daily "all regular chores done" bonus:

  • The award logic is extracted into a reusable helper and re-run for both the previous and the new owner on every move.
  • A user who becomes all-done because a chore was moved off their list still gets the bonus they earned.
  • It never removes points, so no one loses score when a chore is moved.

Housekeeping

Stops tracking runtime data that shouldn't be in the repo:

  • gitignores the local SQLite database (server/data/tasks.db) and the generated encryption key
  • removes the previously-committed server/data/tasks.db

Changes

  • client/src/components/ChoreWidget.jsx — new check/undo + reassign-dropdown UI (+85/-3)
  • server/index.js — reassignment endpoint + extracted bonus-award helper (+99/-66)
  • .gitignore — ignore SQLite db and encryption key
  • server/data/tasks.db — removed from tracking

Notes

  • Additive on top of current main; no changes to existing chore-completion behavior.

The commit list may show an internal "Merge pull request #1" commit from my fork — it's a no-op merge onto the current main tip; the net diff is the single feature change above. Happy to squash or rebase however you prefer.

eemersonrosa and others added 2 commits July 1, 2026 16:48
Replace the per-chore layout with a check/undo button plus a swap-arrow
button that opens a dropdown to move the chore to another person, right
from the main dashboard.

Reassigning now keeps the daily "all regular chores done" bonus
consistent: the award logic is extracted into a reusable helper and
re-run for both the previous and new owner on every move, so a user who
becomes all-done by losing a chore gets the bonus they earned. It never
removes points, so no one loses their score on a move.

Also stop tracking runtime data: gitignore the local SQLite database and
the generated encryption key.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
@jherforth

Copy link
Copy Markdown
Owner

Thanks for this, @eemersonrosa — the reassign-from-the-dashboard feature is a great addition. 🙌

Heads up on how it's landing: right before this, we merged a chore due-time notification sounds feature that touched the same two spots your PR does — the PATCH /api/chore-schedules/:id handler in server/index.js and the chore row in ChoreWidget.jsx. To avoid a messy conflict, we integrated your change on top of that work rather than merging the branch directly. Everything from your PR was carried over verbatim:

  • the swap-arrow reassign button + user dropdown on each chore row;
  • the extracted getTodaysRegularChoresForUser / awardDailyRegularBonusIfDue helpers and the refactor of /api/chores/complete to use them;
  • the PATCH user_id path that re-checks the daily "all regular chores done" bonus for both the previous and new owner (and never removes points);
  • the .gitignore hardening — we also extended it to untrack the committed server/data/.encryption-key alongside tasks.db.

Net behavior is identical to your PR. Because the change now lives directly on our main line, you don't need to rebase or resolve anything — this PR can be closed/squashed whenever is convenient for you.

One small follow-up we noted (not blocking, and not something your PR introduced): reassigning via PATCH bypasses the "one uncompleted bonus chore per user" guard that the dedicated assign endpoint enforces, so a user could end up with two. Happy to add a guard later if it comes up.

Thanks again for the clean, well-documented contribution!

@jherforth jherforth closed this Jul 3, 2026
@github-project-automation github-project-automation Bot moved this from Backlog to Done in HomeGlow Kanban Jul 3, 2026
@eemersonrosa eemersonrosa deleted the feature/chore-reassign-dropdown branch July 3, 2026 14:49
@jherforth jherforth added this to the 1.6 milestone Jul 6, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Archived in project

Development

Successfully merging this pull request may close these issues.

2 participants