Sort actively-snoozed roots to the end of the active section (REQ-038) - #362
Merged
Conversation
An actively-snoozed, ungoverned task is not demanding operator attention, so demote it to the end of the active section: after ordinary non-terminal tasks but still above COMPLETE/DROPPED. _make_sort_key now takes the display clock and its leading element becomes a three-way section int (0 active, 1 snoozed-active root, 2 terminal) instead of the is_terminal bool. The demotion is gated on having no governor, so a snooze never splits an ensemble — governed children stay adjacent to their governor via the later grouping step, and a snoozed governor root carries its children down with it. With now=None no task is treated as snoozed, preserving prior ordering. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
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.
An actively-snoozed, ungoverned task is not demanding operator attention, so it now sinks to the end of the active section in the dashboard — after all other non-terminal tasks, but still above the terminal (COMPLETE/DROPPED) tasks. This is chunk 3/3 of the snooze feature, porting upstream REQ-038 (adapted: this fork has no
attention/piercing, so an active snooze is always demoted and an expired one never is).What changed
_make_sort_keynow takes the display clock (now) and its leading tuple element becomes a three-way section int —0active,1snoozed-active root,2terminal — replacing the oldis_terminalbool.not task.get("governor_task_id"), so a snooze never splits an ensemble: governed children stay adjacent to their governor via the existing grouping step, and a snoozed governor root carries its children down with it.action_refresh) threads the existing per-repaintdisplay_nowclock in.now=Noneno task is treated as snoozed, preserving the prior active-before-terminal ordering for any caller that doesn't pass a clock.Builds on the snooze fact (#359) and the snooze controls/clock seam (#360).