Repository navigation
feat(time-tracking): lock Monday to Friday and leave the weekend open - #229
Merged
Merged
Conversation
The sign-off panel could only lock a whole week, a month, or a week cut at a month end, so locking a work week also locked Saturday and Sunday. Week mode now offers a Mon–Fri choice. A failed lock keeps the chosen days selected, so a retry doesn't widen to the weekend. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
ponbac
marked this pull request as ready for review
November 7, 2026 14:12
Codex Review Summary: ✅ CompletedThis 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. |
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.
What and why
The sign-off panel could lock a whole week (Mon–Sun), a month, or a week cut at a month end. It couldn't lock a work week alone, so locking Monday to Friday also locked Saturday and Sunday, even when they hadn't happened yet.
Week mode now has a Mon–Fri choice next to the month-end splits. Picking it changes the title and button to "Week 45, Mon–Fri" and locks only those five days. Unlock and Undo work on the same days.
How
The panel already supported locking part of a week (the month-end splits). Mon–Fri is one more part. A pure
weekPartslists what a week can be locked as: Mon–Fri first, then any month-end split. When a month ends on a Friday, the split matching Mon–Fri is dropped, so it isn't offered twice.A failed lock used to clear what you'd picked and return to the due period. That period covers the whole week, so a retry would have locked the weekend. The panel now keeps the selection, and a retry locks the same days. A lock across a month end can fail halfway, and a retry finishes the job, because locking is idempotent.
Unchanged on purpose
The reminder logic doesn't change. With Mon–Fri locked and the weekend open, the week stays "due" and becomes overdue on Monday until Saturday and Sunday are locked. That matches #228 and what Kleer reports for a week with an open weekend.
Checks
SQLX_OFFLINE=true just check-all: Rust check, clippy, tsc, eslint, bun tests and omarchy plugin tests all pass. After the last review tweak, tsc, eslint and the bun tests ran again and pass (342 tests).workweekRange(Sunday anchor, week crossing a month end) andweekParts(month ending on a Friday).Reviewed with review-loop: 1 round with GPT-6.1 Sol. Verdict: approved, no findings. A separate engineering-principles pass raised 3 nits; all were applied.
🤖 Generated with Claude Code