feat(profile): timezone is a select with curated IANA list + browser auto-detect #83

Merged
YousifShkara merged 1 commit from feat/profile-timezone-dropdown into main 2026-06-06 04:18:34 +02:00
Owner

The timezone field on the profile form was a free-text input. Users had to know the exact IANA name (no autocomplete, no validation, easy to typo) and JIT-provisioned rows arrived with a literal "UTC" that the user had no incentive to ever change.

Replaced with a <select> populated from a curated list of ~40 commonly-needed IANA zones (Americas, Europe, Africa/Middle East, Asia, Australia/Pacific). The list is intentionally not exhaustive (IANA has ~600 zones); the goal is a usable picker covering everywhere mokosh customers actually serve. If a user's saved timezone happens to be outside the curated set, the form prepends it as a "(current)" entry so saving never silently overwrites an exotic-but-valid choice.

Also fixes the "stuck on UTC" surface. When the saved value is the JIT placeholder (empty, "UTC", or "Etc/UTC"), the signal seeds with the browser-detected zone resolved via Intl.DateTimeFormat().resolvedOptions().timeZone (called through js_sys::Reflect so we don't need to pull in a separate Intl crate). The user opens the page on a fresh JIT row and the form is already pre-populated with their actual local zone; one Save click and they're done.

No server change: PUT /api/v1/auth/me still takes a free-form string; we just don't expose that surface as free text any more. The mokosh-server companion fix (fix/jit-fallback-name-not-uuid-fragments) addresses the related "UUID-fragment names on the same row" symptom in the JIT placeholder pipeline.

The timezone field on the profile form was a free-text input. Users had to know the exact IANA name (no autocomplete, no validation, easy to typo) and JIT-provisioned rows arrived with a literal `"UTC"` that the user had no incentive to ever change. Replaced with a `<select>` populated from a curated list of ~40 commonly-needed IANA zones (Americas, Europe, Africa/Middle East, Asia, Australia/Pacific). The list is intentionally not exhaustive (IANA has ~600 zones); the goal is a usable picker covering everywhere mokosh customers actually serve. If a user's saved timezone happens to be outside the curated set, the form prepends it as a "(current)" entry so saving never silently overwrites an exotic-but-valid choice. Also fixes the "stuck on UTC" surface. When the saved value is the JIT placeholder (empty, "UTC", or "Etc/UTC"), the signal seeds with the browser-detected zone resolved via `Intl.DateTimeFormat().resolvedOptions().timeZone` (called through `js_sys::Reflect` so we don't need to pull in a separate Intl crate). The user opens the page on a fresh JIT row and the form is already pre-populated with their actual local zone; one Save click and they're done. No server change: `PUT /api/v1/auth/me` still takes a free-form string; we just don't expose that surface as free text any more. The mokosh-server companion fix (`fix/jit-fallback-name-not-uuid-fragments`) addresses the related "UUID-fragment names on the same row" symptom in the JIT placeholder pipeline.
feat(profile): timezone is a select with curated IANA list + browser auto-detect
All checks were successful
Create release / Create release from merged PR (pull_request) Has been skipped
Check / clippy + fmt + tests (pull_request) Successful in 1m7s
1d90100a36
The timezone field on the profile form was a free-text input. Users had to know the exact IANA name (no autocomplete, no validation, easy to typo) and JIT-provisioned rows arrived with a literal `"UTC"` that the user had no incentive to ever change.

Replaced with a `<select>` populated from a curated list of ~40 commonly-needed IANA zones (Americas, Europe, Africa/Middle East, Asia, Australia/Pacific). The list is intentionally not exhaustive (IANA has ~600 zones); the goal is a usable picker covering everywhere mokosh customers actually serve. If a user's saved timezone happens to be outside the curated set, the form prepends it as a "(current)" entry so saving never silently overwrites an exotic-but-valid choice.

Also fixes the "stuck on UTC" surface. When the saved value is the JIT placeholder (empty, "UTC", or "Etc/UTC"), the signal seeds with the browser-detected zone resolved via `Intl.DateTimeFormat().resolvedOptions().timeZone` (called through `js_sys::Reflect` so we don't need to pull in a separate Intl crate). The user opens the page on a fresh JIT row and the form is already pre-populated with their actual local zone; one Save click and they're done.

No server change: `PUT /api/v1/auth/me` still takes a free-form string; we just don't expose that surface as free text any more. The mokosh-server companion fix (`fix/jit-fallback-name-not-uuid-fragments`) addresses the related "UUID-fragment names on the same row" symptom in the JIT placeholder pipeline.
YousifShkara deleted branch feat/profile-timezone-dropdown 2026-06-06 04:18:34 +02:00
Sign in to join this conversation.
No reviewers
No labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
psa-systems/mokosh-apps!83
No description provided.