Skip to content

Add Chores - #4

Open
Mihilih wants to merge 1 commit into
feature/housesfrom
feature/chores
Open

Mihilih wants to merge 1 commit into
feature/housesfrom
feature/chores

Conversation

@Mihilih

@Mihilih Mihilih commented Nov 10, 2026

Copy link
Copy Markdown
Collaborator

Overview

Adds chores: rotations, the week view, marking turns done, swapping turns and the "Done this month" stats. This is the third MVP PR after login and houses, and is taken from mvp-features, which is what the dev server runs.

Changes Made

New src/chores/ module

  • schedule.ts: date math for each frequency (DAILY, EVERY_OTHER_DAY, WEEKLY, BIWEEKLY, MONTHLY, with monthly clamped to the end of short months) and who's up next in the rotation
  • choreService.ts: creates, edits and deletes chores and generates their turns. Swaps and completions are saved on the turn, so editing a chore later never undoes them, and finished or overdue turns never change
  • choreController.ts, choreRouter.ts, chores.schema.ts: routes and request validation

Endpoints (all under /houses/:houseId, members only)

  • GET /chores, POST /chores, GET /chores/:choreId, PATCH /chores/:choreId, DELETE /chores/:choreId
  • GET /chores/stats?month=YYYY-MM: turns each person finished that month
  • GET /chore-assignments?from&to&assignee&includeOverdue: turns in a date range (max 62 days), used by Home and the week view
  • POST / DELETE /chore-assignments/:assignmentId/complete: mark done or undo. Anyone in the house can do it, and it counts for whoever did
  • POST /chore-assignments/:assignmentId/swap: trade two upcoming turns of the same chore

Houses

  • Mounted the chore router in houseRouter.ts
  • Leaving or being removed from a house now drops the person from every rotation and deletes their unfinished future turns. Done turns stay in the history. Releasing shopping claims comes with the shopping list PR

No schema changes. The chore tables were already in the initial migration.

Test Coverage

  • test/schedule.test.ts: frequency stepping, end-of-month clamping, listing turns in a range, rotation order, and "today" in the house's time zone
  • test/chores.test.ts (15 tests): creating chores and the "Coming up" preview, rotation members must live in the house, the week view with status and the "me" filter, overdue turns, bad date ranges, complete/undo and monthly stats, swaps and "Allow swaps" off, reordering the rotation, rescheduling that keeps finished turns, no rescheduling into the past, deleting a chore, leaving the house mid-rotation, and hiding other houses' chores
  • Existing houses and auth tests still pass

Next Steps

  • Shopping list PR: shopping endpoints, releasing "I'll get it" claims on leave, seed data, API docs and the full Postman collection
  • Reminders: reminderHour is saved but nothing sends reminders yet

@coderabbitai

coderabbitai Bot commented Nov 10, 2026 •

Copy link
Copy Markdown

Warning

Review limit reached

You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository.

Next included review available in 59 minutes.

Check out review usage here.

View limit details

Limit details: You’ve used the included review currently available.

Learn how review limits work.

Review configuration:

Run configuration

  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: defaults
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: 7266a1a1-9780-45f1-baea-75eafe66bc33
Commits

Reviewing files that changed from the base of the PR and between f750b1c and 281c1a4.

Files selected for processing: 9

  • src/chores/choreController.ts
  • src/chores/choreRouter.ts
  • src/chores/choreService.ts
  • src/chores/chores.schema.ts
  • src/chores/schedule.ts
  • src/houses/houseRouter.ts
  • src/houses/houseService.ts
  • test/chores.test.ts
  • test/schedule.test.ts
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

Share

@Mihilih
Mihilih changed the base branch from main to feature/houses November 10, 2026 02:15
@Mihilih Mihilih mentioned this pull request Nov 11, 2026
@Mihilih
Mihilih added this pull request to stack #6 November 11, 2026 22:28
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