GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — fix(clients): a one-hour snooze no longer reads "2h left" by saphid · Pull Request #29787 · pingdotgg/t3code

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

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

Sign up for GitHub

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
saphid wants to merge 3 commits into pingdotgg:main from saphid:fix/snooze-hunt
+19 −6
Closed

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

Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
3 commits
Select commit Hold shift + click to select a range
94804cb
fix(clients): a one-hour snooze no longer reads "2h left"
saphid Nov 3, 2026
1d6c3bc
Merge remote-tracking branch 'github/main' into takeover-29787
maria-rcks Nov 3, 2026
521f63c
chore: refresh snooze label branch from main
github-actions[bot] Nov 12, 2026
File filter
Filter by extension

Clear filters
Conversations
Failed to load comments.
Loading

Uh oh!

There was an error while loading. Please reload this page.

Jump to
Jump to file
Failed to load files.
Loading

Uh oh!

There was an error while loading. Please reload this page.

Diff view
Diff view

There are no files selected for viewing

12 changes: 6 additions & 6 deletions 12 packages/client-runtime/src/state/threadSettled.ts
Show comments
View file
Open in desktop
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,6 @@ interface QueuedThreadShell {
* Bound the pending window so those threads can eventually settle.
*/
export const QUEUED_TURN_START_GRACE_MS = 2 * 60 * 1_000;
const DAY_MS = 24 * 60 * 60 * 1_000;

export function hasQueuedTurnStart(
shell: QueuedThreadShell,
Expand Down Expand Up @@ -352,11 +351,12 @@ export function snoozeWakeLabel(snoozedUntil: string, options: { readonly now: s
const wakeMs = Date.parse(snoozedUntil);
const nowMs = Date.parse(options.now);
if (Number.isNaN(wakeMs) || Number.isNaN(nowMs)) return "now";
const remainingMs = wakeMs - nowMs;
if (remainingMs <= 0) return "now";
if (remainingMs < HOUR_MS) return `${Math.max(1, Math.ceil(remainingMs / 60_000))}m`;
if (remainingMs < DAY_MS) return `${Math.ceil(remainingMs / HOUR_MS)}h`;
return `${Math.ceil(remainingMs / DAY_MS)}d`;
if (wakeMs <= nowMs) return "now";
// Count clock minutes: callers pass a minute-floored or live `now`, and durations keep seconds.
const minutes = Math.max(1, Math.floor(wakeMs / 60_000) - Math.floor(nowMs / 60_000));
if (minutes < 60) return `${minutes}m`;
if (minutes < 24 * 60) return `${Math.ceil(minutes / 60)}h`;
return `${Math.ceil(minutes / (24 * 60))}d`;
}

export type CustomSnoozeInput =
Expand Down
13 changes: 13 additions & 0 deletions 13 packages/client-runtime/src/state/threadSnoozed.test.ts
Show comments
View file
Open in desktop
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ import {
hasQueuedTurnStart,
pickSnoozePreset,
resolveSnoozePresets,
snoozeWakeLabel,
threadRaisedHandWhileSnoozed,
threadWokeAt,
isThreadWokeUnseen,
Expand Down Expand Up @@ -478,6 +479,18 @@ describe("pickSnoozePreset", () => {
});
});

describe("snoozeWakeLabel", () => {
it("reads a one-hour snooze as 1h on minute and live clocks", () => {
const wake = "2026-04-10T13:00:30.000Z";
expect(snoozeWakeLabel(wake, { now: NOW })).toBe("1h");
expect(snoozeWakeLabel(wake, { now: "2026-04-10T12:00:40.000Z" })).toBe("1h");
expect(snoozeWakeLabel("2026-04-10T15:00:30.000Z", { now: NOW })).toBe("3h");
expect(snoozeWakeLabel(wake, { now: "2026-04-10T12:01:00.000Z" })).toBe("59m");
expect(snoozeWakeLabel(wake, { now: "2026-04-10T13:00:10.000Z" })).toBe("1m");
expect(snoozeWakeLabel(wake, { now: "2026-04-10T13:00:30.000Z" })).toBe("now");
});
});

it("dismisses a wake at its timestamp without hiding a later wake", () => {
const firstWake = "2026-04-10T10:00:00.000Z";
const state = {
Expand Down
Loading
Oops, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

Add this suggestion to a batch that can be applied as a single commit. This suggestion is invalid because no changes were made to the code. Suggestions cannot be applied while the pull request is closed. Suggestions cannot be applied while viewing a subset of changes. Only one suggestion per line can be applied in a batch. Add this suggestion to a batch that can be applied as a single commit. Applying suggestions on deleted lines is not supported. You must change the existing code in this line in order to create a valid suggestion. Outdated suggestions cannot be applied. This suggestion has been applied or marked resolved. Suggestions cannot be applied from pending reviews. Suggestions cannot be applied on multi-line comments. Suggestions cannot be applied while the pull request is queued to merge. Suggestion cannot be applied right now. Please check back later.
You are visitor 01402809 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.