Repository navigation
feat(time-tracking): lock and unlock time from a sign-off panel - #227
Conversation
Replace the unlocked-period alerts with a panel beside the entries that reviews what's due and locks it in Kleer. It stays one quiet line until a week or month lock is due, then escalates up to a nav dot and a daily toast when overdue. The Kleer adapter splits ranges at month ends because Kleer refuses a range across months. Unlock reads statuses back because Kleer answers success for days it refuses. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
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. |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 80a2ef8f29
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
…he timeline The lock button could fire before a browsed period's statuses arrived, which also made Undo reopen days that were already locked. In day mode the timeline ignored the day picked in the sign-off panel. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
@codex review |
|
Codex Review: Didn't find any major issues. 👍 Reviewed commit: ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
If Codex has suggestions, it will comment; otherwise it will react with 👍. Codex can also answer questions or update the PR. Try commenting "@codex address that feedback". |
What and why
Week and month ends are hard deadlines for locking time, but Toki could only warn about it and link out to Kleer. The warnings also missed days without entries, and they showed at the same volume whatever the urgency.
This adds locking to Toki. A sign-off panel beside the entries reviews what's due and locks it with one click. It replaces the "previous week/month unlocked" alerts.
How
Toki works out two recurring deadlines from the person's schedule: the last scheduled day of each week and each month. Anything due or overdue becomes one lock. The panel stays out of the way until then, and gets louder only as a deadline passes.
Attention levels
flowchart TD A{Lock due?} -->|No| B{Due tomorrow?} B -->|No| C[Clear: one quiet line] B -->|Yes| D[Soon: same line with a dot] A -->|Due today| E[Due: full panel, tinted header, nav dot] A -->|Week has ended| F[Overdue: amber header, nav dot, daily toast] A -->|Month has ended| G[Month overdue: red header, red nav dot, daily toast] E --> H[Lock] F --> H G --> H H --> I[Panel closes, back to the quiet line]Clicking a day jumps the list to it, so a short day can be fixed with the review still open. Animations play once and stop, today is never flagged, and the toast shows at most once a day and never on the time tracking page.
Changes
POST /time-tracking/lockandPOST /time-tracking/unlockgo through the existing provider-neutral ports. Neither is in the curated agent OpenAPI, so no MCP tool is needed.200for days it refuses to unlock, so the service reads the statuses back and returnsstillLocked. The UI warns about those days.approveddays. Two certified days opened when a mixed range was unlocked, and that is unexplained.Kleer findings are in
.docs/kleer.md.Limitations
test-api.kleer.se, including whether the service account may lock.registration-useron the events it locks.Checks
cargo fmt --check,cargo clippyonkleerandtoki-api,cargo test -p kleer -p toki-api(825 passed),bun tsc,bun lint,bun run test(338 passed),bun run build.stillLocked.🤖 Generated with Claude Code