Skip to content

fix(web): snooze labels follow the app language - #39494

Merged
juliusmarminge merged 4 commits into
pingdotgg:mainfrom
SoroushRF:fix/snooze-labels-app-language
Nov 22, 2026
Merged

juliusmarminge merged 4 commits into
pingdotgg:mainfrom
SoroushRF:fix/snooze-labels-app-language

Conversation

@SoroushRF

Copy link
Copy Markdown
Contributor

Problem

When you explicitly choose German in T3 on an English browser, snooze preset times and weekdays can still use English formatting. The custom snooze date button can also show an English date inside German controls.

  1. Run vp i and vp run dev on Linux. Open the web URL in Chromium with English (United States) preferred.
  2. Add a local project. Start a thread with Replay (dev) → showcase, send any text, and wait for the turn to finish.
  3. In Settings → General → Display, set Time format to 24-hour and Language to Deutsch.
  4. In Settings → Threads → Optionen zum Zurückstellen, click Option hinzufügen and set the new duration to 2 Tage. Compare its preview with the idle thread’s clock menu (Thread zurückstellen). Both show an English weekday on base and a German weekday with the fix.
  5. In the menu, choose Benutzerdefiniert… and compare the date button.

Change

An explicitly selected app language formats snooze preset times, weekdays, and the custom date button. resolveSnoozePreset receives the locale for the weekday, and the web time formatter uses it for the time text. The Time format setting still determines the 12- or 24-hour clock.

System default and unrecognized saved values use the existing browser date and weekday formats and host time format. Explicit English keeps those formats on English browsers, including their regional conventions.

Scope

This small display bug has direct reproduction steps and needs no issue. This change covers preset previews, menu labels, and the date button in the web custom dialog. The calendar popover, browser-rendered time inputs, and wake times retain their current behavior. The settings weekday selector follows the translation catalog. Mobile preset labels keep their current device-language formatting; this PR does not change mobile.

Verification

  • With TZ=UTC on an en-US host, vp test run packages/client-runtime/src/state/threadSnoozed.test.ts apps/web/src/timestampFormat.test.ts apps/web/src/i18n/runtime.test.ts gives 4 failures and 44 passes on 78ef2dd9. The same suites plus SnoozePresetsSettings.logic.test.ts and useThreadActionMenu.test.ts pass 59 tests on d8d8aa88.
  • The pinned-Thursday Chromium scenario fails on 031dd1a8 and passes on d8d8aa88. It checks the settings preview, the sidebar clock menu, and the custom date button.
  • The web input probe changes only the five explicit language override cases out of 21. vp run check:changed passed, including seven package typechecks, 52 unit tests, and one React Compiler test.

Configure the web scenario engine with locale: "en-US" and timezoneId: "UTC" before running the attached scenario. Scenario source

Surface Before After
Snooze options German preview with Mon 09:00 German preview with the German weekday
Sidebar clock menu Nächste Woche with Mon 09:00 Nächste Woche with the German weekday
Custom snooze date English date in the German dialog German date in the German dialog

Not checked:

  • Packaged Electron UI. The formatter probe covers simulated Electron OS locales.

Found by Gemini 4 Neon in Antigravity. Implementation and evidence: GPT-6.2 Sol in Codex, directed by @SoroushRF. Independent review: GPT-6.2 Sol in Codex and Claude Opus 5.5 in Claude Code.

🤖 Generated with Claude Code

SoroushRF and others added 2 commits November 19, 2026 21:17
Co-authored-by: GPT-6.2 Sol <noreply@openai.com>
Use explicit app languages for preset weekdays, times, and custom dates.
Preserve existing host formatting under System default.

Co-authored-by: GPT-6.2 Sol <noreply@openai.com>
@github-actions github-actions Bot added vouch:unvouched Author is not yet trusted in the VOUCHED list. size:L 100-499 changed lines (additions + deletions). labels Nov 20, 2026
@coderabbitai

coderabbitai Bot commented Nov 20, 2026 •

Copy link
Copy Markdown
Contributor

Explain Change →

No actionable comments were generated in the recent review.

Walkthrough

The web i18n runtime now tracks a formatting locale separately from the translation catalog locale. Snooze timestamp formatting and preset weekday labels receive that formatting locale. Tests cover locale selection and locale-aware formatting.

Changes: Locale-aware snooze formatting

