feat(desktop): searchable timezone dropdown in settings - #38607
Conversation
Replaces the free-text timezone field with a searchable dropdown of all IANA timezones, each showing its UTC offset, plus a "System default" option. This stops users entering values the backend can't parse.
|
Hold off on any merges at this point. My Hermes agent running on my dev environment is still reporting my own timezone instead of the one I've set so I'm just debugging to ensure it's not related to this change. |
|
This may be intended behavior but it seems inconsistent from a users perspective. Setting the timezone in the Desktop App, described as "Used when Hermes needs local time context". Ask: What time is it? Ask: Print out the current date/time with Python Looking through it seems the agent and its tools behave differently with timezones.
I believe this PR hasn't introduces any issues, just existing logic not taking advantage of it. |
teknium1
left a comment
There was a problem hiding this comment.
Thanks for the focused desktop UX improvement. The current main still uses a free-text input for timezone at apps/desktop/src/app/settings/config-settings.tsx:212-217, while the documented value is an IANA identifier (website/docs/user-guide/configuration.md:1802-1808), so the feature remains useful.
Problems
apps/desktop/src/components/timezone-combobox.tsx:43returns[]whenIntl.supportedValuesOfis unavailable. This does not provide the stated text-entry fallback; it leaves only “System default” selectable.- User-visible strings at
apps/desktop/src/components/timezone-combobox.tsx:111,141,143,147,158are hard-coded English. Locale-specific field descriptions override the changed fallback description, so Japanese and Chinese still say the blank value uses the system timezone (apps/desktop/src/i18n/ja.ts:525-526,apps/desktop/src/i18n/zh.ts:606,apps/desktop/src/i18n/zh-hant.ts:515).
Suggested changes
- Preserve a usable validated-entry or bundled-list fallback when
Intl.supportedValuesOfis absent, with a regression test. - Add the new strings and revised description to all desktop locales, plus tests for selection, System default, filtering, and fallback behavior.
- Main already has a shared Popover from
344415892f5d1de80fe4141e4ba3dfb76d167124; retain that implementation while salvaging the timezone UI.
Automated hermes-sweeper review.
| } | ||
| } | ||
|
|
||
| return [] |
There was a problem hiding this comment.
This does not provide the comment's promised plain-text fallback: with no Intl.supportedValuesOf, the option list is empty and the user can only choose System default. Please retain a validated text-entry path or supply a fallback canonical zone list, and cover this branch with a test.
| </PopoverTrigger> | ||
| <PopoverContent align="end" className="w-[min(22rem,90vw)] p-0"> | ||
| <Command shouldFilter={false}> | ||
| <CommandInput onValueChange={setSearch} placeholder="Search timezones..." value={search} /> |
There was a problem hiding this comment.
Please source this and the other new visible strings (System default, empty state, truncation hint) from the desktop i18n catalog. The desktop has Japanese and Chinese catalogs, whose existing timezone descriptions also need the System-default wording update.
|
Closing in favor of #68969 (merged via #73505), which landed the same feature with backend-served IANA options, full i18n, and the shared Popover/cmdk stack — resolving the three issues flagged in the earlier review here (Intl.supportedValuesOf fallback, hard-coded English strings, custom Popover primitive). Thanks for being first to tackle this, and for the timezone-behavior table in the comments — the terminal/code-execution timezone inconsistency you documented is a real, separate gap worth its own issue. |
What does this PR do?
Replaces the free-text timezone field with a searchable dropdown of all IANA timezones, each showing its UTC offset, plus a "System default" option. This prevents human errors and stops users entering values the backend can't parse.
Demo
Type of Change
Changes Made
TimezoneComboboxcomponent (apps/desktop/src/components/timezone-combobox.tsx). It lists every IANA zone fromIntl.supportedValuesOf('timeZone'), shows each one's current UTC offset, and has a "System default" option.apps/desktop/src/app/settings/config-settings.tsx).apps/desktop/src/components/ui/popover.tsx).apps/desktop/src/lib/icons.ts).apps/desktop/src/app/settings/constants.ts).How to Test
cd apps/desktop && npm run dev).Checklist
Code
fix(scope):,feat(scope):, etc.)pytest tests/ -qand all tests passDocumentation & Housekeeping
docs/, docstrings) — N/A, only the in-app field description changedcli-config.yaml.exampleif I added/changed config keys — N/A, thetimezonekey already existsCONTRIBUTING.mdorAGENTS.mdif I changed architecture or workflows — N/AIntlAPI, no platform-specific codeScreenshots / Logs