Skip to content
Source
Sign inSign up
pingdotgg/t3code

fix(server): settle snoozed threads immediately #5379

Merged0bkevin(GitHub profile, opens in a new tab)merged 4 commits intomain fromrefs/pull/5379/headmerged by juliusmarminge View on GitHub

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 behavior with focused tests; no auth, data migration, or broad API surface changes.

Overview Settling a snoozed thread now clears snooze in the same command, so the inbox row moves to Settled instead of staying under Snoozed because snooze won lifecycle classification.

The thread.settle handler in the orchestration decider still emits thread.settled (and thread.unpinned when pinned), and also emits thread.unsnoozed with reason 'user' when snoozedUntil is set. Pin and snooze companions are collected together, so a pinned-and-snoozed settle produces [thread.settled, thread.unpinned, thread.unsnoozed]. Awake threads still get only thread.settled; a repeat settle on legacy settled+snoozed state can repair by unsnoozing without changing settled timestamps incorrectly.

Tests in decider.settled.test.ts cover snoozed-only, legacy repair, and pinned+snoozed cases.

Reviewed by [Cursor Bugbot](https://cursor.com/bugbot) for commit 660295a725abbe99c192f7013cb3edb4d7abe352. Bugbot is set up for automated code reviews on this repo. Configure [here](https://www.cursor.com/dashboard/bugbot).

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 660295a.
    1. coderabbitai[bot](GitHub profile, opens in a new tab)commented

      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: 145679c0-a3da-4a7b-a9de-8d4fd85229c4

      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.
    2. github-actions[bot](GitHub profile, opens in a new tab) added labelsvouch:unvouched

    3. 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](https://docs.macroscope.com/approvability#example-custom-eligibility-rules).
    4. juliusmarminge merged this07e668d

    5. juliusmarminge closed this

Sign in to join this conversation.