Skip to content

Add Task.snoozed_until recorded fact (snooze chunk 1/3: backend) - #359

Merged
tildesrc merged 1 commit into
mainfrom
panopticon/snooze-backend-fact
Aug 5, 2026
Merged

Add Task.snoozed_until recorded fact (snooze chunk 1/3: backend)#359
tildesrc merged 1 commit into
mainfrom
panopticon/snooze-backend-fact

Conversation

@tildesrc

@tildesrc tildesrc commented Aug 5, 2026

Copy link
Copy Markdown
Contributor

Ports the control-plane half of the upstream snooze feature (REQ-027.1) into this fork: a single operator-owned attention-mute deadline, Task.snoozed_until, plus the REST/store/client plumbing to set and read it. No dashboard behaviour — that's a later chunk.

The control plane stays deterministic and clock-free: it records the operator's timestamp verbatim and never compares it to a clock. Whether a finite deadline is active is left entirely to the dashboard.

What changed

  • core (models.py): Task.snoozed_until: str | None = None — an optional ISO-8601 string; None means not snoozed.
  • store (store_sqlalchemy.py + Alembic migration): persist/round-trip the column alongside url (nullable String).
  • service (service.py): set_snooze records or clears the value, leaving state/turn/blocked untouched.
  • api (api.py): SnoozeIn + PUT /tasks/{id}/snooze; snoozed_until on TaskOut and TaskSummaryOut.
  • client (client.py): set_snooze helper.

Notes

  • The reserved indefinite value 9999-12-31T23:59:59+00:00 is treated as an opaque string by the backend; only the dashboard special-cases it. null clears the snooze.
  • Snooze is dashboard-driven only — no MCP tool, mirroring blocked minus MCP.
  • Deliberately no attention field and no piercing logic (dropped for this port).

Out of scope (later chunks)

  • Dashboard rendering, hotkeys, the clock seam, dim styling, the snoozed · Xh left label.
  • Snoozed-task sort ordering.

🤖 Generated with Claude Code

Port the control-plane half of the upstream snooze feature (REQ-027.1):
a single operator-owned attention-mute deadline recorded verbatim, with no
clock comparison in the control plane and no dashboard behaviour yet.

- core: Task.snoozed_until (optional ISO-8601 string, None = not snoozed)
- store: persist/round-trip it alongside url; Alembic migration for the column
- service: set_snooze records/clears it, leaving state/turn/blocked untouched
- api: SnoozeIn + PUT /tasks/{id}/snooze; snoozed_until on TaskOut/TaskSummaryOut
- client: set_snooze helper

The reserved indefinite value (9999-12-31...) is treated as an opaque string;
only the dashboard (a later chunk) special-cases it. No MCP tool: snooze is
dashboard-driven only. No attention field / piercing logic (dropped for this port).

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
@tildesrc
tildesrc merged commit b7980b4 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