Add non-working mode and workday boundary rules to /timebox#23
Merged
Conversation
New TIMEBOX_WORK_START/END/END_HARD bound the working band inside the day; day end moves to 23:59 so the evening is plannable.
- Mode gains 'nonworking'; commute line switches via a _MODE_BLOCK map - DayConfig carries the work window; working days get boundary + focus-fill rules (work tasks inside the window, <=60m non-work inside it, Work/Personal Focus placeholders filling gaps to 23:30), injected for office/wfh only - Dropped tasks now render a shared 'couldn't be scheduled' notice
Picking 'Day off' asks for a start time (24h free text like 900/1330, or a 09:00 default button) before collecting tasks, overriding the day start.
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
Extends
/timeboxwith a third day type and sharper working-day rules, per a grilled-out spec.Non-working day mode
900→09:00,1330→13:30,0930, colon form9:00also accepted; anything ambiguous/out-of-range re-asks), or a Start 09:00 default button.Workday boundary rules (office/wfh)
New
TIMEBOX_WORK_START/TIMEBOX_WORK_END(soft) /TIMEBOX_WORK_END_HARDbound a work window inside the day. The planner now:Other
Implementation notes
_MODE_BLOCKfragment-switches the commute line and the work-window rules are injected only for working days — no prompt triplication.DayConfiggains the work window;_day_config(start_override=…)threads the non-working start time in without mutating the frozen config.source=timeboxtag, so redo's clear-then-write removes them cleanly.Testing
tests/test_scheduler.pyupdated + new cases: work-window/focus rules present for office/wfh, absent for nonworking; dropped-notice wording. 17 passed locally.