time input: replace hand-rolled fields with react-aria-components TimeField
All checks were successful
Build and Push Docker Image / build (push) Successful in 49s

the previous TimeInput was a bespoke two-field widget. correct in behaviour
but off-policy: we don't roll our own ui primitives when a maintained
library solves it. swap for react-aria-components + @internationalized/date
pinned to hourCycle={24}, granularity=minute, shouldForceLeadingZeros so
the output is always strict HH:MM regardless of browser/OS locale.

wrapper lives at src/shared/components/ui/time-input.tsx and keeps the
existing string-based API (value: "HH:MM", onChange(next)) so callers don't
change.

also updates the stack docs: web-stack.md now pins react-aria-components
as THE required library for every date/time ui; iOS and Android entries
mark their canonical component as TBD and explicitly forbid rolling our
own without user sign-off.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
2026-04-13 15:37:03 +02:00
parent a1122d7666
commit c0bcbaec1b
6 changed files with 346 additions and 56 deletions

View File

@@ -77,6 +77,7 @@ mise exec bun -- bun start # production: Hono serves dist/ + API on :3000
## Forward-looking rules
- [Schema changes need migrations going forward](feedback_schema_migrations.md) — resurrect the try/catch ALTER TABLE pattern in `server/db/index.ts` whenever touching table columns
- [Never use locale-aware time/number widgets](feedback_iso8601_no_locale.md) — use `TimeInput` + `formatThousands`, never `<input type="time">` or `toLocaleString()`
## Workflow rules
- **Always bump version** in `package.json` before committing/pushing. CalVer with dot-suffix per global AGENTS.md (`YYYY.MM.DD.N`). `.gitea/workflows/build.yml` tags a Docker image with this version, so the `+N` form breaks CI with `invalid reference format`.