Repository navigation
Add a chore grace period and photo-verified chore claims - #17
Merged
Merged
Conversation
Chores now get an admin-configurable grace period (default 4 hours, up to 12) before they count as missed. The assignee can still finish a chore during the grace period, including past midnight. Once the grace period ends, another roommate can cover the missed chore: claim it with a before photo, finish it with an after photo, and the roommates outside the claim vote. Approval charges the assignee the full penalty, pays the roommate who covered it up to $10, and sends the rest to the household fund. Rejection excuses the miss. A tie or no votes approves. Claims need at least three roommates and close at the end of the day after the chore was due. A claimed infraction cannot be disputed, voted on, or forgiven, and a claim without an after photo lapses back to normal review. Every chore now carries the house penalty, so the unused per-chore penalty toggle is removed.
Database: - Fund payments only mark posted, uncovered penalties as paid, so an open claim can no longer get stuck on an already-settled penalty. - process_due_work handles each claim and penalty on its own, so one bad row is logged and retried instead of blocking every household. - Chores added after their due time cannot be claimed, which closes a backdated-chore exploit. - Deleting a chore keeps assignments that are already in their grace period. - Only the affected member can dispute an infraction; outsiders are refused. - Claim photos must be uploaded after the miss (before photo) or after the claim (after photo), and copies of another household photo are refused. Retrying with the same photo after a failed request still works. - Reviewers are fixed when the after photo is submitted, so membership changes cannot decide a claim. - Households are published to realtime so grace period changes reach every member. App: - Photo picker uses focusable buttons, so it works with a keyboard. - Today page follows midnight while open and keeps grace-period chores visible until their grace period ends. - Claim dialogs show errors inline, can be closed during an upload, and fit on a phone screen; the claimer can add the after photo from the infraction card too. - Claim votes use the same colour pair as infraction votes, explain what each choice does, name the reviewers, and hide once the vote closes. - Photo viewer switches between before and after; broken or expired photos retry once, then show a fallback. - History totals follow the real penalty status, outcome chips wrap, and missed chores use the coral icon. - Claim deadlines are correct in time zones that skip midnight.
AshtonLong
requested review from
OneFourBrandon
and
a balanced review from Copilot
November 4, 2026 01:52
An approved claim now moves the full penalty from the assignee to the roommate who covered it. The $10 cap is gone and the household fund gets nothing from a covered chore. Covered penalties no longer count toward the infractions history's unpaid total, since nothing is owed to the fund for them.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Chores now get a grace period before they count as missed, and roommates can cover a missed chore and earn its penalty. Every chore carries the house penalty, so the per-chore penalty checkbox is gone. It was never enforced anyway.
Grace period
Covering a missed chore
Covering only works in houses with 3 or more people. When the grace period ends, anyone except the assignee can claim the chore from "Up for grabs" by taking a before photo. The first claim wins.
Claims close at the end of the day after the chore was due. The claimer has to add an after photo by then, or the claim lapses and the normal review takes over again.
After a chore is claimed, the infraction can't be disputed, put to the normal vote, or forgiven. The assignee can add a note for the voters.
Only the roommates outside the claim vote. That list is fixed when the after photo is submitted. The vote closes once all of them have voted, or after 48 hours.
More rejects than approves means the claim is rejected: the miss is excused and no money moves. A tie, or no votes, approves the claim.
When a claim is approved, a single balanced ledger entry moves the whole penalty from the assignee to the roommate who covered it. The household fund gets nothing, and the assignee owes the fund nothing for that miss.
For example, on a $15 second miss: assignee −$15, coverer +$15, fund $0. It's an ordinary balance between the two roommates, so it nets against shared expenses and bills like any other balance. Nobody has to make a separate payment for it.
Covered penalties don't count toward the infractions history's "unpaid" or "paid" totals, since those track what's owed to the fund.
Push notifications go to:
Photos are stored in a new private
chore-claimsbucket. Members can add photos but can't replace or delete them. The server checks that each photo was uploaded by the claimer, at the right time, and isn't a copy of another photo from the house.Deploying
The migration
20261103170000_chore_grace_period_and_claims.sql:households.chore_grace_minutestask_definitions.penalty_enabledchore_claimsandchore_claim_votestables and thechore-claimsstorage buckethouseholdsto realtimeOther fixes in this PR
process_due_worknow handles each claim and penalty on its own. One bad row gets logged and retried instead of blocking every household.Validation
master: "bill tap opens breakdown" (both browsers) and "driveway grid drag" (Safari).Known limitations