From df617a64c70c715c4b2b32ea015b55f2d2123e22 Mon Sep 17 00:00:00 2001 From: Timothy Date: Sun, 19 Jul 2026 11:58:22 +0200 Subject: [PATCH] fix(463): bound the schedules "Active schedule" selector so it stops overlapping the header MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The header selector rendered at the Select default `fullWidth=true`, which applies `.ctv-field-full { width: 100% }`. In the flex `.ctv-schedule-header` that made it demand the whole row, overlapping/distorting the title block and Add/Edit/Delete buttons. Pass `fullWidth={false}` (sizes to content) + bound it to 150–260px so a long schedule name can't re-widen it; the native select's value truncates within the frame (`.ctv-select { min-width: 0 }`). Pure-SPA/CSS, no API/DB change. Regression test asserts the selector wrapper is not `.ctv-field-full`. Co-Authored-By: Claude Opus 4.8 (1M context) --- web/src/screens/SchedulesScreen.test.tsx | 10 ++++++++++ web/src/screens/SchedulesScreen.tsx | 5 +++++ 2 files changed, 15 insertions(+) diff --git a/web/src/screens/SchedulesScreen.test.tsx b/web/src/screens/SchedulesScreen.test.tsx index 4734fde23..72ddbfe75 100644 --- a/web/src/screens/SchedulesScreen.test.tsx +++ b/web/src/screens/SchedulesScreen.test.tsx @@ -170,6 +170,16 @@ describe('SchedulesScreen — load', () => { expect(screen.getByLabelText('Schedule lineup')).toBeTruthy(); }); + it('renders the "Active schedule" selector non-full-width so it cannot overflow the header (#463)', async () => { + await renderReady(); + const select = screen.getByLabelText('Active schedule'); + const field = select.closest('.ctv-field'); + expect(field).not.toBeNull(); + // fullWidth={false} => the wrapper must NOT carry .ctv-field-full (width:100%), which was what + // stretched the selector across the flex header and overlapped the title + action buttons. + expect(field?.classList.contains('ctv-field-full')).toBe(false); + }); + it('fetches filler presets per kind (5 kinds)', async () => { const handle = await renderReady(); const kinds = handle.requests.filter((r) => r.url.startsWith('/api/v1/filler-presets')).map((r) => r.url); diff --git a/web/src/screens/SchedulesScreen.tsx b/web/src/screens/SchedulesScreen.tsx index bf344ea2d..a00b7b820 100644 --- a/web/src/screens/SchedulesScreen.tsx +++ b/web/src/screens/SchedulesScreen.tsx @@ -481,6 +481,11 @@ export function SchedulesScreen() { label="Active schedule" size="sm" disabled={saving} + // fullWidth (the Select default) applies width:100%, which in this flex header made the + // selector demand the whole row and overlap the title block + action buttons (#463). Size it + // to content, bounded so a long schedule name can't re-widen it past the header. + fullWidth={false} + style={{ maxWidth: 260, minWidth: 150 }} value={`${activeSchedule.id}`} onChange={(e) => guardedSwitch(Number(e.target.value))} options={schedules.map((s) => ({ value: `${s.id}`, label: s.name ?? `Schedule ${s.id}` }))} -- 2.47.3