From 12ad61d98ec23005b7f58e4063569d64914a4c26 Mon Sep 17 00:00:00 2001 From: UltimaPhoenix <2079222+UltimaPhoenix@users.noreply.github.com> Date: Sun, 8 Nov 2026 20:04:14 +0100 Subject: [PATCH] fix(dashboard): /courses and /settings read in a narrow window MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Below sm (640 px) the courses table cut every title ("From a cache miss to a…") and laid the status badge over the date, and the settings form's paired fields (lessons per day + gap, interactions + scope) cut their selects ("Per chat sessi…"). - /courses below sm is a list: each course is a block with the full title (no clamp) and its lesson, then progress · status · updated on one line. From sm up it is the table, unchanged. - /settings below sm stacks the paired fields one per row. From sm up, two per row as before. Classes only, in views.ts. The nav is untouched: how Settings and the theme toggle fit a narrow window is a separate decision. tests/web.test.ts: the courses list carries its narrow layout (hidden header, wrapping rows, unclamped title); settings has no fixed two-column row left. --- src/web/views.ts | 28 +++++++++++++++------------- tests/web.test.ts | 24 ++++++++++++++++++++++++ 2 files changed, 39 insertions(+), 13 deletions(-) diff --git a/src/web/views.ts b/src/web/views.ts index 545a9c2..6150e0b 100644 --- a/src/web/views.ts +++ b/src/web/views.ts @@ -1240,27 +1240,29 @@ export function coursesPage(d: CoursesData): Html { ${ d.courses.length ? html`
| Course | Progress | Status | Updated | |||
|---|---|---|---|---|---|---|
| - ${c.title} - ${c.lesson_id ? html`from ${c.lesson_title ?? c.lesson_id}` : ""} + return html` | ||||||
| + ${c.title} + ${c.lesson_id ? html`from ${c.lesson_title ?? c.lesson_id}` : ""} | -+ |
${done}/${c.steps.length} |
- ${statusBadge(c.status)} | -${c.updated_at.slice(0, 10)} | +${statusBadge(c.status)} | +${c.updated_at.slice(0, 10)} |