fix(463): bound the schedules "Active schedule" selector so it stops overlapping the header
Build ErsatzTV Image / CI image pin matches docker/ci (pull_request) Successful in 5s
Build ErsatzTV Image / API docs in sync (OpenAPI + endpoint index) (pull_request) Successful in 14s
Build ErsatzTV Image / Docs update reminder (pull_request) Successful in 8s
Build ErsatzTV Image / Formatting (changed .cs conform to .editorconfig) (pull_request) Successful in 9s
Build ErsatzTV Image / decisions.md append-only (pull_request) Successful in 13s
Build ErsatzTV Image / Functional E2E (curl contracts) (pull_request) Successful in 15m24s
Build ErsatzTV Image / Build & test (.NET) (pull_request) Successful in 19m38s
Build ErsatzTV Image / EF migration integrity (SQLite + MySql) (pull_request) Successful in 20m56s
Build ErsatzTV Image / Build & push image (amd64) (pull_request) Has been skipped

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) <noreply@anthropic.com>
This commit is contained in:
2026-07-19 11:58:22 +02:00
co-authored by Claude Opus 4.8
parent 996c545161
commit df617a64c7
2 changed files with 15 additions and 0 deletions
+10
View File
@@ -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);
+5
View File
@@ -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}` }))}