Layer / File(s) Summary
Resolve and expose the formatting locale
apps/web/src/i18n/locales.ts, apps/web/src/i18n/runtime.ts, apps/web/src/i18n/I18nProvider.tsx, apps/web/src/i18n/locales.test.ts
Locale selection now returns a catalog locale and a formatting locale. The runtime stores both values and exposes the formatting locale through a getter and hook. Tests cover selected language and browser locale combinations.
Format snooze timestamps by locale
apps/web/src/timestampFormat.ts, apps/web/src/timestampFormat.test.ts, apps/web/src/components/CustomSnoozeDialog.tsx, apps/web/src/components/Sidebar.snooze.ts
The timestamp formatter accepts an optional locale. The custom snooze dialog and sidebar pass the formatting locale to timestamp formatting. A test checks Chinese locale output and explicit 24-hour output.
Pass locale through snooze preset formatting
packages/client-runtime/src/state/threadSettled.ts, packages/client-runtime/src/state/threadSnoozed.test.ts, apps/web/src/components/settings/SnoozePresetsSettings.tsx
Snooze preset resolution and selection accept an optional locale and use it for weekday labels. The settings list passes the formatting locale to preset and timestamp formatting. A test checks a German weekday label.

Estimated code review effort: 3 (Moderate) | ~20 minutes

Change: Bug fix

Suggested labels: bugfix

Suggested reviewers: maria-rcks, juliusmarminge, t3dotgg

Merge Risk: Minimal · up to 479ec

Snooze labels now follow the selected app language, while system default keeps host formatting. No merge-blocking issues were found in the reviewed changes.

Pre-merge checks: Passed 4

Check name Status Explanation
Title check Passed The title "fix(web): snooze labels follow the app language" matches the main change: snooze preset times, weekdays, and the custom date button now use the explicitly selected app language instead of b…
Description check Passed The description follows the repository template. It has Problem, Change, Scope, and Verification sections, plus reproduction steps, a scope statement that explains why no issue is needed, and before/a…
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.
Full details: Title check

Explanation

The title "fix(web): snooze labels follow the app language" matches the main change: snooze preset times, weekdays, and the custom date button now use the explicitly selected app language instead of browser or host formatting. It uses a conventional commit prefix and is specific enough for a teammate to understand the primary change.

Full details: Description check

Explanation

The description follows the repository template. It has Problem, Change, Scope, and Verification sections, plus reproduction steps, a scope statement that explains why no issue is needed, and before/after screenshots for the UI change. Verification lists focused test suites and a Chromium scenario with observed results, and it states what was not checked (packaged Electron UI). The Problem section does not link an issue, but the Scope section explains why none is needed, which the template allows. The Verification section also includes an unrendered-looking screenshot table and an external scenario link, which are acceptable evidence.

Finishing Touches

Generate unit tests (beta)

  • 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 d8d8aa8 and 479eccb.

Files selected for processing: 3

  • apps/web/src/i18n/locales.test.ts
  • apps/web/src/i18n/locales.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; 7 remain after this review.

@juliusmarminge juliusmarminge added the takeover:in-progress A takeover lead is working on this PR label Nov 20, 2026
juliusmarminge and others added 2 commits November 20, 2026 03:04
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Replace the mocked runtime test with a table test of resolveWebLocaleSelection, and drop a snooze test that only restated main's default.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@juliusmarminge juliusmarminge added takeover:needs-julius Takeover done; route gate says Julius decides takeover:in-progress A takeover lead is working on this PR and removed takeover:in-progress A takeover lead is working on this PR takeover:needs-julius Takeover done; route gate says Julius decides labels Nov 20, 2026
@juliusmarminge

Copy link
Copy Markdown
Member

Evidence

The German language defect is proven fixed. The previously rejected padding and menu-width changes remain. passesOnHead covers the language defect only.

Steps on both commits: seed a synthetic project and completed replay thread; set the clock preference and Deutsch in General → Display; add a snooze option and set a duration to 2 Tage; capture settings previews; open the sidebar snooze menu; open Benutzerdefiniert… and capture its date button; cancel, choose Nächste Woche and expand the snoozed shelf.

Every capture uses real Chromium, 1280×800, light theme, UTC, and a browser clock fixed at 2026-11-20 03:33 UTC. Each side has fresh isolated server state. Browser locale and clock setting are identified below.

Capture Before — 8e8ff9b243 After — 479eccb964
en-US, 24-hour: settings previews Before: settings previews After: settings previews
en-US, 24-hour: snooze menu Before: snooze menu After: snooze menu
en-US, 24-hour: custom date Before: custom date After: custom date
en-US, 12-hour: snooze menu Before: 12-hour menu After: 12-hour menu
en-US, System default clock Before: en-US System default After: en-US System default
en-GB, System default clock Before: en-GB System default After: en-GB System default

