Skip to content

feat(desktop): searchable timezone dropdown in settings - #38607

Closed
CyrisXD wants to merge 1 commit into
NousResearch:mainfrom
CyrisXD:feat/timezone-dropdown
Closed

feat(desktop): searchable timezone dropdown in settings#38607
CyrisXD wants to merge 1 commit into
NousResearch:mainfrom
CyrisXD:feat/timezone-dropdown

Conversation

@CyrisXD

@CyrisXD CyrisXD commented Jun 4, 2026

Copy link
Copy Markdown

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

Timezone Dropdown Demo

Type of Change

  • 🐛 Bug fix (non-breaking change that fixes an issue)
  • ✨ New feature (non-breaking change that adds functionality)
  • 🔒 Security fix
  • 📝 Documentation update
  • ✅ Tests (adding or improving test coverage)
  • ♻️ Refactor (no behavior change)
  • 🎯 New skill (bundled or hub)

Changes Made

  • Added a TimezoneCombobox component (apps/desktop/src/components/timezone-combobox.tsx). It lists every IANA zone from Intl.supportedValuesOf('timeZone'), shows each one's current UTC offset, and has a "System default" option.
  • Wired it into the timezone setting, replacing the old text input (apps/desktop/src/app/settings/config-settings.tsx).
  • Added a small reusable Popover primitive matching the existing select/dropdown ones (apps/desktop/src/components/ui/popover.tsx).
  • Added the World icon to the icon set (apps/desktop/src/lib/icons.ts).
  • Updated the field description so it mentions "System default" instead of the old "Blank" wording (apps/desktop/src/app/settings/constants.ts).

How to Test

  1. Launch the desktop app (cd apps/desktop && npm run dev).
  2. Go to Settings -> Chat -> Timezone.
  3. Open the dropdown and type to search (e.g. "auckland"), then pick a zone.
  4. Reopen Settings to confirm it saved.
  5. Pick "System default" to clear it back to the device timezone.

Checklist

Code

  • I've read the Contributing Guide
  • My commit messages follow Conventional Commits (fix(scope):, feat(scope):, etc.)
  • I searched for existing PRs to make sure this isn't a duplicate
  • My PR contains only changes related to this fix/feature (no unrelated commits)
  • I've run pytest tests/ -q and all tests pass
  • I've added tests for my changes (required for bug fixes, strongly encouraged for features)
  • I've tested on my platform: macOS 15

Documentation & Housekeeping

  • I've updated relevant documentation (README, docs/, docstrings) — N/A, only the in-app field description changed
  • I've updated cli-config.yaml.example if I added/changed config keys — N/A, the timezone key already exists
  • I've updated CONTRIBUTING.md or AGENTS.md if I changed architecture or workflows — N/A
  • I've considered cross-platform impact (Windows, macOS) per the compatibility guide — uses the standard web Intl API, no platform-specific code
  • I've updated tool descriptions/schemas if I changed tool behavior — N/A

Screenshots / Logs

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.
@alt-glitch alt-glitch added type/feature New feature or request P3 Low — cosmetic, nice to have comp/tui Terminal UI (ui-tui/ + tui_gateway/) labels Jun 4, 2026
@CyrisXD

CyrisXD commented Jun 4, 2026

Copy link
Copy Markdown
Author

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.

@CyrisXD

CyrisXD commented Jun 4, 2026

Copy link
Copy Markdown
Author

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".
I'd set it to another country/timezone.

Ask: What time is it?
Hermes: Replies with my local time

Ask: Print out the current date/time with Python
Hermes: Executes the python code, but is still local timezone

Looking through it seems the agent and its tools behave differently with timezones.

Source the agent uses for "now" Honors timezone setting in desktop? Why
terminal tool (date) ❌ No Never sets TZ → OS timezone
code_execution (Python) ❌ No Reads HERMES_TIMEZONE env, which the dashboard never sets → OS timezone
System-prompt "Conversation started" date ✅ Yes hermes_time reads config.yaml directly
cron / scheduled jobs ✅ Yes same

I believe this PR hasn't introduces any issues, just existing logic not taking advantage of it.

@alt-glitch alt-glitch added comp/desktop Electron desktop app (apps/desktop/*) and removed comp/tui Terminal UI (ui-tui/ + tui_gateway/) labels Jun 26, 2026

@teknium1 teknium1 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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:43 returns [] when Intl.supportedValuesOf is 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,158 are 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.supportedValuesOf is 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 []

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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} />

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

@teknium1 teknium1 added sweeper:risk-compatibility Sweeper risk: may break existing users, config, migrations, defaults, or upgrades sweeper:blast-moderate Sweeper blast radius: moderate — a subsystem or single platform labels Jul 14, 2026
@teknium1

Copy link
Copy Markdown
Contributor

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.

@teknium1 teknium1 closed this Jul 28, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

comp/desktop Electron desktop app (apps/desktop/*) P3 Low — cosmetic, nice to have sweeper:blast-moderate Sweeper blast radius: moderate — a subsystem or single platform sweeper:risk-compatibility Sweeper risk: may break existing users, config, migrations, defaults, or upgrades type/feature New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants