Skip to content

fix(web): respect 24-hour time entry in custom snooze - #22433

Open
Wiktor102 wants to merge 1 commit into
pingdotgg:mainfrom
Wiktor102:fix/custom-snooze-24-hour-setting
Open

Wiktor102 wants to merge 1 commit into
pingdotgg:mainfrom
Wiktor102:fix/custom-snooze-24-hour-setting

Conversation

@Wiktor102

Copy link
Copy Markdown
Contributor

Custom snooze ignored Settings → Time format → 24-hour and could still display an AM/PM field. Explicit 24-hour mode now uses an HH:MM text field with 00:00–23:59 validation, so the visible format follows the setting instead of the native picker's locale behavior. Other time-format settings keep the existing native picker. Snooze date resolution, future-time validation, and duration behavior are unchanged.

Fixes #19930. This is a small correction to an existing explicit setting, under the focused obvious-bug exception in CONTRIBUTING.md.

I think #12440 is the better solution because it provides a custom UI. I do not know why it was closed. This PR is a narrower fix for respecting the explicit 24-hour setting.

Verified on Linux with Chromium 148.0.7778.96 in the repository's browser-test harness:

  • cd apps/web && vp test run --project browser src/components/CustomSnoozeDialog.browser.test.tsx: 5 passed. Covers visible 17:30 entry, 23:59, midnight on a future date, invalid/empty/past times, and native entry for 12-hour and system-default settings.
  • vp test run packages/client-runtime/src/state/customSnooze.test.ts apps/web/src/components/Sidebar.snooze.test.ts: 28 passed, including local-time/DST validation and duration semantics.
  • Targeted vp lint and vp fmt --check for both changed files passed.
  • vp run --filter @t3tools/web typecheck passed, with existing Effect suggestions elsewhere.

Both screenshots show the actual dialog with the 24-hour setting and the same 17:30 input. Before uses the main-branch component; after uses this fix. The native field's underlying value was already 17:30, but it visibly displayed 05:30 PM. The text field visibly displays 17:30.

Before After
Before: native time field displays 05:30 PM despite the explicit 24-hour setting After: time field visibly displays 17:30

Integrated app/Electron verification was not completed. T3's Browser panel could not launch because the running T3 host is root with Chrome's sandbox enabled. The screenshots and interaction tests above use the existing Chromium component-test harness; Electron itself was not launched. Web and desktop share this dialog. Mobile uses separate native pickers and is outside this web/desktop fix.

Note

This PR was implemented by gpt-6.1-sol (high reasoning effort) in Codex.

@github-actions github-actions Bot added vouch:unvouched PR author is not yet trusted in the VOUCHED list. size:XS 0-9 changed lines (additions + deletions). labels Oct 20, 2026
@macroscopeapp

macroscopeapp Bot commented Oct 20, 2026

Copy link
Copy Markdown
Contributor

Approvability

Verdict: Approved at 00d46c6

Macroscope's review found this PR approvable — This is a small, self-contained UI bug fix that makes the existing 24-hour setting use an HH:MM field while preserving the native picker for other formats. Snooze resolution and defaults are unchanged, and focused browser tests cover the new behavior.

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

@Wiktor102
Wiktor102 force-pushed the fix/custom-snooze-24-hour-setting branch from 00d46c6 to b409d2c Compare October 20, 2026 18:08
@coderabbitai

coderabbitai Bot commented Oct 20, 2026 •

Copy link
Copy Markdown
Contributor

Review in Change Stack →

Important

Review skipped

Review was skipped as selected files did not have any reviewable changes.

⚙️ Run configuration
  • Configuration used: Path: .coderabbit.config.ts
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: 03c3f62b-e0b5-4622-8a8c-a9760c2bf035
📥 Commits

Reviewing files that changed from the base of the PR and between 00d46c6 and b409d2c.

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

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration
  • Configuration used: Path: .coderabbit.config.ts
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: 4be862d4-76b9-4ada-86f9-0f782211f2c1
📥 Commits

Reviewing files that changed from the base of the PR and between 2893437 and 00d46c6.

📒 Files selected for processing: 2
  • apps/web/src/components/CustomSnoozeDialog.browser.test.tsx
  • apps/web/src/components/CustomSnoozeDialog.tsx

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

📝 Walkthrough

The custom snooze dialog now reads the configured timestamp format. For 24-hour format, it uses a text field with HH:MM validation. For other formats, it retains the native time input. Browser tests cover input behavior and submitted timestamps.

Changes: Custom snooze time format

Layer / File(s) Summary
Format-aware input and validation
apps/web/src/components/CustomSnoozeDialog.tsx, apps/web/src/components/CustomSnoozeDialog.browser.test.tsx
The dialog uses a text input with HH:MM validation when 24-hour format is configured. Other formats retain the native time input. Browser tests cover valid and invalid times and verify submitted timestamps.

Priority: ⚪ Pending latest changes

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

Change: Bug fix · Severity of issue fixed: Low

Merge Risk: ⚪ Minimal · up to 00d46

The custom snooze change is ready to merge after normal checks; no actionable issue remains.

Pre-merge checks: Passed 4
Check name Status Explanation
Title check Passed The title clearly and concisely describes the main change: respecting the 24-hour time format in custom snooze.
Description check Passed The description explains the problem, fix, scope, linked issue, verification results, screenshots, and known Electron verification limitation. It provides the required information even without the tem…
Linked Issues check Passed Issue #19930 requires the custom snooze picker to honor the configured time format. The dialog reads timestampFormat, uses a text field with HH:MM and 00:00–23:59 validation for 24-hour, and r…
Out of Scope Changes check Passed The pull request changes only CustomSnoozeDialog.tsx and its focused browser test. The component change directly implements issue #19930. The tests verify the required behavior and do not introduce …
Full details: Description check

Explanation

The description explains the problem, fix, scope, linked issue, verification results, screenshots, and known Electron verification limitation. It provides the required information even without the template headings.

Full details: Linked Issues check

Explanation

Issue #19930 requires the custom snooze picker to honor the configured time format. The dialog reads timestampFormat, uses a text field with HH:MM and 00:00–23:59 validation for 24-hour, and retains the native time input for 12-hour and locale. The added browser tests cover valid 24-hour values, invalid values, future-date midnight, and native input for the other settings. Existing snooze resolution and future-time validation remain unchanged.

Full details: Out of Scope Changes check

Explanation

The pull request changes only CustomSnoozeDialog.tsx and its focused browser test. The component change directly implements issue #19930. The tests verify the required behavior and do not introduce unrelated product changes.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create a new PR
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

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

NikitaMGrimm pushed a commit to NikitaMGrimm/t3code that referenced this pull request Oct 20, 2026
Use client clock preferences for custom snooze and scheduled time entry, automation summaries, connection and device details, PR timestamps, request details, and usage resets. Keep canonical HH:MM scheduling values and preserve timestamp precision.

Builds on the clock-preference fixes proposed in upstream pingdotgg#12867 and pingdotgg#22433. Add focused formatter and time-entry coverage to personal nightly checks.

This branch has not been deployed

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

Labels

size:XS 0-9 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]: Custom snooze time picker ignores the Time format setting

1 participant