Base shows English weekdays and dates inside German UI. Head shows Mo, So and 20. Nov. 2026. Explicit 12-hour and en-US System default retain AM/PM; en-GB System default retains a 24-hour cycle in real Chromium. Previews and menus agree in all four runs. Selecting Nächste Woche successfully moves the thread to the snoozed shelf on both commits.

The explicit 24-hour head also changes 04:03 → 4:03, 06:33 → 6:33 and 09:00 → 9:00; its menu narrows from about 226 to 209 px. Those differences remain actual app behavior. The native time input still shows AM/PM on both sides and is outside the accepted scope.

Before interaction recording · After interaction recording. Recordings are trimmed after pairing and slowed to one-third speed.

Scenario source · Browser locale/UTC configuration patch. Use SNOOZE_EVIDENCE_MODE=24-hour, 12-hour or locale, and SNOOZE_EVIDENCE_BROWSER_LOCALE=en-GB for the British default-clock run. Keep T3CODE_DEV_SEED=0 and inherit it into the scenario server.

Full evidence report, including all four recording pairs · Catalog of 36 stills, eight recordings and four paired verdicts.

Not shown:

  • Mobile consumers of resolveSnoozePreset and non-snooze formatShortTimestamp callers (DiffPanel and lifecycle rows) were not exercised; these captures cover the maintainer-scoped web snooze flow.
  • A 03:xx chat timestamp comparison was not captured: replay message timestamps came from the unchanged server clock. This proof does not establish padding consistency with chat.
  • System default as the app language and the Electron host-locale bridge were not exercised; all four runs explicitly selected Deutsch. System default as the clock setting was verified in both en-US and en-GB Chromium.

@juliusmarminge juliusmarminge added takeover:ready Takeover done; auto-lands when gates pass and removed takeover:in-progress A takeover lead is working on this PR labels Nov 22, 2026
@juliusmarminge
juliusmarminge merged commit 67f1752 into pingdotgg:main Nov 22, 2026
97 checks passed
@juliusmarminge juliusmarminge removed the takeover:ready Takeover done; auto-lands when gates pass label Nov 22, 2026
Skyway1111 added a commit to Skyway1111/no-deps-T3 that referenced this pull request Nov 22, 2026
Merged upstream/main by intent without reintroducing removed dependencies:
- Resolved 11 conflicts (9 content, 2 modify/delete) preserving zero-dep i18n (@t3tools/shared/i18n*), icons (~/ui-core/icons), router (~/ui-core/router), binary wire framing, and Office worker architecture
- Ported pingdotgg#40945 fromHistory flag into custom TipTap-free ComposerPromptEditor
- Ported pingdotgg#41008 focused-tab sheet navigation and race-safe state into zero-dep Spreadsheet
- Composed pingdotgg#40932 withSocketHeartbeat with zero-dep binary wire framing in ws.ts (and guarded CloseEvent in encodeWireChunk)
- Integrated pingdotgg#39494 formattingLocale into zero-dep web i18n runtime/provider
- Replaced gt-i18n, gt-react, gt-react-native, lucide-react, and jszip imports in newly added upstream files with in-tree zero-dep equivalents

Verified full web+server build, knip (files/deps/exports), and 492+ targeted tests.
rynfar added a commit to rynfar/t3code that referenced this pull request Nov 23, 2026
Port 11 upstream sidebar and shared status parity improvements into apps/native: show environment machine and label on sidebar rows and worktree path in hover card (`pingdotgg#40736`), fold Add project into the project filter popover (`pingdotgg#33057`), start sidebar New threads in the scoped project (`pingdotgg#35185`), include unsent drafts in Cmd+1..9 jumps and Cmd+[/] traversal (`pingdotgg#39968`), prefer repository root checkouts as group defaults (`pingdotgg#37191`), add right-click context menu without rename on sidebar search rows (`pingdotgg#31545`), keep script-only drafts with running terminals listed (`pingdotgg#25272`), aggregate status across multiple linked issues on sidebar badges (`pingdotgg#39351`), filter dismissed providers before update pill grouping (`pingdotgg#39636`), localize snooze preset weekdays and times (`pingdotgg#39494`), and omit departing threads from collapsed shelves during settle/snooze navigation (`pingdotgg#26661`).

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

Labels

size:L 100-499 changed lines (additions + deletions). vouch:unvouched Author is not yet trusted in the VOUCHED list.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants