From db22e4a1d246dbb0e4a7b91111ea2be38b4642b2 Mon Sep 17 00:00:00 2001 From: Miguel Palhas Date: Wed, 11 Nov 2026 17:16:47 +0000 Subject: [PATCH 1/9] refactor(web): page skeleton as Tailwind utilities Decks, page bars, sections, heads, status slots and group notes move out of components.css into Deck, PageBar, Section, Rows and friends. The theme gains the geometry tokens and the container widths. Refs #280 Co-Authored-By: Claude Opus 5.5 (1M context) --- web/scripts/check-tokens.mjs | 3 +- web/src/buckets.tsx | 43 +++++--- web/src/components.css | 167 ++---------------------------- web/src/detail.tsx | 1 + web/src/style.css | 17 +++ web/src/subs-panel.tsx | 30 +++--- web/src/ui.tsx | 194 ++++++++++++++++++++++++++++++++--- web/src/views/Library.tsx | 57 +++++----- web/src/views/Movie.tsx | 23 +++-- web/src/views/Queues.tsx | 27 ++--- web/src/views/Search.tsx | 49 ++++----- web/src/views/Series.tsx | 17 +-- web/src/views/Settings.tsx | 61 +++++------ web/src/views/TvDeck.tsx | 11 +- 14 files changed, 370 insertions(+), 330 deletions(-) diff --git a/web/scripts/check-tokens.mjs b/web/scripts/check-tokens.mjs index 2c21db2..63e184a 100644 --- a/web/scripts/check-tokens.mjs +++ b/web/scripts/check-tokens.mjs @@ -108,7 +108,8 @@ function checkCss(source, rel) { } } -const ARBITRARY = /(?:^|[\s"'`:])!?-?[a-z][\w-]*-\[([^\]\s]+)\]/g; +// a value, not a variant: `data-[tone=fault]:` selects, it does not style +const ARBITRARY = /(?:^|[\s"'`:])!?-?[a-z][\w-]*-\[([^\]\s]+)\](?!:)/g; function checkPlain(source, rel) { // Comments are prose, not styling — `checkCss` already ignores them, and diff --git a/web/src/buckets.tsx b/web/src/buckets.tsx index efe978c..c22d23b 100644 --- a/web/src/buckets.tsx +++ b/web/src/buckets.tsx @@ -19,7 +19,18 @@ import { ruleLabel, type WaiveOutcome, } from "./releases"; -import { Chip, Control, DeckHead, Disclosure, EmptyRow, Row, SkeletonRows, useNote } from "./ui"; +import { + Chip, + Control, + DeckHead, + Disclosure, + EmptyRow, + Row, + Rows, + Section, + SkeletonRows, + useNote, +} from "./ui"; export type Bucket = "eligible" | "waived" | "rejected"; @@ -138,13 +149,13 @@ function CollapsedBucket({ }) { const [open, setOpen] = useState(false); return ( - ); } @@ -171,17 +182,17 @@ export function Buckets({ state, actions }: { state: DeckState; actions: Release if (state.kind !== "releases") { return (
-
); } @@ -206,10 +217,10 @@ function PaintedBuckets({ const forceable = rejected.filter(overridable).length; return (
-
+
-
    + {eligible.length === 0 ? ( )} -
-
+ +
- + -
+
-
    + {files === null && } {files?.kind === "error" && ( @@ -569,14 +572,14 @@ export function MovieView({ movieId, toReleases }: { movieId: number; toReleases refresh={refreshSubtitles} /> ))} -
-
+ +
-
+
- + -
- +
+ ); } diff --git a/web/src/views/Queues.tsx b/web/src/views/Queues.tsx index 2b15009..89492a8 100644 --- a/web/src/views/Queues.tsx +++ b/web/src/views/Queues.tsx @@ -25,12 +25,15 @@ import { missingChipLabel } from "../subtitles"; import { Chip, Control, + Deck, DeckHead, EmptyRow, GroupNote, + PageBar, Row, + Rows, + Section, SkeletonRows, - StatusSlot, useNote, useStatus, } from "../ui"; @@ -208,11 +211,11 @@ function QueueGroup({ hidden: boolean; }) { return ( - ); } @@ -294,14 +297,12 @@ export function QueuesView({ hidden }: { hidden: boolean }) { ); return ( -
-
-

queues

- - {loaded === null || total === 0 ? "" : `${total} waiting`} - - -
+
+ ); } diff --git a/web/src/views/Search.tsx b/web/src/views/Search.tsx index 8639f7e..b4c847b 100644 --- a/web/src/views/Search.tsx +++ b/web/src/views/Search.tsx @@ -18,7 +18,19 @@ import { type TmdbMovie, type TmdbSeries, } from "../search"; -import { Chip, Control, DeckHead, flag, LampToggle, Row, StatusSlot, useStatus } from "../ui"; +import { + Chip, + Control, + Deck, + DeckHead, + flag, + LampToggle, + PageBar, + Row, + Rows, + Section, + useStatus, +} from "../ui"; /** Which kind the deck is showing. `all` is both, and the default. */ type KindFilter = "all" | "movie" | "series"; @@ -395,17 +407,8 @@ export function SearchView({ all.filter((hit) => filter === "all" || hit.kind === filter).length; return ( -
-
-

search

- -
+
+ + ); } diff --git a/web/src/views/Series.tsx b/web/src/views/Series.tsx index d415dd3..16b7e13 100644 --- a/web/src/views/Series.tsx +++ b/web/src/views/Series.tsx @@ -52,11 +52,14 @@ import { ArmedDeleteWord, Chip, Control, + Deck, DeckHead, EmptyRow, IconControl, LampToggle, Row, + Rows, + Section, SkeletonRows, StatusSlot, useNote, @@ -695,7 +698,7 @@ export function SeriesView({ seriesId, covered }: { seriesId: number; covered: b const rootListed = series !== null && tvRoots.some((root) => root.id === series.root_id); return ( -
+
+ + + ); } diff --git a/web/src/views/Settings.tsx b/web/src/views/Settings.tsx index 6f253be..7dff475 100644 --- a/web/src/views/Settings.tsx +++ b/web/src/views/Settings.tsx @@ -34,13 +34,16 @@ import { Chip, Control, cx, + Deck, DeckHead, GroupNote, IconControl, type Note, NoteLine, + PageBar, Row, - StatusSlot, + Rows, + Section, useNote, useStatus, } from "../ui"; @@ -1116,33 +1119,31 @@ export function SettingsView({ hidden }: { hidden: boolean }) { const reload = () => void load(); return ( -
-
-

settings

- - {loaded === null - ? "" - : `${loaded.roots.length} roots · ${loaded.policies.length} policies`} - - -
+
+ + ); } diff --git a/web/src/views/TvDeck.tsx b/web/src/views/TvDeck.tsx index 1c56c79..46f082d 100644 --- a/web/src/views/TvDeck.tsx +++ b/web/src/views/TvDeck.tsx @@ -16,7 +16,7 @@ import { type SeasonPackState, } from "../releases"; import { waiveAndGrabTv } from "../series"; -import { IconControl, type Status, StatusSlot } from "../ui"; +import { Deck, IconControl, type Status, StatusSlot } from "../ui"; /** §6.2: the sweep runs on the daemon's cadence. Poll modestly, give up softly. */ const TV_SWEEP_POLL_MS = 5000; @@ -358,8 +358,9 @@ export function TvDeckView({ request }: { request: TvDeckRequest }) { } return ( -
-
+ + {/* a detail page without a hero still gives its head room under the rail */} +

{request.title}

@@ -376,7 +377,7 @@ export function TvDeckView({ request }: { request: TvDeckRequest }) { search indexers
- + -
+ ); } -- 2.47.3 From 288d4b26adb21fae0216f138ba09a89f182e23d9 Mon Sep 17 00:00:00 2001 From: Miguel Palhas Date: Wed, 11 Nov 2026 17:25:18 +0000 Subject: [PATCH 2/9] refactor(web): rail and tab bar as Tailwind utilities Phone search mode keys on a named group, and hover is redefined to apply on every pointer, as the board's own :hover rules always did. Refs #280 Co-Authored-By: Claude Opus 5.5 (1M context) --- web/src/App.tsx | 78 ++++++++----- web/src/components.css | 259 ----------------------------------------- web/src/style.css | 25 +++- 3 files changed, 76 insertions(+), 286 deletions(-) diff --git a/web/src/App.tsx b/web/src/App.tsx index c2efe0f..345e93c 100644 --- a/web/src/App.tsx +++ b/web/src/App.tsx @@ -158,6 +158,14 @@ function restoreFocus(target: HTMLElement | null) { }); } +/** A rail destination: engraved mono words, an accent rule under the current one. */ +const NAV_LINK = + "inline-flex items-center gap-2 min-h-control-h py-0 px-3 font-readout text-xs font-semibold uppercase tracking-label text-ink-muted no-underline border-b-2 border-b-transparent hover:text-accent-bright aria-[current=page]:text-accent aria-[current=page]:border-b-accent"; + +/** A tab bar destination: glyph over word, a short accent rule on top of the current one. */ +const TAB = + "relative grid place-items-center content-center gap-1 text-2xs font-semibold uppercase tracking-wide text-ink-faint no-underline aria-[current=page]:text-accent aria-[current=page]:before:absolute aria-[current=page]:before:top-0 aria-[current=page]:before:inset-x-3/10 aria-[current=page]:before:h-rule aria-[current=page]:before:bg-accent"; + function TabGlyph({ name }: { name: IconName }) { return (