Skip to content

Answer every press, keep what is being typed, and fit a phone - #14

Merged
antoine-debroye merged 2 commits into
mainfrom
ad/audit-tier4-ui
Oct 9, 2026
Merged

antoine-debroye merged 2 commits into
mainfrom
ad/audit-tier4-ui

Conversation

@antoine-debroye

Copy link
Copy Markdown
Collaborator

Why

Tier 4 of the October audit (doc/audit-2026-10-09.md, section 4): the admin UI gave no answer, or the wrong one, for several actions, and did not fit a phone. Stacked on #13.

What changed

Broken actions (U1, U2, U5)

  • Remove / Delete file from an episode's own page now lands on the show page with the confirmation. The response re-targeted #episode-table, which only the show page has, so htmx threw and the page kept showing an episode that was gone.
  • Check now / Pause / Resume / Stop following on the Subscription page re-read the page and say what happened; they used to post into a 303 the XHR swallowed. Stop following now asks first.
  • The password-changed toast is a real toast (the out-of-band attribute sat on the toast itself, so htmx inserted only its children).

Feedback (U3, U4, U14, U16, U19)

  • Every decision, teach, check, rescan and settings button is disabled with a spinner while its request is out; a second press is dropped, not queued. htmx:sendError (offline, dropped tunnel, blocked by an extension) now shows an error toast; the 401-then-redirect no longer flashes "Something went wrong".
  • Check now and Teach start the pass and answer at once; the work strip follows it. The no-JS path still waits.
  • A background refresh (SSE or load) is held while a field inside the region is focused or dirty, and taken once it is left; a decision no longer renders the panel twice; <details> state survives swaps.
  • The scan strip streamed over SSE now carries the same polling backstop as the clicked one.
  • Error toasts persist until dismissed and are role="alert"; long notices stay longer; hover pause resumes.
  • Settings toggles and inline saves confirm with a toast.

Phone and accessibility (U6, U7, U8, U15, U17, U18)

  • Topbar wraps its actions on narrow screens instead of cutting them off; the access log and "Most fetched" stack into labelled cards.
  • Primary buttons and accent text use --accent-2 (≈5:1); informational muted text uses --ink-soft.
  • Focus is restored after swaps and modal close; 44 px targets on coarse pointers; switches have accessible names; card titles are <h2>; field errors carry aria-invalid/aria-describedby; aria-current on the breadcrumb (and the sidebar's was never rendered correctly: Eta escaped the quotes).

Small fixes (U9, U10, U11, U12): cut pills link to the episode page; /shows/new no longer pre-fills "New show" and keeps what was typed on a refusal; upload success is green; Dashboard highlights in the sidebar.

Approved design change (U20): a filename starting with YYYY-MM-DD sets the episode's publish date (midnight in the instance's zone) on first sight; undated files keep mtime; a date you set on the episode page is never overwritten. README and spec §6.3 updated.

How it was verified

  • npm test: 1336 pass (one load-induced flake in an unrelated scan-error test passed on re-run; the stacked Tier 3 run of the same code passed 1376/1376). 18 new tests (11 UI, 3 subscriptions, 4 scanner).
  • ./test/acceptance/run.sh selfpod:tier4: 63 passed, 0 failed against a built image.
  • Clicked in a real browser at 375 px and desktop: episode-page remove/delete, subscription actions and the stop-following dialog, password change toast, settings toggles and inline save, "Check now" answering in under a second with the strip, a half-typed boundary surviving an SSE refresh, zero duplicate panel fetches after a decision, 44 px targets measured, topbar and access log layouts on a phone.

🤖 Generated with Claude Code

antoine-debroye and others added 2 commits October 9, 2026 18:28
…tier 4, U1–U20)

Items U1–U12 and U14–U20 of doc/audit-2026-10-09.md §4.

Broken or silent actions: Remove/Delete from the episode's own page re-targeted
a table that page does not have, so nothing happened; the four Subscription
status buttons posted into a redirect the XHR swallowed; the password-changed
toast put hx-swap-oob on the toast itself and arrived as bare text. Each now
answers with HX-Redirect and a flash, or a real toast, and Stop following asks
first. Every decision, teach, check, rescan and settings control is held and
shows a ring while its request is out (hx-indicator / hx-disabled-elt /
hx-sync), htmx:sendError is reported, and a 401 with HX-Redirect no longer
flashes an error on its way to sign-in. Check now and the three Teach routes
start the pass and answer at once on the htmx path; the plain form still waits.

Background refreshes: a swap the page asked for itself (sse:, load, script) is
held while a field inside it is focused or dirty and taken once it is not; a
<details> someone toggled keeps its state across swaps; the stream's re-render
of a target with a user request in flight is dropped, which removes the double
render after every decision.

Phone: the topbar actions wrap under the breadcrumb below 640px; the access log
and both statistics tables stack with data-label column names (thead kept for
screen readers); 44px targets on coarse pointers, with the cut bar's tap area
on a wrapper so the track keeps its 14px. Contrast: --accent-2 for button fills
and text-sized accent, --ink-soft for muted text that carries information.

Also: the SSE scan-progress strip is the same partial as the clicked one, with
its polling backstop; keyboard focus is put back after swaps and modal closes;
error toasts persist and are alerts, others scale with length, mouseleave
resumes; Settings switches get accessible names, card titles are h2, refused
fields carry aria-invalid/aria-describedby, the breadcrumb marks the current
page, a refused sign-in focuses the password; new-show no longer pre-fills the
page title and keeps what was typed; upload success is green; the dashboard is
highlighted in the sidebar (and the sidebar's aria-current, rendered through the
escaping tag, is now a real attribute); settings toggles and inline saves say
they saved; the cut pill links to the episode page.

A date at the start of a filename (YYYY-MM-DD, with -, _, . or nothing) is the
episode's publish date at midnight in TZ on first sight, unless the mtime already
falls on that day; undated files keep the mtime; a rescan never touches pub_date.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Check now and Teach now start a pass and answer at once, so the request no
longer holds the pass open. The test harness closed the database under a
pass that was still cutting an episode, and the test process then sat on a
handle it could never release — the suite hung at exit, sometimes.

The pipeline gains idle(), which resolves once nothing is running or
queued, and both harnesses await it before closing anything.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant