Repository navigation
Ask who did a task before marking someone else's done - #37
Conversation
Anyone in a commune could tick any task, and the task then credited the person whose turn it was, so it could be marked done for someone with nobody's name beside theirs. Marking done a task someone else holds now asks "Who did it?": "I did it" or "<name> did it", each pressed and held until its bar fills. The database refuses the completion without an answer (migration 0041), and last done records both names: who did it, and who marked it for them or whose turn they covered. The history line and the activity say the same. The rotation moves on as before. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01A6P7aTcMBccooYYr4xYnVS
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
|
CI did not run on this commit. "Database, local API and worker", "Web app" and "Secret scan" each finished in about 2 seconds with no runner assigned (runner id 0). That is the same Actions stoppage already reported on #34 to #36, so no test ran and this PR did not cause it. I can't re-run jobs from this session (a re-run returns 403). Once Actions starts runners again, use "Re-run all jobs" on this PR. Locally on this commit, everything passes: all 29 database tests, every local API test on a disposable database, all 669 web tests, typecheck, build and Generated by Claude Code |
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
Before: anyone in a commune could tick any task with one tap. The history recorded who pressed it, but the task's "last done" credited the person on the rota, so a task could be marked done for someone without anyone seeing who actually pressed the button.
After: tapping Done on a task someone else holds asks "This is Ama's turn. Who did it?" with I did it and Ama did it. Each answer has to be pressed and held until its bar fills, so a stray tap does nothing. Both names go on the task: "Ama Owusu · 11 Oct · marked by Ben", or "Ben · 11 Oct · covering Ama". The history line and the activity feed say the same. Your own tasks, and tasks nobody holds, still complete with one tap. Edem chose "Both" (say who did it, and hold to confirm) on the decision card.
The rotation moves on exactly as before, from the holder's turn.
How: migration 0041 adds
p_done_by('me'or'assignee') torecord_operation_occurrence, which now refuses to complete someone else's task without it.last_donegainsmarkedByandcovering(the validator allows only these), each occurrence storesdone_by_id, and the snapshot history carriesdoneById. The local API and the Data API client passdoneBy.ui/DoneByChoice.tsxholds the question and the hold-to-confirm button (pointer, touch and keyboard: hold Space or Enter). It is used on the Operations late card, in the task window and in This Hub's week list. The task window also gets a "Last done" fact. A task still held by a name with no account keeps crediting that name and adds who marked it.Release note: a client released before 0041 can still complete its own tasks and unheld tasks, but not someone else's. Deploy this client right after applying 0041 and refreshing the Data API schema cache (see
infra/neon/README.md).Checked locally: 29 database tests (new
task_done_by.sql), every local API test on a disposable database and port, 669 web tests (newtests/task-done-by.test.tsx), typecheck, build anddump-schema.sh --check. I also tried it in Chromium on desktop and phone against a disposable database: letting go early leaves the task as it was, a full hold records it, and both names show in the task window.Stacked on #36.
🤖 Generated with Claude Code
https://claude.ai/code/session_01A6P7aTcMBccooYYr4xYnVS
Generated by Claude Code