feat(usage): exclude daily breaks from the 5h pace marker#144
Draft
neumie wants to merge 2 commits into
Draft
Conversation
ExtensionSettingsStore::update ran the host setter (which mutates the settings entity, not the store global), so observe_global watchers — settings panels and the live usage widgets — never woke and a settings change only landed on the next poll tick. Touch the global to fire them. Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]> Claude-Session: https://claude.ai/code/session_014gEkgRjtnkrT8nwtymN5N8
Add recurring daily break periods as a shared usage setting. On hour windows the pace marker paces the budget over worked time (window minus the breaks inside it), so it runs at a steady faster rate and reaches 100% before reset by the break amount — leaving more headroom while you work. Day/weekly windows keep the working-days reshape unchanged. Stepper-based "Breaks" UI (add/remove, 15-min nudges) in both the Claude and Codex settings panels. Break coverage is computed with calendar arithmetic (DST-safe) and overlapping ranges are merged so they can't double-count. Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]> Claude-Session: https://claude.ai/code/session_014gEkgRjtnkrT8nwtymN5N8
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
Adds a Breaks preference (shared between the Claude and Codex usage widgets): recurring daily time ranges that are excluded from the 5-hour pace marker.
On hour windows the marker now paces the budget over worked time —
elapsed / (window − breaks inside it)— so it runs at a steady faster rate than the clock and reaches 100% before reset by the break amount. Net effect: a break leaves you more headroom while you work (you have fewer working hours to spend the same budget). Day/weekly windows are untouched (they keep the working-days reshape).UI
A stepper-based Breaks section (add / remove, 15-min nudges) in both the Claude and Codex settings panels, writing to the shared
usagesettings blob alongside working-days (merge-preserving).Notes
from_valuedrops sub-15-min ranges, so a hand-edited/legacy blob can't panic the editor.fix(extensions):ExtensionSettingsStore::updatenow notifies global observers, so a settings change reaches the live widgets immediately instead of on the next poll tick (also benefits working-days).🤖 Generated with Claude Code