Skip to content

fix(server): settle snoozed threads immediately - #5379

Open
0bkevin wants to merge 2 commits into
pingdotgg:mainfrom
0bkevin:fix/5377-settle-snoozed-thread
Open

fix(server): settle snoozed threads immediately#5379
0bkevin wants to merge 2 commits into
pingdotgg:mainfrom
0bkevin:fix/5377-settle-snoozed-thread

Conversation

@0bkevin

@0bkevin 0bkevin commented Aug 5, 2026

Copy link
Copy Markdown

Settling a snoozed thread persisted the settled override while leaving its snooze active. Because snooze takes precedence in client lifecycle classification, the row stayed in Snoozed until it was woken.

The thread decider now emits thread.unsnoozed alongside thread.settled whenever the thread is snoozed, using the same lifecycle timestamp. This moves the row to Settled immediately, preserves the existing unpin behavior, and lets a repeated settle repair legacy settled-and-snoozed state.

Verification:

  • pnpm exec vp test run apps/server/src/orchestration/decider.settled.test.ts (14 tests)
  • pnpm exec vp test run apps/server/src/orchestration/decider.settled.test.ts apps/server/src/orchestration/decider.snoozed.test.ts (24 tests)
  • pnpm --filter t3 exec tsgo --noEmit
  • targeted lint and format checks for both changed files
  • git diff --check
  • isolated web UI pass: snooze via “In 1 hour,” settle from the Snoozed row, confirm immediate placement under Settled without waking, then reload and confirm persistence

Closes #5377

Made with GPT-5.6 Sol using the Codex harness in T3 Code.


Note

Low Risk
Localized orchestration decider lifecycle behavior with new unit tests; no auth, data migration, or broad API surface changes.

Overview
Settling a thread now clears snooze so the row can show as Settled instead of staying under Snoozed when lifecycle classification prefers snooze over settled.

The thread.settle handler in decider.ts builds companion events for anything that would keep the row pinned or snoozed: it still emits thread.unpinned when pinned, and also emits thread.unsnoozed with reason user when snoozedUntil is set. Awake threads still get only thread.settled. Pinned + snoozed threads get settled, unpinned, and unsnoozed in one command.

Tests in decider.settled.test.ts cover snoozed settle, legacy settled-and-still-snoozed repair on repeat settle, and pinned+snoozed combinations.

Reviewed by Cursor Bugbot for commit 5a3fd32. Bugbot is set up for automated code reviews on this repo. Configure here.

Note

Fix thread settling to immediately unsnooze snoozed threads

  • When settling a thread, decider.ts now emits thread.unsnoozed (with reason 'user') alongside thread.settled when the thread is snoozed.
  • A pinned thread still emits thread.unpinned; both companion events can now be emitted together in the sequence [thread.settled, ...companions].
  • Behavioral Change: previously, settling a snoozed thread left the snooze state intact; now it is cleared as part of the same operation.

Macroscope summarized 5a3fd32.

@coderabbitai

coderabbitai Bot commented Aug 5, 2026

Copy link
Copy Markdown

Important

Review skipped

Auto reviews are disabled on this repository. Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: Repository UI

Review profile: CHILL

Plan: Pro Plus

Run ID: f4c43778-1a39-42b2-8675-3eec281fb0f2

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@github-actions github-actions Bot added size:M 30-99 changed lines (additions + deletions). vouch:unvouched PR author is not yet trusted in the VOUCHED list. labels Aug 5, 2026
@macroscopeapp

macroscopeapp Bot commented Aug 5, 2026

Copy link
Copy Markdown
Contributor

Approvability

Verdict: Approved a5636e3

Straightforward bug fix that extends the settle command to also clear snoozed state, following the existing pattern for clearing pinned state. The change is small, self-contained, and well-tested.

You can customize Macroscope's approvability policy. Learn more.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

size:M 30-99 changed lines (additions + deletions). vouch:unvouched PR author is not yet trusted in the VOUCHED list.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Bug]: Settling a snoozed thread is deferred until the thread wakes

1 participant