Skip to content

Sort actively-snoozed roots to the end of the active section (REQ-038) - #362

Merged
tildesrc merged 1 commit into
mainfrom
panopticon/snooze-sort-order
Aug 5, 2026
Merged

Sort actively-snoozed roots to the end of the active section (REQ-038)#362
tildesrc merged 1 commit into
mainfrom
panopticon/snooze-sort-order

Conversation

@tildesrc

@tildesrc tildesrc commented Aug 5, 2026

Copy link
Copy Markdown
Contributor

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_key now takes the display clock (now) and its leading tuple element becomes a three-way section int0 active, 1 snoozed-active root, 2 terminal — replacing the old is_terminal bool.
  • The demotion is gated on 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.
  • The single call site (action_refresh) threads the existing per-repaint display_now clock in.
  • With now=None no 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).

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>
@tildesrc
tildesrc merged commit 0f54386 into main Aug 5, 2026
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant