Skip to content

fix(clients): a one-hour snooze no longer reads "2h left" - #36785

Merged
juliusmarminge merged 4 commits into
mainfrom
factory/pr-29787-a1794667227
Nov 14, 2026
Merged

juliusmarminge merged 4 commits into
mainfrom
factory/pr-29787-a1794667227

Conversation

@juliusmarminge

@juliusmarminge juliusmarminge commented Nov 14, 2026 •

Copy link
Copy Markdown
Member

No items needed a change. All 36 checks on PR #36785 pass at 158dab8. Macroscope approved it with no comments on lines. CodeRabbit's review says 'No actionable comments were generated' and rates the merge risk Minimal. The fix itself is unchanged: snoozeWakeLabel counts whole clock minutes (floor(wake/min) - floor(now/min), at least 1) before choosing minutes, hours or days. Retained seconds therefore no longer push a one-hour snooze up to '2h' when now is cut to the minute.

Supersedes #29787. The change is @saphid's; their commits are kept.

Reproduction on main

Reproduced on main at cebdf39:

  1. Started the dev server on main with a fresh database and opened the web client. 2. Started a Replay 'showcase' turn in the default project, then pressed Stop so the thread was idle. 3. With that thread open, opened the header's Thread actions menu and picked Snooze → 'In 1 hour (3:47 PM)'. I clicked at 14:47:30 UTC, half a minute into the minute; the stored snoozedUntil was 2026-11-14T15:47:30.080Z, seconds kept. 4. Right away, before the minute changed, the header line under the conversation read 'Snoozed, 2h left · Wake now', while the same thread's row in the sidebar's Snoozed shelf read '60m'. 5. After the clock passed 14:48:00 UTC, the header read 'Snoozed, 60m left' and the shelf still read '60m'. A one-hour snooze was labelled 2h for its first ~30 seconds, and the header and shelf disagreed. Cause: the header passes a minute-floored now (14:47:00) to snoozeWakeLabel, giving 60.5 minutes remaining, which ceils to 2h; the shelf passes live time and gets just under 60m.

Evidence

Web, Chromium, 1280×800, light theme; fresh synthetic database per revision. Create a Replay showcase thread, let it finish, open Thread actions → Snooze → In 1 hour about 20 seconds into a minute. Capture immediately and after the next minute boundary.

Proven: scenarios:prove exited 0, failing on base and passing on head.

Capture Before After
Commit c666345bb9 158dab83de
Immediately after snooze Before: header 2h, shelf 60m After: header and shelf 1h
Next minute boundary Before: both 60m After: both 59m
Recording Before interaction After interaction

Scenario source

Base failed the expected next-minute '59m left' assertion; head passed and also satisfied the initial '1h left' assertion.

Not shown:

  • Mobile list and native desktop shell were not exercised; this proof covers the web header and snoozed shelf.
  • Replay completed naturally instead of pressing Stop; both revisions snoozed an idle thread.

Tests

No new local runs this round; the code is unchanged. CI on 158dab8: all 36 checks passed. Earlier, on this head: vp test run packages/client-runtime/src/state/threadSnoozed.test.ts passed (36 tests), vp run check:changed passed, and the new test fails against main's code.

Not in this change

  • CodeRabbit's description check notes the empty before/after 'Evidence' section in the PR description; that is for the pipeline's proof step, not a code change.

Who did the work

  • Written by Claude Opus 5.5, in Claude Code
  • Reviewed by GPT-6.1 Sol, in Codex, and by Claude Opus 5.5, each on its own
  • Proof captured by GPT-6.1 Sol and checked by Claude Opus 5.5

Run by the t3code factory in T3 Code.

saphid and others added 4 commits November 3, 2026 11:54
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Pick up the unrelated Astro check expectation fix while preserving the existing snooze label contribution unchanged.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@github-actions github-actions Bot added vouch:trusted Author is trusted by repo permissions or the VOUCHED list. size:S 10-29 changed lines (additions + deletions). labels Nov 14, 2026
@macroscopeapp

macroscopeapp Bot commented Nov 14, 2026

Copy link
Copy Markdown
Contributor

Approvability

Verdict: Approved at 158dab8

Macroscope's review found this PR approvable — Snooze countdown labels now use clock-minute rounding so a one-hour snooze does not appear as two hours. The change affects display text only, not snooze timing or wake behavior.

You can add or adjust custom eligibility rules. Learn more.

@coderabbitai

coderabbitai Bot commented Nov 14, 2026 •

Copy link
Copy Markdown
Contributor

Explain Change →

No actionable comments were generated in the recent review.

Walkthrough

Snooze wake labels now use floored minute differences, with minute, hour, and day rounding bands and "now" for expired wake times. Tests cover countdown labels at several intervals.

Changes: Snooze wake labels

Layer / File(s) Summary
Countdown calculation and tests
packages/client-runtime/src/state/threadSettled.ts, packages/client-runtime/src/state/threadSnoozed.test.ts
snoozeWakeLabel displays minutes below 60, ceiling-rounded hours below 24 hours, and ceiling-rounded days thereafter. Expired wake times display "now". Tests cover these labels at several intervals.

Estimated code review effort: 2 (Simple) | ~10 minutes

Change: Bug fix

Suggested reviewers: t3dotgg, maria-rcks

Merge Risk: Minimal · up to 158da

This fixes a one-hour snooze briefly showing as "2h" when the two clients compute the label from slightly different clocks. The change is small and covered by tests, so merge risk is minimal.

Pre-merge checks: Passed 4

Check name Status Explanation
Title check Passed The title names the bug fixed (a one-hour snooze showing "2h left") and matches the main change in threadSettled.ts, which counts whole clock minutes before choosing minutes, hours, or days. It is spe…
Linked Issues check Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check Passed Check skipped because no linked issues were found for this pull request.
Description check Passed The description is thorough and covers the problem (a one-hour snooze briefly labelled '2h' because the header floors now to the minute), the change (count whole clock minutes before choosing minutes,…
Full details: Title check

Explanation

The title names the bug fixed (a one-hour snooze showing "2h left") and matches the main change in threadSettled.ts, which counts whole clock minutes before choosing minutes, hours, or days. It is specific and the scope is clear.

Full details: Description check

Explanation

The description is thorough and covers the problem (a one-hour snooze briefly labelled '2h' because the header floors now to the minute), the change (count whole clock minutes before choosing minutes, hours, or days), scope (links superseded #29787 and reproduction on main), and verification (reproduction steps, web evidence with before/after captures, and test runs). The template's Problem, Change, Scope, and Verification sections are all present. Minor gaps: the 'Scope' section does not explicitly justify the change against the bug-fix-only policy beyond the reproduction, and the template's trailing agent-model line is present. The description is mostly complete, so the check passes.

Finishing Touches

Generate unit tests (beta)

  • Commit to this branch
  • Create a new PR
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts
Recent review info

Run configuration

Commits

Reviewing files that changed from the base of the PR and between 4747472 and 158dab8.

Files selected for processing: 2

  • packages/client-runtime/src/state/threadSettled.ts
  • packages/client-runtime/src/state/threadSnoozed.test.ts

Included review availability: This review used your included allowance. Your plan provides up to 10 included reviews per hour; 5 remain after this review.

@juliusmarminge
juliusmarminge merged commit 0457241 into main Nov 14, 2026
37 checks passed
@juliusmarminge
juliusmarminge deleted the factory/pr-29787-a1794667227 branch November 14, 2026 15:22
Pipyakas pushed a commit to Pipyakas/t3code that referenced this pull request Nov 15, 2026
…36785)

Co-authored-by: Alex Southwell <4596216+saphid@users.noreply.github.com>
Co-authored-by: maria-rcks <maria@kuuro.net>
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
(cherry picked from commit 0457241)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

size:S 10-29 changed lines (additions + deletions). vouch:trusted Author is trusted by repo permissions or the VOUCHED list.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants