Files
ita-ito-horaires/app/admin/exceptions
vliaudatandClaude Opus 5 743a3778cc fix: start the quick controls from the selected day's own hours
"Opens later at" and "closes earlier at" were prefilled with 14:00 and
16:00 — arbitrary values, wrong on most days, which left the preview
showing hours nobody had asked for until both fields were corrected.
They now start from the day's real opening and closing, so any
adjustment is relative to what that day actually is.

A day with a lunch break is bounded by its first opening and its last
closing, which is what these two actions act on.

Changing the date changes the hours the times are relative to, so a
value typed for Tuesday must not survive into Thursday. The fields live
in a component keyed on the date and React resets them by remounting —
the React compiler rightly refuses an effect that writes state back, and
it is the clearer arrangement anyway.

The end-to-end test picks a trading day rather than assuming today is
one. The first version guarded the assertions behind a visibility check,
which would have passed in silence on exactly the days the controls
matter least.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_012cSY9pVhZmJUKNN7wf1Myd
2026-09-22 23:24:28 +02:00
..