feat(profile): timezone is a select with curated IANA list + browser auto-detect #83
No reviewers
Labels
No labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
psa-systems/mokosh-apps!83
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "feat/profile-timezone-dropdown"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
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 throughjs_sys::Reflectso 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/mestill 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.