wrolpi/app/src/components/ui/ui.css

1352 lines
41 KiB
CSS
Raw Normal View History

ui: token-driven component library on Mantine Adds src/components/ui: buttons, messages, labels, progress, status, tables, form controls, panels, cards, statistics, modals, tooltips, tabs, and icons. Everything resolves its colors through theme tokens, so no component branches on the current theme, and Semantic UI keeps rendering the app meanwhile. Mantine is bridged rather than restyled: its own CSS variables are pointed at our tokens. Four details were not obvious, and each caused a visible defect in night mode before being fixed: - Structural colors must go in the resolver's light/dark blocks. Mantine emits its values under [data-mantine-color-scheme], which outranks the :root block that `variables` becomes, so its grays were winning. - The dark and gray palettes are mapped shade by shade to tokens. Mantine reads them directly for table borders, zebra stripes and input chrome; they can be neither flattened nor left alone. - Mantine writes --button-* as inline styles, which no stylesheet can outrank, so the dashed danger treatment sets real properties instead. - Switch colors are written onto inner elements, so they need scoped CSS rather than a variable on the root. Adds a --knob token for control handles, because Mantine's default thumb follows theme.white, which is near-black in the dark-based themes. An audit of every painted pixel in the /theme-sample gallery now finds no non-red channel in night mode. Icons come from @tabler/icons-react with the 102 Semantic names the app uses mapped to components; they stroke with currentColor, so they follow the theme without any rule of their own. Toasts keep the react-semantic-toasts-2 signature so those call sites migrate by changing an import. TypeScript 5 is required: Mantine's declarations use `const` type parameters, which 4.9 cannot parse (Mantine 7 is the same, so downgrading is no escape). That needs two npm overrides to keep clean installs working, both verified against a Docker build: react-scripts declares peerOptional typescript ^3||^4, and fork-ts-checker 6.5.2 assigns typescript.performance.mark, which TS 5 made getter-only - crashing the dev server's type checker on every rebuild. semantic-baseline.test.js ratchets the removal: it fails if a file not already listed imports Semantic UI. An ESLint rule would have printed 75 warnings per rebuild, and CI unsets CI= for its build step, so it would guard nothing there. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-07-29 19:22:03 -06:00
/*
* Styles for the token-driven component library.
*
* Rules here encode design decisions Mantine's variables cannot express on their
* own — chiefly the two that change *form* rather than color between themes:
* the dashed danger treatment and status-by-brightness. See ui-design.md.
*
* Nothing in this file hardcodes a color; every value comes from a token.
*/
/* ------------------------------------------------------------------ Icons */
.wrolpi-icon-spin {
animation: wrolpi-icon-spin 0.9s linear infinite;
}
@keyframes wrolpi-icon-spin {
to {
transform: rotate(360deg);
}
}
@media (prefers-reduced-motion: reduce) {
.wrolpi-icon-spin {
animation: none;
}
}
ui: nine leaf files off Semantic, and the components they needed Phase 2, part 2. Baseline 72 -> 63. Migrated: Tables, SortableTable, DonatePage, Share, Headline, ErrorBoundary, and the QR code, VIN decoder, and temperature calculators. New in the library, all in the gallery and tested: SearchBox Semantic's `<Search category>`, keeping its grouped `results` shape because four call sites already build it. A real combobox: arrows move, Enter takes the highlighted suggestion or submits the raw text, Escape closes without clearing. Pagination Semantic's prop names, but onPageChange gets the page number rather than an (event, data) pair. TabBar the strip and its house style only; routing stays at the call site, which is what decides what is active. IconStack two glyphs composed into one symbol, named once for assistive technology (Semantic's IconGroup). Table.HeaderCell gains `sorted` and `onSort`. That last one is a fix, not just a port. Semantic's `sorted` prop set `aria-sort`; migrating a table by hand dropped it, leaving a clickable <th> that no keyboard could reach and no screen reader could describe. Putting it in the library means the next table gets it right without anyone remembering. Night mode holes closed along the way: the QR codes on the donate, share, and calculator pages are white by necessity — a scanner needs the contrast — and they render as SVG, which the media filter does not target. In night mode that was a lit panel. They now carry `.media`, so the filter remaps the block as a unit and the contrast survives the mapping. Also: `paypal` joins the icon map rather than being imported ad hoc in a page, and FileBrowser stops passing Semantic-only table props into a DOM element.
2026-07-30 09:31:15 -06:00
.wrolpi-icon-stack {
position: relative;
display: inline-flex;
line-height: 0;
}
/*
* The corner glyph sits on the main one, so it carries the surface color behind
* it — without that the two sets of strokes cross and neither reads.
ui: test the last four components, and put the last four in the gallery Closes the tail of the library: `Loader`, `Loading`, `Placeholder` and `Checkbox` had no test of their own, and `IconStack`, `MediaFilterToggle`, `MultiSelect` and `NumberInput` were not in the gallery, which the project rule says every component must be. Putting them in the gallery is what found the rest of this. An IconStack's corner glyph paints a disc of the surface behind itself so the two sets of strokes do not cross, and that surface was hardcoded to the page background. It is right in exactly one of the three places a stack appears. The nav bar showed a white disc on the red bar, and the file browser's "New Folder" button showed one punched through the blue fill. It is now `--icon-stack-bg`, defaulting to the page: the file browser passes the button's fill, and the nav bar sets it on the <nav> beside the colour it already writes there, so it inherits -- the bar's colour is a user setting and cannot be named by a token. A MultiSelect's chosen options are Mantine Pills, and Pill is the one component that ignores the radius theme: it writes `--pill-radius: rem(1000)` onto the element, which zeroing `--mantine-radius-xl` cannot reach. They were lozenges on a page of square boxes. Twelve jest tests and sixteen browser tests. The browser half covers what jsdom cannot judge: that a Skeleton is a different colour from the panel it covers in all four themes (its greys are remapped to our tokens, and neither `--border` nor `--bg` was picked with a panel behind it), that the loader colour resolves through the token, and that the corner disc matches its surface. Every one was checked red against a planted regression first. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
2026-08-01 15:48:10 -06:00
*
* Which surface that is depends on where the stack was placed, and only the call
* site knows: the file browser puts one inside a filled blue button, where a disc
* of the page background is a hole punched in the button. `--icon-stack-bg`
* defaults to the page, and a call site anywhere else sets it.
ui: nine leaf files off Semantic, and the components they needed Phase 2, part 2. Baseline 72 -> 63. Migrated: Tables, SortableTable, DonatePage, Share, Headline, ErrorBoundary, and the QR code, VIN decoder, and temperature calculators. New in the library, all in the gallery and tested: SearchBox Semantic's `<Search category>`, keeping its grouped `results` shape because four call sites already build it. A real combobox: arrows move, Enter takes the highlighted suggestion or submits the raw text, Escape closes without clearing. Pagination Semantic's prop names, but onPageChange gets the page number rather than an (event, data) pair. TabBar the strip and its house style only; routing stays at the call site, which is what decides what is active. IconStack two glyphs composed into one symbol, named once for assistive technology (Semantic's IconGroup). Table.HeaderCell gains `sorted` and `onSort`. That last one is a fix, not just a port. Semantic's `sorted` prop set `aria-sort`; migrating a table by hand dropped it, leaving a clickable <th> that no keyboard could reach and no screen reader could describe. Putting it in the library means the next table gets it right without anyone remembering. Night mode holes closed along the way: the QR codes on the donate, share, and calculator pages are white by necessity — a scanner needs the contrast — and they render as SVG, which the media filter does not target. In night mode that was a lit panel. They now carry `.media`, so the filter remaps the block as a unit and the contrast survives the mapping. Also: `paypal` joins the icon map rather than being imported ad hoc in a page, and FileBrowser stops passing Semantic-only table props into a DOM element.
2026-07-30 09:31:15 -06:00
*/
.wrolpi-icon-stack-corner {
position: absolute;
right: -3px;
bottom: -3px;
display: flex;
ui: test the last four components, and put the last four in the gallery Closes the tail of the library: `Loader`, `Loading`, `Placeholder` and `Checkbox` had no test of their own, and `IconStack`, `MediaFilterToggle`, `MultiSelect` and `NumberInput` were not in the gallery, which the project rule says every component must be. Putting them in the gallery is what found the rest of this. An IconStack's corner glyph paints a disc of the surface behind itself so the two sets of strokes do not cross, and that surface was hardcoded to the page background. It is right in exactly one of the three places a stack appears. The nav bar showed a white disc on the red bar, and the file browser's "New Folder" button showed one punched through the blue fill. It is now `--icon-stack-bg`, defaulting to the page: the file browser passes the button's fill, and the nav bar sets it on the <nav> beside the colour it already writes there, so it inherits -- the bar's colour is a user setting and cannot be named by a token. A MultiSelect's chosen options are Mantine Pills, and Pill is the one component that ignores the radius theme: it writes `--pill-radius: rem(1000)` onto the element, which zeroing `--mantine-radius-xl` cannot reach. They were lozenges on a page of square boxes. Twelve jest tests and sixteen browser tests. The browser half covers what jsdom cannot judge: that a Skeleton is a different colour from the panel it covers in all four themes (its greys are remapped to our tokens, and neither `--border` nor `--bg` was picked with a panel behind it), that the loader colour resolves through the token, and that the corner disc matches its surface. Every one was checked red against a planted regression first. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
2026-08-01 15:48:10 -06:00
background: var(--icon-stack-bg, var(--bg));
ui: nine leaf files off Semantic, and the components they needed Phase 2, part 2. Baseline 72 -> 63. Migrated: Tables, SortableTable, DonatePage, Share, Headline, ErrorBoundary, and the QR code, VIN decoder, and temperature calculators. New in the library, all in the gallery and tested: SearchBox Semantic's `<Search category>`, keeping its grouped `results` shape because four call sites already build it. A real combobox: arrows move, Enter takes the highlighted suggestion or submits the raw text, Escape closes without clearing. Pagination Semantic's prop names, but onPageChange gets the page number rather than an (event, data) pair. TabBar the strip and its house style only; routing stays at the call site, which is what decides what is active. IconStack two glyphs composed into one symbol, named once for assistive technology (Semantic's IconGroup). Table.HeaderCell gains `sorted` and `onSort`. That last one is a fix, not just a port. Semantic's `sorted` prop set `aria-sort`; migrating a table by hand dropped it, leaving a clickable <th> that no keyboard could reach and no screen reader could describe. Putting it in the library means the next table gets it right without anyone remembering. Night mode holes closed along the way: the QR codes on the donate, share, and calculator pages are white by necessity — a scanner needs the contrast — and they render as SVG, which the media filter does not target. In night mode that was a lit panel. They now carry `.media`, so the filter remaps the block as a unit and the contrast survives the mapping. Also: `paypal` joins the icon map rather than being imported ad hoc in a page, and FileBrowser stops passing Semantic-only table props into a DOM element.
2026-07-30 09:31:15 -06:00
border-radius: 50%;
padding: 1px;
}
test: act on review — the skeleton guard was reading the wrong layer The "separates the skeleton from the panel" cases could not fail. A Skeleton is three layers: the element paints nothing, ::before paints --mantine-color-body (`--bg`) at z-index 10, and ::after paints the bar the user actually sees (`--head` in light, `--border` in dark) at z-index 11, on top. `paintedBackground` walked outward from the element and returned the first paint, which is ::before -- so all four cases compared the page background to the panel. Those differ by design in every theme, so the bars could have collapsed into the panel entirely and every assertion stayed green. My planted regression did not catch it because the plant was broader than the claim: it forced all three layers to the panel colour, so the test went red for a reason the fix did not depend on. The plant now sets only ::after, and a second plant sets only ::before and must stay GREEN. The layer order is now the caller's argument, since "the background" is ambiguous once pseudo-elements are involved and guessing makes a test vacuous rather than wrong. Also from review: The disc on a filled button was pinned to `--blue` at the call site, but WROL mode disables that button and Mantine repaints it `--mantine-color-disabled` -- a blue chip on a grey button, the original hole inverted. The surface now comes from the cascade (`--button-bg`, and the disabled colour for any variant), so the call site says nothing at all and cannot be wrong about a state it does not control. Keying on `[data-variant="filled"]` alone matched none of our buttons: Mantine omits the attribute when a call site names a colour but no variant, which is how every filled button here is written. The Checkbox behaviour test asserted only that a handler fired, against a box held at `checked={false}` that could never change. It is now uncontrolled and asserts the box is checked, plus a second test that the handler sees the new state -- read inside the handler, because `currentTarget` is null by the time a mock is inspected. The empty-caption test counted every div in the container; it counts the loader's siblings now. Two comments corrected: Pill emits no `--pill-radius` at all and its own stylesheet falls back to `1000rem`, and the nav bar no longer relies on the default surface. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
2026-08-01 16:05:29 -06:00
/*
* A stack inside a button is the one case the call site should not have to describe,
* because the surface changes underneath it: Mantine paints a filled button from
* `--button-bg` but a disabled one from `--mantine-color-disabled`, whatever its variant.
* The file browser's New Folder button is disabled in WROL mode, so a disc pinned to the
* enabled fill would be a blue chip on a grey button -- the original hole, inverted.
*
* Only `filled` gets the first rule: an outline or subtle button sets `--button-bg` to
* `transparent`, and there the surface behind the button is still the right answer.
* `:not([data-variant])` is that same case -- Mantine omits the attribute entirely when a
* call site names a colour but no variant, which is how every filled button here is
* written, and keying on the attribute alone matched none of them. `--button-bg` itself
* is absent when a button names neither, hence the fallback chain.
*/
.mantine-Button-root:not([data-variant]) .wrolpi-icon-stack-corner,
.mantine-Button-root[data-variant="filled"] .wrolpi-icon-stack-corner {
background: var(--button-bg, var(--icon-stack-bg, var(--bg)));
}
.mantine-Button-root:disabled .wrolpi-icon-stack-corner,
.mantine-Button-root[data-disabled] .wrolpi-icon-stack-corner {
background: var(--mantine-color-disabled);
}
ui: token-driven component library on Mantine Adds src/components/ui: buttons, messages, labels, progress, status, tables, form controls, panels, cards, statistics, modals, tooltips, tabs, and icons. Everything resolves its colors through theme tokens, so no component branches on the current theme, and Semantic UI keeps rendering the app meanwhile. Mantine is bridged rather than restyled: its own CSS variables are pointed at our tokens. Four details were not obvious, and each caused a visible defect in night mode before being fixed: - Structural colors must go in the resolver's light/dark blocks. Mantine emits its values under [data-mantine-color-scheme], which outranks the :root block that `variables` becomes, so its grays were winning. - The dark and gray palettes are mapped shade by shade to tokens. Mantine reads them directly for table borders, zebra stripes and input chrome; they can be neither flattened nor left alone. - Mantine writes --button-* as inline styles, which no stylesheet can outrank, so the dashed danger treatment sets real properties instead. - Switch colors are written onto inner elements, so they need scoped CSS rather than a variable on the root. Adds a --knob token for control handles, because Mantine's default thumb follows theme.white, which is near-black in the dark-based themes. An audit of every painted pixel in the /theme-sample gallery now finds no non-red channel in night mode. Icons come from @tabler/icons-react with the 102 Semantic names the app uses mapped to components; they stroke with currentColor, so they follow the theme without any rule of their own. Toasts keep the react-semantic-toasts-2 signature so those call sites migrate by changing an import. TypeScript 5 is required: Mantine's declarations use `const` type parameters, which 4.9 cannot parse (Mantine 7 is the same, so downgrading is no escape). That needs two npm overrides to keep clean installs working, both verified against a Docker build: react-scripts declares peerOptional typescript ^3||^4, and fork-ts-checker 6.5.2 assigns typescript.performance.mark, which TS 5 made getter-only - crashing the dev server's type checker on every rebuild. semantic-baseline.test.js ratchets the removal: it fails if a file not already listed imports Semantic UI. An ESLint rule would have printed 75 warnings per rebuild, and CI unsets CI= for its build step, so it would guard nothing there. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-07-29 19:22:03 -06:00
/* ---------------------------------------------------------------- Buttons */
/*
* Dashed borders mean "destructive or failed", and nothing else may use them.
* In night mode a destructive button drops its fill entirely: 1.5px keeps the
* dashes legible at low brightness, where a 1px hairline dash disappears.
*/
/*
* In light, dark, and amber the button stays filled, which `color="red"` already
* does. Night is the exception, and it cannot be expressed by overriding
* Mantine's `--button-*` variables: Mantine writes those as inline styles on the
* element, which no stylesheet rule can outrank. Setting the real properties
* works instead — this selector (0,2,0 plus an element) outranks the Mantine
* class rule that reads the variables.
*/
html[data-theme="night"] .wrolpi-button-danger {
background: transparent;
test: act on review — and correct an overstated claim about the toast bug I said all four toast kinds were "the same pixel" in night. They were not. Planting a reversion to hue names left the new distinctness test GREEN, because in night `--blue`, `--green`, `--yellow` and `--red` are four different values (2.29, 3.14, 4.52, 5.64 against a panel). What they are is cramped and badly ranked, with info at 2.29:1 -- below the 3:1 floor, present and invisible. The byte-identical pairs are real but elsewhere: `--orange` is `--text` and `--yellow` is `--amber`, which bites a call site that reaches for those names, not the toast mapping. The PR body has been corrected too. So the distinctness assertion is not the one with teeth; the legibility floor is. The monochrome toast test now measures every kind against the toast's own surface, and the hue reversion fails it naming the number: 2.29:1. Also from review: `.wrolpi-message-error` still forced `border: 1.5px dashed var(--red)` while its accent and icon had moved to roles -- nearly the same pixel in night, so no colour test could see it. It follows `--message-color` now. Six more library rules were naming a hue for a thing that means danger: the night danger button, invalid form fields, invalid paths, path error text, danger panels and failed table rows. All roles now, with a source guard that fails any rule whose SELECTOR means severity and whose body names a hue. Focus rings and active-tab accents deliberately keep `--blue`: those are the primary accent, not severity. The tokens.css note claimed the brightness ramp held "in every theme" when the tests deliberately limit it to monochrome. Narrowed, with the reason spelled out, because the next person to read it would otherwise have "fixed" light to match the prose -- which would mean reordering light's hues to satisfy a test. Added the end-of-chain cases the review asked for: four toasts and four Messages in night and amber, measured rather than inferred from variable names. Colour reads now go through a strict `toRgb` that refuses anything not already resolved. The reviewer's concern that `getPropertyValue('--info')` returns an unresolved `var(--blue)` does not hold -- custom properties are substituted at computed-value time and it returns `#20629c` -- but feeding an unresolved value to a luminance calculation yields NaN, and `expect(NaN).to.not.equal(x)` passes. Worth refusing loudly. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
2026-08-01 17:46:33 -06:00
color: var(--danger);
border: 1.5px dashed var(--danger);
ui: token-driven component library on Mantine Adds src/components/ui: buttons, messages, labels, progress, status, tables, form controls, panels, cards, statistics, modals, tooltips, tabs, and icons. Everything resolves its colors through theme tokens, so no component branches on the current theme, and Semantic UI keeps rendering the app meanwhile. Mantine is bridged rather than restyled: its own CSS variables are pointed at our tokens. Four details were not obvious, and each caused a visible defect in night mode before being fixed: - Structural colors must go in the resolver's light/dark blocks. Mantine emits its values under [data-mantine-color-scheme], which outranks the :root block that `variables` becomes, so its grays were winning. - The dark and gray palettes are mapped shade by shade to tokens. Mantine reads them directly for table borders, zebra stripes and input chrome; they can be neither flattened nor left alone. - Mantine writes --button-* as inline styles, which no stylesheet can outrank, so the dashed danger treatment sets real properties instead. - Switch colors are written onto inner elements, so they need scoped CSS rather than a variable on the root. Adds a --knob token for control handles, because Mantine's default thumb follows theme.white, which is near-black in the dark-based themes. An audit of every painted pixel in the /theme-sample gallery now finds no non-red channel in night mode. Icons come from @tabler/icons-react with the 102 Semantic names the app uses mapped to components; they stroke with currentColor, so they follow the theme without any rule of their own. Toasts keep the react-semantic-toasts-2 signature so those call sites migrate by changing an import. TypeScript 5 is required: Mantine's declarations use `const` type parameters, which 4.9 cannot parse (Mantine 7 is the same, so downgrading is no escape). That needs two npm overrides to keep clean installs working, both verified against a Docker build: react-scripts declares peerOptional typescript ^3||^4, and fork-ts-checker 6.5.2 assigns typescript.performance.mark, which TS 5 made getter-only - crashing the dev server's type checker on every rebuild. semantic-baseline.test.js ratchets the removal: it fails if a file not already listed imports Semantic UI. An ESLint rule would have printed 75 warnings per rebuild, and CI unsets CI= for its build step, so it would guard nothing there. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-07-29 19:22:03 -06:00
}
html[data-theme="night"] .wrolpi-button-danger:hover:not(:disabled) {
background: var(--panel);
}
/* The icon inside inherits currentColor, so it follows without another rule. */
/* ----------------------------------------------------------- Theme picker */
.wrolpi-theme-picker {
display: grid;
grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
gap: 10px;
}
.wrolpi-theme-option {
display: flex;
flex-direction: column;
gap: 4px;
align-items: flex-start;
text-align: left;
padding: 10px 12px;
background: var(--panel);
color: var(--text);
border: 1px solid var(--border);
font: inherit;
cursor: pointer;
}
.wrolpi-theme-option:hover {
background: var(--head);
}
/* The selected theme is marked by a heavier border as well as color, so the
selection survives in monochrome themes. */
.wrolpi-theme-option-active {
border: 2px solid var(--blue);
padding: 9px 11px;
}
html[data-theme="night"] .wrolpi-theme-option-active,
html[data-theme="amber"] .wrolpi-theme-option-active {
border-color: var(--text);
}
.wrolpi-theme-option:focus-visible {
outline: 2px solid var(--blue);
outline-offset: 1px;
}
.wrolpi-theme-option-name {
display: inline-flex;
align-items: center;
gap: 7px;
font-weight: 600;
font-size: 13px;
}
.wrolpi-theme-option-description {
font-size: 12px;
color: var(--muted);
line-height: 1.4;
}
ui: media filtering is a per-theme setting, not a night-mode hardcode Filtering media was keyed on `data-theme="night"`, which made it a property of the theme that no user could turn off. Some people want their media tinted to match the interface; some want to see the actual image. A theme now declares a filter and whether it starts on, and the user decides: night night-red on by default. An unfiltered thumbnail undoes dark adaptation, which is the whole point of the mode. amber amber-mono off by default. Amber is a look, not a night-vision aid, so media keeps its real colors until asked for. light - no filter offered, so no toggle is shown. dark - The choice is stored per theme, so wanting amber's tint says nothing about wanting night's. The toggle lives in the theme picker, which puts it on the Settings page and in the gallery at once. Mechanically the rules now key on a `data-media-filter` attribute rather than `data-theme`: a rule keyed on the theme could not be turned off. index.html stamps that attribute before first paint alongside data-theme -- without it, night mode paints a screen of unfiltered thumbnails while the bundle arrives over a hotspot, costing the user the adaptation the theme exists to protect. Tests cover both the attribute rule and the fact that the inline script's duplicated ids and defaults still agree with names.ts. The amber matrix is the same luminance collapse tinted to #ff9500 (red full, green 0.584, blue zero) with a gentler gamma than night's: amber carries far more luminance and clips to a flat wash otherwise. The gallery gains a Media filtering section showing the WROLPi logo filtered, beside an unfiltered copy that opts out with `night-unfiltered`. That copy is behind a click on purpose -- an unfiltered image is a bright patch, and night mode should not spring one on someone reading in the dark. ui-design.md gains the media filtering contract it never got in Phase 0, including the note that a Phase 3 custom theme names an existing filter id and cannot ship its own matrix, since that would be code rather than data.
2026-07-30 08:51:28 -06:00
/* Separated from the theme grid: it configures the chosen theme, it is not a choice. */
.wrolpi-media-filter-setting {
margin-top: 14px;
padding-top: 12px;
border-top: 1px solid var(--border);
}
ui: nine leaf files off Semantic, and the components they needed Phase 2, part 2. Baseline 72 -> 63. Migrated: Tables, SortableTable, DonatePage, Share, Headline, ErrorBoundary, and the QR code, VIN decoder, and temperature calculators. New in the library, all in the gallery and tested: SearchBox Semantic's `<Search category>`, keeping its grouped `results` shape because four call sites already build it. A real combobox: arrows move, Enter takes the highlighted suggestion or submits the raw text, Escape closes without clearing. Pagination Semantic's prop names, but onPageChange gets the page number rather than an (event, data) pair. TabBar the strip and its house style only; routing stays at the call site, which is what decides what is active. IconStack two glyphs composed into one symbol, named once for assistive technology (Semantic's IconGroup). Table.HeaderCell gains `sorted` and `onSort`. That last one is a fix, not just a port. Semantic's `sorted` prop set `aria-sort`; migrating a table by hand dropped it, leaving a clickable <th> that no keyboard could reach and no screen reader could describe. Putting it in the library means the next table gets it right without anyone remembering. Night mode holes closed along the way: the QR codes on the donate, share, and calculator pages are white by necessity — a scanner needs the contrast — and they render as SVG, which the media filter does not target. In night mode that was a lit panel. They now carry `.media`, so the filter remaps the block as a unit and the contrast survives the mapping. Also: `paypal` joins the icon map rather than being imported ad hoc in a page, and FileBrowser stops passing Semantic-only table props into a DOM element.
2026-07-30 09:31:15 -06:00
/* ------------------------------------------------------------ Pagination */
.wrolpi-pagination button {
background: var(--panel);
color: var(--text);
border: 1px solid var(--border);
}
.wrolpi-pagination button[data-active] {
background: var(--blue);
color: var(--btn-text);
border-color: var(--blue);
}
/* Night and amber have no second hue to spend, so the current page is marked by a
heavier border and the panel surface instead of a filled block of color. */
html[data-theme="night"] .wrolpi-pagination button[data-active],
html[data-theme="amber"] .wrolpi-pagination button[data-active] {
background: var(--panel);
color: var(--text);
border: 2px solid var(--text);
}
.wrolpi-pagination button:disabled {
color: var(--muted);
background: var(--bg);
}
/* ---------------------------------------------------------------- Tab bar */
.wrolpi-tabs {
display: flex;
align-items: flex-end;
justify-content: space-between;
gap: 12px;
border-bottom: 1px solid var(--border);
margin-bottom: 14px;
}
.wrolpi-tabs-links {
display: flex;
flex-wrap: wrap;
}
.wrolpi-tabs-right {
padding-bottom: 6px;
}
.wrolpi-tab {
display: inline-block;
padding: 8px 14px;
color: var(--muted);
text-decoration: none;
font-size: 13px;
/*
* A tab is a NavLink in the app's nav bars but a <button> on Inventory and in the
* gallery, and a button carries the UA's own `buttonface` background -- rgb(239,239,239).
* Only the active tab set a background, so every inactive one was a near-white block in
* dark, night and amber. The bar's own surface has to show through instead.
*/
background: transparent;
ui: nine leaf files off Semantic, and the components they needed Phase 2, part 2. Baseline 72 -> 63. Migrated: Tables, SortableTable, DonatePage, Share, Headline, ErrorBoundary, and the QR code, VIN decoder, and temperature calculators. New in the library, all in the gallery and tested: SearchBox Semantic's `<Search category>`, keeping its grouped `results` shape because four call sites already build it. A real combobox: arrows move, Enter takes the highlighted suggestion or submits the raw text, Escape closes without clearing. Pagination Semantic's prop names, but onPageChange gets the page number rather than an (event, data) pair. TabBar the strip and its house style only; routing stays at the call site, which is what decides what is active. IconStack two glyphs composed into one symbol, named once for assistive technology (Semantic's IconGroup). Table.HeaderCell gains `sorted` and `onSort`. That last one is a fix, not just a port. Semantic's `sorted` prop set `aria-sort`; migrating a table by hand dropped it, leaving a clickable <th> that no keyboard could reach and no screen reader could describe. Putting it in the library means the next table gets it right without anyone remembering. Night mode holes closed along the way: the QR codes on the donate, share, and calculator pages are white by necessity — a scanner needs the contrast — and they render as SVG, which the media filter does not target. In night mode that was a lit panel. They now carry `.media`, so the filter remaps the block as a unit and the contrast survives the mapping. Also: `paypal` joins the icon map rather than being imported ad hoc in a page, and FileBrowser stops passing Semantic-only table props into a DOM element.
2026-07-30 09:31:15 -06:00
border: 1px solid transparent;
/* Sits on the bar's own rule, so the active tab can erase it and read as
connected to the panel below. */
margin-bottom: -1px;
}
.wrolpi-tab:hover {
color: var(--text);
}
.wrolpi-tab-active {
color: var(--text);
background: var(--panel);
border-color: var(--border);
border-bottom-color: var(--panel);
font-weight: 600;
}
.wrolpi-tab:focus-visible {
outline: 2px solid var(--blue);
outline-offset: -2px;
}
/* ------------------------------------------------------------- Search box */
.wrolpi-searchbox {
position: relative;
width: 100%;
}
.wrolpi-searchbox-control {
display: flex;
align-items: center;
gap: 8px;
background: var(--panel);
border: 1px solid var(--border);
padding: 0 8px;
}
.wrolpi-searchbox-control:focus-within {
border-color: var(--blue);
}
html[data-theme="night"] .wrolpi-searchbox-control:focus-within,
html[data-theme="amber"] .wrolpi-searchbox-control:focus-within {
border-color: var(--text);
}
.wrolpi-searchbox-icon {
display: flex;
color: var(--muted);
}
.wrolpi-searchbox-input {
flex: 1;
min-width: 0;
padding: 8px 0;
background: none;
border: none;
outline: none;
color: var(--text);
font: inherit;
font-size: 13px;
}
.wrolpi-searchbox-input::placeholder {
color: var(--muted);
}
.wrolpi-searchbox-loading,
.wrolpi-searchbox-clear {
flex: none;
}
/*
* The suggestion list overlays the page rather than pushing it down — a search
* that reflows the results underneath it is unusable while typing.
*/
.wrolpi-searchbox-results {
position: absolute;
z-index: 20;
top: 100%;
left: 0;
right: 0;
/*
* Tall enough for a full set of grouped suggestions -- directories, channels and
* domains together run past 320px, and the last group was being clipped -- but
* still capped so a long list cannot cover the page.
*/
max-height: min(60vh, 480px);
ui: nine leaf files off Semantic, and the components they needed Phase 2, part 2. Baseline 72 -> 63. Migrated: Tables, SortableTable, DonatePage, Share, Headline, ErrorBoundary, and the QR code, VIN decoder, and temperature calculators. New in the library, all in the gallery and tested: SearchBox Semantic's `<Search category>`, keeping its grouped `results` shape because four call sites already build it. A real combobox: arrows move, Enter takes the highlighted suggestion or submits the raw text, Escape closes without clearing. Pagination Semantic's prop names, but onPageChange gets the page number rather than an (event, data) pair. TabBar the strip and its house style only; routing stays at the call site, which is what decides what is active. IconStack two glyphs composed into one symbol, named once for assistive technology (Semantic's IconGroup). Table.HeaderCell gains `sorted` and `onSort`. That last one is a fix, not just a port. Semantic's `sorted` prop set `aria-sort`; migrating a table by hand dropped it, leaving a clickable <th> that no keyboard could reach and no screen reader could describe. Putting it in the library means the next table gets it right without anyone remembering. Night mode holes closed along the way: the QR codes on the donate, share, and calculator pages are white by necessity — a scanner needs the contrast — and they render as SVG, which the media filter does not target. In night mode that was a lit panel. They now carry `.media`, so the filter remaps the block as a unit and the contrast survives the mapping. Also: `paypal` joins the icon map rather than being imported ad hoc in a page, and FileBrowser stops passing Semantic-only table props into a DOM element.
2026-07-30 09:31:15 -06:00
overflow-y: auto;
background: var(--panel);
border: 1px solid var(--border);
border-top: none;
}
.wrolpi-searchbox-group-name {
padding: 6px 10px;
font-size: 11px;
font-weight: 600;
letter-spacing: 0.08em;
text-transform: uppercase;
color: var(--muted);
background: var(--head);
}
.wrolpi-searchbox-result {
padding: 7px 10px;
cursor: pointer;
border-top: 1px solid var(--border);
}
.wrolpi-searchbox-result-active {
background: var(--head);
}
.wrolpi-searchbox-result-title {
font-size: 13px;
color: var(--text);
overflow-wrap: anywhere;
}
.wrolpi-searchbox-result-description {
font-size: 11px;
color: var(--muted);
}
.wrolpi-searchbox-empty {
padding: 10px;
font-size: 12px;
color: var(--muted);
}
ui: migrate the extension pages and Configs; five components they needed Phase 2, part 1. Three files leave Semantic UI (baseline 75 -> 72), and the components they needed join the library and the gallery: Header Semantic's shape (as/icon/subheader/dividing). 47 files use <Header>, and the level now picks the size, so the type scale stays a scale instead of each call site choosing a font size. Message gains an icon and a dismiss button. ActionInput input and button sharing one outline, for <Input action={...}/>. Loading centered loader with a caption, replacing the <Loader active inline='centered'> + wrapper div in 19 places. Modal becomes compound - Modal.Header/.Content/.Actions, plus Semantic's open, closeIcon, and size names - because 34 files are written against that shape. test-utils mounts MantineProvider with ThemeProvider's exact configuration: migrated components render Mantine internals and every one of their test files would otherwise need its own provider. One Semantic bleed found and fixed: semantic.min.css sets `h1,h2,h3,h4,h5 { font-family: Lato }` and loads after Mantine's element rule, so headings ignored the theme's body face. Only visible in amber, where the body is mono and the headings were not. A class-level restatement outranks it; the rule comes out when Semantic does. Verified: 925 jest tests, clean production build, and a night-mode audit of every painted pixel in the gallery (red-only, one known false positive). The Configs backup and restore flow was exercised against the real API.
2026-07-29 20:25:34 -06:00
/* ---------------------------------------------------------------- Modals */
/*
* Actions sit below the body, separated by a hairline rather than a raised bar.
* Right-aligned, so the confirming action lands where the eye finishes reading.
*/
.wrolpi-modal-actions {
display: flex;
justify-content: flex-end;
flex-wrap: wrap;
gap: 10px;
/* Bleed back out through the modal body's own padding so the rule spans the
full width; -1 * whatever Mantine padded the body with. */
margin: 18px calc(var(--mantine-spacing-md) * -1) calc(var(--mantine-spacing-md) * -1);
padding: 12px var(--mantine-spacing-md);
border-top: 1px solid var(--border);
}
ui: the last Semantic UI file, and the stylesheet with it ControllerPage was the final call site; Theme.tsx then had nothing left to wrap, so it drops from 861 lines to 338 -- the provider that resolves the theme, stamps `data-theme` and `data-media-filter`, persists both and hands Mantine our tokens. Everything below that was Semantic wrappers. The dark-mode compatibility props went with them. `i`, `s`, `t` and `inverted` existed so unmigrated components could borrow Semantic's dark treatment, and they carried hardcoded greys -- #1B1C1D, #dddddd, #eeeeee -- which is exactly what the token themes replaced. Three call sites in Common.js were still injecting the #eeeeee one into links. Then `semantic-ui-offline/semantic.min.css` came out of App.js. That took more with it than expected, and looking at the running app is the only reason it was caught: Every link lost its colour and gained the browser's underline and visited purple. The dashboard's load averages and section headings were underlined and purple. Links now take `--blue`, which remaps per theme, and underline only on hover -- many of them wrap cards, posters and icons. `box-sizing: border-box` disappeared, which silently changes the size of every padded element in the app. Semantic's reset had been providing it. The navigation bar overflowed a 1000px viewport with `nowrap` and cut "Admin" off the right edge -- the one link a user needs to reach the settings that fix a broken WROLPi. Semantic's menu wrapped; ours does now too. The gzipped CSS bundle is 47.5 kB, and one call site was still leaning on Semantic's grid classes -- now a flex column, since all three of its callers pass library components. The ratchet stays rather than being deleted. At zero it asserts four things: no file imports Semantic UI, none calls its toast library, none leans on its stylesheet, and no file reaches back through Theme.tsx. It can go when the packages are uninstalled. Theme.test.js is deleted, but not before porting the two behaviours it protected: that Button forwards a ref to the real DOM element (a class-component ref once crashed the Control page, because portals call `node.contains`), and that the progress percentage stays readable on every bar colour.
2026-07-30 13:41:05 -06:00
/* A stack of form rows, replacing Semantic's `ui stackable grid` in edit forms. */
.wrolpi-form-rows {
display: flex;
flex-direction: column;
gap: 14px;
}
/* ------------------------------------------------------------- Form fields */
ui: test the last four components, and put the last four in the gallery Closes the tail of the library: `Loader`, `Loading`, `Placeholder` and `Checkbox` had no test of their own, and `IconStack`, `MediaFilterToggle`, `MultiSelect` and `NumberInput` were not in the gallery, which the project rule says every component must be. Putting them in the gallery is what found the rest of this. An IconStack's corner glyph paints a disc of the surface behind itself so the two sets of strokes do not cross, and that surface was hardcoded to the page background. It is right in exactly one of the three places a stack appears. The nav bar showed a white disc on the red bar, and the file browser's "New Folder" button showed one punched through the blue fill. It is now `--icon-stack-bg`, defaulting to the page: the file browser passes the button's fill, and the nav bar sets it on the <nav> beside the colour it already writes there, so it inherits -- the bar's colour is a user setting and cannot be named by a token. A MultiSelect's chosen options are Mantine Pills, and Pill is the one component that ignores the radius theme: it writes `--pill-radius: rem(1000)` onto the element, which zeroing `--mantine-radius-xl` cannot reach. They were lozenges on a page of square boxes. Twelve jest tests and sixteen browser tests. The browser half covers what jsdom cannot judge: that a Skeleton is a different colour from the panel it covers in all four themes (its greys are remapped to our tokens, and neither `--border` nor `--bg` was picked with a panel behind it), that the loader colour resolves through the token, and that the corner disc matches its surface. Every one was checked red against a planted regression first. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
2026-08-01 15:48:10 -06:00
/*
* A Pill is what MultiSelect renders for each chosen option, and it is the one place
test: act on review — the skeleton guard was reading the wrong layer The "separates the skeleton from the panel" cases could not fail. A Skeleton is three layers: the element paints nothing, ::before paints --mantine-color-body (`--bg`) at z-index 10, and ::after paints the bar the user actually sees (`--head` in light, `--border` in dark) at z-index 11, on top. `paintedBackground` walked outward from the element and returned the first paint, which is ::before -- so all four cases compared the page background to the panel. Those differ by design in every theme, so the bars could have collapsed into the panel entirely and every assertion stayed green. My planted regression did not catch it because the plant was broader than the claim: it forced all three layers to the panel colour, so the test went red for a reason the fix did not depend on. The plant now sets only ::after, and a second plant sets only ::before and must stay GREEN. The layer order is now the caller's argument, since "the background" is ambiguous once pseudo-elements are involved and guessing makes a test vacuous rather than wrong. Also from review: The disc on a filled button was pinned to `--blue` at the call site, but WROL mode disables that button and Mantine repaints it `--mantine-color-disabled` -- a blue chip on a grey button, the original hole inverted. The surface now comes from the cascade (`--button-bg`, and the disabled colour for any variant), so the call site says nothing at all and cannot be wrong about a state it does not control. Keying on `[data-variant="filled"]` alone matched none of our buttons: Mantine omits the attribute when a call site names a colour but no variant, which is how every filled button here is written. The Checkbox behaviour test asserted only that a handler fired, against a box held at `checked={false}` that could never change. It is now uncontrolled and asserts the box is checked, plus a second test that the handler sees the new state -- read inside the handler, because `currentTarget` is null by the time a mock is inspected. The empty-caption test counted every div in the container; it counts the loader's siblings now. Two comments corrected: Pill emits no `--pill-radius` at all and its own stylesheet falls back to `1000rem`, and the nav bar no longer relies on the default surface. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
2026-08-01 16:05:29 -06:00
* Mantine does not honour the radius theme. MultiSelect leaves `radius` undefined, so
* Pill emits no `--pill-radius` at all and its stylesheet falls back to
* `border-radius: var(--pill-radius, 1000rem)` -- a literal in Mantine's own CSS, which
* zeroing `--mantine-radius-xl` never touches. Defining the variable is what stops the
* fallback from ever applying. Everything else in the library has hard corners.
ui: test the last four components, and put the last four in the gallery Closes the tail of the library: `Loader`, `Loading`, `Placeholder` and `Checkbox` had no test of their own, and `IconStack`, `MediaFilterToggle`, `MultiSelect` and `NumberInput` were not in the gallery, which the project rule says every component must be. Putting them in the gallery is what found the rest of this. An IconStack's corner glyph paints a disc of the surface behind itself so the two sets of strokes do not cross, and that surface was hardcoded to the page background. It is right in exactly one of the three places a stack appears. The nav bar showed a white disc on the red bar, and the file browser's "New Folder" button showed one punched through the blue fill. It is now `--icon-stack-bg`, defaulting to the page: the file browser passes the button's fill, and the nav bar sets it on the <nav> beside the colour it already writes there, so it inherits -- the bar's colour is a user setting and cannot be named by a token. A MultiSelect's chosen options are Mantine Pills, and Pill is the one component that ignores the radius theme: it writes `--pill-radius: rem(1000)` onto the element, which zeroing `--mantine-radius-xl` cannot reach. They were lozenges on a page of square boxes. Twelve jest tests and sixteen browser tests. The browser half covers what jsdom cannot judge: that a Skeleton is a different colour from the panel it covers in all four themes (its greys are remapped to our tokens, and neither `--border` nor `--bg` was picked with a panel behind it), that the loader colour resolves through the token, and that the corner disc matches its surface. Every one was checked red against a planted regression first. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
2026-08-01 15:48:10 -06:00
*/
.mantine-Pill-root {
--pill-radius: 0;
border-radius: 0;
}
ui: the last Semantic UI file, and the stylesheet with it ControllerPage was the final call site; Theme.tsx then had nothing left to wrap, so it drops from 861 lines to 338 -- the provider that resolves the theme, stamps `data-theme` and `data-media-filter`, persists both and hands Mantine our tokens. Everything below that was Semantic wrappers. The dark-mode compatibility props went with them. `i`, `s`, `t` and `inverted` existed so unmigrated components could borrow Semantic's dark treatment, and they carried hardcoded greys -- #1B1C1D, #dddddd, #eeeeee -- which is exactly what the token themes replaced. Three call sites in Common.js were still injecting the #eeeeee one into links. Then `semantic-ui-offline/semantic.min.css` came out of App.js. That took more with it than expected, and looking at the running app is the only reason it was caught: Every link lost its colour and gained the browser's underline and visited purple. The dashboard's load averages and section headings were underlined and purple. Links now take `--blue`, which remaps per theme, and underline only on hover -- many of them wrap cards, posters and icons. `box-sizing: border-box` disappeared, which silently changes the size of every padded element in the app. Semantic's reset had been providing it. The navigation bar overflowed a 1000px viewport with `nowrap` and cut "Admin" off the right edge -- the one link a user needs to reach the settings that fix a broken WROLPi. Semantic's menu wrapped; ours does now too. The gzipped CSS bundle is 47.5 kB, and one call site was still leaning on Semantic's grid classes -- now a flex column, since all three of its callers pass library components. The ratchet stays rather than being deleted. At zero it asserts four things: no file imports Semantic UI, none calls its toast library, none leans on its stylesheet, and no file reaches back through Theme.tsx. It can go when the packages are uninstalled. Theme.test.js is deleted, but not before porting the two behaviours it protected: that Button forwards a ref to the real DOM element (a class-component ref once crashed the Control page, because portals call `node.contains`), and that the progress percentage stays readable on every bar colour.
2026-07-30 13:41:05 -06:00
/*
* `hooks/useForm.js` renders its own <label> and native <input> — it always did, with
* Semantic's Form.Input only wrapping them for field styling. These rules supply that
* styling from tokens instead, so a native input matches the library's own controls.
*/
.wrolpi-form-field input {
width: 100%;
padding: 7px 9px;
background: var(--panel);
color: var(--text);
border: 1px solid var(--border);
font: inherit;
font-size: 13px;
}
.wrolpi-form-field input::placeholder {
color: var(--muted);
}
.wrolpi-form-field input:focus {
outline: none;
border-color: var(--blue);
}
html[data-theme="night"] .wrolpi-form-field input:focus,
html[data-theme="amber"] .wrolpi-form-field input:focus {
border-color: var(--text);
}
/* An invalid field is dashed, matching every other failure state in the interface. */
.wrolpi-form-field[data-error] input {
test: act on review — and correct an overstated claim about the toast bug I said all four toast kinds were "the same pixel" in night. They were not. Planting a reversion to hue names left the new distinctness test GREEN, because in night `--blue`, `--green`, `--yellow` and `--red` are four different values (2.29, 3.14, 4.52, 5.64 against a panel). What they are is cramped and badly ranked, with info at 2.29:1 -- below the 3:1 floor, present and invisible. The byte-identical pairs are real but elsewhere: `--orange` is `--text` and `--yellow` is `--amber`, which bites a call site that reaches for those names, not the toast mapping. The PR body has been corrected too. So the distinctness assertion is not the one with teeth; the legibility floor is. The monochrome toast test now measures every kind against the toast's own surface, and the hue reversion fails it naming the number: 2.29:1. Also from review: `.wrolpi-message-error` still forced `border: 1.5px dashed var(--red)` while its accent and icon had moved to roles -- nearly the same pixel in night, so no colour test could see it. It follows `--message-color` now. Six more library rules were naming a hue for a thing that means danger: the night danger button, invalid form fields, invalid paths, path error text, danger panels and failed table rows. All roles now, with a source guard that fails any rule whose SELECTOR means severity and whose body names a hue. Focus rings and active-tab accents deliberately keep `--blue`: those are the primary accent, not severity. The tokens.css note claimed the brightness ramp held "in every theme" when the tests deliberately limit it to monochrome. Narrowed, with the reason spelled out, because the next person to read it would otherwise have "fixed" light to match the prose -- which would mean reordering light's hues to satisfy a test. Added the end-of-chain cases the review asked for: four toasts and four Messages in night and amber, measured rather than inferred from variable names. Colour reads now go through a strict `toRgb` that refuses anything not already resolved. The reviewer's concern that `getPropertyValue('--info')` returns an unresolved `var(--blue)` does not hold -- custom properties are substituted at computed-value time and it returns `#20629c` -- but feeding an unresolved value to a luminance calculation yields NaN, and `expect(NaN).to.not.equal(x)` passes. Worth refusing loudly. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
2026-08-01 17:46:33 -06:00
border: 1.5px dashed var(--danger);
ui: the last Semantic UI file, and the stylesheet with it ControllerPage was the final call site; Theme.tsx then had nothing left to wrap, so it drops from 861 lines to 338 -- the provider that resolves the theme, stamps `data-theme` and `data-media-filter`, persists both and hands Mantine our tokens. Everything below that was Semantic wrappers. The dark-mode compatibility props went with them. `i`, `s`, `t` and `inverted` existed so unmigrated components could borrow Semantic's dark treatment, and they carried hardcoded greys -- #1B1C1D, #dddddd, #eeeeee -- which is exactly what the token themes replaced. Three call sites in Common.js were still injecting the #eeeeee one into links. Then `semantic-ui-offline/semantic.min.css` came out of App.js. That took more with it than expected, and looking at the running app is the only reason it was caught: Every link lost its colour and gained the browser's underline and visited purple. The dashboard's load averages and section headings were underlined and purple. Links now take `--blue`, which remaps per theme, and underline only on hover -- many of them wrap cards, posters and icons. `box-sizing: border-box` disappeared, which silently changes the size of every padded element in the app. Semantic's reset had been providing it. The navigation bar overflowed a 1000px viewport with `nowrap` and cut "Admin" off the right edge -- the one link a user needs to reach the settings that fix a broken WROLPi. Semantic's menu wrapped; ours does now too. The gzipped CSS bundle is 47.5 kB, and one call site was still leaning on Semantic's grid classes -- now a flex column, since all three of its callers pass library components. The ratchet stays rather than being deleted. At zero it asserts four things: no file imports Semantic UI, none calls its toast library, none leans on its stylesheet, and no file reaches back through Theme.tsx. It can go when the packages are uninstalled. Theme.test.js is deleted, but not before porting the two behaviours it protected: that Button forwards a ref to the real DOM element (a class-component ref once crashed the Control page, because portals call `node.contains`), and that the progress percentage stays readable on every bar colour.
2026-07-30 13:41:05 -06:00
}
.wrolpi-form-field input:disabled {
color: var(--muted);
background: var(--bg);
}
ui: PathInput, and the media directory stops printing over the value The five Special Directories fields on the Settings page were unreadable: the media directory printed straight through the value, so Archive Directory showed `a/media/wrolpi/hain_tag)s/%(domain)s`. Cause: `leftSectionWidth='auto'`. Mantine turns that prop into `--input-padding-inline-start`, and `padding-inline-start: auto` is not valid CSS -- it resolves to zero, so the input reserved no room for the section positioned on top of it. It fails only in CSS, only at runtime, and nothing warns. Fixed by expressing the field in the library instead of computing a width. PathInput puts the prefix and the input side by side in a flex row sharing one outline, so there is no width to get wrong and nothing to overlap -- the failure is structurally impossible rather than merely corrected. It also sizes to any prefix, which matters because the media directory is `/media/wrolpi` on a Pi and something else under Docker. Written test-first, and the tests need no mocks at all -- no context, no fetch, no router, just the provider test-utils already supplies. That is the point: Settings.js needs a pile of provider and API mocks, so its inputs were never covered, which is how five broken fields shipped. The tests assert the things that actually matter and can be checked without layout: the prefix is a sibling rather than a child, the value never contains it, onChange reports only what was typed, the prefix is the field's accessible description so a screen-reader user knows what the path is relative to, and disabled reaches the input rather than just the wrapper. Plus a source guard, since jsdom cannot see an overlap: nothing may pass `leftSectionWidth='auto'` or `rightSectionWidth='auto'`. It strips comments first -- PathInput documents the mistake by name, and prose about a mistake is not the mistake.
2026-07-30 15:12:18 -06:00
/* --------------------------------------------------------------- Path input */
/*
* Prefix and input are siblings in a flex row sharing one outline, so the prefix cannot
* print over the value -- the failure that Mantine's absolutely-positioned `leftSection`
* allowed when its reserved width was wrong. The prefix takes its natural width, so any
* media directory fits without a number being maintained anywhere.
*/
.wrolpi-path-input-label {
display: block;
font-weight: 600;
font-size: 13px;
margin-bottom: 4px;
}
.wrolpi-path-input-control {
display: flex;
align-items: stretch;
background: var(--panel);
border: 1px solid var(--border);
}
.wrolpi-path-input-control:focus-within {
border-color: var(--blue);
}
html[data-theme="night"] .wrolpi-path-input-control:focus-within,
html[data-theme="amber"] .wrolpi-path-input-control:focus-within {
border-color: var(--text);
}
.wrolpi-path-input-control[data-error] {
test: act on review — and correct an overstated claim about the toast bug I said all four toast kinds were "the same pixel" in night. They were not. Planting a reversion to hue names left the new distinctness test GREEN, because in night `--blue`, `--green`, `--yellow` and `--red` are four different values (2.29, 3.14, 4.52, 5.64 against a panel). What they are is cramped and badly ranked, with info at 2.29:1 -- below the 3:1 floor, present and invisible. The byte-identical pairs are real but elsewhere: `--orange` is `--text` and `--yellow` is `--amber`, which bites a call site that reaches for those names, not the toast mapping. The PR body has been corrected too. So the distinctness assertion is not the one with teeth; the legibility floor is. The monochrome toast test now measures every kind against the toast's own surface, and the hue reversion fails it naming the number: 2.29:1. Also from review: `.wrolpi-message-error` still forced `border: 1.5px dashed var(--red)` while its accent and icon had moved to roles -- nearly the same pixel in night, so no colour test could see it. It follows `--message-color` now. Six more library rules were naming a hue for a thing that means danger: the night danger button, invalid form fields, invalid paths, path error text, danger panels and failed table rows. All roles now, with a source guard that fails any rule whose SELECTOR means severity and whose body names a hue. Focus rings and active-tab accents deliberately keep `--blue`: those are the primary accent, not severity. The tokens.css note claimed the brightness ramp held "in every theme" when the tests deliberately limit it to monochrome. Narrowed, with the reason spelled out, because the next person to read it would otherwise have "fixed" light to match the prose -- which would mean reordering light's hues to satisfy a test. Added the end-of-chain cases the review asked for: four toasts and four Messages in night and amber, measured rather than inferred from variable names. Colour reads now go through a strict `toRgb` that refuses anything not already resolved. The reviewer's concern that `getPropertyValue('--info')` returns an unresolved `var(--blue)` does not hold -- custom properties are substituted at computed-value time and it returns `#20629c` -- but feeding an unresolved value to a luminance calculation yields NaN, and `expect(NaN).to.not.equal(x)` passes. Worth refusing loudly. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
2026-08-01 17:46:33 -06:00
border: 1.5px dashed var(--danger);
ui: PathInput, and the media directory stops printing over the value The five Special Directories fields on the Settings page were unreadable: the media directory printed straight through the value, so Archive Directory showed `a/media/wrolpi/hain_tag)s/%(domain)s`. Cause: `leftSectionWidth='auto'`. Mantine turns that prop into `--input-padding-inline-start`, and `padding-inline-start: auto` is not valid CSS -- it resolves to zero, so the input reserved no room for the section positioned on top of it. It fails only in CSS, only at runtime, and nothing warns. Fixed by expressing the field in the library instead of computing a width. PathInput puts the prefix and the input side by side in a flex row sharing one outline, so there is no width to get wrong and nothing to overlap -- the failure is structurally impossible rather than merely corrected. It also sizes to any prefix, which matters because the media directory is `/media/wrolpi` on a Pi and something else under Docker. Written test-first, and the tests need no mocks at all -- no context, no fetch, no router, just the provider test-utils already supplies. That is the point: Settings.js needs a pile of provider and API mocks, so its inputs were never covered, which is how five broken fields shipped. The tests assert the things that actually matter and can be checked without layout: the prefix is a sibling rather than a child, the value never contains it, onChange reports only what was typed, the prefix is the field's accessible description so a screen-reader user knows what the path is relative to, and disabled reaches the input rather than just the wrapper. Plus a source guard, since jsdom cannot see an overlap: nothing may pass `leftSectionWidth='auto'` or `rightSectionWidth='auto'`. It strips comments first -- PathInput documents the mistake by name, and prose about a mistake is not the mistake.
2026-07-30 15:12:18 -06:00
}
.wrolpi-path-input-control[data-disabled] {
background: var(--bg);
}
ui: name the directory fields, announce their help text, let long prefixes shrink Greptile's three findings on #590, all confirmed real before fixing, and each one verified red against the original code afterwards. P1, the directory fields had no accessible names. All five rendered their visible label as a bare <label> with no htmlFor while passing no label prop, so their inputs had a description ("/media/wrolpi/") and no name at all -- five fields in one grid, holding similar relative paths, indistinguishable to a screen reader. The labels now belong to the inputs, InfoPopup content and all. This predates PathInput; the old TextInput call sites had the same gap, and moving to a component that supports labels is what made it fixable. P1, description and error were rendered but never referenced. aria-describedby pointed only at the prefix, so the help text listing the variables a path accepts, and the reason a path was rejected, were both invisible to assistive technology. Both are now in the description, and an errored field reports aria-invalid. P2 was worse than reported: at `flex: none` a long prefix took the entire row and left the input eighteen pixels wide -- not "consumes the editable area" but a field nobody can type in. The media directory is whatever the API reports, so its length was never ours to assume. The prefix now shrinks and ellipsises at half the control, with the full path on `title` and in the accessible description. The naming fault could not have been caught where the others were. jsdom cannot see layout, and the Settings page needs enough mocking that it had no test at all -- which is why these five fields were uncovered when they broke. The new e2e spec intercepts the API and lets the real page render, so it measures the names and the geometry a user actually gets. Reverting one field to a bare label fails it; a long prefix fails the browser spec at 18px. 962 jest, 15 browser component, 46 e2e, clean cache-busted build, tsc clean. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
2026-07-30 15:46:54 -06:00
/*
* Muted and on the header surface: it reads as context, not as something to edit.
*
* It shrinks and ellipsises rather than holding its full width. The prefix is whatever the
* API reports as the media directory -- `/media/wrolpi` on a Pi, but a development box or an
* unusual Docker mount can report a much longer path -- and at `flex: none` a long one took
* the whole row and left the input 18px wide, a field nobody could type into. Capping it at
* half the control keeps the editable part editable; the full path stays available through
* `title` and is read out in full by the accessible description either way.
*/
ui: PathInput, and the media directory stops printing over the value The five Special Directories fields on the Settings page were unreadable: the media directory printed straight through the value, so Archive Directory showed `a/media/wrolpi/hain_tag)s/%(domain)s`. Cause: `leftSectionWidth='auto'`. Mantine turns that prop into `--input-padding-inline-start`, and `padding-inline-start: auto` is not valid CSS -- it resolves to zero, so the input reserved no room for the section positioned on top of it. It fails only in CSS, only at runtime, and nothing warns. Fixed by expressing the field in the library instead of computing a width. PathInput puts the prefix and the input side by side in a flex row sharing one outline, so there is no width to get wrong and nothing to overlap -- the failure is structurally impossible rather than merely corrected. It also sizes to any prefix, which matters because the media directory is `/media/wrolpi` on a Pi and something else under Docker. Written test-first, and the tests need no mocks at all -- no context, no fetch, no router, just the provider test-utils already supplies. That is the point: Settings.js needs a pile of provider and API mocks, so its inputs were never covered, which is how five broken fields shipped. The tests assert the things that actually matter and can be checked without layout: the prefix is a sibling rather than a child, the value never contains it, onChange reports only what was typed, the prefix is the field's accessible description so a screen-reader user knows what the path is relative to, and disabled reaches the input rather than just the wrapper. Plus a source guard, since jsdom cannot see an overlap: nothing may pass `leftSectionWidth='auto'` or `rightSectionWidth='auto'`. It strips comments first -- PathInput documents the mistake by name, and prose about a mistake is not the mistake.
2026-07-30 15:12:18 -06:00
.wrolpi-path-input-prefix {
display: flex;
align-items: center;
ui: name the directory fields, announce their help text, let long prefixes shrink Greptile's three findings on #590, all confirmed real before fixing, and each one verified red against the original code afterwards. P1, the directory fields had no accessible names. All five rendered their visible label as a bare <label> with no htmlFor while passing no label prop, so their inputs had a description ("/media/wrolpi/") and no name at all -- five fields in one grid, holding similar relative paths, indistinguishable to a screen reader. The labels now belong to the inputs, InfoPopup content and all. This predates PathInput; the old TextInput call sites had the same gap, and moving to a component that supports labels is what made it fixable. P1, description and error were rendered but never referenced. aria-describedby pointed only at the prefix, so the help text listing the variables a path accepts, and the reason a path was rejected, were both invisible to assistive technology. Both are now in the description, and an errored field reports aria-invalid. P2 was worse than reported: at `flex: none` a long prefix took the entire row and left the input eighteen pixels wide -- not "consumes the editable area" but a field nobody can type in. The media directory is whatever the API reports, so its length was never ours to assume. The prefix now shrinks and ellipsises at half the control, with the full path on `title` and in the accessible description. The naming fault could not have been caught where the others were. jsdom cannot see layout, and the Settings page needs enough mocking that it had no test at all -- which is why these five fields were uncovered when they broke. The new e2e spec intercepts the API and lets the real page render, so it measures the names and the geometry a user actually gets. Reverting one field to a bare label fails it; a long prefix fails the browser spec at 18px. 962 jest, 15 browser component, 46 e2e, clean cache-busted build, tsc clean. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
2026-07-30 15:46:54 -06:00
flex: 0 1 auto;
min-width: 3ch;
max-width: 50%;
overflow: hidden;
text-overflow: ellipsis;
ui: PathInput, and the media directory stops printing over the value The five Special Directories fields on the Settings page were unreadable: the media directory printed straight through the value, so Archive Directory showed `a/media/wrolpi/hain_tag)s/%(domain)s`. Cause: `leftSectionWidth='auto'`. Mantine turns that prop into `--input-padding-inline-start`, and `padding-inline-start: auto` is not valid CSS -- it resolves to zero, so the input reserved no room for the section positioned on top of it. It fails only in CSS, only at runtime, and nothing warns. Fixed by expressing the field in the library instead of computing a width. PathInput puts the prefix and the input side by side in a flex row sharing one outline, so there is no width to get wrong and nothing to overlap -- the failure is structurally impossible rather than merely corrected. It also sizes to any prefix, which matters because the media directory is `/media/wrolpi` on a Pi and something else under Docker. Written test-first, and the tests need no mocks at all -- no context, no fetch, no router, just the provider test-utils already supplies. That is the point: Settings.js needs a pile of provider and API mocks, so its inputs were never covered, which is how five broken fields shipped. The tests assert the things that actually matter and can be checked without layout: the prefix is a sibling rather than a child, the value never contains it, onChange reports only what was typed, the prefix is the field's accessible description so a screen-reader user knows what the path is relative to, and disabled reaches the input rather than just the wrapper. Plus a source guard, since jsdom cannot see an overlap: nothing may pass `leftSectionWidth='auto'` or `rightSectionWidth='auto'`. It strips comments first -- PathInput documents the mistake by name, and prose about a mistake is not the mistake.
2026-07-30 15:12:18 -06:00
padding: 0 6px 0 9px;
background: var(--head);
border-right: 1px solid var(--border);
color: var(--muted);
font-size: 12px;
white-space: nowrap;
user-select: none;
}
.wrolpi-path-input-control input {
flex: 1;
min-width: 0;
padding: 7px 9px;
background: none;
border: none;
outline: none;
color: var(--text);
font: inherit;
font-size: 13px;
}
.wrolpi-path-input-control input::placeholder {
color: var(--muted);
}
.wrolpi-path-input-control input:disabled {
color: var(--muted);
}
.wrolpi-path-input-description {
font-size: 12px;
color: var(--muted);
margin-top: 3px;
}
.wrolpi-path-input-error {
font-size: 12px;
test: act on review — and correct an overstated claim about the toast bug I said all four toast kinds were "the same pixel" in night. They were not. Planting a reversion to hue names left the new distinctness test GREEN, because in night `--blue`, `--green`, `--yellow` and `--red` are four different values (2.29, 3.14, 4.52, 5.64 against a panel). What they are is cramped and badly ranked, with info at 2.29:1 -- below the 3:1 floor, present and invisible. The byte-identical pairs are real but elsewhere: `--orange` is `--text` and `--yellow` is `--amber`, which bites a call site that reaches for those names, not the toast mapping. The PR body has been corrected too. So the distinctness assertion is not the one with teeth; the legibility floor is. The monochrome toast test now measures every kind against the toast's own surface, and the hue reversion fails it naming the number: 2.29:1. Also from review: `.wrolpi-message-error` still forced `border: 1.5px dashed var(--red)` while its accent and icon had moved to roles -- nearly the same pixel in night, so no colour test could see it. It follows `--message-color` now. Six more library rules were naming a hue for a thing that means danger: the night danger button, invalid form fields, invalid paths, path error text, danger panels and failed table rows. All roles now, with a source guard that fails any rule whose SELECTOR means severity and whose body names a hue. Focus rings and active-tab accents deliberately keep `--blue`: those are the primary accent, not severity. The tokens.css note claimed the brightness ramp held "in every theme" when the tests deliberately limit it to monochrome. Narrowed, with the reason spelled out, because the next person to read it would otherwise have "fixed" light to match the prose -- which would mean reordering light's hues to satisfy a test. Added the end-of-chain cases the review asked for: four toasts and four Messages in night and amber, measured rather than inferred from variable names. Colour reads now go through a strict `toRgb` that refuses anything not already resolved. The reviewer's concern that `getPropertyValue('--info')` returns an unresolved `var(--blue)` does not hold -- custom properties are substituted at computed-value time and it returns `#20629c` -- but feeding an unresolved value to a luminance calculation yields NaN, and `expect(NaN).to.not.equal(x)` passes. Worth refusing loudly. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
2026-08-01 17:46:33 -06:00
color: var(--danger);
ui: PathInput, and the media directory stops printing over the value The five Special Directories fields on the Settings page were unreadable: the media directory printed straight through the value, so Archive Directory showed `a/media/wrolpi/hain_tag)s/%(domain)s`. Cause: `leftSectionWidth='auto'`. Mantine turns that prop into `--input-padding-inline-start`, and `padding-inline-start: auto` is not valid CSS -- it resolves to zero, so the input reserved no room for the section positioned on top of it. It fails only in CSS, only at runtime, and nothing warns. Fixed by expressing the field in the library instead of computing a width. PathInput puts the prefix and the input side by side in a flex row sharing one outline, so there is no width to get wrong and nothing to overlap -- the failure is structurally impossible rather than merely corrected. It also sizes to any prefix, which matters because the media directory is `/media/wrolpi` on a Pi and something else under Docker. Written test-first, and the tests need no mocks at all -- no context, no fetch, no router, just the provider test-utils already supplies. That is the point: Settings.js needs a pile of provider and API mocks, so its inputs were never covered, which is how five broken fields shipped. The tests assert the things that actually matter and can be checked without layout: the prefix is a sibling rather than a child, the value never contains it, onChange reports only what was typed, the prefix is the field's accessible description so a screen-reader user knows what the path is relative to, and disabled reaches the input rather than just the wrapper. Plus a source guard, since jsdom cannot see an overlap: nothing may pass `leftSectionWidth='auto'` or `rightSectionWidth='auto'`. It strips comments first -- PathInput documents the mistake by name, and prose about a mistake is not the mistake.
2026-07-30 15:12:18 -06:00
margin-top: 3px;
}
ui: migrate the extension pages and Configs; five components they needed Phase 2, part 1. Three files leave Semantic UI (baseline 75 -> 72), and the components they needed join the library and the gallery: Header Semantic's shape (as/icon/subheader/dividing). 47 files use <Header>, and the level now picks the size, so the type scale stays a scale instead of each call site choosing a font size. Message gains an icon and a dismiss button. ActionInput input and button sharing one outline, for <Input action={...}/>. Loading centered loader with a caption, replacing the <Loader active inline='centered'> + wrapper div in 19 places. Modal becomes compound - Modal.Header/.Content/.Actions, plus Semantic's open, closeIcon, and size names - because 34 files are written against that shape. test-utils mounts MantineProvider with ThemeProvider's exact configuration: migrated components render Mantine internals and every one of their test files would otherwise need its own provider. One Semantic bleed found and fixed: semantic.min.css sets `h1,h2,h3,h4,h5 { font-family: Lato }` and loads after Mantine's element rule, so headings ignored the theme's body face. Only visible in amber, where the body is mono and the headings were not. A class-level restatement outranks it; the rule comes out when Semantic does. Verified: 925 jest tests, clean production build, and a night-mode audit of every painted pixel in the gallery (red-only, one known false positive). The Configs backup and restore flow was exercised against the real API.
2026-07-29 20:25:34 -06:00
/* ---------------------------------------------------------- Action inputs */
/*
* Input and button share one outline: the input gives up its right border and
* the button's left border becomes the seam between them.
*/
.wrolpi-action-input {
display: flex;
align-items: stretch;
width: 100%;
}
.wrolpi-action-input > .mantine-TextInput-root {
flex: 1;
min-width: 0;
}
.wrolpi-action-input .mantine-TextInput-input {
border-right-width: 0;
}
.wrolpi-action-input > :not(.mantine-TextInput-root) {
flex: none;
}
ui: token-driven component library on Mantine Adds src/components/ui: buttons, messages, labels, progress, status, tables, form controls, panels, cards, statistics, modals, tooltips, tabs, and icons. Everything resolves its colors through theme tokens, so no component branches on the current theme, and Semantic UI keeps rendering the app meanwhile. Mantine is bridged rather than restyled: its own CSS variables are pointed at our tokens. Four details were not obvious, and each caused a visible defect in night mode before being fixed: - Structural colors must go in the resolver's light/dark blocks. Mantine emits its values under [data-mantine-color-scheme], which outranks the :root block that `variables` becomes, so its grays were winning. - The dark and gray palettes are mapped shade by shade to tokens. Mantine reads them directly for table borders, zebra stripes and input chrome; they can be neither flattened nor left alone. - Mantine writes --button-* as inline styles, which no stylesheet can outrank, so the dashed danger treatment sets real properties instead. - Switch colors are written onto inner elements, so they need scoped CSS rather than a variable on the root. Adds a --knob token for control handles, because Mantine's default thumb follows theme.white, which is near-black in the dark-based themes. An audit of every painted pixel in the /theme-sample gallery now finds no non-red channel in night mode. Icons come from @tabler/icons-react with the 102 Semantic names the app uses mapped to components; they stroke with currentColor, so they follow the theme without any rule of their own. Toasts keep the react-semantic-toasts-2 signature so those call sites migrate by changing an import. TypeScript 5 is required: Mantine's declarations use `const` type parameters, which 4.9 cannot parse (Mantine 7 is the same, so downgrading is no escape). That needs two npm overrides to keep clean installs working, both verified against a Docker build: react-scripts declares peerOptional typescript ^3||^4, and fork-ts-checker 6.5.2 assigns typescript.performance.mark, which TS 5 made getter-only - crashing the dev server's type checker on every rebuild. semantic-baseline.test.js ratchets the removal: it fails if a file not already listed imports Semantic UI. An ESLint rule would have printed 75 warnings per rebuild, and CI unsets CI= for its build step, so it would guard nothing there. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-07-29 19:22:03 -06:00
/* --------------------------------------------------------------- Switches */
/*
* Mantine's unchecked track is a gray from its own palette, which would put a
* non-red pixel on screen in night mode. Scoped to `:not(:checked)` so the
* checked track keeps coming from the `color` prop.
*/
ui: Common.js and thirteen more files off Semantic Phase 2, part 3. Baseline 63 -> 50. Common.js is the one that mattered: 51 files import it, so its Semantic usage was propping up the rest of the migration. Everything in it now comes from the library -- Paginator, the two search inputs, DirectorySearch, TabLinks, the toggles, the messages, APIButton, Breadcrumbs, SimpleAccordion, IframeViewer, CardPoster, FileIcon, LoadStatistic, the theme menu, and the hotspot icons. Also migrated: Placeholder, Apps, ArchivePreview, CbzViewer, AddToPlaylist, TaggedDeleteConfirmModal, the collection edit/tag forms, and four inventory components. New in the library, all in the gallery and tested: SearchBox Semantic's `<Search category>` with its grouped results shape kept, because four call sites already build it. A real combobox rather than a div that listens for clicks. Pagination Semantic's prop names; onPageChange gets the page number. TabBar the strip only -- routing stays with the caller. IconStack Semantic's IconGroup, named once for assistive technology. Table.HeaderCell sorted/onSort -- a real button carrying aria-sort. Button/IconButton translate Semantic's size names. That last one is defensive: unmigrated callers still pass size='tiny', and Mantine drops a size it does not recognise without a word, so the button quietly renders at the wrong size. Mapping here keeps the mixed state honest. Three real bugs found and fixed on the way, none of them cosmetic: * `fileSuffixIconName` returned fourteen icon names the map did not have, so opening a folder with a PDF, a Word document or an archive in it logged an error and drew a fallback glyph. All fourteen mapped, with a test that walks the mapper's own return values, and another asserting every mapped name resolves to a Tabler component that exists. * `Statistic` relied on Semantic's `Statistic.Group` for its spacing, so on the dashboard the load averages ran together into "1 MIN. LOAD5 MIN. LOAD15 MIN. LOAD". It carries its own spacing now. * Semantic's inverted stylesheet colors every descendant of an inverted segment, so Toggle labels inherited #dddddd -- white pixels in night mode, on the Settings page, which is exactly where someone adjusts their WROLPi in the dark. Restated from tokens. The baseline ratchet gained a third assertion: a migrated file may still lean on Semantic's CSS classes without importing the library, which the import check cannot see and which would collapse silently when Phase 4 deletes the stylesheet. There is one such bridge today and it is now declared.
2026-07-30 10:00:48 -06:00
/*
* Semantic's inverted stylesheet colors *every* descendant of `.ui.inverted.segment`
* (rgba(255,255,255,.9), and #dddddd on labels). Our components are mounted inside
* unmigrated pages that still use those wrappers, so an inherited color puts white
* pixels on screen in night mode. Restating from tokens is the fix; the rule can go
* when the last Semantic wrapper does.
*/
.wrolpi-switch .mantine-Switch-label {
color: var(--text);
}
.wrolpi-switch .mantine-Switch-description {
color: var(--muted);
}
.wrolpi-switch input:disabled + * .mantine-Switch-label,
.wrolpi-switch input:disabled ~ * .mantine-Switch-label {
color: var(--muted);
}
ui: token-driven component library on Mantine Adds src/components/ui: buttons, messages, labels, progress, status, tables, form controls, panels, cards, statistics, modals, tooltips, tabs, and icons. Everything resolves its colors through theme tokens, so no component branches on the current theme, and Semantic UI keeps rendering the app meanwhile. Mantine is bridged rather than restyled: its own CSS variables are pointed at our tokens. Four details were not obvious, and each caused a visible defect in night mode before being fixed: - Structural colors must go in the resolver's light/dark blocks. Mantine emits its values under [data-mantine-color-scheme], which outranks the :root block that `variables` becomes, so its grays were winning. - The dark and gray palettes are mapped shade by shade to tokens. Mantine reads them directly for table borders, zebra stripes and input chrome; they can be neither flattened nor left alone. - Mantine writes --button-* as inline styles, which no stylesheet can outrank, so the dashed danger treatment sets real properties instead. - Switch colors are written onto inner elements, so they need scoped CSS rather than a variable on the root. Adds a --knob token for control handles, because Mantine's default thumb follows theme.white, which is near-black in the dark-based themes. An audit of every painted pixel in the /theme-sample gallery now finds no non-red channel in night mode. Icons come from @tabler/icons-react with the 102 Semantic names the app uses mapped to components; they stroke with currentColor, so they follow the theme without any rule of their own. Toasts keep the react-semantic-toasts-2 signature so those call sites migrate by changing an import. TypeScript 5 is required: Mantine's declarations use `const` type parameters, which 4.9 cannot parse (Mantine 7 is the same, so downgrading is no escape). That needs two npm overrides to keep clean installs working, both verified against a Docker build: react-scripts declares peerOptional typescript ^3||^4, and fork-ts-checker 6.5.2 assigns typescript.performance.mark, which TS 5 made getter-only - crashing the dev server's type checker on every rebuild. semantic-baseline.test.js ratchets the removal: it fails if a file not already listed imports Semantic UI. An ESLint rule would have printed 75 warnings per rebuild, and CI unsets CI= for its build step, so it would guard nothing there. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-07-29 19:22:03 -06:00
.wrolpi-switch input:not(:checked) + .mantine-Switch-track {
--switch-bg: var(--border);
}
/*
* The disabled thumb has the same problem: Mantine sets it from its gray palette,
* on the thumb element itself, which is a near-white pixel in night mode.
*/
.wrolpi-switch input:disabled + * > .mantine-Switch-thumb,
.wrolpi-switch input[data-disabled] + * > .mantine-Switch-thumb {
--switch-thumb-bg-disabled: var(--muted);
}
/* ----------------------------------------------------------------- Labels */
/*
* Sized to Semantic's label (12px text, ~7px of vertical padding), which these replaced.
* The first pass came out at 11.5px with 3px of padding and read as noticeably smaller than
* what users had before -- a tag is a hit target as well as a word.
*/
ui: token-driven component library on Mantine Adds src/components/ui: buttons, messages, labels, progress, status, tables, form controls, panels, cards, statistics, modals, tooltips, tabs, and icons. Everything resolves its colors through theme tokens, so no component branches on the current theme, and Semantic UI keeps rendering the app meanwhile. Mantine is bridged rather than restyled: its own CSS variables are pointed at our tokens. Four details were not obvious, and each caused a visible defect in night mode before being fixed: - Structural colors must go in the resolver's light/dark blocks. Mantine emits its values under [data-mantine-color-scheme], which outranks the :root block that `variables` becomes, so its grays were winning. - The dark and gray palettes are mapped shade by shade to tokens. Mantine reads them directly for table borders, zebra stripes and input chrome; they can be neither flattened nor left alone. - Mantine writes --button-* as inline styles, which no stylesheet can outrank, so the dashed danger treatment sets real properties instead. - Switch colors are written onto inner elements, so they need scoped CSS rather than a variable on the root. Adds a --knob token for control handles, because Mantine's default thumb follows theme.white, which is near-black in the dark-based themes. An audit of every painted pixel in the /theme-sample gallery now finds no non-red channel in night mode. Icons come from @tabler/icons-react with the 102 Semantic names the app uses mapped to components; they stroke with currentColor, so they follow the theme without any rule of their own. Toasts keep the react-semantic-toasts-2 signature so those call sites migrate by changing an import. TypeScript 5 is required: Mantine's declarations use `const` type parameters, which 4.9 cannot parse (Mantine 7 is the same, so downgrading is no escape). That needs two npm overrides to keep clean installs working, both verified against a Docker build: react-scripts declares peerOptional typescript ^3||^4, and fork-ts-checker 6.5.2 assigns typescript.performance.mark, which TS 5 made getter-only - crashing the dev server's type checker on every rebuild. semantic-baseline.test.js ratchets the removal: it fails if a file not already listed imports Semantic UI. An ESLint rule would have printed 75 warnings per rebuild, and CI unsets CI= for its build step, so it would guard nothing there. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-07-29 19:22:03 -06:00
.wrolpi-label {
display: inline-flex;
align-items: center;
gap: 4px;
padding: 5px 10px;
font-size: 12.5px;
ui: token-driven component library on Mantine Adds src/components/ui: buttons, messages, labels, progress, status, tables, form controls, panels, cards, statistics, modals, tooltips, tabs, and icons. Everything resolves its colors through theme tokens, so no component branches on the current theme, and Semantic UI keeps rendering the app meanwhile. Mantine is bridged rather than restyled: its own CSS variables are pointed at our tokens. Four details were not obvious, and each caused a visible defect in night mode before being fixed: - Structural colors must go in the resolver's light/dark blocks. Mantine emits its values under [data-mantine-color-scheme], which outranks the :root block that `variables` becomes, so its grays were winning. - The dark and gray palettes are mapped shade by shade to tokens. Mantine reads them directly for table borders, zebra stripes and input chrome; they can be neither flattened nor left alone. - Mantine writes --button-* as inline styles, which no stylesheet can outrank, so the dashed danger treatment sets real properties instead. - Switch colors are written onto inner elements, so they need scoped CSS rather than a variable on the root. Adds a --knob token for control handles, because Mantine's default thumb follows theme.white, which is near-black in the dark-based themes. An audit of every painted pixel in the /theme-sample gallery now finds no non-red channel in night mode. Icons come from @tabler/icons-react with the 102 Semantic names the app uses mapped to components; they stroke with currentColor, so they follow the theme without any rule of their own. Toasts keep the react-semantic-toasts-2 signature so those call sites migrate by changing an import. TypeScript 5 is required: Mantine's declarations use `const` type parameters, which 4.9 cannot parse (Mantine 7 is the same, so downgrading is no escape). That needs two npm overrides to keep clean installs working, both verified against a Docker build: react-scripts declares peerOptional typescript ^3||^4, and fork-ts-checker 6.5.2 assigns typescript.performance.mark, which TS 5 made getter-only - crashing the dev server's type checker on every rebuild. semantic-baseline.test.js ratchets the removal: it fails if a file not already listed imports Semantic UI. An ESLint rule would have printed 75 warnings per rebuild, and CI unsets CI= for its build step, so it would guard nothing there. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-07-29 19:22:03 -06:00
font-weight: 500;
line-height: 1.3;
background: var(--label-color);
/*
* `--label-text` is set per-tag by Tags.js, which calculates black or light text against
* the user's chosen fill. The fallback covers every label whose fill is a theme token.
* It is a variable rather than an inline `color` so that a theme which discards the fill
* can also discard the text colour calculated for it.
*/
color: var(--label-text, var(--btn-text));
ui: token-driven component library on Mantine Adds src/components/ui: buttons, messages, labels, progress, status, tables, form controls, panels, cards, statistics, modals, tooltips, tabs, and icons. Everything resolves its colors through theme tokens, so no component branches on the current theme, and Semantic UI keeps rendering the app meanwhile. Mantine is bridged rather than restyled: its own CSS variables are pointed at our tokens. Four details were not obvious, and each caused a visible defect in night mode before being fixed: - Structural colors must go in the resolver's light/dark blocks. Mantine emits its values under [data-mantine-color-scheme], which outranks the :root block that `variables` becomes, so its grays were winning. - The dark and gray palettes are mapped shade by shade to tokens. Mantine reads them directly for table borders, zebra stripes and input chrome; they can be neither flattened nor left alone. - Mantine writes --button-* as inline styles, which no stylesheet can outrank, so the dashed danger treatment sets real properties instead. - Switch colors are written onto inner elements, so they need scoped CSS rather than a variable on the root. Adds a --knob token for control handles, because Mantine's default thumb follows theme.white, which is near-black in the dark-based themes. An audit of every painted pixel in the /theme-sample gallery now finds no non-red channel in night mode. Icons come from @tabler/icons-react with the 102 Semantic names the app uses mapped to components; they stroke with currentColor, so they follow the theme without any rule of their own. Toasts keep the react-semantic-toasts-2 signature so those call sites migrate by changing an import. TypeScript 5 is required: Mantine's declarations use `const` type parameters, which 4.9 cannot parse (Mantine 7 is the same, so downgrading is no escape). That needs two npm overrides to keep clean installs working, both verified against a Docker build: react-scripts declares peerOptional typescript ^3||^4, and fork-ts-checker 6.5.2 assigns typescript.performance.mark, which TS 5 made getter-only - crashing the dev server's type checker on every rebuild. semantic-baseline.test.js ratchets the removal: it fails if a file not already listed imports Semantic UI. An ESLint rule would have printed 75 warnings per rebuild, and CI unsets CI= for its build step, so it would guard nothing there. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-07-29 19:22:03 -06:00
border: 1px solid transparent;
}
/* ------------------------------------------------------------------- Tags */
/*
* A tag is a label with a physical shape: a pointed left edge and an eyelet, like a tag
* tied to a garment. The point is a square rotated 45 degrees behind the left edge -- its
* right half sits under the body in the same colour and merges, leaving the left half
* showing as the point. At 20px a side its diagonal is 28px, which is the body's height,
* so the two edges of the point meet the body exactly at its corners.
*
* The eyelet is drawn in `currentColor`, so it reads as a hole punched through the tag on
* any surface, filled or outlined, without needing to know what is behind it.
*/
.wrolpi-tag {
position: relative;
/*
* Room for the point, which is drawn outside the body: half its diagonal (14.1px) plus
* the 1px it is nudged left, rounded up.
*/
margin-left: 16px;
/* Tags wrap, and a wrapped row was sitting on the row above it. */
margin-bottom: 5px;
/*
* The point is centred on the left edge, so its inner half covers the body's first 10px
* -- and a positioned pseudo-element paints above the parent's text, not behind it, so
* without this the first letter is hidden under the point. Semantic's tag label carried
* the same asymmetry (`padding-left: 1.5em`) for the same reason.
*/
padding-left: 13px;
}
.wrolpi-tag::before {
content: '';
position: absolute;
top: 50%;
right: 100%;
width: 20px;
height: 20px;
/*
* Nudged 1px left of where `right: 100%` puts it. That property positions against the
* containing block's *padding* box, and the body carries a 1px border, so a square centred
* there sits a pixel inside the visible left edge -- and the point read as set slightly
* into the tag rather than growing out of it. This is exactly that border: 2px opened a
* visible gap on the inner side, because the point's edges then meet the body's left edge
* short of its corners and leave the difference showing.
*/
transform: translate(calc(50% - 1px), -50%) rotate(45deg);
background: var(--label-color);
}
/*
* The eyelet sits in the point, where a real tag's hole is -- inside the body it reads as a
* bullet in front of the word. It is outside the element's own box, over the ::before, and
* paints on top of it by being the later pseudo-element.
*/
.wrolpi-tag::after {
content: '';
position: absolute;
top: 50%;
left: -7px;
width: 5px;
height: 5px;
margin-top: -2.5px;
border-radius: 50%;
background: currentColor;
/* A hole, not a dot: it should read as absence rather than as a bullet. */
opacity: 0.45;
}
/*
* White and black labels would vanish into the surface they sit on. They set the text
* colour through `--label-text` rather than `color` for the same reason the per-tag colour
* does: setting `color` here outranked the base rule, so amber -- which replaces every fill
* with its own and has no `color` rule of its own -- was left painting `--white` on `--text`,
* light orange on orange.
*/
ui: token-driven component library on Mantine Adds src/components/ui: buttons, messages, labels, progress, status, tables, form controls, panels, cards, statistics, modals, tooltips, tabs, and icons. Everything resolves its colors through theme tokens, so no component branches on the current theme, and Semantic UI keeps rendering the app meanwhile. Mantine is bridged rather than restyled: its own CSS variables are pointed at our tokens. Four details were not obvious, and each caused a visible defect in night mode before being fixed: - Structural colors must go in the resolver's light/dark blocks. Mantine emits its values under [data-mantine-color-scheme], which outranks the :root block that `variables` becomes, so its grays were winning. - The dark and gray palettes are mapped shade by shade to tokens. Mantine reads them directly for table borders, zebra stripes and input chrome; they can be neither flattened nor left alone. - Mantine writes --button-* as inline styles, which no stylesheet can outrank, so the dashed danger treatment sets real properties instead. - Switch colors are written onto inner elements, so they need scoped CSS rather than a variable on the root. Adds a --knob token for control handles, because Mantine's default thumb follows theme.white, which is near-black in the dark-based themes. An audit of every painted pixel in the /theme-sample gallery now finds no non-red channel in night mode. Icons come from @tabler/icons-react with the 102 Semantic names the app uses mapped to components; they stroke with currentColor, so they follow the theme without any rule of their own. Toasts keep the react-semantic-toasts-2 signature so those call sites migrate by changing an import. TypeScript 5 is required: Mantine's declarations use `const` type parameters, which 4.9 cannot parse (Mantine 7 is the same, so downgrading is no escape). That needs two npm overrides to keep clean installs working, both verified against a Docker build: react-scripts declares peerOptional typescript ^3||^4, and fork-ts-checker 6.5.2 assigns typescript.performance.mark, which TS 5 made getter-only - crashing the dev server's type checker on every rebuild. semantic-baseline.test.js ratchets the removal: it fails if a file not already listed imports Semantic UI. An ESLint rule would have printed 75 warnings per rebuild, and CI unsets CI= for its build step, so it would guard nothing there. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-07-29 19:22:03 -06:00
.wrolpi-label-white {
--label-text: var(--black);
ui: token-driven component library on Mantine Adds src/components/ui: buttons, messages, labels, progress, status, tables, form controls, panels, cards, statistics, modals, tooltips, tabs, and icons. Everything resolves its colors through theme tokens, so no component branches on the current theme, and Semantic UI keeps rendering the app meanwhile. Mantine is bridged rather than restyled: its own CSS variables are pointed at our tokens. Four details were not obvious, and each caused a visible defect in night mode before being fixed: - Structural colors must go in the resolver's light/dark blocks. Mantine emits its values under [data-mantine-color-scheme], which outranks the :root block that `variables` becomes, so its grays were winning. - The dark and gray palettes are mapped shade by shade to tokens. Mantine reads them directly for table borders, zebra stripes and input chrome; they can be neither flattened nor left alone. - Mantine writes --button-* as inline styles, which no stylesheet can outrank, so the dashed danger treatment sets real properties instead. - Switch colors are written onto inner elements, so they need scoped CSS rather than a variable on the root. Adds a --knob token for control handles, because Mantine's default thumb follows theme.white, which is near-black in the dark-based themes. An audit of every painted pixel in the /theme-sample gallery now finds no non-red channel in night mode. Icons come from @tabler/icons-react with the 102 Semantic names the app uses mapped to components; they stroke with currentColor, so they follow the theme without any rule of their own. Toasts keep the react-semantic-toasts-2 signature so those call sites migrate by changing an import. TypeScript 5 is required: Mantine's declarations use `const` type parameters, which 4.9 cannot parse (Mantine 7 is the same, so downgrading is no escape). That needs two npm overrides to keep clean installs working, both verified against a Docker build: react-scripts declares peerOptional typescript ^3||^4, and fork-ts-checker 6.5.2 assigns typescript.performance.mark, which TS 5 made getter-only - crashing the dev server's type checker on every rebuild. semantic-baseline.test.js ratchets the removal: it fails if a file not already listed imports Semantic UI. An ESLint rule would have printed 75 warnings per rebuild, and CI unsets CI= for its build step, so it would guard nothing there. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-07-29 19:22:03 -06:00
border-color: var(--border);
}
.wrolpi-label-black {
--label-text: var(--white);
ui: token-driven component library on Mantine Adds src/components/ui: buttons, messages, labels, progress, status, tables, form controls, panels, cards, statistics, modals, tooltips, tabs, and icons. Everything resolves its colors through theme tokens, so no component branches on the current theme, and Semantic UI keeps rendering the app meanwhile. Mantine is bridged rather than restyled: its own CSS variables are pointed at our tokens. Four details were not obvious, and each caused a visible defect in night mode before being fixed: - Structural colors must go in the resolver's light/dark blocks. Mantine emits its values under [data-mantine-color-scheme], which outranks the :root block that `variables` becomes, so its grays were winning. - The dark and gray palettes are mapped shade by shade to tokens. Mantine reads them directly for table borders, zebra stripes and input chrome; they can be neither flattened nor left alone. - Mantine writes --button-* as inline styles, which no stylesheet can outrank, so the dashed danger treatment sets real properties instead. - Switch colors are written onto inner elements, so they need scoped CSS rather than a variable on the root. Adds a --knob token for control handles, because Mantine's default thumb follows theme.white, which is near-black in the dark-based themes. An audit of every painted pixel in the /theme-sample gallery now finds no non-red channel in night mode. Icons come from @tabler/icons-react with the 102 Semantic names the app uses mapped to components; they stroke with currentColor, so they follow the theme without any rule of their own. Toasts keep the react-semantic-toasts-2 signature so those call sites migrate by changing an import. TypeScript 5 is required: Mantine's declarations use `const` type parameters, which 4.9 cannot parse (Mantine 7 is the same, so downgrading is no escape). That needs two npm overrides to keep clean installs working, both verified against a Docker build: react-scripts declares peerOptional typescript ^3||^4, and fork-ts-checker 6.5.2 assigns typescript.performance.mark, which TS 5 made getter-only - crashing the dev server's type checker on every rebuild. semantic-baseline.test.js ratchets the removal: it fails if a file not already listed imports Semantic UI. An ESLint rule would have printed 75 warnings per rebuild, and CI unsets CI= for its build step, so it would guard nothing there. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-07-29 19:22:03 -06:00
border-color: var(--border);
}
/*
* Night mode: a filled label is a bright patch, and a wall of tags would be a
* wall of light. Every label becomes an outline instead.
*/
html[data-theme="night"] .wrolpi-label {
background: transparent;
color: var(--label-color);
border-color: var(--label-color);
}
/*
* Night draws the tag as an outline, so the point has to be two strokes rather than a solid
* diamond, and the body's own left border has to go -- otherwise a line closes across the
* base of the point and it reads as a chip with a triangle stuck to it.
*/
html[data-theme="night"] .wrolpi-tag {
border-left-color: transparent;
}
html[data-theme="night"] .wrolpi-tag::before {
background: transparent;
border-left: 1px solid var(--label-color);
border-bottom: 1px solid var(--label-color);
}
ui: migrate the extension pages and Configs; five components they needed Phase 2, part 1. Three files leave Semantic UI (baseline 75 -> 72), and the components they needed join the library and the gallery: Header Semantic's shape (as/icon/subheader/dividing). 47 files use <Header>, and the level now picks the size, so the type scale stays a scale instead of each call site choosing a font size. Message gains an icon and a dismiss button. ActionInput input and button sharing one outline, for <Input action={...}/>. Loading centered loader with a caption, replacing the <Loader active inline='centered'> + wrapper div in 19 places. Modal becomes compound - Modal.Header/.Content/.Actions, plus Semantic's open, closeIcon, and size names - because 34 files are written against that shape. test-utils mounts MantineProvider with ThemeProvider's exact configuration: migrated components render Mantine internals and every one of their test files would otherwise need its own provider. One Semantic bleed found and fixed: semantic.min.css sets `h1,h2,h3,h4,h5 { font-family: Lato }` and loads after Mantine's element rule, so headings ignored the theme's body face. Only visible in amber, where the body is mono and the headings were not. A class-level restatement outranks it; the rule comes out when Semantic does. Verified: 925 jest tests, clean production build, and a night-mode audit of every painted pixel in the gallery (red-only, one known false positive). The Configs backup and restore flow was exercised against the real API.
2026-07-29 20:25:34 -06:00
/* ---------------------------------------------------------------- Headers */
.wrolpi-header {
margin: 0 0 10px;
}
ui: headings open their section, and keep their help icon on one line Two things, and the second was a regression this migration caused. A heading had `margin: 0 0 10px` -- no top margin at all -- so it sat flush against whatever came before and read as part of it rather than as the start of the next thing. On /more/statistics "Tags" touched the panel above it with a 0px gap. Now 22px above and 10px below, because a heading belongs to what follows it. `* + .wrolpi-header` rather than a blanket margin, for the same reason StatisticGroup needed it: a heading that opens a Panel or a page is already where it should be, and pushing it down just dents the top of its own container. The help icon on every HelpHeader and InfoHeader had dropped to its own line -- "Root CA Certificate" in Settings is the clearest one. `.inline-header` set `h1..h5 {display: inline-block}` so the heading and a sibling `<span>` shared a row, which worked while these were a bare `<h2>` and stopped the moment they gained a block wrapper: the `<label>`'s block child forced a break. Fixed in the library rather than patched in App.css. `Header` takes an `after` slot rendered inside the heading element, where the existing flex row already handles alignment and spacing. Both wrappers pass their icon through it, the `<label>` moves inside the heading so `for_` keeps associating the text with its field (three call sites rely on it), and the `.inline-header` rules are deleted. Fifteen call sites are fixed by fixing the two wrappers. Tests: containment in jest, and the part jsdom cannot judge -- that the two boxes actually share a line, and that the heading stays one row tall -- in a browser. Planted both original shapes: the margin removed, a blanket margin denting its container, and the control moved back outside the heading element. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
2026-08-01 18:41:58 -06:00
/*
* A heading opens a section, so it needs more air above it than below — it belongs to
* what follows, not to what came before. With no top margin at all a heading sat flush
* against the panel above it, which read as part of that panel rather than as the start
* of the next thing (visible on /more/statistics, where "Tags" touched the panel above).
*
* `* +` rather than a blanket margin: a heading that opens a Panel or a page is already
* where it should be, and pushing it down would just dent the top of its own container.
*/
* + .wrolpi-header {
margin-top: 22px;
}
test: act on review — and one of the seven turned out to be undemonstrable Six real fixes and one honest retraction. The control is now a SIBLING of the heading inside a flex row, not a child of it. Inside the `<h3>` it joined the heading's accessible name, so screen reader heading navigation announced "Root CA Certificate Help". The row is what keeps them on one line, and it is only rendered when there is something to sit beside, so the markup for the other 46 call sites is unchanged. `style` now lands on the wrapper. It used to reach the outer div; going through Header put it on the inner heading, where a margin sets space INSIDE the wrapper and only worked at all through margin collapse -- which stops the moment the wrapper gains padding or a border. Status's "Drive Bandwidth" is the live case: verified 16px on the block, 0 on the h2. Text properties still arrive, because colour and text-align inherit; the `color` PROP stays on the heading. A `<label>` only when `for_` names a field. Several call sites pass an InfoHeader as the `label` prop of InputForm/ToggleForm, which wraps it in a label of its own -- an unconditional one nested labels, which is invalid and makes clicking the text ambiguous. Verified: zero `label label` on /videos/settings, where "Video Resolutions" keeps its label and "Video File Format" no longer has one. The help controls carried `iconStyle: {margin: '0.5em'}`, which separated a free-floating sibling and, inside the row, added to the gap on every side. Zeroed; the row's gap is the spacing. The browser test mounted a plain Button in an `after` slot rather than a real HelpHeader, so the default icon chrome above was exactly what it could not see. It mounts the real wrapper now. Two of my assertions were also too weak to catch what they claimed: the gap was measured to `.wrolpi-header-after`, a flex container whose own rect does not move when a child gains a margin, so it had to measure the button; and the squeeze case used a title of ordinary words, which simply wraps and never puts the row under pressure. Renamed the suites -- "keeps the icon on its own line" read as the opposite of the fix. The retraction: `flex-shrink: 0` is declared but has NO test. Three attempts could not find a width where removing it changes what is painted -- the row's only other item is a heading, and its automatic minimum size absorbs the pressure; the help control is an ActionIcon with a min-width it will not go below either. The declaration stays as a statement of intent, with a comment saying it is unproven, rather than a green test that does not discriminate. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
2026-08-01 19:00:32 -06:00
/* The heading and its trailing control share one row. */
.wrolpi-header-row {
display: flex;
align-items: center;
gap: 8px;
}
ui: headings open their section, and keep their help icon on one line Two things, and the second was a regression this migration caused. A heading had `margin: 0 0 10px` -- no top margin at all -- so it sat flush against whatever came before and read as part of it rather than as the start of the next thing. On /more/statistics "Tags" touched the panel above it with a 0px gap. Now 22px above and 10px below, because a heading belongs to what follows it. `* + .wrolpi-header` rather than a blanket margin, for the same reason StatisticGroup needed it: a heading that opens a Panel or a page is already where it should be, and pushing it down just dents the top of its own container. The help icon on every HelpHeader and InfoHeader had dropped to its own line -- "Root CA Certificate" in Settings is the clearest one. `.inline-header` set `h1..h5 {display: inline-block}` so the heading and a sibling `<span>` shared a row, which worked while these were a bare `<h2>` and stopped the moment they gained a block wrapper: the `<label>`'s block child forced a break. Fixed in the library rather than patched in App.css. `Header` takes an `after` slot rendered inside the heading element, where the existing flex row already handles alignment and spacing. Both wrappers pass their icon through it, the `<label>` moves inside the heading so `for_` keeps associating the text with its field (three call sites rely on it), and the `.inline-header` rules are deleted. Fifteen call sites are fixed by fixing the two wrappers. Tests: containment in jest, and the part jsdom cannot judge -- that the two boxes actually share a line, and that the heading stays one row tall -- in a browser. Planted both original shapes: the margin removed, a blanket margin denting its container, and the control moved back outside the heading element. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
2026-08-01 18:41:58 -06:00
/*
test: act on review — and one of the seven turned out to be undemonstrable Six real fixes and one honest retraction. The control is now a SIBLING of the heading inside a flex row, not a child of it. Inside the `<h3>` it joined the heading's accessible name, so screen reader heading navigation announced "Root CA Certificate Help". The row is what keeps them on one line, and it is only rendered when there is something to sit beside, so the markup for the other 46 call sites is unchanged. `style` now lands on the wrapper. It used to reach the outer div; going through Header put it on the inner heading, where a margin sets space INSIDE the wrapper and only worked at all through margin collapse -- which stops the moment the wrapper gains padding or a border. Status's "Drive Bandwidth" is the live case: verified 16px on the block, 0 on the h2. Text properties still arrive, because colour and text-align inherit; the `color` PROP stays on the heading. A `<label>` only when `for_` names a field. Several call sites pass an InfoHeader as the `label` prop of InputForm/ToggleForm, which wraps it in a label of its own -- an unconditional one nested labels, which is invalid and makes clicking the text ambiguous. Verified: zero `label label` on /videos/settings, where "Video Resolutions" keeps its label and "Video File Format" no longer has one. The help controls carried `iconStyle: {margin: '0.5em'}`, which separated a free-floating sibling and, inside the row, added to the gap on every side. Zeroed; the row's gap is the spacing. The browser test mounted a plain Button in an `after` slot rather than a real HelpHeader, so the default icon chrome above was exactly what it could not see. It mounts the real wrapper now. Two of my assertions were also too weak to catch what they claimed: the gap was measured to `.wrolpi-header-after`, a flex container whose own rect does not move when a child gains a margin, so it had to measure the button; and the squeeze case used a title of ordinary words, which simply wraps and never puts the row under pressure. Renamed the suites -- "keeps the icon on its own line" read as the opposite of the fix. The retraction: `flex-shrink: 0` is declared but has NO test. Three attempts could not find a width where removing it changes what is painted -- the row's only other item is a heading, and its automatic minimum size absorbs the pressure; the help control is an ActionIcon with a min-width it will not go below either. The declaration stays as a statement of intent, with a comment saying it is unproven, rather than a green test that does not discriminate. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
2026-08-01 19:00:32 -06:00
* Trailing content keeps the heading's row but not its size: a help button rendered at
* heading scale is a 26px glyph next to a 17px word.
*
* `flex-shrink: 0` states the intent -- a control is not the thing that should give way,
* a long title should wrap instead. Declared, but NOT covered by a test: with the row's
* only other item being a heading, the heading's automatic minimum size absorbs the
* pressure and no width could be found where removing this changes what is painted. It
* is here for the day the slot holds something beside a heading that can shrink, not
* because a case exists today.
ui: headings open their section, and keep their help icon on one line Two things, and the second was a regression this migration caused. A heading had `margin: 0 0 10px` -- no top margin at all -- so it sat flush against whatever came before and read as part of it rather than as the start of the next thing. On /more/statistics "Tags" touched the panel above it with a 0px gap. Now 22px above and 10px below, because a heading belongs to what follows it. `* + .wrolpi-header` rather than a blanket margin, for the same reason StatisticGroup needed it: a heading that opens a Panel or a page is already where it should be, and pushing it down just dents the top of its own container. The help icon on every HelpHeader and InfoHeader had dropped to its own line -- "Root CA Certificate" in Settings is the clearest one. `.inline-header` set `h1..h5 {display: inline-block}` so the heading and a sibling `<span>` shared a row, which worked while these were a bare `<h2>` and stopped the moment they gained a block wrapper: the `<label>`'s block child forced a break. Fixed in the library rather than patched in App.css. `Header` takes an `after` slot rendered inside the heading element, where the existing flex row already handles alignment and spacing. Both wrappers pass their icon through it, the `<label>` moves inside the heading so `for_` keeps associating the text with its field (three call sites rely on it), and the `.inline-header` rules are deleted. Fifteen call sites are fixed by fixing the two wrappers. Tests: containment in jest, and the part jsdom cannot judge -- that the two boxes actually share a line, and that the heading stays one row tall -- in a browser. Planted both original shapes: the margin removed, a blanket margin denting its container, and the control moved back outside the heading element. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
2026-08-01 18:41:58 -06:00
*/
.wrolpi-header-after {
display: inline-flex;
align-items: center;
test: act on review — and one of the seven turned out to be undemonstrable Six real fixes and one honest retraction. The control is now a SIBLING of the heading inside a flex row, not a child of it. Inside the `<h3>` it joined the heading's accessible name, so screen reader heading navigation announced "Root CA Certificate Help". The row is what keeps them on one line, and it is only rendered when there is something to sit beside, so the markup for the other 46 call sites is unchanged. `style` now lands on the wrapper. It used to reach the outer div; going through Header put it on the inner heading, where a margin sets space INSIDE the wrapper and only worked at all through margin collapse -- which stops the moment the wrapper gains padding or a border. Status's "Drive Bandwidth" is the live case: verified 16px on the block, 0 on the h2. Text properties still arrive, because colour and text-align inherit; the `color` PROP stays on the heading. A `<label>` only when `for_` names a field. Several call sites pass an InfoHeader as the `label` prop of InputForm/ToggleForm, which wraps it in a label of its own -- an unconditional one nested labels, which is invalid and makes clicking the text ambiguous. Verified: zero `label label` on /videos/settings, where "Video Resolutions" keeps its label and "Video File Format" no longer has one. The help controls carried `iconStyle: {margin: '0.5em'}`, which separated a free-floating sibling and, inside the row, added to the gap on every side. Zeroed; the row's gap is the spacing. The browser test mounted a plain Button in an `after` slot rather than a real HelpHeader, so the default icon chrome above was exactly what it could not see. It mounts the real wrapper now. Two of my assertions were also too weak to catch what they claimed: the gap was measured to `.wrolpi-header-after`, a flex container whose own rect does not move when a child gains a margin, so it had to measure the button; and the squeeze case used a title of ordinary words, which simply wraps and never puts the row under pressure. Renamed the suites -- "keeps the icon on its own line" read as the opposite of the fix. The retraction: `flex-shrink: 0` is declared but has NO test. Three attempts could not find a width where removing it changes what is painted -- the row's only other item is a heading, and its automatic minimum size absorbs the pressure; the help control is an ActionIcon with a min-width it will not go below either. The declaration stays as a statement of intent, with a comment saying it is unproven, rather than a green test that does not discriminate. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
2026-08-01 19:00:32 -06:00
flex-shrink: 0;
ui: headings open their section, and keep their help icon on one line Two things, and the second was a regression this migration caused. A heading had `margin: 0 0 10px` -- no top margin at all -- so it sat flush against whatever came before and read as part of it rather than as the start of the next thing. On /more/statistics "Tags" touched the panel above it with a 0px gap. Now 22px above and 10px below, because a heading belongs to what follows it. `* + .wrolpi-header` rather than a blanket margin, for the same reason StatisticGroup needed it: a heading that opens a Panel or a page is already where it should be, and pushing it down just dents the top of its own container. The help icon on every HelpHeader and InfoHeader had dropped to its own line -- "Root CA Certificate" in Settings is the clearest one. `.inline-header` set `h1..h5 {display: inline-block}` so the heading and a sibling `<span>` shared a row, which worked while these were a bare `<h2>` and stopped the moment they gained a block wrapper: the `<label>`'s block child forced a break. Fixed in the library rather than patched in App.css. `Header` takes an `after` slot rendered inside the heading element, where the existing flex row already handles alignment and spacing. Both wrappers pass their icon through it, the `<label>` moves inside the heading so `for_` keeps associating the text with its field (three call sites rely on it), and the `.inline-header` rules are deleted. Fifteen call sites are fixed by fixing the two wrappers. Tests: containment in jest, and the part jsdom cannot judge -- that the two boxes actually share a line, and that the heading stays one row tall -- in a browser. Planted both original shapes: the margin removed, a blanket margin denting its container, and the control moved back outside the heading element. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
2026-08-01 18:41:58 -06:00
font-size: 13px;
font-weight: 400;
}
ui: migrate the extension pages and Configs; five components they needed Phase 2, part 1. Three files leave Semantic UI (baseline 75 -> 72), and the components they needed join the library and the gallery: Header Semantic's shape (as/icon/subheader/dividing). 47 files use <Header>, and the level now picks the size, so the type scale stays a scale instead of each call site choosing a font size. Message gains an icon and a dismiss button. ActionInput input and button sharing one outline, for <Input action={...}/>. Loading centered loader with a caption, replacing the <Loader active inline='centered'> + wrapper div in 19 places. Modal becomes compound - Modal.Header/.Content/.Actions, plus Semantic's open, closeIcon, and size names - because 34 files are written against that shape. test-utils mounts MantineProvider with ThemeProvider's exact configuration: migrated components render Mantine internals and every one of their test files would otherwise need its own provider. One Semantic bleed found and fixed: semantic.min.css sets `h1,h2,h3,h4,h5 { font-family: Lato }` and loads after Mantine's element rule, so headings ignored the theme's body face. Only visible in amber, where the body is mono and the headings were not. A class-level restatement outranks it; the rule comes out when Semantic does. Verified: 925 jest tests, clean production build, and a night-mode audit of every painted pixel in the gallery (red-only, one known false positive). The Configs backup and restore flow was exercised against the real API.
2026-07-29 20:25:34 -06:00
.wrolpi-header-dividing {
border-bottom: 1px solid var(--border);
padding-bottom: 6px;
}
.wrolpi-header-text {
display: flex;
align-items: center;
gap: 8px;
margin: 0;
/*
* Stated explicitly because semantic.min.css sets `h1,h2,h3,h4,h5 { font-family:
* Lato }` and loads after Mantine's element rule, so headings would ignore the
* theme's body face — visible in amber, where the body is mono and headings were
* not. A class outranks the element selector. Can go once Semantic is gone.
*/
font-family: var(--font-body);
font-weight: 600;
line-height: 1.25;
color: var(--text);
text-wrap: balance;
}
/* The scale lives here so no call site invents a size of its own. */
.wrolpi-header-h1 {
font-size: 26px;
}
.wrolpi-header-h2 {
font-size: 21px;
}
.wrolpi-header-h3 {
font-size: 17px;
}
.wrolpi-header-h4 {
font-size: 14px;
}
.wrolpi-header-h5 {
font-size: 13px;
letter-spacing: 0.02em;
}
.wrolpi-header-sub {
font-size: 12px;
color: var(--muted);
margin-top: 3px;
}
ui: three silent library defects the agents' reports surfaced Each of these was reported by an agent working around it rather than patched in one file, which is why all three are fixed once, for every call site. Button accepted an `href` and dropped it. Mantine renders an anchor only when it also gets `component='a'`; Semantic spelled that `as='a'`. So a migrated call site that kept just the href produced something that looks like a download link and navigates nowhere -- silently, with no warning. Button and IconButton now infer the anchor from the href. The media filter ran twice on nested media. A `.media` wrapper filters its subtree as one unit -- the audio player needs that, because its control glyphs are SVG and the element-type rule does not reach them -- but the poster image inside also matched that rule. Two passes of a luminance-to-red matrix is not one: the second takes 0.2126 of an already-red pixel, so the poster came out markedly darker than everything around it. Leaf media inside a filtered wrapper is now left alone. Progress had no indeterminate state. Semantic's `indicating` animated a stripe when the size was unknown; without it an upload that has not reported yet sits at 0% and reads as stalled -- and `aria-valuenow="0"` tells a screen reader the same wrong thing. It now animates, reports no value, and falls back to a static fill under prefers-reduced-motion. Also: night and amber now override an inline `--label-color`. A call site may legitimately need many distinguishable colours -- the Flasher's chip badges use a twelve-colour palette no four tokens can express -- but on a night-adapted screen a green or blue chip badge defeats the entire mode. The labels lose their distinctness there, which is the right trade.
2026-07-30 13:15:03 -06:00
/*
* Night and amber are single-hue by definition, and a call site may legitimately want
* many distinguishable colours — the Flasher's chip-family badges set `--label-color`
* inline from a twelve-colour palette that no four tokens can express.
*
* In those themes the palette is overridden back to the theme's own text colour, so a
* label cannot put a green or blue pixel on a night-adapted screen. `!important` is
* required because the palette arrives as an inline custom property, which a normal
* rule cannot outrank. The labels stop being distinguishable by colour, which is the
* correct trade: the theme's whole purpose is that no other hue reaches the eye.
*/
html[data-theme="night"] .wrolpi-label,
html[data-theme="amber"] .wrolpi-label {
--label-color: var(--text) !important;
/*
* The per-tag text colour goes with the fill it was calculated against. Tags.js works
* out black-or-light from the user's chosen hex, and once that hex is discarded the
* answer is not just useless but wrong: amber was painting `#dddddd` on `#ff9500`, about
* 1.9:1 and a neutral grey in a theme whose whole point is that nothing else is. Night,
* which is an outline over a near-black page, was painting that black text on nothing.
*
* There is no contrast to calculate here, which is why this is a token and not a second
* version of `contrastingColor`: the fill is the theme's own, so the answer is fixed.
*/
--label-text: var(--btn-text) !important;
ui: three silent library defects the agents' reports surfaced Each of these was reported by an agent working around it rather than patched in one file, which is why all three are fixed once, for every call site. Button accepted an `href` and dropped it. Mantine renders an anchor only when it also gets `component='a'`; Semantic spelled that `as='a'`. So a migrated call site that kept just the href produced something that looks like a download link and navigates nowhere -- silently, with no warning. Button and IconButton now infer the anchor from the href. The media filter ran twice on nested media. A `.media` wrapper filters its subtree as one unit -- the audio player needs that, because its control glyphs are SVG and the element-type rule does not reach them -- but the poster image inside also matched that rule. Two passes of a luminance-to-red matrix is not one: the second takes 0.2126 of an already-red pixel, so the poster came out markedly darker than everything around it. Leaf media inside a filtered wrapper is now left alone. Progress had no indeterminate state. Semantic's `indicating` animated a stripe when the size was unknown; without it an upload that has not reported yet sits at 0% and reads as stalled -- and `aria-valuenow="0"` tells a screen reader the same wrong thing. It now animates, reports no value, and falls back to a static fill under prefers-reduced-motion. Also: night and amber now override an inline `--label-color`. A call site may legitimately need many distinguishable colours -- the Flasher's chip badges use a twelve-colour palette no four tokens can express -- but on a night-adapted screen a green or blue chip badge defeats the entire mode. The labels lose their distinctness there, which is the right trade.
2026-07-30 13:15:03 -06:00
}
ui: toasts move to the top right, get readable titles, and get tests The title was unreadable in dark, night and amber. Mantine paints a dark-scheme notification title with `--mantine-color-white`, and the bridge aliases that to `--btn-text` -- deliberately, because it is the text drawn on a filled button, near-black in those three themes. So the title came out rgb(28, 31, 33) on a rgb(38, 41, 43) surface: about 1.1:1, present and invisible. Fixing the alias is not an option, it is correct for the buttons it exists for, so notifications now take their surface, border and text from our tokens instead. Measured after: 14.9, 11.9, 5.0 and 8.6 to one. The description follows the same route, and night and amber drop its muting. `--muted` on a panel is 2.0:1 in night and 3.1:1 in amber -- the description is the message itself, so those two let the title's weight carry the hierarchy instead. (`--muted` being that dim in night is not only a toast problem; statistic labels and inactive tabs use it too. Left alone here.) Position moves from bottom right to top right. Bottom right put toasts over the file browser's sticky footer and a video's player controls, which are the two places a background task is most likely to report while the user is doing something else. Gallery gets a Toasts section: one button per type, one that stacks a numbered toast per press, one that fills the container to its limit of five, one that never expires, one with no title, one with text long enough to wrap, and clear-all. A toast is the one component that cannot be seen by loading a page, so it needs buttons rather than a sample. Tests ----- Thirteen, where there were none for thirteen call sites -- and `toast` has already failed once app-wide, when App.js dropped Semantic's container while seven pages still imported the old helper and every notification silently went nowhere. Six were verified red against planted defects (a shared `id`, which makes Mantine replace instead of stack; one colour for every type; `autoClose` taking the 0 literally). The duration tests use real timers with short durations, which matters. With fake timers the element is never removed from the DOM -- hiding a notification runs an exit transition, and advancing the clock, even awaited inside `act`, does not complete it. Both the assertion and its control then read the same whatever the code does. The test for `time: 0` passed against a planted `autoClose: 0` twice before this was rewritten: once asserting synchronously, once with a control that could not fail either. It now waits for a normally-expiring toast to disappear first, so dismissal is demonstrably working before the survivor is asserted.
2026-08-01 14:50:53 -06:00
/* ----------------------------------------------------------------- Toasts */
/*
* Notifications take their colours from our tokens rather than from Mantine's colour scheme.
*
* Mantine paints a dark-scheme notification title with `--mantine-color-white`, and the
* bridge aliases that to `--btn-text` -- deliberately, because it is the text drawn on a
* filled button, which is near-black in dark, night and amber. So the title came out at
* rgb(28, 31, 33) on a rgb(38, 41, 43) surface: about 1.1:1, present and invisible. Fixing
* the alias is not an option; it is correct for the buttons it exists for.
*
* The `html` prefix is only there to outrank Mantine's single-class rules. One set of values
* covers every theme, because the tokens are what differ.
*/
html .mantine-Notification-root {
background-color: var(--panel);
border-color: var(--border);
}
html .mantine-Notification-title {
color: var(--text);
}
html .mantine-Notification-description {
color: var(--muted);
}
/*
* The description is the message itself, so it has to be read, and `--muted` is too dim to
* read on a panel in the two monochrome themes -- 2.0:1 in night, 3.1:1 in amber, against
* 5.1:1 and 5.7:1 in dark and light. Those two drop the muting and let the title's weight
* carry the hierarchy instead, which is the same brightness-over-hue trade the rest of night
* makes.
*/
html[data-theme="night"] .mantine-Notification-description,
html[data-theme="amber"] .mantine-Notification-description {
color: var(--text);
}
html .mantine-Notification-closeButton {
color: var(--muted);
}
html .mantine-Notification-closeButton:hover {
background-color: var(--head);
color: var(--text);
}
ui: token-driven component library on Mantine Adds src/components/ui: buttons, messages, labels, progress, status, tables, form controls, panels, cards, statistics, modals, tooltips, tabs, and icons. Everything resolves its colors through theme tokens, so no component branches on the current theme, and Semantic UI keeps rendering the app meanwhile. Mantine is bridged rather than restyled: its own CSS variables are pointed at our tokens. Four details were not obvious, and each caused a visible defect in night mode before being fixed: - Structural colors must go in the resolver's light/dark blocks. Mantine emits its values under [data-mantine-color-scheme], which outranks the :root block that `variables` becomes, so its grays were winning. - The dark and gray palettes are mapped shade by shade to tokens. Mantine reads them directly for table borders, zebra stripes and input chrome; they can be neither flattened nor left alone. - Mantine writes --button-* as inline styles, which no stylesheet can outrank, so the dashed danger treatment sets real properties instead. - Switch colors are written onto inner elements, so they need scoped CSS rather than a variable on the root. Adds a --knob token for control handles, because Mantine's default thumb follows theme.white, which is near-black in the dark-based themes. An audit of every painted pixel in the /theme-sample gallery now finds no non-red channel in night mode. Icons come from @tabler/icons-react with the 102 Semantic names the app uses mapped to components; they stroke with currentColor, so they follow the theme without any rule of their own. Toasts keep the react-semantic-toasts-2 signature so those call sites migrate by changing an import. TypeScript 5 is required: Mantine's declarations use `const` type parameters, which 4.9 cannot parse (Mantine 7 is the same, so downgrading is no escape). That needs two npm overrides to keep clean installs working, both verified against a Docker build: react-scripts declares peerOptional typescript ^3||^4, and fork-ts-checker 6.5.2 assigns typescript.performance.mark, which TS 5 made getter-only - crashing the dev server's type checker on every rebuild. semantic-baseline.test.js ratchets the removal: it fails if a file not already listed imports Semantic UI. An ESLint rule would have printed 75 warnings per rebuild, and CI unsets CI= for its build step, so it would guard nothing there. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-07-29 19:22:03 -06:00
/* --------------------------------------------------------------- Messages */
.wrolpi-message {
ui: migrate the extension pages and Configs; five components they needed Phase 2, part 1. Three files leave Semantic UI (baseline 75 -> 72), and the components they needed join the library and the gallery: Header Semantic's shape (as/icon/subheader/dividing). 47 files use <Header>, and the level now picks the size, so the type scale stays a scale instead of each call site choosing a font size. Message gains an icon and a dismiss button. ActionInput input and button sharing one outline, for <Input action={...}/>. Loading centered loader with a caption, replacing the <Loader active inline='centered'> + wrapper div in 19 places. Modal becomes compound - Modal.Header/.Content/.Actions, plus Semantic's open, closeIcon, and size names - because 34 files are written against that shape. test-utils mounts MantineProvider with ThemeProvider's exact configuration: migrated components render Mantine internals and every one of their test files would otherwise need its own provider. One Semantic bleed found and fixed: semantic.min.css sets `h1,h2,h3,h4,h5 { font-family: Lato }` and loads after Mantine's element rule, so headings ignored the theme's body face. Only visible in amber, where the body is mono and the headings were not. A class-level restatement outranks it; the rule comes out when Semantic does. Verified: 925 jest tests, clean production build, and a night-mode audit of every painted pixel in the gallery (red-only, one known false positive). The Configs backup and restore flow was exercised against the real API.
2026-07-29 20:25:34 -06:00
display: flex;
align-items: flex-start;
gap: 10px;
ui: token-driven component library on Mantine Adds src/components/ui: buttons, messages, labels, progress, status, tables, form controls, panels, cards, statistics, modals, tooltips, tabs, and icons. Everything resolves its colors through theme tokens, so no component branches on the current theme, and Semantic UI keeps rendering the app meanwhile. Mantine is bridged rather than restyled: its own CSS variables are pointed at our tokens. Four details were not obvious, and each caused a visible defect in night mode before being fixed: - Structural colors must go in the resolver's light/dark blocks. Mantine emits its values under [data-mantine-color-scheme], which outranks the :root block that `variables` becomes, so its grays were winning. - The dark and gray palettes are mapped shade by shade to tokens. Mantine reads them directly for table borders, zebra stripes and input chrome; they can be neither flattened nor left alone. - Mantine writes --button-* as inline styles, which no stylesheet can outrank, so the dashed danger treatment sets real properties instead. - Switch colors are written onto inner elements, so they need scoped CSS rather than a variable on the root. Adds a --knob token for control handles, because Mantine's default thumb follows theme.white, which is near-black in the dark-based themes. An audit of every painted pixel in the /theme-sample gallery now finds no non-red channel in night mode. Icons come from @tabler/icons-react with the 102 Semantic names the app uses mapped to components; they stroke with currentColor, so they follow the theme without any rule of their own. Toasts keep the react-semantic-toasts-2 signature so those call sites migrate by changing an import. TypeScript 5 is required: Mantine's declarations use `const` type parameters, which 4.9 cannot parse (Mantine 7 is the same, so downgrading is no escape). That needs two npm overrides to keep clean installs working, both verified against a Docker build: react-scripts declares peerOptional typescript ^3||^4, and fork-ts-checker 6.5.2 assigns typescript.performance.mark, which TS 5 made getter-only - crashing the dev server's type checker on every rebuild. semantic-baseline.test.js ratchets the removal: it fails if a file not already listed imports Semantic UI. An ESLint rule would have printed 75 warnings per rebuild, and CI unsets CI= for its build step, so it would guard nothing there. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-07-29 19:22:03 -06:00
border: 1px solid var(--border);
border-left: 3px solid var(--message-color, var(--border));
background: var(--panel);
padding: 10px 14px;
font-size: 13px;
}
ui: migrate the extension pages and Configs; five components they needed Phase 2, part 1. Three files leave Semantic UI (baseline 75 -> 72), and the components they needed join the library and the gallery: Header Semantic's shape (as/icon/subheader/dividing). 47 files use <Header>, and the level now picks the size, so the type scale stays a scale instead of each call site choosing a font size. Message gains an icon and a dismiss button. ActionInput input and button sharing one outline, for <Input action={...}/>. Loading centered loader with a caption, replacing the <Loader active inline='centered'> + wrapper div in 19 places. Modal becomes compound - Modal.Header/.Content/.Actions, plus Semantic's open, closeIcon, and size names - because 34 files are written against that shape. test-utils mounts MantineProvider with ThemeProvider's exact configuration: migrated components render Mantine internals and every one of their test files would otherwise need its own provider. One Semantic bleed found and fixed: semantic.min.css sets `h1,h2,h3,h4,h5 { font-family: Lato }` and loads after Mantine's element rule, so headings ignored the theme's body face. Only visible in amber, where the body is mono and the headings were not. A class-level restatement outranks it; the rule comes out when Semantic does. Verified: 925 jest tests, clean production build, and a night-mode audit of every painted pixel in the gallery (red-only, one known false positive). The Configs backup and restore flow was exercised against the real API.
2026-07-29 20:25:34 -06:00
.wrolpi-message-content {
flex: 1;
min-width: 0;
}
/* The icon repeats what the border color already says, so it takes that color. */
.wrolpi-message-icon {
color: var(--message-color, var(--text));
display: flex;
padding-top: 1px;
}
.wrolpi-message-dismiss {
background: none;
border: none;
padding: 0;
color: var(--muted);
cursor: pointer;
display: flex;
/* Widen the tap target past the glyph without moving it. */
margin: -6px -6px -6px 0;
padding: 6px;
}
.wrolpi-message-dismiss:hover {
color: var(--text);
}
.wrolpi-message-dismiss:focus-visible {
outline: 2px solid var(--blue);
outline-offset: -2px;
}
ui: token-driven component library on Mantine Adds src/components/ui: buttons, messages, labels, progress, status, tables, form controls, panels, cards, statistics, modals, tooltips, tabs, and icons. Everything resolves its colors through theme tokens, so no component branches on the current theme, and Semantic UI keeps rendering the app meanwhile. Mantine is bridged rather than restyled: its own CSS variables are pointed at our tokens. Four details were not obvious, and each caused a visible defect in night mode before being fixed: - Structural colors must go in the resolver's light/dark blocks. Mantine emits its values under [data-mantine-color-scheme], which outranks the :root block that `variables` becomes, so its grays were winning. - The dark and gray palettes are mapped shade by shade to tokens. Mantine reads them directly for table borders, zebra stripes and input chrome; they can be neither flattened nor left alone. - Mantine writes --button-* as inline styles, which no stylesheet can outrank, so the dashed danger treatment sets real properties instead. - Switch colors are written onto inner elements, so they need scoped CSS rather than a variable on the root. Adds a --knob token for control handles, because Mantine's default thumb follows theme.white, which is near-black in the dark-based themes. An audit of every painted pixel in the /theme-sample gallery now finds no non-red channel in night mode. Icons come from @tabler/icons-react with the 102 Semantic names the app uses mapped to components; they stroke with currentColor, so they follow the theme without any rule of their own. Toasts keep the react-semantic-toasts-2 signature so those call sites migrate by changing an import. TypeScript 5 is required: Mantine's declarations use `const` type parameters, which 4.9 cannot parse (Mantine 7 is the same, so downgrading is no escape). That needs two npm overrides to keep clean installs working, both verified against a Docker build: react-scripts declares peerOptional typescript ^3||^4, and fork-ts-checker 6.5.2 assigns typescript.performance.mark, which TS 5 made getter-only - crashing the dev server's type checker on every rebuild. semantic-baseline.test.js ratchets the removal: it fails if a file not already listed imports Semantic UI. An ESLint rule would have printed 75 warnings per rebuild, and CI unsets CI= for its build step, so it would guard nothing there. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-07-29 19:22:03 -06:00
.wrolpi-message-title {
font-weight: 600;
margin-bottom: 2px;
}
.wrolpi-message-body {
color: var(--muted);
}
/* Errors take the danger treatment in every theme, so "dashed" stays one rule. */
test: act on review — and correct an overstated claim about the toast bug I said all four toast kinds were "the same pixel" in night. They were not. Planting a reversion to hue names left the new distinctness test GREEN, because in night `--blue`, `--green`, `--yellow` and `--red` are four different values (2.29, 3.14, 4.52, 5.64 against a panel). What they are is cramped and badly ranked, with info at 2.29:1 -- below the 3:1 floor, present and invisible. The byte-identical pairs are real but elsewhere: `--orange` is `--text` and `--yellow` is `--amber`, which bites a call site that reaches for those names, not the toast mapping. The PR body has been corrected too. So the distinctness assertion is not the one with teeth; the legibility floor is. The monochrome toast test now measures every kind against the toast's own surface, and the hue reversion fails it naming the number: 2.29:1. Also from review: `.wrolpi-message-error` still forced `border: 1.5px dashed var(--red)` while its accent and icon had moved to roles -- nearly the same pixel in night, so no colour test could see it. It follows `--message-color` now. Six more library rules were naming a hue for a thing that means danger: the night danger button, invalid form fields, invalid paths, path error text, danger panels and failed table rows. All roles now, with a source guard that fails any rule whose SELECTOR means severity and whose body names a hue. Focus rings and active-tab accents deliberately keep `--blue`: those are the primary accent, not severity. The tokens.css note claimed the brightness ramp held "in every theme" when the tests deliberately limit it to monochrome. Narrowed, with the reason spelled out, because the next person to read it would otherwise have "fixed" light to match the prose -- which would mean reordering light's hues to satisfy a test. Added the end-of-chain cases the review asked for: four toasts and four Messages in night and amber, measured rather than inferred from variable names. Colour reads now go through a strict `toRgb` that refuses anything not already resolved. The reviewer's concern that `getPropertyValue('--info')` returns an unresolved `var(--blue)` does not hold -- custom properties are substituted at computed-value time and it returns `#20629c` -- but feeding an unresolved value to a luminance calculation yields NaN, and `expect(NaN).to.not.equal(x)` passes. Worth refusing loudly. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
2026-08-01 17:46:33 -06:00
/*
* The dashed frame tracks the role the message was given, exactly as its accent and
* icon already do. Naming a hue here meant the frame and the accent could disagree --
* invisible in night, where they are nearly the same pixel, but still wrong.
*/
ui: token-driven component library on Mantine Adds src/components/ui: buttons, messages, labels, progress, status, tables, form controls, panels, cards, statistics, modals, tooltips, tabs, and icons. Everything resolves its colors through theme tokens, so no component branches on the current theme, and Semantic UI keeps rendering the app meanwhile. Mantine is bridged rather than restyled: its own CSS variables are pointed at our tokens. Four details were not obvious, and each caused a visible defect in night mode before being fixed: - Structural colors must go in the resolver's light/dark blocks. Mantine emits its values under [data-mantine-color-scheme], which outranks the :root block that `variables` becomes, so its grays were winning. - The dark and gray palettes are mapped shade by shade to tokens. Mantine reads them directly for table borders, zebra stripes and input chrome; they can be neither flattened nor left alone. - Mantine writes --button-* as inline styles, which no stylesheet can outrank, so the dashed danger treatment sets real properties instead. - Switch colors are written onto inner elements, so they need scoped CSS rather than a variable on the root. Adds a --knob token for control handles, because Mantine's default thumb follows theme.white, which is near-black in the dark-based themes. An audit of every painted pixel in the /theme-sample gallery now finds no non-red channel in night mode. Icons come from @tabler/icons-react with the 102 Semantic names the app uses mapped to components; they stroke with currentColor, so they follow the theme without any rule of their own. Toasts keep the react-semantic-toasts-2 signature so those call sites migrate by changing an import. TypeScript 5 is required: Mantine's declarations use `const` type parameters, which 4.9 cannot parse (Mantine 7 is the same, so downgrading is no escape). That needs two npm overrides to keep clean installs working, both verified against a Docker build: react-scripts declares peerOptional typescript ^3||^4, and fork-ts-checker 6.5.2 assigns typescript.performance.mark, which TS 5 made getter-only - crashing the dev server's type checker on every rebuild. semantic-baseline.test.js ratchets the removal: it fails if a file not already listed imports Semantic UI. An ESLint rule would have printed 75 warnings per rebuild, and CI unsets CI= for its build step, so it would guard nothing there. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-07-29 19:22:03 -06:00
.wrolpi-message-error {
test: act on review — and correct an overstated claim about the toast bug I said all four toast kinds were "the same pixel" in night. They were not. Planting a reversion to hue names left the new distinctness test GREEN, because in night `--blue`, `--green`, `--yellow` and `--red` are four different values (2.29, 3.14, 4.52, 5.64 against a panel). What they are is cramped and badly ranked, with info at 2.29:1 -- below the 3:1 floor, present and invisible. The byte-identical pairs are real but elsewhere: `--orange` is `--text` and `--yellow` is `--amber`, which bites a call site that reaches for those names, not the toast mapping. The PR body has been corrected too. So the distinctness assertion is not the one with teeth; the legibility floor is. The monochrome toast test now measures every kind against the toast's own surface, and the hue reversion fails it naming the number: 2.29:1. Also from review: `.wrolpi-message-error` still forced `border: 1.5px dashed var(--red)` while its accent and icon had moved to roles -- nearly the same pixel in night, so no colour test could see it. It follows `--message-color` now. Six more library rules were naming a hue for a thing that means danger: the night danger button, invalid form fields, invalid paths, path error text, danger panels and failed table rows. All roles now, with a source guard that fails any rule whose SELECTOR means severity and whose body names a hue. Focus rings and active-tab accents deliberately keep `--blue`: those are the primary accent, not severity. The tokens.css note claimed the brightness ramp held "in every theme" when the tests deliberately limit it to monochrome. Narrowed, with the reason spelled out, because the next person to read it would otherwise have "fixed" light to match the prose -- which would mean reordering light's hues to satisfy a test. Added the end-of-chain cases the review asked for: four toasts and four Messages in night and amber, measured rather than inferred from variable names. Colour reads now go through a strict `toRgb` that refuses anything not already resolved. The reviewer's concern that `getPropertyValue('--info')` returns an unresolved `var(--blue)` does not hold -- custom properties are substituted at computed-value time and it returns `#20629c` -- but feeding an unresolved value to a luminance calculation yields NaN, and `expect(NaN).to.not.equal(x)` passes. Worth refusing loudly. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
2026-08-01 17:46:33 -06:00
border: 1.5px dashed var(--message-color);
ui: token-driven component library on Mantine Adds src/components/ui: buttons, messages, labels, progress, status, tables, form controls, panels, cards, statistics, modals, tooltips, tabs, and icons. Everything resolves its colors through theme tokens, so no component branches on the current theme, and Semantic UI keeps rendering the app meanwhile. Mantine is bridged rather than restyled: its own CSS variables are pointed at our tokens. Four details were not obvious, and each caused a visible defect in night mode before being fixed: - Structural colors must go in the resolver's light/dark blocks. Mantine emits its values under [data-mantine-color-scheme], which outranks the :root block that `variables` becomes, so its grays were winning. - The dark and gray palettes are mapped shade by shade to tokens. Mantine reads them directly for table borders, zebra stripes and input chrome; they can be neither flattened nor left alone. - Mantine writes --button-* as inline styles, which no stylesheet can outrank, so the dashed danger treatment sets real properties instead. - Switch colors are written onto inner elements, so they need scoped CSS rather than a variable on the root. Adds a --knob token for control handles, because Mantine's default thumb follows theme.white, which is near-black in the dark-based themes. An audit of every painted pixel in the /theme-sample gallery now finds no non-red channel in night mode. Icons come from @tabler/icons-react with the 102 Semantic names the app uses mapped to components; they stroke with currentColor, so they follow the theme without any rule of their own. Toasts keep the react-semantic-toasts-2 signature so those call sites migrate by changing an import. TypeScript 5 is required: Mantine's declarations use `const` type parameters, which 4.9 cannot parse (Mantine 7 is the same, so downgrading is no escape). That needs two npm overrides to keep clean installs working, both verified against a Docker build: react-scripts declares peerOptional typescript ^3||^4, and fork-ts-checker 6.5.2 assigns typescript.performance.mark, which TS 5 made getter-only - crashing the dev server's type checker on every rebuild. semantic-baseline.test.js ratchets the removal: it fails if a file not already listed imports Semantic UI. An ESLint rule would have printed 75 warnings per rebuild, and CI unsets CI= for its build step, so it would guard nothing there. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-07-29 19:22:03 -06:00
}
/* --------------------------------------------------------------- Progress */
ui: progress bars get room for their label, and keep their band inside Three things, plus an answer to why two sets of bars on the same page were spaced differently. The bar was 16px tall with an 11px bold label, leaving about half a pixel of air above and below. On the Status page that is 44 of them. Now 22px with a 12px label -- these labels carry device names and units, not just a number. The indeterminate band escaped the bar. It slides on `margin-left` from -35% to 100%, and nothing clipped it, so the animation ran from outside the left edge to outside the right one. `overflow: hidden` on the bar. The CPU and RAM bars were touching while the drive-bandwidth bars on the same page were not, and the difference was not the bars: CPU and RAM are bare siblings inside a Panel, while each bandwidth bar sits alone in a Grid column and takes its spacing from the Grid. `* + .wrolpi-progress` distinguishes those two by itself -- it fires only when a bar actually follows something, so an only-child bar in a column is untouched. A blanket margin would have doubled the Grid's gutter, and that is asserted too. The gallery gains a Progress section: six percentages, custom labels, no label, indeterminate, and the four roles. Its own demo gaps were removed so what it shows is the spacing the component really has. MEASURED while building the gallery, and NOT fixed: the label reads 5.49:1 against the fill in light -- the brightness filter is what buys that -- but 2.35 in dark, 2.48 in night and 2.74 in amber. Against the empty track it is 5.2 to 15:1 everywhere. Reaching AA over the fill needs the label drawn twice and clipped at the fill boundary so each half takes its own colour, and in night not even that suffices: `--text` is only about 4:1 against pure black and a fill is lighter than black by definition. Recorded in ui.css and in the test, which asserts the track half only rather than picking a threshold low enough to pass. One test was unfalsifiable and is rewritten. "Keeps a long label from widening the bar" cannot fail: the label is `position: absolute; inset: 0` and takes no part in its parent's width. What a long label actually does is wrap to a second line inside a 22px bar and get cut in half by the new clip, so the test measures line boxes now. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
2026-08-01 19:52:10 -06:00
/*
* Tall enough for the label inside it. At 16px a 14px line box left half a pixel of air
* above and below the text, which on the Status page is 44 bars of cramped 11px bold --
* legible only if you already knew what it said.
*
* `overflow: hidden` is what keeps the indeterminate band inside the bar. Without it the
* band slides from `margin-left: -35%` to `100%` in full view, so the animation ran from
* outside the left edge to outside the right one, painting over whatever sat beside it.
*/
ui: token-driven component library on Mantine Adds src/components/ui: buttons, messages, labels, progress, status, tables, form controls, panels, cards, statistics, modals, tooltips, tabs, and icons. Everything resolves its colors through theme tokens, so no component branches on the current theme, and Semantic UI keeps rendering the app meanwhile. Mantine is bridged rather than restyled: its own CSS variables are pointed at our tokens. Four details were not obvious, and each caused a visible defect in night mode before being fixed: - Structural colors must go in the resolver's light/dark blocks. Mantine emits its values under [data-mantine-color-scheme], which outranks the :root block that `variables` becomes, so its grays were winning. - The dark and gray palettes are mapped shade by shade to tokens. Mantine reads them directly for table borders, zebra stripes and input chrome; they can be neither flattened nor left alone. - Mantine writes --button-* as inline styles, which no stylesheet can outrank, so the dashed danger treatment sets real properties instead. - Switch colors are written onto inner elements, so they need scoped CSS rather than a variable on the root. Adds a --knob token for control handles, because Mantine's default thumb follows theme.white, which is near-black in the dark-based themes. An audit of every painted pixel in the /theme-sample gallery now finds no non-red channel in night mode. Icons come from @tabler/icons-react with the 102 Semantic names the app uses mapped to components; they stroke with currentColor, so they follow the theme without any rule of their own. Toasts keep the react-semantic-toasts-2 signature so those call sites migrate by changing an import. TypeScript 5 is required: Mantine's declarations use `const` type parameters, which 4.9 cannot parse (Mantine 7 is the same, so downgrading is no escape). That needs two npm overrides to keep clean installs working, both verified against a Docker build: react-scripts declares peerOptional typescript ^3||^4, and fork-ts-checker 6.5.2 assigns typescript.performance.mark, which TS 5 made getter-only - crashing the dev server's type checker on every rebuild. semantic-baseline.test.js ratchets the removal: it fails if a file not already listed imports Semantic UI. An ESLint rule would have printed 75 warnings per rebuild, and CI unsets CI= for its build step, so it would guard nothing there. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-07-29 19:22:03 -06:00
.wrolpi-progress {
position: relative;
ui: progress bars get room for their label, and keep their band inside Three things, plus an answer to why two sets of bars on the same page were spaced differently. The bar was 16px tall with an 11px bold label, leaving about half a pixel of air above and below. On the Status page that is 44 of them. Now 22px with a 12px label -- these labels carry device names and units, not just a number. The indeterminate band escaped the bar. It slides on `margin-left` from -35% to 100%, and nothing clipped it, so the animation ran from outside the left edge to outside the right one. `overflow: hidden` on the bar. The CPU and RAM bars were touching while the drive-bandwidth bars on the same page were not, and the difference was not the bars: CPU and RAM are bare siblings inside a Panel, while each bandwidth bar sits alone in a Grid column and takes its spacing from the Grid. `* + .wrolpi-progress` distinguishes those two by itself -- it fires only when a bar actually follows something, so an only-child bar in a column is untouched. A blanket margin would have doubled the Grid's gutter, and that is asserted too. The gallery gains a Progress section: six percentages, custom labels, no label, indeterminate, and the four roles. Its own demo gaps were removed so what it shows is the spacing the component really has. MEASURED while building the gallery, and NOT fixed: the label reads 5.49:1 against the fill in light -- the brightness filter is what buys that -- but 2.35 in dark, 2.48 in night and 2.74 in amber. Against the empty track it is 5.2 to 15:1 everywhere. Reaching AA over the fill needs the label drawn twice and clipped at the fill boundary so each half takes its own colour, and in night not even that suffices: `--text` is only about 4:1 against pure black and a fill is lighter than black by definition. Recorded in ui.css and in the test, which asserts the track half only rather than picking a threshold low enough to pass. One test was unfalsifiable and is rewritten. "Keeps a long label from widening the bar" cannot fail: the label is `position: absolute; inset: 0` and takes no part in its parent's width. What a long label actually does is wrap to a second line inside a 22px bar and get cut in half by the new clip, so the test measures line boxes now. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
2026-08-01 19:52:10 -06:00
height: 22px;
ui: token-driven component library on Mantine Adds src/components/ui: buttons, messages, labels, progress, status, tables, form controls, panels, cards, statistics, modals, tooltips, tabs, and icons. Everything resolves its colors through theme tokens, so no component branches on the current theme, and Semantic UI keeps rendering the app meanwhile. Mantine is bridged rather than restyled: its own CSS variables are pointed at our tokens. Four details were not obvious, and each caused a visible defect in night mode before being fixed: - Structural colors must go in the resolver's light/dark blocks. Mantine emits its values under [data-mantine-color-scheme], which outranks the :root block that `variables` becomes, so its grays were winning. - The dark and gray palettes are mapped shade by shade to tokens. Mantine reads them directly for table borders, zebra stripes and input chrome; they can be neither flattened nor left alone. - Mantine writes --button-* as inline styles, which no stylesheet can outrank, so the dashed danger treatment sets real properties instead. - Switch colors are written onto inner elements, so they need scoped CSS rather than a variable on the root. Adds a --knob token for control handles, because Mantine's default thumb follows theme.white, which is near-black in the dark-based themes. An audit of every painted pixel in the /theme-sample gallery now finds no non-red channel in night mode. Icons come from @tabler/icons-react with the 102 Semantic names the app uses mapped to components; they stroke with currentColor, so they follow the theme without any rule of their own. Toasts keep the react-semantic-toasts-2 signature so those call sites migrate by changing an import. TypeScript 5 is required: Mantine's declarations use `const` type parameters, which 4.9 cannot parse (Mantine 7 is the same, so downgrading is no escape). That needs two npm overrides to keep clean installs working, both verified against a Docker build: react-scripts declares peerOptional typescript ^3||^4, and fork-ts-checker 6.5.2 assigns typescript.performance.mark, which TS 5 made getter-only - crashing the dev server's type checker on every rebuild. semantic-baseline.test.js ratchets the removal: it fails if a file not already listed imports Semantic UI. An ESLint rule would have printed 75 warnings per rebuild, and CI unsets CI= for its build step, so it would guard nothing there. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-07-29 19:22:03 -06:00
min-width: 120px;
ui: progress bars get room for their label, and keep their band inside Three things, plus an answer to why two sets of bars on the same page were spaced differently. The bar was 16px tall with an 11px bold label, leaving about half a pixel of air above and below. On the Status page that is 44 of them. Now 22px with a 12px label -- these labels carry device names and units, not just a number. The indeterminate band escaped the bar. It slides on `margin-left` from -35% to 100%, and nothing clipped it, so the animation ran from outside the left edge to outside the right one. `overflow: hidden` on the bar. The CPU and RAM bars were touching while the drive-bandwidth bars on the same page were not, and the difference was not the bars: CPU and RAM are bare siblings inside a Panel, while each bandwidth bar sits alone in a Grid column and takes its spacing from the Grid. `* + .wrolpi-progress` distinguishes those two by itself -- it fires only when a bar actually follows something, so an only-child bar in a column is untouched. A blanket margin would have doubled the Grid's gutter, and that is asserted too. The gallery gains a Progress section: six percentages, custom labels, no label, indeterminate, and the four roles. Its own demo gaps were removed so what it shows is the spacing the component really has. MEASURED while building the gallery, and NOT fixed: the label reads 5.49:1 against the fill in light -- the brightness filter is what buys that -- but 2.35 in dark, 2.48 in night and 2.74 in amber. Against the empty track it is 5.2 to 15:1 everywhere. Reaching AA over the fill needs the label drawn twice and clipped at the fill boundary so each half takes its own colour, and in night not even that suffices: `--text` is only about 4:1 against pure black and a fill is lighter than black by definition. Recorded in ui.css and in the test, which asserts the track half only rather than picking a threshold low enough to pass. One test was unfalsifiable and is rewritten. "Keeps a long label from widening the bar" cannot fail: the label is `position: absolute; inset: 0` and takes no part in its parent's width. What a long label actually does is wrap to a second line inside a 22px bar and get cut in half by the new clip, so the test measures line boxes now. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
2026-08-01 19:52:10 -06:00
overflow: hidden;
ui: token-driven component library on Mantine Adds src/components/ui: buttons, messages, labels, progress, status, tables, form controls, panels, cards, statistics, modals, tooltips, tabs, and icons. Everything resolves its colors through theme tokens, so no component branches on the current theme, and Semantic UI keeps rendering the app meanwhile. Mantine is bridged rather than restyled: its own CSS variables are pointed at our tokens. Four details were not obvious, and each caused a visible defect in night mode before being fixed: - Structural colors must go in the resolver's light/dark blocks. Mantine emits its values under [data-mantine-color-scheme], which outranks the :root block that `variables` becomes, so its grays were winning. - The dark and gray palettes are mapped shade by shade to tokens. Mantine reads them directly for table borders, zebra stripes and input chrome; they can be neither flattened nor left alone. - Mantine writes --button-* as inline styles, which no stylesheet can outrank, so the dashed danger treatment sets real properties instead. - Switch colors are written onto inner elements, so they need scoped CSS rather than a variable on the root. Adds a --knob token for control handles, because Mantine's default thumb follows theme.white, which is near-black in the dark-based themes. An audit of every painted pixel in the /theme-sample gallery now finds no non-red channel in night mode. Icons come from @tabler/icons-react with the 102 Semantic names the app uses mapped to components; they stroke with currentColor, so they follow the theme without any rule of their own. Toasts keep the react-semantic-toasts-2 signature so those call sites migrate by changing an import. TypeScript 5 is required: Mantine's declarations use `const` type parameters, which 4.9 cannot parse (Mantine 7 is the same, so downgrading is no escape). That needs two npm overrides to keep clean installs working, both verified against a Docker build: react-scripts declares peerOptional typescript ^3||^4, and fork-ts-checker 6.5.2 assigns typescript.performance.mark, which TS 5 made getter-only - crashing the dev server's type checker on every rebuild. semantic-baseline.test.js ratchets the removal: it fails if a file not already listed imports Semantic UI. An ESLint rule would have printed 75 warnings per rebuild, and CI unsets CI= for its build step, so it would guard nothing there. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-07-29 19:22:03 -06:00
background: var(--bg);
border: 1px solid var(--border);
}
ui: progress bars get room for their label, and keep their band inside Three things, plus an answer to why two sets of bars on the same page were spaced differently. The bar was 16px tall with an 11px bold label, leaving about half a pixel of air above and below. On the Status page that is 44 of them. Now 22px with a 12px label -- these labels carry device names and units, not just a number. The indeterminate band escaped the bar. It slides on `margin-left` from -35% to 100%, and nothing clipped it, so the animation ran from outside the left edge to outside the right one. `overflow: hidden` on the bar. The CPU and RAM bars were touching while the drive-bandwidth bars on the same page were not, and the difference was not the bars: CPU and RAM are bare siblings inside a Panel, while each bandwidth bar sits alone in a Grid column and takes its spacing from the Grid. `* + .wrolpi-progress` distinguishes those two by itself -- it fires only when a bar actually follows something, so an only-child bar in a column is untouched. A blanket margin would have doubled the Grid's gutter, and that is asserted too. The gallery gains a Progress section: six percentages, custom labels, no label, indeterminate, and the four roles. Its own demo gaps were removed so what it shows is the spacing the component really has. MEASURED while building the gallery, and NOT fixed: the label reads 5.49:1 against the fill in light -- the brightness filter is what buys that -- but 2.35 in dark, 2.48 in night and 2.74 in amber. Against the empty track it is 5.2 to 15:1 everywhere. Reaching AA over the fill needs the label drawn twice and clipped at the fill boundary so each half takes its own colour, and in night not even that suffices: `--text` is only about 4:1 against pure black and a fill is lighter than black by definition. Recorded in ui.css and in the test, which asserts the track half only rather than picking a threshold low enough to pass. One test was unfalsifiable and is rewritten. "Keeps a long label from widening the bar" cannot fail: the label is `position: absolute; inset: 0` and takes no part in its parent's width. What a long label actually does is wrap to a second line inside a 22px bar and get cut in half by the new clip, so the test measures line boxes now. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
2026-08-01 19:52:10 -06:00
/*
* Bars stacked directly on top of each other need a gap; bars that a container already
* spaces do not. On the Status page the CPU and RAM bars are bare siblings in a Panel and
* were touching, while the drive-bandwidth bars each sit alone in a Grid column and get
* their spacing from the Grid.
*
* `* +` distinguishes those two cases by itself: it fires only when a bar actually follows
* something, so an only-child bar in a column is untouched.
*/
* + .wrolpi-progress {
margin-top: 8px;
}
ui: token-driven component library on Mantine Adds src/components/ui: buttons, messages, labels, progress, status, tables, form controls, panels, cards, statistics, modals, tooltips, tabs, and icons. Everything resolves its colors through theme tokens, so no component branches on the current theme, and Semantic UI keeps rendering the app meanwhile. Mantine is bridged rather than restyled: its own CSS variables are pointed at our tokens. Four details were not obvious, and each caused a visible defect in night mode before being fixed: - Structural colors must go in the resolver's light/dark blocks. Mantine emits its values under [data-mantine-color-scheme], which outranks the :root block that `variables` becomes, so its grays were winning. - The dark and gray palettes are mapped shade by shade to tokens. Mantine reads them directly for table borders, zebra stripes and input chrome; they can be neither flattened nor left alone. - Mantine writes --button-* as inline styles, which no stylesheet can outrank, so the dashed danger treatment sets real properties instead. - Switch colors are written onto inner elements, so they need scoped CSS rather than a variable on the root. Adds a --knob token for control handles, because Mantine's default thumb follows theme.white, which is near-black in the dark-based themes. An audit of every painted pixel in the /theme-sample gallery now finds no non-red channel in night mode. Icons come from @tabler/icons-react with the 102 Semantic names the app uses mapped to components; they stroke with currentColor, so they follow the theme without any rule of their own. Toasts keep the react-semantic-toasts-2 signature so those call sites migrate by changing an import. TypeScript 5 is required: Mantine's declarations use `const` type parameters, which 4.9 cannot parse (Mantine 7 is the same, so downgrading is no escape). That needs two npm overrides to keep clean installs working, both verified against a Docker build: react-scripts declares peerOptional typescript ^3||^4, and fork-ts-checker 6.5.2 assigns typescript.performance.mark, which TS 5 made getter-only - crashing the dev server's type checker on every rebuild. semantic-baseline.test.js ratchets the removal: it fails if a file not already listed imports Semantic UI. An ESLint rule would have printed 75 warnings per rebuild, and CI unsets CI= for its build step, so it would guard nothing there. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-07-29 19:22:03 -06:00
.wrolpi-progress-fill {
height: 100%;
background: var(--progress-color, var(--blue));
transition: width 0.2s linear;
}
@media (prefers-reduced-motion: reduce) {
.wrolpi-progress-fill {
transition: none;
}
}
ui: three silent library defects the agents' reports surfaced Each of these was reported by an agent working around it rather than patched in one file, which is why all three are fixed once, for every call site. Button accepted an `href` and dropped it. Mantine renders an anchor only when it also gets `component='a'`; Semantic spelled that `as='a'`. So a migrated call site that kept just the href produced something that looks like a download link and navigates nowhere -- silently, with no warning. Button and IconButton now infer the anchor from the href. The media filter ran twice on nested media. A `.media` wrapper filters its subtree as one unit -- the audio player needs that, because its control glyphs are SVG and the element-type rule does not reach them -- but the poster image inside also matched that rule. Two passes of a luminance-to-red matrix is not one: the second takes 0.2126 of an already-red pixel, so the poster came out markedly darker than everything around it. Leaf media inside a filtered wrapper is now left alone. Progress had no indeterminate state. Semantic's `indicating` animated a stripe when the size was unknown; without it an upload that has not reported yet sits at 0% and reads as stalled -- and `aria-valuenow="0"` tells a screen reader the same wrong thing. It now animates, reports no value, and falls back to a static fill under prefers-reduced-motion. Also: night and amber now override an inline `--label-color`. A call site may legitimately need many distinguishable colours -- the Flasher's chip badges use a twelve-colour palette no four tokens can express -- but on a night-adapted screen a green or blue chip badge defeats the entire mode. The labels lose their distinctness there, which is the right trade.
2026-07-30 13:15:03 -06:00
/*
* Indeterminate: a sliding band, for work whose size is not known yet. Semantic called
* this `indicating`; without it an upload that has not reported its size sits at 0% and
* reads as stalled.
*/
.wrolpi-progress-indeterminate .wrolpi-progress-fill {
width: 35%;
animation: wrolpi-progress-slide 1.4s ease-in-out infinite;
}
@keyframes wrolpi-progress-slide {
from {
margin-left: -35%;
}
to {
margin-left: 100%;
}
}
/* Motion is the only signal here, so when it is suppressed the bar fills instead. */
@media (prefers-reduced-motion: reduce) {
.wrolpi-progress-indeterminate .wrolpi-progress-fill {
animation: none;
width: 100%;
opacity: 0.5;
}
}
ui: token-driven component library on Mantine Adds src/components/ui: buttons, messages, labels, progress, status, tables, form controls, panels, cards, statistics, modals, tooltips, tabs, and icons. Everything resolves its colors through theme tokens, so no component branches on the current theme, and Semantic UI keeps rendering the app meanwhile. Mantine is bridged rather than restyled: its own CSS variables are pointed at our tokens. Four details were not obvious, and each caused a visible defect in night mode before being fixed: - Structural colors must go in the resolver's light/dark blocks. Mantine emits its values under [data-mantine-color-scheme], which outranks the :root block that `variables` becomes, so its grays were winning. - The dark and gray palettes are mapped shade by shade to tokens. Mantine reads them directly for table borders, zebra stripes and input chrome; they can be neither flattened nor left alone. - Mantine writes --button-* as inline styles, which no stylesheet can outrank, so the dashed danger treatment sets real properties instead. - Switch colors are written onto inner elements, so they need scoped CSS rather than a variable on the root. Adds a --knob token for control handles, because Mantine's default thumb follows theme.white, which is near-black in the dark-based themes. An audit of every painted pixel in the /theme-sample gallery now finds no non-red channel in night mode. Icons come from @tabler/icons-react with the 102 Semantic names the app uses mapped to components; they stroke with currentColor, so they follow the theme without any rule of their own. Toasts keep the react-semantic-toasts-2 signature so those call sites migrate by changing an import. TypeScript 5 is required: Mantine's declarations use `const` type parameters, which 4.9 cannot parse (Mantine 7 is the same, so downgrading is no escape). That needs two npm overrides to keep clean installs working, both verified against a Docker build: react-scripts declares peerOptional typescript ^3||^4, and fork-ts-checker 6.5.2 assigns typescript.performance.mark, which TS 5 made getter-only - crashing the dev server's type checker on every rebuild. semantic-baseline.test.js ratchets the removal: it fails if a file not already listed imports Semantic UI. An ESLint rule would have printed 75 warnings per rebuild, and CI unsets CI= for its build step, so it would guard nothing there. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-07-29 19:22:03 -06:00
.wrolpi-progress-text {
position: absolute;
inset: 0;
display: flex;
align-items: center;
justify-content: center;
ui: progress bars get room for their label, and keep their band inside Three things, plus an answer to why two sets of bars on the same page were spaced differently. The bar was 16px tall with an 11px bold label, leaving about half a pixel of air above and below. On the Status page that is 44 of them. Now 22px with a 12px label -- these labels carry device names and units, not just a number. The indeterminate band escaped the bar. It slides on `margin-left` from -35% to 100%, and nothing clipped it, so the animation ran from outside the left edge to outside the right one. `overflow: hidden` on the bar. The CPU and RAM bars were touching while the drive-bandwidth bars on the same page were not, and the difference was not the bars: CPU and RAM are bare siblings inside a Panel, while each bandwidth bar sits alone in a Grid column and takes its spacing from the Grid. `* + .wrolpi-progress` distinguishes those two by itself -- it fires only when a bar actually follows something, so an only-child bar in a column is untouched. A blanket margin would have doubled the Grid's gutter, and that is asserted too. The gallery gains a Progress section: six percentages, custom labels, no label, indeterminate, and the four roles. Its own demo gaps were removed so what it shows is the spacing the component really has. MEASURED while building the gallery, and NOT fixed: the label reads 5.49:1 against the fill in light -- the brightness filter is what buys that -- but 2.35 in dark, 2.48 in night and 2.74 in amber. Against the empty track it is 5.2 to 15:1 everywhere. Reaching AA over the fill needs the label drawn twice and clipped at the fill boundary so each half takes its own colour, and in night not even that suffices: `--text` is only about 4:1 against pure black and a fill is lighter than black by definition. Recorded in ui.css and in the test, which asserts the track half only rather than picking a threshold low enough to pass. One test was unfalsifiable and is rewritten. "Keeps a long label from widening the bar" cannot fail: the label is `position: absolute; inset: 0` and takes no part in its parent's width. What a long label actually does is wrap to a second line inside a 22px bar and get cut in half by the new clip, so the test measures line boxes now. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
2026-08-01 19:52:10 -06:00
/* 12px rather than 11: these labels carry units and device names, not just a number. */
font-size: 12px;
ui: token-driven component library on Mantine Adds src/components/ui: buttons, messages, labels, progress, status, tables, form controls, panels, cards, statistics, modals, tooltips, tabs, and icons. Everything resolves its colors through theme tokens, so no component branches on the current theme, and Semantic UI keeps rendering the app meanwhile. Mantine is bridged rather than restyled: its own CSS variables are pointed at our tokens. Four details were not obvious, and each caused a visible defect in night mode before being fixed: - Structural colors must go in the resolver's light/dark blocks. Mantine emits its values under [data-mantine-color-scheme], which outranks the :root block that `variables` becomes, so its grays were winning. - The dark and gray palettes are mapped shade by shade to tokens. Mantine reads them directly for table borders, zebra stripes and input chrome; they can be neither flattened nor left alone. - Mantine writes --button-* as inline styles, which no stylesheet can outrank, so the dashed danger treatment sets real properties instead. - Switch colors are written onto inner elements, so they need scoped CSS rather than a variable on the root. Adds a --knob token for control handles, because Mantine's default thumb follows theme.white, which is near-black in the dark-based themes. An audit of every painted pixel in the /theme-sample gallery now finds no non-red channel in night mode. Icons come from @tabler/icons-react with the 102 Semantic names the app uses mapped to components; they stroke with currentColor, so they follow the theme without any rule of their own. Toasts keep the react-semantic-toasts-2 signature so those call sites migrate by changing an import. TypeScript 5 is required: Mantine's declarations use `const` type parameters, which 4.9 cannot parse (Mantine 7 is the same, so downgrading is no escape). That needs two npm overrides to keep clean installs working, both verified against a Docker build: react-scripts declares peerOptional typescript ^3||^4, and fork-ts-checker 6.5.2 assigns typescript.performance.mark, which TS 5 made getter-only - crashing the dev server's type checker on every rebuild. semantic-baseline.test.js ratchets the removal: it fails if a file not already listed imports Semantic UI. An ESLint rule would have printed 75 warnings per rebuild, and CI unsets CI= for its build step, so it would guard nothing there. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-07-29 19:22:03 -06:00
font-weight: 700;
color: var(--text);
font-variant-numeric: tabular-nums;
test: act on review — a test that could not pass with Reduce Motion on The indeterminate test read the band's position out of a running animation and asserted it had left the box. Two problems, and the second is the serious one: it samples a moving target, and under `prefers-reduced-motion` the slide is replaced by `width: 100%` with no negative margin, so the band never leaves the box and the assertion is permanently false. Anyone with Reduce Motion turned on -- or a CI host with it set -- gets a hard failure on a correct build. Reproduced it rather than taking it on faith: forcing the reduced-motion branch for the whole run fails the old form and passes the new one. The band is pinned now, to where the animation's first keyframe puts it, and the assertion is on the clip plus that escape. Deterministic, and true on any machine. Added the other branch too: with motion suppressed the bar fills instead of sliding, and a band that never moves must never leave the box. `text-overflow: ellipsis` on the label. `nowrap` alone stopped it wrapping and being bisected by the clip, but left a hard mid-glyph cut, and the call sites that feed this are exactly the ones with long strings -- Upload.js and FileBrowser.js label with a filename, Files.js with the error string. The one-line test was close to circular: with `nowrap` applied, one line box is almost a restatement of the rule. It now also asserts the computed `nowrap` and `ellipsis`, and that the line is genuinely WIDER than the space it has -- without that, a label that simply fits would satisfy it. Dropped a dead ternary from the air-around-label test; it built a rect nothing used and made it look as though the measurement came from somewhere it did not. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
2026-08-01 20:03:31 -06:00
/*
* A long label is a real case, not a hypothetical: uploads label with a filename
* (Upload.js, FileBrowser.js) and a failed refresh labels with the error string.
* Without `nowrap` it wraps to a second line inside a 22px bar and the clip bisects
* it; with a hard clip and no ellipsis, `Complete: very-long-archive-name.tar.gz`
* ends mid-glyph and reads as broken rather than truncated.
*/
ui: progress bars get room for their label, and keep their band inside Three things, plus an answer to why two sets of bars on the same page were spaced differently. The bar was 16px tall with an 11px bold label, leaving about half a pixel of air above and below. On the Status page that is 44 of them. Now 22px with a 12px label -- these labels carry device names and units, not just a number. The indeterminate band escaped the bar. It slides on `margin-left` from -35% to 100%, and nothing clipped it, so the animation ran from outside the left edge to outside the right one. `overflow: hidden` on the bar. The CPU and RAM bars were touching while the drive-bandwidth bars on the same page were not, and the difference was not the bars: CPU and RAM are bare siblings inside a Panel, while each bandwidth bar sits alone in a Grid column and takes its spacing from the Grid. `* + .wrolpi-progress` distinguishes those two by itself -- it fires only when a bar actually follows something, so an only-child bar in a column is untouched. A blanket margin would have doubled the Grid's gutter, and that is asserted too. The gallery gains a Progress section: six percentages, custom labels, no label, indeterminate, and the four roles. Its own demo gaps were removed so what it shows is the spacing the component really has. MEASURED while building the gallery, and NOT fixed: the label reads 5.49:1 against the fill in light -- the brightness filter is what buys that -- but 2.35 in dark, 2.48 in night and 2.74 in amber. Against the empty track it is 5.2 to 15:1 everywhere. Reaching AA over the fill needs the label drawn twice and clipped at the fill boundary so each half takes its own colour, and in night not even that suffices: `--text` is only about 4:1 against pure black and a fill is lighter than black by definition. Recorded in ui.css and in the test, which asserts the track half only rather than picking a threshold low enough to pass. One test was unfalsifiable and is rewritten. "Keeps a long label from widening the bar" cannot fail: the label is `position: absolute; inset: 0` and takes no part in its parent's width. What a long label actually does is wrap to a second line inside a 22px bar and get cut in half by the new clip, so the test measures line boxes now. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
2026-08-01 19:52:10 -06:00
padding: 0 6px;
overflow: hidden;
white-space: nowrap;
test: act on review — a test that could not pass with Reduce Motion on The indeterminate test read the band's position out of a running animation and asserted it had left the box. Two problems, and the second is the serious one: it samples a moving target, and under `prefers-reduced-motion` the slide is replaced by `width: 100%` with no negative margin, so the band never leaves the box and the assertion is permanently false. Anyone with Reduce Motion turned on -- or a CI host with it set -- gets a hard failure on a correct build. Reproduced it rather than taking it on faith: forcing the reduced-motion branch for the whole run fails the old form and passes the new one. The band is pinned now, to where the animation's first keyframe puts it, and the assertion is on the clip plus that escape. Deterministic, and true on any machine. Added the other branch too: with motion suppressed the bar fills instead of sliding, and a band that never moves must never leave the box. `text-overflow: ellipsis` on the label. `nowrap` alone stopped it wrapping and being bisected by the clip, but left a hard mid-glyph cut, and the call sites that feed this are exactly the ones with long strings -- Upload.js and FileBrowser.js label with a filename, Files.js with the error string. The one-line test was close to circular: with `nowrap` applied, one line box is almost a restatement of the rule. It now also asserts the computed `nowrap` and `ellipsis`, and that the line is genuinely WIDER than the space it has -- without that, a label that simply fits would satisfy it. Dropped a dead ternary from the air-around-label test; it built a rect nothing used and made it look as though the measurement came from somewhere it did not. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
2026-08-01 20:03:31 -06:00
text-overflow: ellipsis;
ui: token-driven component library on Mantine Adds src/components/ui: buttons, messages, labels, progress, status, tables, form controls, panels, cards, statistics, modals, tooltips, tabs, and icons. Everything resolves its colors through theme tokens, so no component branches on the current theme, and Semantic UI keeps rendering the app meanwhile. Mantine is bridged rather than restyled: its own CSS variables are pointed at our tokens. Four details were not obvious, and each caused a visible defect in night mode before being fixed: - Structural colors must go in the resolver's light/dark blocks. Mantine emits its values under [data-mantine-color-scheme], which outranks the :root block that `variables` becomes, so its grays were winning. - The dark and gray palettes are mapped shade by shade to tokens. Mantine reads them directly for table borders, zebra stripes and input chrome; they can be neither flattened nor left alone. - Mantine writes --button-* as inline styles, which no stylesheet can outrank, so the dashed danger treatment sets real properties instead. - Switch colors are written onto inner elements, so they need scoped CSS rather than a variable on the root. Adds a --knob token for control handles, because Mantine's default thumb follows theme.white, which is near-black in the dark-based themes. An audit of every painted pixel in the /theme-sample gallery now finds no non-red channel in night mode. Icons come from @tabler/icons-react with the 102 Semantic names the app uses mapped to components; they stroke with currentColor, so they follow the theme without any rule of their own. Toasts keep the react-semantic-toasts-2 signature so those call sites migrate by changing an import. TypeScript 5 is required: Mantine's declarations use `const` type parameters, which 4.9 cannot parse (Mantine 7 is the same, so downgrading is no escape). That needs two npm overrides to keep clean installs working, both verified against a Docker build: react-scripts declares peerOptional typescript ^3||^4, and fork-ts-checker 6.5.2 assigns typescript.performance.mark, which TS 5 made getter-only - crashing the dev server's type checker on every rebuild. semantic-baseline.test.js ratchets the removal: it fails if a file not already listed imports Semantic UI. An ESLint rule would have printed 75 warnings per rebuild, and CI unsets CI= for its build step, so it would guard nothing there. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-07-29 19:22:03 -06:00
}
/*
* The percent text sits on both the filled and empty halves of the bar, so the
* fill has to stay light enough in light mode for dark text to read over it.
ui: progress bars get room for their label, and keep their band inside Three things, plus an answer to why two sets of bars on the same page were spaced differently. The bar was 16px tall with an 11px bold label, leaving about half a pixel of air above and below. On the Status page that is 44 of them. Now 22px with a 12px label -- these labels carry device names and units, not just a number. The indeterminate band escaped the bar. It slides on `margin-left` from -35% to 100%, and nothing clipped it, so the animation ran from outside the left edge to outside the right one. `overflow: hidden` on the bar. The CPU and RAM bars were touching while the drive-bandwidth bars on the same page were not, and the difference was not the bars: CPU and RAM are bare siblings inside a Panel, while each bandwidth bar sits alone in a Grid column and takes its spacing from the Grid. `* + .wrolpi-progress` distinguishes those two by itself -- it fires only when a bar actually follows something, so an only-child bar in a column is untouched. A blanket margin would have doubled the Grid's gutter, and that is asserted too. The gallery gains a Progress section: six percentages, custom labels, no label, indeterminate, and the four roles. Its own demo gaps were removed so what it shows is the spacing the component really has. MEASURED while building the gallery, and NOT fixed: the label reads 5.49:1 against the fill in light -- the brightness filter is what buys that -- but 2.35 in dark, 2.48 in night and 2.74 in amber. Against the empty track it is 5.2 to 15:1 everywhere. Reaching AA over the fill needs the label drawn twice and clipped at the fill boundary so each half takes its own colour, and in night not even that suffices: `--text` is only about 4:1 against pure black and a fill is lighter than black by definition. Recorded in ui.css and in the test, which asserts the track half only rather than picking a threshold low enough to pass. One test was unfalsifiable and is rewritten. "Keeps a long label from widening the bar" cannot fail: the label is `position: absolute; inset: 0` and takes no part in its parent's width. What a long label actually does is wrap to a second line inside a 22px bar and get cut in half by the new clip, so the test measures line boxes now. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
2026-08-01 19:52:10 -06:00
*
* MEASURED, and only light actually clears it. The label against the fill is
* 5.49:1 in light (the brightness filter below is what buys that) but 2.35 in
* dark, 2.48 in night and 2.74 in amber; against the empty track it is 5.2-15:1
* everywhere. Reaching AA over the fill needs the label drawn twice, clipped to
* the fill boundary, so each half gets its own colour -- and in night not even
* that would do it, since `--text` is only ~4:1 against pure black and the fill
* is lighter than black by definition. Left as it is, deliberately, rather than
* asserted at a threshold chosen to pass.
ui: token-driven component library on Mantine Adds src/components/ui: buttons, messages, labels, progress, status, tables, form controls, panels, cards, statistics, modals, tooltips, tabs, and icons. Everything resolves its colors through theme tokens, so no component branches on the current theme, and Semantic UI keeps rendering the app meanwhile. Mantine is bridged rather than restyled: its own CSS variables are pointed at our tokens. Four details were not obvious, and each caused a visible defect in night mode before being fixed: - Structural colors must go in the resolver's light/dark blocks. Mantine emits its values under [data-mantine-color-scheme], which outranks the :root block that `variables` becomes, so its grays were winning. - The dark and gray palettes are mapped shade by shade to tokens. Mantine reads them directly for table borders, zebra stripes and input chrome; they can be neither flattened nor left alone. - Mantine writes --button-* as inline styles, which no stylesheet can outrank, so the dashed danger treatment sets real properties instead. - Switch colors are written onto inner elements, so they need scoped CSS rather than a variable on the root. Adds a --knob token for control handles, because Mantine's default thumb follows theme.white, which is near-black in the dark-based themes. An audit of every painted pixel in the /theme-sample gallery now finds no non-red channel in night mode. Icons come from @tabler/icons-react with the 102 Semantic names the app uses mapped to components; they stroke with currentColor, so they follow the theme without any rule of their own. Toasts keep the react-semantic-toasts-2 signature so those call sites migrate by changing an import. TypeScript 5 is required: Mantine's declarations use `const` type parameters, which 4.9 cannot parse (Mantine 7 is the same, so downgrading is no escape). That needs two npm overrides to keep clean installs working, both verified against a Docker build: react-scripts declares peerOptional typescript ^3||^4, and fork-ts-checker 6.5.2 assigns typescript.performance.mark, which TS 5 made getter-only - crashing the dev server's type checker on every rebuild. semantic-baseline.test.js ratchets the removal: it fails if a file not already listed imports Semantic UI. An ESLint rule would have printed 75 warnings per rebuild, and CI unsets CI= for its build step, so it would guard nothing there. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-07-29 19:22:03 -06:00
*/
html[data-theme="light"] .wrolpi-progress {
background: var(--panel);
}
html[data-theme="light"] .wrolpi-progress-fill {
filter: brightness(1.75) saturate(0.55);
}
/* Night: a mostly-full bar must not become a large bright surface. */
html[data-theme="night"] .wrolpi-progress-fill,
html[data-theme="amber"] .wrolpi-progress-fill {
background: var(--muted);
}
/* ----------------------------------------------------------------- Panels */
.wrolpi-panel {
background: var(--panel);
border: 1px solid var(--border);
padding: 14px 16px;
}
/* Danger zones are dashed in every theme; it doubles as a colorblind-safe cue. */
.wrolpi-panel-danger {
test: act on review — and correct an overstated claim about the toast bug I said all four toast kinds were "the same pixel" in night. They were not. Planting a reversion to hue names left the new distinctness test GREEN, because in night `--blue`, `--green`, `--yellow` and `--red` are four different values (2.29, 3.14, 4.52, 5.64 against a panel). What they are is cramped and badly ranked, with info at 2.29:1 -- below the 3:1 floor, present and invisible. The byte-identical pairs are real but elsewhere: `--orange` is `--text` and `--yellow` is `--amber`, which bites a call site that reaches for those names, not the toast mapping. The PR body has been corrected too. So the distinctness assertion is not the one with teeth; the legibility floor is. The monochrome toast test now measures every kind against the toast's own surface, and the hue reversion fails it naming the number: 2.29:1. Also from review: `.wrolpi-message-error` still forced `border: 1.5px dashed var(--red)` while its accent and icon had moved to roles -- nearly the same pixel in night, so no colour test could see it. It follows `--message-color` now. Six more library rules were naming a hue for a thing that means danger: the night danger button, invalid form fields, invalid paths, path error text, danger panels and failed table rows. All roles now, with a source guard that fails any rule whose SELECTOR means severity and whose body names a hue. Focus rings and active-tab accents deliberately keep `--blue`: those are the primary accent, not severity. The tokens.css note claimed the brightness ramp held "in every theme" when the tests deliberately limit it to monochrome. Narrowed, with the reason spelled out, because the next person to read it would otherwise have "fixed" light to match the prose -- which would mean reordering light's hues to satisfy a test. Added the end-of-chain cases the review asked for: four toasts and four Messages in night and amber, measured rather than inferred from variable names. Colour reads now go through a strict `toRgb` that refuses anything not already resolved. The reviewer's concern that `getPropertyValue('--info')` returns an unresolved `var(--blue)` does not hold -- custom properties are substituted at computed-value time and it returns `#20629c` -- but feeding an unresolved value to a luminance calculation yields NaN, and `expect(NaN).to.not.equal(x)` passes. Worth refusing loudly. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
2026-08-01 17:46:33 -06:00
border: 1.5px dashed var(--danger);
ui: token-driven component library on Mantine Adds src/components/ui: buttons, messages, labels, progress, status, tables, form controls, panels, cards, statistics, modals, tooltips, tabs, and icons. Everything resolves its colors through theme tokens, so no component branches on the current theme, and Semantic UI keeps rendering the app meanwhile. Mantine is bridged rather than restyled: its own CSS variables are pointed at our tokens. Four details were not obvious, and each caused a visible defect in night mode before being fixed: - Structural colors must go in the resolver's light/dark blocks. Mantine emits its values under [data-mantine-color-scheme], which outranks the :root block that `variables` becomes, so its grays were winning. - The dark and gray palettes are mapped shade by shade to tokens. Mantine reads them directly for table borders, zebra stripes and input chrome; they can be neither flattened nor left alone. - Mantine writes --button-* as inline styles, which no stylesheet can outrank, so the dashed danger treatment sets real properties instead. - Switch colors are written onto inner elements, so they need scoped CSS rather than a variable on the root. Adds a --knob token for control handles, because Mantine's default thumb follows theme.white, which is near-black in the dark-based themes. An audit of every painted pixel in the /theme-sample gallery now finds no non-red channel in night mode. Icons come from @tabler/icons-react with the 102 Semantic names the app uses mapped to components; they stroke with currentColor, so they follow the theme without any rule of their own. Toasts keep the react-semantic-toasts-2 signature so those call sites migrate by changing an import. TypeScript 5 is required: Mantine's declarations use `const` type parameters, which 4.9 cannot parse (Mantine 7 is the same, so downgrading is no escape). That needs two npm overrides to keep clean installs working, both verified against a Docker build: react-scripts declares peerOptional typescript ^3||^4, and fork-ts-checker 6.5.2 assigns typescript.performance.mark, which TS 5 made getter-only - crashing the dev server's type checker on every rebuild. semantic-baseline.test.js ratchets the removal: it fails if a file not already listed imports Semantic UI. An ESLint rule would have printed 75 warnings per rebuild, and CI unsets CI= for its build step, so it would guard nothing there. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-07-29 19:22:03 -06:00
}
ui: Common.js and thirteen more files off Semantic Phase 2, part 3. Baseline 63 -> 50. Common.js is the one that mattered: 51 files import it, so its Semantic usage was propping up the rest of the migration. Everything in it now comes from the library -- Paginator, the two search inputs, DirectorySearch, TabLinks, the toggles, the messages, APIButton, Breadcrumbs, SimpleAccordion, IframeViewer, CardPoster, FileIcon, LoadStatistic, the theme menu, and the hotspot icons. Also migrated: Placeholder, Apps, ArchivePreview, CbzViewer, AddToPlaylist, TaggedDeleteConfirmModal, the collection edit/tag forms, and four inventory components. New in the library, all in the gallery and tested: SearchBox Semantic's `<Search category>` with its grouped results shape kept, because four call sites already build it. A real combobox rather than a div that listens for clicks. Pagination Semantic's prop names; onPageChange gets the page number. TabBar the strip only -- routing stays with the caller. IconStack Semantic's IconGroup, named once for assistive technology. Table.HeaderCell sorted/onSort -- a real button carrying aria-sort. Button/IconButton translate Semantic's size names. That last one is defensive: unmigrated callers still pass size='tiny', and Mantine drops a size it does not recognise without a word, so the button quietly renders at the wrong size. Mapping here keeps the mixed state honest. Three real bugs found and fixed on the way, none of them cosmetic: * `fileSuffixIconName` returned fourteen icon names the map did not have, so opening a folder with a PDF, a Word document or an archive in it logged an error and drew a fallback glyph. All fourteen mapped, with a test that walks the mapper's own return values, and another asserting every mapped name resolves to a Tabler component that exists. * `Statistic` relied on Semantic's `Statistic.Group` for its spacing, so on the dashboard the load averages ran together into "1 MIN. LOAD5 MIN. LOAD15 MIN. LOAD". It carries its own spacing now. * Semantic's inverted stylesheet colors every descendant of an inverted segment, so Toggle labels inherited #dddddd -- white pixels in night mode, on the Settings page, which is exactly where someone adjusts their WROLPi in the dark. Restated from tokens. The baseline ratchet gained a third assertion: a migrated file may still lean on Semantic's CSS classes without importing the library, which the import check cannot see and which would collapse silently when Phase 4 deletes the stylesheet. There is one such bridge today and it is now declared.
2026-07-30 10:00:48 -06:00
/* ----------------------------------------------------------- Card posters */
/*
* The icon shown when a file has no poster, and the corner mark for a tagged
* file. Both live here rather than in Common.js so the card surface and the
* poster area agree in every theme.
*/
.wrolpi-card-icon {
position: relative;
display: flex;
align-items: center;
justify-content: center;
min-height: 120px;
background: var(--head);
}
.wrolpi-card-tag {
position: absolute;
top: 0;
left: 0;
display: flex;
padding: 3px 4px;
background: var(--green);
color: var(--btn-text);
}
/* Night and amber have no green to spend; the mark reads as an outline instead. */
html[data-theme="night"] .wrolpi-card-tag,
html[data-theme="amber"] .wrolpi-card-tag {
background: var(--panel);
color: var(--text);
border-right: 1px solid var(--border);
border-bottom: 1px solid var(--border);
}
ui: token-driven component library on Mantine Adds src/components/ui: buttons, messages, labels, progress, status, tables, form controls, panels, cards, statistics, modals, tooltips, tabs, and icons. Everything resolves its colors through theme tokens, so no component branches on the current theme, and Semantic UI keeps rendering the app meanwhile. Mantine is bridged rather than restyled: its own CSS variables are pointed at our tokens. Four details were not obvious, and each caused a visible defect in night mode before being fixed: - Structural colors must go in the resolver's light/dark blocks. Mantine emits its values under [data-mantine-color-scheme], which outranks the :root block that `variables` becomes, so its grays were winning. - The dark and gray palettes are mapped shade by shade to tokens. Mantine reads them directly for table borders, zebra stripes and input chrome; they can be neither flattened nor left alone. - Mantine writes --button-* as inline styles, which no stylesheet can outrank, so the dashed danger treatment sets real properties instead. - Switch colors are written onto inner elements, so they need scoped CSS rather than a variable on the root. Adds a --knob token for control handles, because Mantine's default thumb follows theme.white, which is near-black in the dark-based themes. An audit of every painted pixel in the /theme-sample gallery now finds no non-red channel in night mode. Icons come from @tabler/icons-react with the 102 Semantic names the app uses mapped to components; they stroke with currentColor, so they follow the theme without any rule of their own. Toasts keep the react-semantic-toasts-2 signature so those call sites migrate by changing an import. TypeScript 5 is required: Mantine's declarations use `const` type parameters, which 4.9 cannot parse (Mantine 7 is the same, so downgrading is no escape). That needs two npm overrides to keep clean installs working, both verified against a Docker build: react-scripts declares peerOptional typescript ^3||^4, and fork-ts-checker 6.5.2 assigns typescript.performance.mark, which TS 5 made getter-only - crashing the dev server's type checker on every rebuild. semantic-baseline.test.js ratchets the removal: it fails if a file not already listed imports Semantic UI. An ESLint rule would have printed 75 warnings per rebuild, and CI unsets CI= for its build step, so it would guard nothing there. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-07-29 19:22:03 -06:00
/* ------------------------------------------------------------- Statistics */
ui: Common.js and thirteen more files off Semantic Phase 2, part 3. Baseline 63 -> 50. Common.js is the one that mattered: 51 files import it, so its Semantic usage was propping up the rest of the migration. Everything in it now comes from the library -- Paginator, the two search inputs, DirectorySearch, TabLinks, the toggles, the messages, APIButton, Breadcrumbs, SimpleAccordion, IframeViewer, CardPoster, FileIcon, LoadStatistic, the theme menu, and the hotspot icons. Also migrated: Placeholder, Apps, ArchivePreview, CbzViewer, AddToPlaylist, TaggedDeleteConfirmModal, the collection edit/tag forms, and four inventory components. New in the library, all in the gallery and tested: SearchBox Semantic's `<Search category>` with its grouped results shape kept, because four call sites already build it. A real combobox rather than a div that listens for clicks. Pagination Semantic's prop names; onPageChange gets the page number. TabBar the strip only -- routing stays with the caller. IconStack Semantic's IconGroup, named once for assistive technology. Table.HeaderCell sorted/onSort -- a real button carrying aria-sort. Button/IconButton translate Semantic's size names. That last one is defensive: unmigrated callers still pass size='tiny', and Mantine drops a size it does not recognise without a word, so the button quietly renders at the wrong size. Mapping here keeps the mixed state honest. Three real bugs found and fixed on the way, none of them cosmetic: * `fileSuffixIconName` returned fourteen icon names the map did not have, so opening a folder with a PDF, a Word document or an archive in it logged an error and drew a fallback glyph. All fourteen mapped, with a test that walks the mapper's own return values, and another asserting every mapped name resolves to a Tabler component that exists. * `Statistic` relied on Semantic's `Statistic.Group` for its spacing, so on the dashboard the load averages ran together into "1 MIN. LOAD5 MIN. LOAD15 MIN. LOAD". It carries its own spacing now. * Semantic's inverted stylesheet colors every descendant of an inverted segment, so Toggle labels inherited #dddddd -- white pixels in night mode, on the Settings page, which is exactly where someone adjusts their WROLPi in the dark. Restated from tokens. The baseline ratchet gained a third assertion: a migrated file may still lean on Semantic's CSS classes without importing the library, which the import check cannot see and which would collapse silently when Phase 4 deletes the stylesheet. There is one such bridge today and it is now declared.
2026-07-30 10:00:48 -06:00
/*
* A statistic carries its own spacing rather than relying on a parent to supply
ui: Statistic and StatisticGroup, and the four defects they had These three exports had no test of their own. Statistic had already been caught out once -- it relied on Semantic's `Statistic.Group` for its spacing, so it broke silently when that was uninstalled -- and they are on the Status, Dashboard, Apps, Docs, Videos, Archive and Channels pages. Four defects, each with a test that goes red without the fix: * StatisticGroup ruled between columns only, with a `border-right` on every cell but the last. `auto-fit` wraps, so the seven statistics on the Docs page became four rows on a phone with no rule between them, and the cell ending each earlier row drew its border straight onto the group's outer one, making that edge 2px on the right and 1px on the left. The hairlines are now a 1px grid gap filled by an outline on each cell, which rules both axes however the tracks fall. Ruling the gaps with a border-coloured background behind the grid -- which is where this went first -- has the same reach but paints every track no cell landed in: an odd count left the last slot a solid grey block. An outline is drawn only where a cell is. Both of these are guarded, because the second was introduced while fixing the first. * A statistic that renders nothing left a padded cell and a stray hairline mid-row. FanRPMStatistic returns null on a device with no fan connector, which is most of them, so this was the Status page's normal appearance. The group cannot render a child to find out, so the cell is still emitted and `:empty` takes it out of the grid -- which is why the cells carry no inline style for that rule to have to outrank. * Statistic destructured five props and dropped the rest. LoadStatistic and the four Status wrappers all end in `{...props}`, so anything passed through a wrapper vanished with no error anywhere. * VideosStatistics passed `style={{margin: '2em'}}` to every statistic, Semantic-era spacing that the grid now provides. It beat the group's own rule, being inline, and made that one page's statistics sit differently from the six others. CardGroup was the only component in the library with no class of its own, which left nothing to assert against -- `container.firstChild` in jsdom is Mantine's injected <style> element. It has one now, and takes className/style/rest like its siblings. The gallery grows a seventh statistic, so the group wraps at a normal window width where the row hairlines can be seen, and a second group of coloured readings as Status renders them. Geometry, hairlines and per-theme token resolution are in ui-layout.cy.js rather than jest: jsdom returns zeros from getBoundingClientRect and never resolves a var(), so it cannot judge any of it.
2026-07-30 19:08:44 -06:00
* it, so that one dropped on a page by itself still sits clear of its
* neighbours. Semantic's `Statistic.Group` only spaced elements carrying
* Semantic's own classes, so without this the labels ran together into one
* unreadable line.
ui: Common.js and thirteen more files off Semantic Phase 2, part 3. Baseline 63 -> 50. Common.js is the one that mattered: 51 files import it, so its Semantic usage was propping up the rest of the migration. Everything in it now comes from the library -- Paginator, the two search inputs, DirectorySearch, TabLinks, the toggles, the messages, APIButton, Breadcrumbs, SimpleAccordion, IframeViewer, CardPoster, FileIcon, LoadStatistic, the theme menu, and the hotspot icons. Also migrated: Placeholder, Apps, ArchivePreview, CbzViewer, AddToPlaylist, TaggedDeleteConfirmModal, the collection edit/tag forms, and four inventory components. New in the library, all in the gallery and tested: SearchBox Semantic's `<Search category>` with its grouped results shape kept, because four call sites already build it. A real combobox rather than a div that listens for clicks. Pagination Semantic's prop names; onPageChange gets the page number. TabBar the strip only -- routing stays with the caller. IconStack Semantic's IconGroup, named once for assistive technology. Table.HeaderCell sorted/onSort -- a real button carrying aria-sort. Button/IconButton translate Semantic's size names. That last one is defensive: unmigrated callers still pass size='tiny', and Mantine drops a size it does not recognise without a word, so the button quietly renders at the wrong size. Mapping here keeps the mixed state honest. Three real bugs found and fixed on the way, none of them cosmetic: * `fileSuffixIconName` returned fourteen icon names the map did not have, so opening a folder with a PDF, a Word document or an archive in it logged an error and drew a fallback glyph. All fourteen mapped, with a test that walks the mapper's own return values, and another asserting every mapped name resolves to a Tabler component that exists. * `Statistic` relied on Semantic's `Statistic.Group` for its spacing, so on the dashboard the load averages ran together into "1 MIN. LOAD5 MIN. LOAD15 MIN. LOAD". It carries its own spacing now. * Semantic's inverted stylesheet colors every descendant of an inverted segment, so Toggle labels inherited #dddddd -- white pixels in night mode, on the Settings page, which is exactly where someone adjusts their WROLPi in the dark. Restated from tokens. The baseline ratchet gained a third assertion: a migrated file may still lean on Semantic's CSS classes without importing the library, which the import check cannot see and which would collapse silently when Phase 4 deletes the stylesheet. There is one such bridge today and it is now declared.
2026-07-30 10:00:48 -06:00
*/
.wrolpi-statistic {
display: inline-block;
vertical-align: top;
margin: 0 26px 10px 0;
}
ui: Statistic and StatisticGroup, and the four defects they had These three exports had no test of their own. Statistic had already been caught out once -- it relied on Semantic's `Statistic.Group` for its spacing, so it broke silently when that was uninstalled -- and they are on the Status, Dashboard, Apps, Docs, Videos, Archive and Channels pages. Four defects, each with a test that goes red without the fix: * StatisticGroup ruled between columns only, with a `border-right` on every cell but the last. `auto-fit` wraps, so the seven statistics on the Docs page became four rows on a phone with no rule between them, and the cell ending each earlier row drew its border straight onto the group's outer one, making that edge 2px on the right and 1px on the left. The hairlines are now a 1px grid gap filled by an outline on each cell, which rules both axes however the tracks fall. Ruling the gaps with a border-coloured background behind the grid -- which is where this went first -- has the same reach but paints every track no cell landed in: an odd count left the last slot a solid grey block. An outline is drawn only where a cell is. Both of these are guarded, because the second was introduced while fixing the first. * A statistic that renders nothing left a padded cell and a stray hairline mid-row. FanRPMStatistic returns null on a device with no fan connector, which is most of them, so this was the Status page's normal appearance. The group cannot render a child to find out, so the cell is still emitted and `:empty` takes it out of the grid -- which is why the cells carry no inline style for that rule to have to outrank. * Statistic destructured five props and dropped the rest. LoadStatistic and the four Status wrappers all end in `{...props}`, so anything passed through a wrapper vanished with no error anywhere. * VideosStatistics passed `style={{margin: '2em'}}` to every statistic, Semantic-era spacing that the grid now provides. It beat the group's own rule, being inline, and made that one page's statistics sit differently from the six others. CardGroup was the only component in the library with no class of its own, which left nothing to assert against -- `container.firstChild` in jsdom is Mantine's injected <style> element. It has one now, and takes className/style/rest like its siblings. The gallery grows a seventh statistic, so the group wraps at a normal window width where the row hairlines can be seen, and a second group of coloured readings as Status renders them. Geometry, hairlines and per-theme token resolution are in ui-layout.cy.js rather than jest: jsdom returns zeros from getBoundingClientRect and never resolves a var(), so it cannot judge any of it.
2026-07-30 19:08:44 -06:00
/*
ui: statistics carry no chrome, only spacing The group had a frame, a surface and a hairline between every cell. It now has none of those: a plain responsive grid, transparent, so the statistics sit on whatever they were dropped onto and take its colour -- the page on the gallery, a Panel on Apps and Status. That also retires the problem the previous commit went two rounds on. Ruling the cells needs a technique that survives wrapping, because `auto-fit` settles the number of rows at paint time: a border per cell rules columns but not rows, and a border-coloured background behind a 1px gap rules both but paints every track no cell landed in. With no rules to draw, neither case exists. The gap is wider across than down, since two statistics side by side have only air between them while stacked ones already have the label's line. The margin above the group is conditional on having a sibling before it. A plain `margin-top` reads correctly under the Header that precedes most groups, but Apps opens each of its Panels with one, and there it pushed the values down off the panel's top padding while the bottom stayed put, leaving every panel lopsided. Five browser tests described hairlines that no longer exist. They are replaced by the claims that now hold -- real space between wrapped rows, a wider column gap than row gap, transparency and no frame anywhere, and the conditional margin -- each verified red first: against flush rows for the spacing, against a background-carried hairline for the transparency, and against an unconditional margin for the panel case. Per-theme, the pair to check is no longer the hairline and the surface but the value and the label: with nothing framing a statistic, the contrast between those two is the only thing giving it structure.
2026-07-30 19:17:38 -06:00
* The group is spacing and nothing else: no frame, no rules between cells, and
* no surface of its own, so the statistics sit on whatever they are dropped onto
* -- the page in one place, a Panel in another -- and pick up its colour.
ui: Statistic and StatisticGroup, and the four defects they had These three exports had no test of their own. Statistic had already been caught out once -- it relied on Semantic's `Statistic.Group` for its spacing, so it broke silently when that was uninstalled -- and they are on the Status, Dashboard, Apps, Docs, Videos, Archive and Channels pages. Four defects, each with a test that goes red without the fix: * StatisticGroup ruled between columns only, with a `border-right` on every cell but the last. `auto-fit` wraps, so the seven statistics on the Docs page became four rows on a phone with no rule between them, and the cell ending each earlier row drew its border straight onto the group's outer one, making that edge 2px on the right and 1px on the left. The hairlines are now a 1px grid gap filled by an outline on each cell, which rules both axes however the tracks fall. Ruling the gaps with a border-coloured background behind the grid -- which is where this went first -- has the same reach but paints every track no cell landed in: an odd count left the last slot a solid grey block. An outline is drawn only where a cell is. Both of these are guarded, because the second was introduced while fixing the first. * A statistic that renders nothing left a padded cell and a stray hairline mid-row. FanRPMStatistic returns null on a device with no fan connector, which is most of them, so this was the Status page's normal appearance. The group cannot render a child to find out, so the cell is still emitted and `:empty` takes it out of the grid -- which is why the cells carry no inline style for that rule to have to outrank. * Statistic destructured five props and dropped the rest. LoadStatistic and the four Status wrappers all end in `{...props}`, so anything passed through a wrapper vanished with no error anywhere. * VideosStatistics passed `style={{margin: '2em'}}` to every statistic, Semantic-era spacing that the grid now provides. It beat the group's own rule, being inline, and made that one page's statistics sit differently from the six others. CardGroup was the only component in the library with no class of its own, which left nothing to assert against -- `container.firstChild` in jsdom is Mantine's injected <style> element. It has one now, and takes className/style/rest like its siblings. The gallery grows a seventh statistic, so the group wraps at a normal window width where the row hairlines can be seen, and a second group of coloured readings as Status renders them. Geometry, hairlines and per-theme token resolution are in ui-layout.cy.js rather than jest: jsdom returns zeros from getBoundingClientRect and never resolves a var(), so it cannot judge any of it.
2026-07-30 19:08:44 -06:00
*
ui: statistics carry no chrome, only spacing The group had a frame, a surface and a hairline between every cell. It now has none of those: a plain responsive grid, transparent, so the statistics sit on whatever they were dropped onto and take its colour -- the page on the gallery, a Panel on Apps and Status. That also retires the problem the previous commit went two rounds on. Ruling the cells needs a technique that survives wrapping, because `auto-fit` settles the number of rows at paint time: a border per cell rules columns but not rows, and a border-coloured background behind a 1px gap rules both but paints every track no cell landed in. With no rules to draw, neither case exists. The gap is wider across than down, since two statistics side by side have only air between them while stacked ones already have the label's line. The margin above the group is conditional on having a sibling before it. A plain `margin-top` reads correctly under the Header that precedes most groups, but Apps opens each of its Panels with one, and there it pushed the values down off the panel's top padding while the bottom stayed put, leaving every panel lopsided. Five browser tests described hairlines that no longer exist. They are replaced by the claims that now hold -- real space between wrapped rows, a wider column gap than row gap, transparency and no frame anywhere, and the conditional margin -- each verified red first: against flush rows for the spacing, against a background-carried hairline for the transparency, and against an unconditional margin for the panel case. Per-theme, the pair to check is no longer the hairline and the surface but the value and the label: with nothing framing a statistic, the contrast between those two is the only thing giving it structure.
2026-07-30 19:17:38 -06:00
* That also settles a question this went round twice on. Ruling the cells needs
* a technique that survives wrapping, because `auto-fit` decides the number of
* rows at paint time: a `border-right` per cell rules columns but not rows, and
* a border-coloured background behind a 1px gap rules both but paints every
* track no cell landed in. With no rules at all, neither problem exists.
ui: Statistic and StatisticGroup, and the four defects they had These three exports had no test of their own. Statistic had already been caught out once -- it relied on Semantic's `Statistic.Group` for its spacing, so it broke silently when that was uninstalled -- and they are on the Status, Dashboard, Apps, Docs, Videos, Archive and Channels pages. Four defects, each with a test that goes red without the fix: * StatisticGroup ruled between columns only, with a `border-right` on every cell but the last. `auto-fit` wraps, so the seven statistics on the Docs page became four rows on a phone with no rule between them, and the cell ending each earlier row drew its border straight onto the group's outer one, making that edge 2px on the right and 1px on the left. The hairlines are now a 1px grid gap filled by an outline on each cell, which rules both axes however the tracks fall. Ruling the gaps with a border-coloured background behind the grid -- which is where this went first -- has the same reach but paints every track no cell landed in: an odd count left the last slot a solid grey block. An outline is drawn only where a cell is. Both of these are guarded, because the second was introduced while fixing the first. * A statistic that renders nothing left a padded cell and a stray hairline mid-row. FanRPMStatistic returns null on a device with no fan connector, which is most of them, so this was the Status page's normal appearance. The group cannot render a child to find out, so the cell is still emitted and `:empty` takes it out of the grid -- which is why the cells carry no inline style for that rule to have to outrank. * Statistic destructured five props and dropped the rest. LoadStatistic and the four Status wrappers all end in `{...props}`, so anything passed through a wrapper vanished with no error anywhere. * VideosStatistics passed `style={{margin: '2em'}}` to every statistic, Semantic-era spacing that the grid now provides. It beat the group's own rule, being inline, and made that one page's statistics sit differently from the six others. CardGroup was the only component in the library with no class of its own, which left nothing to assert against -- `container.firstChild` in jsdom is Mantine's injected <style> element. It has one now, and takes className/style/rest like its siblings. The gallery grows a seventh statistic, so the group wraps at a normal window width where the row hairlines can be seen, and a second group of coloured readings as Status renders them. Geometry, hairlines and per-theme token resolution are in ui-layout.cy.js rather than jest: jsdom returns zeros from getBoundingClientRect and never resolves a var(), so it cannot judge any of it.
2026-07-30 19:08:44 -06:00
*
ui: statistics carry no chrome, only spacing The group had a frame, a surface and a hairline between every cell. It now has none of those: a plain responsive grid, transparent, so the statistics sit on whatever they were dropped onto and take its colour -- the page on the gallery, a Panel on Apps and Status. That also retires the problem the previous commit went two rounds on. Ruling the cells needs a technique that survives wrapping, because `auto-fit` settles the number of rows at paint time: a border per cell rules columns but not rows, and a border-coloured background behind a 1px gap rules both but paints every track no cell landed in. With no rules to draw, neither case exists. The gap is wider across than down, since two statistics side by side have only air between them while stacked ones already have the label's line. The margin above the group is conditional on having a sibling before it. A plain `margin-top` reads correctly under the Header that precedes most groups, but Apps opens each of its Panels with one, and there it pushed the values down off the panel's top padding while the bottom stayed put, leaving every panel lopsided. Five browser tests described hairlines that no longer exist. They are replaced by the claims that now hold -- real space between wrapped rows, a wider column gap than row gap, transparency and no frame anywhere, and the conditional margin -- each verified red first: against flush rows for the spacing, against a background-carried hairline for the transparency, and against an unconditional margin for the panel case. Per-theme, the pair to check is no longer the hairline and the surface but the value and the label: with nothing framing a statistic, the contrast between those two is the only thing giving it structure.
2026-07-30 19:17:38 -06:00
* The gap is wider across than down. Two statistics side by side have nothing
* between them but air, so they need enough of it not to read as one column of
* text; stacked ones are already separated by the label's line.
ui: Statistic and StatisticGroup, and the four defects they had These three exports had no test of their own. Statistic had already been caught out once -- it relied on Semantic's `Statistic.Group` for its spacing, so it broke silently when that was uninstalled -- and they are on the Status, Dashboard, Apps, Docs, Videos, Archive and Channels pages. Four defects, each with a test that goes red without the fix: * StatisticGroup ruled between columns only, with a `border-right` on every cell but the last. `auto-fit` wraps, so the seven statistics on the Docs page became four rows on a phone with no rule between them, and the cell ending each earlier row drew its border straight onto the group's outer one, making that edge 2px on the right and 1px on the left. The hairlines are now a 1px grid gap filled by an outline on each cell, which rules both axes however the tracks fall. Ruling the gaps with a border-coloured background behind the grid -- which is where this went first -- has the same reach but paints every track no cell landed in: an odd count left the last slot a solid grey block. An outline is drawn only where a cell is. Both of these are guarded, because the second was introduced while fixing the first. * A statistic that renders nothing left a padded cell and a stray hairline mid-row. FanRPMStatistic returns null on a device with no fan connector, which is most of them, so this was the Status page's normal appearance. The group cannot render a child to find out, so the cell is still emitted and `:empty` takes it out of the grid -- which is why the cells carry no inline style for that rule to have to outrank. * Statistic destructured five props and dropped the rest. LoadStatistic and the four Status wrappers all end in `{...props}`, so anything passed through a wrapper vanished with no error anywhere. * VideosStatistics passed `style={{margin: '2em'}}` to every statistic, Semantic-era spacing that the grid now provides. It beat the group's own rule, being inline, and made that one page's statistics sit differently from the six others. CardGroup was the only component in the library with no class of its own, which left nothing to assert against -- `container.firstChild` in jsdom is Mantine's injected <style> element. It has one now, and takes className/style/rest like its siblings. The gallery grows a seventh statistic, so the group wraps at a normal window width where the row hairlines can be seen, and a second group of coloured readings as Status renders them. Geometry, hairlines and per-theme token resolution are in ui-layout.cy.js rather than jest: jsdom returns zeros from getBoundingClientRect and never resolves a var(), so it cannot judge any of it.
2026-07-30 19:08:44 -06:00
*/
.wrolpi-statistic-group {
display: grid;
grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
ui: statistics carry no chrome, only spacing The group had a frame, a surface and a hairline between every cell. It now has none of those: a plain responsive grid, transparent, so the statistics sit on whatever they were dropped onto and take its colour -- the page on the gallery, a Panel on Apps and Status. That also retires the problem the previous commit went two rounds on. Ruling the cells needs a technique that survives wrapping, because `auto-fit` settles the number of rows at paint time: a border per cell rules columns but not rows, and a border-coloured background behind a 1px gap rules both but paints every track no cell landed in. With no rules to draw, neither case exists. The gap is wider across than down, since two statistics side by side have only air between them while stacked ones already have the label's line. The margin above the group is conditional on having a sibling before it. A plain `margin-top` reads correctly under the Header that precedes most groups, but Apps opens each of its Panels with one, and there it pushed the values down off the panel's top padding while the bottom stayed put, leaving every panel lopsided. Five browser tests described hairlines that no longer exist. They are replaced by the claims that now hold -- real space between wrapped rows, a wider column gap than row gap, transparency and no frame anywhere, and the conditional margin -- each verified red first: against flush rows for the spacing, against a background-carried hairline for the transparency, and against an unconditional margin for the panel case. Per-theme, the pair to check is no longer the hairline and the surface but the value and the label: with nothing framing a statistic, the contrast between those two is the only thing giving it structure.
2026-07-30 19:17:38 -06:00
gap: 18px 30px;
ui: Statistic and StatisticGroup, and the four defects they had These three exports had no test of their own. Statistic had already been caught out once -- it relied on Semantic's `Statistic.Group` for its spacing, so it broke silently when that was uninstalled -- and they are on the Status, Dashboard, Apps, Docs, Videos, Archive and Channels pages. Four defects, each with a test that goes red without the fix: * StatisticGroup ruled between columns only, with a `border-right` on every cell but the last. `auto-fit` wraps, so the seven statistics on the Docs page became four rows on a phone with no rule between them, and the cell ending each earlier row drew its border straight onto the group's outer one, making that edge 2px on the right and 1px on the left. The hairlines are now a 1px grid gap filled by an outline on each cell, which rules both axes however the tracks fall. Ruling the gaps with a border-coloured background behind the grid -- which is where this went first -- has the same reach but paints every track no cell landed in: an odd count left the last slot a solid grey block. An outline is drawn only where a cell is. Both of these are guarded, because the second was introduced while fixing the first. * A statistic that renders nothing left a padded cell and a stray hairline mid-row. FanRPMStatistic returns null on a device with no fan connector, which is most of them, so this was the Status page's normal appearance. The group cannot render a child to find out, so the cell is still emitted and `:empty` takes it out of the grid -- which is why the cells carry no inline style for that rule to have to outrank. * Statistic destructured five props and dropped the rest. LoadStatistic and the four Status wrappers all end in `{...props}`, so anything passed through a wrapper vanished with no error anywhere. * VideosStatistics passed `style={{margin: '2em'}}` to every statistic, Semantic-era spacing that the grid now provides. It beat the group's own rule, being inline, and made that one page's statistics sit differently from the six others. CardGroup was the only component in the library with no class of its own, which left nothing to assert against -- `container.firstChild` in jsdom is Mantine's injected <style> element. It has one now, and takes className/style/rest like its siblings. The gallery grows a seventh statistic, so the group wraps at a normal window width where the row hairlines can be seen, and a second group of coloured readings as Status renders them. Geometry, hairlines and per-theme token resolution are in ui-layout.cy.js rather than jest: jsdom returns zeros from getBoundingClientRect and never resolves a var(), so it cannot judge any of it.
2026-07-30 19:08:44 -06:00
}
ui: statistics carry no chrome, only spacing The group had a frame, a surface and a hairline between every cell. It now has none of those: a plain responsive grid, transparent, so the statistics sit on whatever they were dropped onto and take its colour -- the page on the gallery, a Panel on Apps and Status. That also retires the problem the previous commit went two rounds on. Ruling the cells needs a technique that survives wrapping, because `auto-fit` settles the number of rows at paint time: a border per cell rules columns but not rows, and a border-coloured background behind a 1px gap rules both but paints every track no cell landed in. With no rules to draw, neither case exists. The gap is wider across than down, since two statistics side by side have only air between them while stacked ones already have the label's line. The margin above the group is conditional on having a sibling before it. A plain `margin-top` reads correctly under the Header that precedes most groups, but Apps opens each of its Panels with one, and there it pushed the values down off the panel's top padding while the bottom stayed put, leaving every panel lopsided. Five browser tests described hairlines that no longer exist. They are replaced by the claims that now hold -- real space between wrapped rows, a wider column gap than row gap, transparency and no frame anywhere, and the conditional margin -- each verified red first: against flush rows for the spacing, against a background-carried hairline for the transparency, and against an unconditional margin for the panel case. Per-theme, the pair to check is no longer the hairline and the surface but the value and the label: with nothing framing a statistic, the contrast between those two is the only thing giving it structure.
2026-07-30 19:17:38 -06:00
/*
* With the frame gone there is nothing holding the group off whatever precedes it, and on
* most pages that is a Header -- the first row of values sat directly against the heading.
*
* Only when something does precede it, though. Apps opens each of its Panels with a group,
* and a blanket `margin-top` there pushed the values down off the panel's own top padding
* while leaving the bottom where it was, so the whole panel read as lopsided.
*/
* + .wrolpi-statistic-group {
margin-top: 18px;
ui: Statistic and StatisticGroup, and the four defects they had These three exports had no test of their own. Statistic had already been caught out once -- it relied on Semantic's `Statistic.Group` for its spacing, so it broke silently when that was uninstalled -- and they are on the Status, Dashboard, Apps, Docs, Videos, Archive and Channels pages. Four defects, each with a test that goes red without the fix: * StatisticGroup ruled between columns only, with a `border-right` on every cell but the last. `auto-fit` wraps, so the seven statistics on the Docs page became four rows on a phone with no rule between them, and the cell ending each earlier row drew its border straight onto the group's outer one, making that edge 2px on the right and 1px on the left. The hairlines are now a 1px grid gap filled by an outline on each cell, which rules both axes however the tracks fall. Ruling the gaps with a border-coloured background behind the grid -- which is where this went first -- has the same reach but paints every track no cell landed in: an odd count left the last slot a solid grey block. An outline is drawn only where a cell is. Both of these are guarded, because the second was introduced while fixing the first. * A statistic that renders nothing left a padded cell and a stray hairline mid-row. FanRPMStatistic returns null on a device with no fan connector, which is most of them, so this was the Status page's normal appearance. The group cannot render a child to find out, so the cell is still emitted and `:empty` takes it out of the grid -- which is why the cells carry no inline style for that rule to have to outrank. * Statistic destructured five props and dropped the rest. LoadStatistic and the four Status wrappers all end in `{...props}`, so anything passed through a wrapper vanished with no error anywhere. * VideosStatistics passed `style={{margin: '2em'}}` to every statistic, Semantic-era spacing that the grid now provides. It beat the group's own rule, being inline, and made that one page's statistics sit differently from the six others. CardGroup was the only component in the library with no class of its own, which left nothing to assert against -- `container.firstChild` in jsdom is Mantine's injected <style> element. It has one now, and takes className/style/rest like its siblings. The gallery grows a seventh statistic, so the group wraps at a normal window width where the row hairlines can be seen, and a second group of coloured readings as Status renders them. Geometry, hairlines and per-theme token resolution are in ui-layout.cy.js rather than jest: jsdom returns zeros from getBoundingClientRect and never resolves a var(), so it cannot judge any of it.
2026-07-30 19:08:44 -06:00
}
/*
* A statistic that renders nothing -- Status omits the fan reading on a device
ui: statistics carry no chrome, only spacing The group had a frame, a surface and a hairline between every cell. It now has none of those: a plain responsive grid, transparent, so the statistics sit on whatever they were dropped onto and take its colour -- the page on the gallery, a Panel on Apps and Status. That also retires the problem the previous commit went two rounds on. Ruling the cells needs a technique that survives wrapping, because `auto-fit` settles the number of rows at paint time: a border per cell rules columns but not rows, and a border-coloured background behind a 1px gap rules both but paints every track no cell landed in. With no rules to draw, neither case exists. The gap is wider across than down, since two statistics side by side have only air between them while stacked ones already have the label's line. The margin above the group is conditional on having a sibling before it. A plain `margin-top` reads correctly under the Header that precedes most groups, but Apps opens each of its Panels with one, and there it pushed the values down off the panel's top padding while the bottom stayed put, leaving every panel lopsided. Five browser tests described hairlines that no longer exist. They are replaced by the claims that now hold -- real space between wrapped rows, a wider column gap than row gap, transparency and no frame anywhere, and the conditional margin -- each verified red first: against flush rows for the spacing, against a background-carried hairline for the transparency, and against an unconditional margin for the panel case. Per-theme, the pair to check is no longer the hairline and the surface but the value and the label: with nothing framing a statistic, the contrast between those two is the only thing giving it structure.
2026-07-30 19:17:38 -06:00
* with no fan connector -- must not hold a track open. The group cannot know in
* advance, since it would have to render the child to find out, so the cell is
* emitted either way and this takes the empty ones back out. It is also why the
* cells carry no inline style: there is nothing here for it to outrank.
ui: Statistic and StatisticGroup, and the four defects they had These three exports had no test of their own. Statistic had already been caught out once -- it relied on Semantic's `Statistic.Group` for its spacing, so it broke silently when that was uninstalled -- and they are on the Status, Dashboard, Apps, Docs, Videos, Archive and Channels pages. Four defects, each with a test that goes red without the fix: * StatisticGroup ruled between columns only, with a `border-right` on every cell but the last. `auto-fit` wraps, so the seven statistics on the Docs page became four rows on a phone with no rule between them, and the cell ending each earlier row drew its border straight onto the group's outer one, making that edge 2px on the right and 1px on the left. The hairlines are now a 1px grid gap filled by an outline on each cell, which rules both axes however the tracks fall. Ruling the gaps with a border-coloured background behind the grid -- which is where this went first -- has the same reach but paints every track no cell landed in: an odd count left the last slot a solid grey block. An outline is drawn only where a cell is. Both of these are guarded, because the second was introduced while fixing the first. * A statistic that renders nothing left a padded cell and a stray hairline mid-row. FanRPMStatistic returns null on a device with no fan connector, which is most of them, so this was the Status page's normal appearance. The group cannot render a child to find out, so the cell is still emitted and `:empty` takes it out of the grid -- which is why the cells carry no inline style for that rule to have to outrank. * Statistic destructured five props and dropped the rest. LoadStatistic and the four Status wrappers all end in `{...props}`, so anything passed through a wrapper vanished with no error anywhere. * VideosStatistics passed `style={{margin: '2em'}}` to every statistic, Semantic-era spacing that the grid now provides. It beat the group's own rule, being inline, and made that one page's statistics sit differently from the six others. CardGroup was the only component in the library with no class of its own, which left nothing to assert against -- `container.firstChild` in jsdom is Mantine's injected <style> element. It has one now, and takes className/style/rest like its siblings. The gallery grows a seventh statistic, so the group wraps at a normal window width where the row hairlines can be seen, and a second group of coloured readings as Status renders them. Geometry, hairlines and per-theme token resolution are in ui-layout.cy.js rather than jest: jsdom returns zeros from getBoundingClientRect and never resolves a var(), so it cannot judge any of it.
2026-07-30 19:08:44 -06:00
*/
.wrolpi-statistic-cell:empty {
display: none;
}
ui: Common.js and thirteen more files off Semantic Phase 2, part 3. Baseline 63 -> 50. Common.js is the one that mattered: 51 files import it, so its Semantic usage was propping up the rest of the migration. Everything in it now comes from the library -- Paginator, the two search inputs, DirectorySearch, TabLinks, the toggles, the messages, APIButton, Breadcrumbs, SimpleAccordion, IframeViewer, CardPoster, FileIcon, LoadStatistic, the theme menu, and the hotspot icons. Also migrated: Placeholder, Apps, ArchivePreview, CbzViewer, AddToPlaylist, TaggedDeleteConfirmModal, the collection edit/tag forms, and four inventory components. New in the library, all in the gallery and tested: SearchBox Semantic's `<Search category>` with its grouped results shape kept, because four call sites already build it. A real combobox rather than a div that listens for clicks. Pagination Semantic's prop names; onPageChange gets the page number. TabBar the strip only -- routing stays with the caller. IconStack Semantic's IconGroup, named once for assistive technology. Table.HeaderCell sorted/onSort -- a real button carrying aria-sort. Button/IconButton translate Semantic's size names. That last one is defensive: unmigrated callers still pass size='tiny', and Mantine drops a size it does not recognise without a word, so the button quietly renders at the wrong size. Mapping here keeps the mixed state honest. Three real bugs found and fixed on the way, none of them cosmetic: * `fileSuffixIconName` returned fourteen icon names the map did not have, so opening a folder with a PDF, a Word document or an archive in it logged an error and drew a fallback glyph. All fourteen mapped, with a test that walks the mapper's own return values, and another asserting every mapped name resolves to a Tabler component that exists. * `Statistic` relied on Semantic's `Statistic.Group` for its spacing, so on the dashboard the load averages ran together into "1 MIN. LOAD5 MIN. LOAD15 MIN. LOAD". It carries its own spacing now. * Semantic's inverted stylesheet colors every descendant of an inverted segment, so Toggle labels inherited #dddddd -- white pixels in night mode, on the Settings page, which is exactly where someone adjusts their WROLPi in the dark. Restated from tokens. The baseline ratchet gained a third assertion: a migrated file may still lean on Semantic's CSS classes without importing the library, which the import check cannot see and which would collapse silently when Phase 4 deletes the stylesheet. There is one such bridge today and it is now declared.
2026-07-30 10:00:48 -06:00
/* Inside our own group the grid does the spacing, so the intrinsic margin goes. */
.wrolpi-statistic-cell .wrolpi-statistic {
display: block;
margin: 0;
}
ui: token-driven component library on Mantine Adds src/components/ui: buttons, messages, labels, progress, status, tables, form controls, panels, cards, statistics, modals, tooltips, tabs, and icons. Everything resolves its colors through theme tokens, so no component branches on the current theme, and Semantic UI keeps rendering the app meanwhile. Mantine is bridged rather than restyled: its own CSS variables are pointed at our tokens. Four details were not obvious, and each caused a visible defect in night mode before being fixed: - Structural colors must go in the resolver's light/dark blocks. Mantine emits its values under [data-mantine-color-scheme], which outranks the :root block that `variables` becomes, so its grays were winning. - The dark and gray palettes are mapped shade by shade to tokens. Mantine reads them directly for table borders, zebra stripes and input chrome; they can be neither flattened nor left alone. - Mantine writes --button-* as inline styles, which no stylesheet can outrank, so the dashed danger treatment sets real properties instead. - Switch colors are written onto inner elements, so they need scoped CSS rather than a variable on the root. Adds a --knob token for control handles, because Mantine's default thumb follows theme.white, which is near-black in the dark-based themes. An audit of every painted pixel in the /theme-sample gallery now finds no non-red channel in night mode. Icons come from @tabler/icons-react with the 102 Semantic names the app uses mapped to components; they stroke with currentColor, so they follow the theme without any rule of their own. Toasts keep the react-semantic-toasts-2 signature so those call sites migrate by changing an import. TypeScript 5 is required: Mantine's declarations use `const` type parameters, which 4.9 cannot parse (Mantine 7 is the same, so downgrading is no escape). That needs two npm overrides to keep clean installs working, both verified against a Docker build: react-scripts declares peerOptional typescript ^3||^4, and fork-ts-checker 6.5.2 assigns typescript.performance.mark, which TS 5 made getter-only - crashing the dev server's type checker on every rebuild. semantic-baseline.test.js ratchets the removal: it fails if a file not already listed imports Semantic UI. An ESLint rule would have printed 75 warnings per rebuild, and CI unsets CI= for its build step, so it would guard nothing there. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-07-29 19:22:03 -06:00
.wrolpi-statistic-value {
font-size: 24px;
font-weight: 600;
font-variant-numeric: tabular-nums;
line-height: 1.15;
}
.wrolpi-statistic-label {
font-size: 11px;
letter-spacing: 0.1em;
text-transform: uppercase;
color: var(--muted);
margin-top: 2px;
}
/* ---------------------------------------------------------------- Status */
/*
ui: semantic roles, so night and amber can tell severity apart at all A component now asks for what a colour MEANS -- `danger` -- and the theme decides how that looks. Five roles: neutral, info, success, warning, danger. The names are the ones already in the tree. `--primary/--success/--warning/ --danger` were declared in tokens.css with ZERO consumers, and `MessageKind` was already `info|success|warning|error`; this is one vocabulary instead of three. `error` stays a valid kind because 26 call sites write it, and `danger` is the same thing under the token's name for new code. The token set is the easy half. Light and dark spend a hue per role. Night is red and nothing else and amber is amber and nothing else, and there a role has to be a step on a BRIGHTNESS ramp -- which is why this was worth doing: night --orange is byte-identical to --text --yellow is byte-identical to --amber amber the same collisions, one hue over A call site picking between hue names in those themes is picking between synonyms. That is why all four toast kinds were the same pixel in night, and why an error and an informational message were indistinguishable. Both ramps are built rather than copied: every role clears 3:1 on the panel (neutral is allowed lower -- for pending and disabled, dim IS the signal), severity is strictly increasing in contrast, and danger reaches that theme's own --text brightness so the loudest role is never quieter than prose. Amber needed its own scale, not night's: its --text is 8.6:1 where night's is 5.0:1, so night's ramp would have left every role dimmer than ordinary text. Fixes in passing: night's info was 2.29:1, under the 3:1 floor. And Status loses its three `html[data-theme="night"]` overrides entirely -- it was the one component already encoding severity by brightness by hand, and the roles are that generalised. Roles are registered as Mantine colors too, so `color='danger'` works anywhere `color='red'` does. `isMonochromeTheme` is a new predicate in themes/names. It is the same set as `explicitOnlyThemes` today and deliberately separate: one is about how a theme is chosen, the other about what a theme has to work with. Scope: tokens plus the library. The ~24 app-level `color='...'` call sites are a follow-up -- they need a judgement per site, and two of them already disagree (Downloads.js colours the same "Download error" label `orange` on one line and `red` on another). The 22 `violet` uses are not semantic at all and stay hues. Tests: the ramp claims are asserted per theme in a browser, and the ordering and danger-vs-text claims run ONLY for the monochrome themes -- in light, blue is darker than green on white, so a brightness ramp there would fail a design that is perfectly fine. Every guard checked red against a planted regression, including the original bug (warning and danger collapsed to one value in night) and night's info back at its old 2.29:1. The roles were folded into each theme's own block rather than kept in a standalone one, so the existing "same tokens in every theme" and "only red hues in night" guards cover them for free. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
2026-08-01 17:31:44 -06:00
* One rule for four states in four themes. The colour is the role the component
* chose, and the role already knows what it looks like here -- which is what
* replaced the three `html[data-theme="night"]` overrides that used to live below.
ui: token-driven component library on Mantine Adds src/components/ui: buttons, messages, labels, progress, status, tables, form controls, panels, cards, statistics, modals, tooltips, tabs, and icons. Everything resolves its colors through theme tokens, so no component branches on the current theme, and Semantic UI keeps rendering the app meanwhile. Mantine is bridged rather than restyled: its own CSS variables are pointed at our tokens. Four details were not obvious, and each caused a visible defect in night mode before being fixed: - Structural colors must go in the resolver's light/dark blocks. Mantine emits its values under [data-mantine-color-scheme], which outranks the :root block that `variables` becomes, so its grays were winning. - The dark and gray palettes are mapped shade by shade to tokens. Mantine reads them directly for table borders, zebra stripes and input chrome; they can be neither flattened nor left alone. - Mantine writes --button-* as inline styles, which no stylesheet can outrank, so the dashed danger treatment sets real properties instead. - Switch colors are written onto inner elements, so they need scoped CSS rather than a variable on the root. Adds a --knob token for control handles, because Mantine's default thumb follows theme.white, which is near-black in the dark-based themes. An audit of every painted pixel in the /theme-sample gallery now finds no non-red channel in night mode. Icons come from @tabler/icons-react with the 102 Semantic names the app uses mapped to components; they stroke with currentColor, so they follow the theme without any rule of their own. Toasts keep the react-semantic-toasts-2 signature so those call sites migrate by changing an import. TypeScript 5 is required: Mantine's declarations use `const` type parameters, which 4.9 cannot parse (Mantine 7 is the same, so downgrading is no escape). That needs two npm overrides to keep clean installs working, both verified against a Docker build: react-scripts declares peerOptional typescript ^3||^4, and fork-ts-checker 6.5.2 assigns typescript.performance.mark, which TS 5 made getter-only - crashing the dev server's type checker on every rebuild. semantic-baseline.test.js ratchets the removal: it fails if a file not already listed imports Semantic UI. An ESLint rule would have printed 75 warnings per rebuild, and CI unsets CI= for its build step, so it would guard nothing there. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-07-29 19:22:03 -06:00
*/
.wrolpi-status {
font-size: 12.5px;
font-weight: 500;
display: inline-flex;
align-items: center;
gap: 5px;
ui: semantic roles, so night and amber can tell severity apart at all A component now asks for what a colour MEANS -- `danger` -- and the theme decides how that looks. Five roles: neutral, info, success, warning, danger. The names are the ones already in the tree. `--primary/--success/--warning/ --danger` were declared in tokens.css with ZERO consumers, and `MessageKind` was already `info|success|warning|error`; this is one vocabulary instead of three. `error` stays a valid kind because 26 call sites write it, and `danger` is the same thing under the token's name for new code. The token set is the easy half. Light and dark spend a hue per role. Night is red and nothing else and amber is amber and nothing else, and there a role has to be a step on a BRIGHTNESS ramp -- which is why this was worth doing: night --orange is byte-identical to --text --yellow is byte-identical to --amber amber the same collisions, one hue over A call site picking between hue names in those themes is picking between synonyms. That is why all four toast kinds were the same pixel in night, and why an error and an informational message were indistinguishable. Both ramps are built rather than copied: every role clears 3:1 on the panel (neutral is allowed lower -- for pending and disabled, dim IS the signal), severity is strictly increasing in contrast, and danger reaches that theme's own --text brightness so the loudest role is never quieter than prose. Amber needed its own scale, not night's: its --text is 8.6:1 where night's is 5.0:1, so night's ramp would have left every role dimmer than ordinary text. Fixes in passing: night's info was 2.29:1, under the 3:1 floor. And Status loses its three `html[data-theme="night"]` overrides entirely -- it was the one component already encoding severity by brightness by hand, and the roles are that generalised. Roles are registered as Mantine colors too, so `color='danger'` works anywhere `color='red'` does. `isMonochromeTheme` is a new predicate in themes/names. It is the same set as `explicitOnlyThemes` today and deliberately separate: one is about how a theme is chosen, the other about what a theme has to work with. Scope: tokens plus the library. The ~24 app-level `color='...'` call sites are a follow-up -- they need a judgement per site, and two of them already disagree (Downloads.js colours the same "Download error" label `orange` on one line and `red` on another). The 22 `violet` uses are not semantic at all and stay hues. Tests: the ramp claims are asserted per theme in a browser, and the ordering and danger-vs-text claims run ONLY for the monochrome themes -- in light, blue is darker than green on white, so a brightness ramp there would fail a design that is perfectly fine. Every guard checked red against a planted regression, including the original bug (warning and danger collapsed to one value in night) and night's info back at its old 2.29:1. The roles were folded into each theme's own block rather than kept in a standalone one, so the existing "same tokens in every theme" and "only red hues in night" guards cover them for free. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
2026-08-01 17:31:44 -06:00
color: var(--status-color);
ui: token-driven component library on Mantine Adds src/components/ui: buttons, messages, labels, progress, status, tables, form controls, panels, cards, statistics, modals, tooltips, tabs, and icons. Everything resolves its colors through theme tokens, so no component branches on the current theme, and Semantic UI keeps rendering the app meanwhile. Mantine is bridged rather than restyled: its own CSS variables are pointed at our tokens. Four details were not obvious, and each caused a visible defect in night mode before being fixed: - Structural colors must go in the resolver's light/dark blocks. Mantine emits its values under [data-mantine-color-scheme], which outranks the :root block that `variables` becomes, so its grays were winning. - The dark and gray palettes are mapped shade by shade to tokens. Mantine reads them directly for table borders, zebra stripes and input chrome; they can be neither flattened nor left alone. - Mantine writes --button-* as inline styles, which no stylesheet can outrank, so the dashed danger treatment sets real properties instead. - Switch colors are written onto inner elements, so they need scoped CSS rather than a variable on the root. Adds a --knob token for control handles, because Mantine's default thumb follows theme.white, which is near-black in the dark-based themes. An audit of every painted pixel in the /theme-sample gallery now finds no non-red channel in night mode. Icons come from @tabler/icons-react with the 102 Semantic names the app uses mapped to components; they stroke with currentColor, so they follow the theme without any rule of their own. Toasts keep the react-semantic-toasts-2 signature so those call sites migrate by changing an import. TypeScript 5 is required: Mantine's declarations use `const` type parameters, which 4.9 cannot parse (Mantine 7 is the same, so downgrading is no escape). That needs two npm overrides to keep clean installs working, both verified against a Docker build: react-scripts declares peerOptional typescript ^3||^4, and fork-ts-checker 6.5.2 assigns typescript.performance.mark, which TS 5 made getter-only - crashing the dev server's type checker on every rebuild. semantic-baseline.test.js ratchets the removal: it fails if a file not already listed imports Semantic UI. An ESLint rule would have printed 75 warnings per rebuild, and CI unsets CI= for its build step, so it would guard nothing there. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-07-29 19:22:03 -06:00
}
ui: semantic roles, so night and amber can tell severity apart at all A component now asks for what a colour MEANS -- `danger` -- and the theme decides how that looks. Five roles: neutral, info, success, warning, danger. The names are the ones already in the tree. `--primary/--success/--warning/ --danger` were declared in tokens.css with ZERO consumers, and `MessageKind` was already `info|success|warning|error`; this is one vocabulary instead of three. `error` stays a valid kind because 26 call sites write it, and `danger` is the same thing under the token's name for new code. The token set is the easy half. Light and dark spend a hue per role. Night is red and nothing else and amber is amber and nothing else, and there a role has to be a step on a BRIGHTNESS ramp -- which is why this was worth doing: night --orange is byte-identical to --text --yellow is byte-identical to --amber amber the same collisions, one hue over A call site picking between hue names in those themes is picking between synonyms. That is why all four toast kinds were the same pixel in night, and why an error and an informational message were indistinguishable. Both ramps are built rather than copied: every role clears 3:1 on the panel (neutral is allowed lower -- for pending and disabled, dim IS the signal), severity is strictly increasing in contrast, and danger reaches that theme's own --text brightness so the loudest role is never quieter than prose. Amber needed its own scale, not night's: its --text is 8.6:1 where night's is 5.0:1, so night's ramp would have left every role dimmer than ordinary text. Fixes in passing: night's info was 2.29:1, under the 3:1 floor. And Status loses its three `html[data-theme="night"]` overrides entirely -- it was the one component already encoding severity by brightness by hand, and the roles are that generalised. Roles are registered as Mantine colors too, so `color='danger'` works anywhere `color='red'` does. `isMonochromeTheme` is a new predicate in themes/names. It is the same set as `explicitOnlyThemes` today and deliberately separate: one is about how a theme is chosen, the other about what a theme has to work with. Scope: tokens plus the library. The ~24 app-level `color='...'` call sites are a follow-up -- they need a judgement per site, and two of them already disagree (Downloads.js colours the same "Download error" label `orange` on one line and `red` on another). The 22 `violet` uses are not semantic at all and stay hues. Tests: the ramp claims are asserted per theme in a browser, and the ordering and danger-vs-text claims run ONLY for the monochrome themes -- in light, blue is darker than green on white, so a brightness ramp there would fail a design that is perfectly fine. Every guard checked red against a planted regression, including the original bug (warning and danger collapsed to one value in night) and night's info back at its old 2.29:1. The roles were folded into each theme's own block rather than kept in a standalone one, so the existing "same tokens in every theme" and "only red hues in night" guards cover them for free. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
2026-08-01 17:31:44 -06:00
/*
* Failure is not left to colour alone. Night and amber distinguish the roles by
* brightness, and brightness is the first thing lost on a dim screen or to a user
* who cannot separate these hues, so the loudest state also carries weight.
*/
ui: token-driven component library on Mantine Adds src/components/ui: buttons, messages, labels, progress, status, tables, form controls, panels, cards, statistics, modals, tooltips, tabs, and icons. Everything resolves its colors through theme tokens, so no component branches on the current theme, and Semantic UI keeps rendering the app meanwhile. Mantine is bridged rather than restyled: its own CSS variables are pointed at our tokens. Four details were not obvious, and each caused a visible defect in night mode before being fixed: - Structural colors must go in the resolver's light/dark blocks. Mantine emits its values under [data-mantine-color-scheme], which outranks the :root block that `variables` becomes, so its grays were winning. - The dark and gray palettes are mapped shade by shade to tokens. Mantine reads them directly for table borders, zebra stripes and input chrome; they can be neither flattened nor left alone. - Mantine writes --button-* as inline styles, which no stylesheet can outrank, so the dashed danger treatment sets real properties instead. - Switch colors are written onto inner elements, so they need scoped CSS rather than a variable on the root. Adds a --knob token for control handles, because Mantine's default thumb follows theme.white, which is near-black in the dark-based themes. An audit of every painted pixel in the /theme-sample gallery now finds no non-red channel in night mode. Icons come from @tabler/icons-react with the 102 Semantic names the app uses mapped to components; they stroke with currentColor, so they follow the theme without any rule of their own. Toasts keep the react-semantic-toasts-2 signature so those call sites migrate by changing an import. TypeScript 5 is required: Mantine's declarations use `const` type parameters, which 4.9 cannot parse (Mantine 7 is the same, so downgrading is no escape). That needs two npm overrides to keep clean installs working, both verified against a Docker build: react-scripts declares peerOptional typescript ^3||^4, and fork-ts-checker 6.5.2 assigns typescript.performance.mark, which TS 5 made getter-only - crashing the dev server's type checker on every rebuild. semantic-baseline.test.js ratchets the removal: it fails if a file not already listed imports Semantic UI. An ESLint rule would have printed 75 warnings per rebuild, and CI unsets CI= for its build step, so it would guard nothing there. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-07-29 19:22:03 -06:00
.wrolpi-status-failed {
ui: semantic roles, so night and amber can tell severity apart at all A component now asks for what a colour MEANS -- `danger` -- and the theme decides how that looks. Five roles: neutral, info, success, warning, danger. The names are the ones already in the tree. `--primary/--success/--warning/ --danger` were declared in tokens.css with ZERO consumers, and `MessageKind` was already `info|success|warning|error`; this is one vocabulary instead of three. `error` stays a valid kind because 26 call sites write it, and `danger` is the same thing under the token's name for new code. The token set is the easy half. Light and dark spend a hue per role. Night is red and nothing else and amber is amber and nothing else, and there a role has to be a step on a BRIGHTNESS ramp -- which is why this was worth doing: night --orange is byte-identical to --text --yellow is byte-identical to --amber amber the same collisions, one hue over A call site picking between hue names in those themes is picking between synonyms. That is why all four toast kinds were the same pixel in night, and why an error and an informational message were indistinguishable. Both ramps are built rather than copied: every role clears 3:1 on the panel (neutral is allowed lower -- for pending and disabled, dim IS the signal), severity is strictly increasing in contrast, and danger reaches that theme's own --text brightness so the loudest role is never quieter than prose. Amber needed its own scale, not night's: its --text is 8.6:1 where night's is 5.0:1, so night's ramp would have left every role dimmer than ordinary text. Fixes in passing: night's info was 2.29:1, under the 3:1 floor. And Status loses its three `html[data-theme="night"]` overrides entirely -- it was the one component already encoding severity by brightness by hand, and the roles are that generalised. Roles are registered as Mantine colors too, so `color='danger'` works anywhere `color='red'` does. `isMonochromeTheme` is a new predicate in themes/names. It is the same set as `explicitOnlyThemes` today and deliberately separate: one is about how a theme is chosen, the other about what a theme has to work with. Scope: tokens plus the library. The ~24 app-level `color='...'` call sites are a follow-up -- they need a judgement per site, and two of them already disagree (Downloads.js colours the same "Download error" label `orange` on one line and `red` on another). The 22 `violet` uses are not semantic at all and stay hues. Tests: the ramp claims are asserted per theme in a browser, and the ordering and danger-vs-text claims run ONLY for the monochrome themes -- in light, blue is darker than green on white, so a brightness ramp there would fail a design that is perfectly fine. Every guard checked red against a planted regression, including the original bug (warning and danger collapsed to one value in night) and night's info back at its old 2.29:1. The roles were folded into each theme's own block rather than kept in a standalone one, so the existing "same tokens in every theme" and "only red hues in night" guards cover them for free. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
2026-08-01 17:31:44 -06:00
font-weight: 600;
ui: token-driven component library on Mantine Adds src/components/ui: buttons, messages, labels, progress, status, tables, form controls, panels, cards, statistics, modals, tooltips, tabs, and icons. Everything resolves its colors through theme tokens, so no component branches on the current theme, and Semantic UI keeps rendering the app meanwhile. Mantine is bridged rather than restyled: its own CSS variables are pointed at our tokens. Four details were not obvious, and each caused a visible defect in night mode before being fixed: - Structural colors must go in the resolver's light/dark blocks. Mantine emits its values under [data-mantine-color-scheme], which outranks the :root block that `variables` becomes, so its grays were winning. - The dark and gray palettes are mapped shade by shade to tokens. Mantine reads them directly for table borders, zebra stripes and input chrome; they can be neither flattened nor left alone. - Mantine writes --button-* as inline styles, which no stylesheet can outrank, so the dashed danger treatment sets real properties instead. - Switch colors are written onto inner elements, so they need scoped CSS rather than a variable on the root. Adds a --knob token for control handles, because Mantine's default thumb follows theme.white, which is near-black in the dark-based themes. An audit of every painted pixel in the /theme-sample gallery now finds no non-red channel in night mode. Icons come from @tabler/icons-react with the 102 Semantic names the app uses mapped to components; they stroke with currentColor, so they follow the theme without any rule of their own. Toasts keep the react-semantic-toasts-2 signature so those call sites migrate by changing an import. TypeScript 5 is required: Mantine's declarations use `const` type parameters, which 4.9 cannot parse (Mantine 7 is the same, so downgrading is no escape). That needs two npm overrides to keep clean installs working, both verified against a Docker build: react-scripts declares peerOptional typescript ^3||^4, and fork-ts-checker 6.5.2 assigns typescript.performance.mark, which TS 5 made getter-only - crashing the dev server's type checker on every rebuild. semantic-baseline.test.js ratchets the removal: it fails if a file not already listed imports Semantic UI. An ESLint rule would have printed 75 warnings per rebuild, and CI unsets CI= for its build step, so it would guard nothing there. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-07-29 19:22:03 -06:00
}
/* ----------------------------------------------------------------- Tables */
ui: give tables a real header, drop the column grid, quiet the row rules Three things the file browser made obvious. The header was not a surface. Mantine gives thead no background at all, so the header painted whatever was behind the table -- which is exactly what an unstriped body row paints. Against a striped body it read as one more stripe, and bold type was the only thing distinguishing it. It now carries `--head`, the token that already means "recessed surface", with a full-strength 2px rule under it: the header/body division is the one line in a table that carries meaning, so it is the one allowed to be loud. Column borders are gone. A line around every cell is a lot of ink to repeat what the column headings already say, and it was half of why the header disappeared -- a bordered header cell looks like a cell in a grid. Row rules were `--border`, the same weight as the outline around the table, so a long table read as a stack of boxes. They now use `--table-line`, a new token per theme sitting between the surface and `--border`. The table outline is not a row rule and keeps `--border`; Mantine draws both from `--table-border-color`, so that had to be restated. In the file browser an icon and a filename are inline siblings in one cell. An inline SVG sits on the text baseline, so a 24px glyph beside 13px text hung above it -- the icon looked centred in the row and the name looked like it was resting on the icon's floor. `vertical-align: middle` centres it, and the margin is a gap that was never there at all: the folder icon touched the first letter of its own name. Cypress now loads App.css, as the app does. Without it a spec covering the file browser rows measures a component the app never renders. One jest test and eleven browser tests, each checked red against a planted regression. Two notes for the next person: - `html .mantine-Table-table` is specificity, not decoration. Mantine declares --table-border-color on its own hashed class, which ties with `.mantine-Table-table` and wins on source order. - the "quieter than the outline" test measures both lines against `--panel`. Nothing paints <html> under a mounted component, so measuring against the root background compares them to black, which ranks the *paler* line as the louder one -- the assertion passed backwards until it was pointed at the surface the rules actually sit on. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
2026-08-01 16:46:50 -06:00
/*
* The header is a surface, not just bold text.
*
* Mantine gives `thead` no background at all, so the header showed whatever was
* behind the table -- which is exactly what the unstriped body rows show. Bold
* type was the only thing separating the two, and against a striped body the
* header read as one more stripe. `--head` is the token for a recessed surface
* and is distinct from both the panel and the stripe in all four themes.
*/
.mantine-Table-thead .mantine-Table-th {
background: var(--head);
}
/*
* A full-strength rule under the header, because that is the one division in a
* table that carries meaning: everything above it names, everything below it is
* data. The rules between body rows are `--table-line` and much fainter -- see
* the note there. Applied to the last header row so a grouped header does not
* get a hard rule through the middle of itself.
*/
.mantine-Table-thead .mantine-Table-tr:last-child .mantine-Table-th {
border-bottom: 2px solid var(--border);
}
/*
* Row rules are quieter than any other border in the interface. They only have
* to let the eye track across a row; at `--border` strength, with a rule under
* every row, a long table turns into a stack of boxes.
*
* `html` for specificity, not decoration: Mantine declares this variable on its
* own hashed class, which ties with `.mantine-Table-table` and wins on source
* order because its stylesheet is imported after this one.
*/
html .mantine-Table-table {
--table-border-color: var(--table-line);
}
/*
* The outline around the whole table is not a row rule and keeps full strength;
* Mantine draws both from the same variable, so it has to be restated.
*/
html .mantine-Table-table[data-with-table-border] {
border-color: var(--border);
}
ui: nine leaf files off Semantic, and the components they needed Phase 2, part 2. Baseline 72 -> 63. Migrated: Tables, SortableTable, DonatePage, Share, Headline, ErrorBoundary, and the QR code, VIN decoder, and temperature calculators. New in the library, all in the gallery and tested: SearchBox Semantic's `<Search category>`, keeping its grouped `results` shape because four call sites already build it. A real combobox: arrows move, Enter takes the highlighted suggestion or submits the raw text, Escape closes without clearing. Pagination Semantic's prop names, but onPageChange gets the page number rather than an (event, data) pair. TabBar the strip and its house style only; routing stays at the call site, which is what decides what is active. IconStack two glyphs composed into one symbol, named once for assistive technology (Semantic's IconGroup). Table.HeaderCell gains `sorted` and `onSort`. That last one is a fix, not just a port. Semantic's `sorted` prop set `aria-sort`; migrating a table by hand dropped it, leaving a clickable <th> that no keyboard could reach and no screen reader could describe. Putting it in the library means the next table gets it right without anyone remembering. Night mode holes closed along the way: the QR codes on the donate, share, and calculator pages are white by necessity — a scanner needs the contrast — and they render as SVG, which the media filter does not target. In night mode that was a lit panel. They now carry `.media`, so the filter remaps the block as a unit and the contrast survives the mapping. Also: `paypal` joins the icon map rather than being imported ad hoc in a page, and FileBrowser stops passing Semantic-only table props into a DOM element.
2026-07-30 09:31:15 -06:00
/* A sortable header: a real button, so the column is reachable by keyboard. */
.wrolpi-th-sort {
display: inline-flex;
align-items: center;
gap: 5px;
background: none;
border: none;
padding: 0;
margin: 0;
font: inherit;
color: inherit;
cursor: pointer;
white-space: nowrap;
}
/* The unsorted columns show a faint arrow: the affordance is visible, but it does
not compete with the column actually doing the sorting. */
.wrolpi-th-sort-idle {
opacity: 0.35;
}
.wrolpi-th-sort:hover .wrolpi-th-sort-idle {
opacity: 0.7;
}
.wrolpi-th-sort:focus-visible {
outline: 2px solid var(--blue);
outline-offset: 2px;
}
html[data-theme="night"] .wrolpi-th-sort:focus-visible,
html[data-theme="amber"] .wrolpi-th-sort:focus-visible {
outline-color: var(--text);
}
ui: token-driven component library on Mantine Adds src/components/ui: buttons, messages, labels, progress, status, tables, form controls, panels, cards, statistics, modals, tooltips, tabs, and icons. Everything resolves its colors through theme tokens, so no component branches on the current theme, and Semantic UI keeps rendering the app meanwhile. Mantine is bridged rather than restyled: its own CSS variables are pointed at our tokens. Four details were not obvious, and each caused a visible defect in night mode before being fixed: - Structural colors must go in the resolver's light/dark blocks. Mantine emits its values under [data-mantine-color-scheme], which outranks the :root block that `variables` becomes, so its grays were winning. - The dark and gray palettes are mapped shade by shade to tokens. Mantine reads them directly for table borders, zebra stripes and input chrome; they can be neither flattened nor left alone. - Mantine writes --button-* as inline styles, which no stylesheet can outrank, so the dashed danger treatment sets real properties instead. - Switch colors are written onto inner elements, so they need scoped CSS rather than a variable on the root. Adds a --knob token for control handles, because Mantine's default thumb follows theme.white, which is near-black in the dark-based themes. An audit of every painted pixel in the /theme-sample gallery now finds no non-red channel in night mode. Icons come from @tabler/icons-react with the 102 Semantic names the app uses mapped to components; they stroke with currentColor, so they follow the theme without any rule of their own. Toasts keep the react-semantic-toasts-2 signature so those call sites migrate by changing an import. TypeScript 5 is required: Mantine's declarations use `const` type parameters, which 4.9 cannot parse (Mantine 7 is the same, so downgrading is no escape). That needs two npm overrides to keep clean installs working, both verified against a Docker build: react-scripts declares peerOptional typescript ^3||^4, and fork-ts-checker 6.5.2 assigns typescript.performance.mark, which TS 5 made getter-only - crashing the dev server's type checker on every rebuild. semantic-baseline.test.js ratchets the removal: it fails if a file not already listed imports Semantic UI. An ESLint rule would have printed 75 warnings per rebuild, and CI unsets CI= for its build step, so it would guard nothing there. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-07-29 19:22:03 -06:00
/* A failed row carries the danger border, matching failed messages. */
.wrolpi-row-failed > td {
test: act on review — and correct an overstated claim about the toast bug I said all four toast kinds were "the same pixel" in night. They were not. Planting a reversion to hue names left the new distinctness test GREEN, because in night `--blue`, `--green`, `--yellow` and `--red` are four different values (2.29, 3.14, 4.52, 5.64 against a panel). What they are is cramped and badly ranked, with info at 2.29:1 -- below the 3:1 floor, present and invisible. The byte-identical pairs are real but elsewhere: `--orange` is `--text` and `--yellow` is `--amber`, which bites a call site that reaches for those names, not the toast mapping. The PR body has been corrected too. So the distinctness assertion is not the one with teeth; the legibility floor is. The monochrome toast test now measures every kind against the toast's own surface, and the hue reversion fails it naming the number: 2.29:1. Also from review: `.wrolpi-message-error` still forced `border: 1.5px dashed var(--red)` while its accent and icon had moved to roles -- nearly the same pixel in night, so no colour test could see it. It follows `--message-color` now. Six more library rules were naming a hue for a thing that means danger: the night danger button, invalid form fields, invalid paths, path error text, danger panels and failed table rows. All roles now, with a source guard that fails any rule whose SELECTOR means severity and whose body names a hue. Focus rings and active-tab accents deliberately keep `--blue`: those are the primary accent, not severity. The tokens.css note claimed the brightness ramp held "in every theme" when the tests deliberately limit it to monochrome. Narrowed, with the reason spelled out, because the next person to read it would otherwise have "fixed" light to match the prose -- which would mean reordering light's hues to satisfy a test. Added the end-of-chain cases the review asked for: four toasts and four Messages in night and amber, measured rather than inferred from variable names. Colour reads now go through a strict `toRgb` that refuses anything not already resolved. The reviewer's concern that `getPropertyValue('--info')` returns an unresolved `var(--blue)` does not hold -- custom properties are substituted at computed-value time and it returns `#20629c` -- but feeding an unresolved value to a luminance calculation yields NaN, and `expect(NaN).to.not.equal(x)` passes. Worth refusing loudly. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
2026-08-01 17:46:33 -06:00
border-top: 1.5px dashed var(--danger);
border-bottom: 1.5px dashed var(--danger);
ui: token-driven component library on Mantine Adds src/components/ui: buttons, messages, labels, progress, status, tables, form controls, panels, cards, statistics, modals, tooltips, tabs, and icons. Everything resolves its colors through theme tokens, so no component branches on the current theme, and Semantic UI keeps rendering the app meanwhile. Mantine is bridged rather than restyled: its own CSS variables are pointed at our tokens. Four details were not obvious, and each caused a visible defect in night mode before being fixed: - Structural colors must go in the resolver's light/dark blocks. Mantine emits its values under [data-mantine-color-scheme], which outranks the :root block that `variables` becomes, so its grays were winning. - The dark and gray palettes are mapped shade by shade to tokens. Mantine reads them directly for table borders, zebra stripes and input chrome; they can be neither flattened nor left alone. - Mantine writes --button-* as inline styles, which no stylesheet can outrank, so the dashed danger treatment sets real properties instead. - Switch colors are written onto inner elements, so they need scoped CSS rather than a variable on the root. Adds a --knob token for control handles, because Mantine's default thumb follows theme.white, which is near-black in the dark-based themes. An audit of every painted pixel in the /theme-sample gallery now finds no non-red channel in night mode. Icons come from @tabler/icons-react with the 102 Semantic names the app uses mapped to components; they stroke with currentColor, so they follow the theme without any rule of their own. Toasts keep the react-semantic-toasts-2 signature so those call sites migrate by changing an import. TypeScript 5 is required: Mantine's declarations use `const` type parameters, which 4.9 cannot parse (Mantine 7 is the same, so downgrading is no escape). That needs two npm overrides to keep clean installs working, both verified against a Docker build: react-scripts declares peerOptional typescript ^3||^4, and fork-ts-checker 6.5.2 assigns typescript.performance.mark, which TS 5 made getter-only - crashing the dev server's type checker on every rebuild. semantic-baseline.test.js ratchets the removal: it fails if a file not already listed imports Semantic UI. An ESLint rule would have printed 75 warnings per rebuild, and CI unsets CI= for its build step, so it would guard nothing there. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-07-29 19:22:03 -06:00
}
.wrolpi-row-failed > td:first-child {
test: act on review — and correct an overstated claim about the toast bug I said all four toast kinds were "the same pixel" in night. They were not. Planting a reversion to hue names left the new distinctness test GREEN, because in night `--blue`, `--green`, `--yellow` and `--red` are four different values (2.29, 3.14, 4.52, 5.64 against a panel). What they are is cramped and badly ranked, with info at 2.29:1 -- below the 3:1 floor, present and invisible. The byte-identical pairs are real but elsewhere: `--orange` is `--text` and `--yellow` is `--amber`, which bites a call site that reaches for those names, not the toast mapping. The PR body has been corrected too. So the distinctness assertion is not the one with teeth; the legibility floor is. The monochrome toast test now measures every kind against the toast's own surface, and the hue reversion fails it naming the number: 2.29:1. Also from review: `.wrolpi-message-error` still forced `border: 1.5px dashed var(--red)` while its accent and icon had moved to roles -- nearly the same pixel in night, so no colour test could see it. It follows `--message-color` now. Six more library rules were naming a hue for a thing that means danger: the night danger button, invalid form fields, invalid paths, path error text, danger panels and failed table rows. All roles now, with a source guard that fails any rule whose SELECTOR means severity and whose body names a hue. Focus rings and active-tab accents deliberately keep `--blue`: those are the primary accent, not severity. The tokens.css note claimed the brightness ramp held "in every theme" when the tests deliberately limit it to monochrome. Narrowed, with the reason spelled out, because the next person to read it would otherwise have "fixed" light to match the prose -- which would mean reordering light's hues to satisfy a test. Added the end-of-chain cases the review asked for: four toasts and four Messages in night and amber, measured rather than inferred from variable names. Colour reads now go through a strict `toRgb` that refuses anything not already resolved. The reviewer's concern that `getPropertyValue('--info')` returns an unresolved `var(--blue)` does not hold -- custom properties are substituted at computed-value time and it returns `#20629c` -- but feeding an unresolved value to a luminance calculation yields NaN, and `expect(NaN).to.not.equal(x)` passes. Worth refusing loudly. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
2026-08-01 17:46:33 -06:00
border-left: 1.5px dashed var(--danger);
ui: token-driven component library on Mantine Adds src/components/ui: buttons, messages, labels, progress, status, tables, form controls, panels, cards, statistics, modals, tooltips, tabs, and icons. Everything resolves its colors through theme tokens, so no component branches on the current theme, and Semantic UI keeps rendering the app meanwhile. Mantine is bridged rather than restyled: its own CSS variables are pointed at our tokens. Four details were not obvious, and each caused a visible defect in night mode before being fixed: - Structural colors must go in the resolver's light/dark blocks. Mantine emits its values under [data-mantine-color-scheme], which outranks the :root block that `variables` becomes, so its grays were winning. - The dark and gray palettes are mapped shade by shade to tokens. Mantine reads them directly for table borders, zebra stripes and input chrome; they can be neither flattened nor left alone. - Mantine writes --button-* as inline styles, which no stylesheet can outrank, so the dashed danger treatment sets real properties instead. - Switch colors are written onto inner elements, so they need scoped CSS rather than a variable on the root. Adds a --knob token for control handles, because Mantine's default thumb follows theme.white, which is near-black in the dark-based themes. An audit of every painted pixel in the /theme-sample gallery now finds no non-red channel in night mode. Icons come from @tabler/icons-react with the 102 Semantic names the app uses mapped to components; they stroke with currentColor, so they follow the theme without any rule of their own. Toasts keep the react-semantic-toasts-2 signature so those call sites migrate by changing an import. TypeScript 5 is required: Mantine's declarations use `const` type parameters, which 4.9 cannot parse (Mantine 7 is the same, so downgrading is no escape). That needs two npm overrides to keep clean installs working, both verified against a Docker build: react-scripts declares peerOptional typescript ^3||^4, and fork-ts-checker 6.5.2 assigns typescript.performance.mark, which TS 5 made getter-only - crashing the dev server's type checker on every rebuild. semantic-baseline.test.js ratchets the removal: it fails if a file not already listed imports Semantic UI. An ESLint rule would have printed 75 warnings per rebuild, and CI unsets CI= for its build step, so it would guard nothing there. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-07-29 19:22:03 -06:00
}
.wrolpi-row-failed > td:last-child {
test: act on review — and correct an overstated claim about the toast bug I said all four toast kinds were "the same pixel" in night. They were not. Planting a reversion to hue names left the new distinctness test GREEN, because in night `--blue`, `--green`, `--yellow` and `--red` are four different values (2.29, 3.14, 4.52, 5.64 against a panel). What they are is cramped and badly ranked, with info at 2.29:1 -- below the 3:1 floor, present and invisible. The byte-identical pairs are real but elsewhere: `--orange` is `--text` and `--yellow` is `--amber`, which bites a call site that reaches for those names, not the toast mapping. The PR body has been corrected too. So the distinctness assertion is not the one with teeth; the legibility floor is. The monochrome toast test now measures every kind against the toast's own surface, and the hue reversion fails it naming the number: 2.29:1. Also from review: `.wrolpi-message-error` still forced `border: 1.5px dashed var(--red)` while its accent and icon had moved to roles -- nearly the same pixel in night, so no colour test could see it. It follows `--message-color` now. Six more library rules were naming a hue for a thing that means danger: the night danger button, invalid form fields, invalid paths, path error text, danger panels and failed table rows. All roles now, with a source guard that fails any rule whose SELECTOR means severity and whose body names a hue. Focus rings and active-tab accents deliberately keep `--blue`: those are the primary accent, not severity. The tokens.css note claimed the brightness ramp held "in every theme" when the tests deliberately limit it to monochrome. Narrowed, with the reason spelled out, because the next person to read it would otherwise have "fixed" light to match the prose -- which would mean reordering light's hues to satisfy a test. Added the end-of-chain cases the review asked for: four toasts and four Messages in night and amber, measured rather than inferred from variable names. Colour reads now go through a strict `toRgb` that refuses anything not already resolved. The reviewer's concern that `getPropertyValue('--info')` returns an unresolved `var(--blue)` does not hold -- custom properties are substituted at computed-value time and it returns `#20629c` -- but feeding an unresolved value to a luminance calculation yields NaN, and `expect(NaN).to.not.equal(x)` passes. Worth refusing loudly. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
2026-08-01 17:46:33 -06:00
border-right: 1.5px dashed var(--danger);
ui: token-driven component library on Mantine Adds src/components/ui: buttons, messages, labels, progress, status, tables, form controls, panels, cards, statistics, modals, tooltips, tabs, and icons. Everything resolves its colors through theme tokens, so no component branches on the current theme, and Semantic UI keeps rendering the app meanwhile. Mantine is bridged rather than restyled: its own CSS variables are pointed at our tokens. Four details were not obvious, and each caused a visible defect in night mode before being fixed: - Structural colors must go in the resolver's light/dark blocks. Mantine emits its values under [data-mantine-color-scheme], which outranks the :root block that `variables` becomes, so its grays were winning. - The dark and gray palettes are mapped shade by shade to tokens. Mantine reads them directly for table borders, zebra stripes and input chrome; they can be neither flattened nor left alone. - Mantine writes --button-* as inline styles, which no stylesheet can outrank, so the dashed danger treatment sets real properties instead. - Switch colors are written onto inner elements, so they need scoped CSS rather than a variable on the root. Adds a --knob token for control handles, because Mantine's default thumb follows theme.white, which is near-black in the dark-based themes. An audit of every painted pixel in the /theme-sample gallery now finds no non-red channel in night mode. Icons come from @tabler/icons-react with the 102 Semantic names the app uses mapped to components; they stroke with currentColor, so they follow the theme without any rule of their own. Toasts keep the react-semantic-toasts-2 signature so those call sites migrate by changing an import. TypeScript 5 is required: Mantine's declarations use `const` type parameters, which 4.9 cannot parse (Mantine 7 is the same, so downgrading is no escape). That needs two npm overrides to keep clean installs working, both verified against a Docker build: react-scripts declares peerOptional typescript ^3||^4, and fork-ts-checker 6.5.2 assigns typescript.performance.mark, which TS 5 made getter-only - crashing the dev server's type checker on every rebuild. semantic-baseline.test.js ratchets the removal: it fails if a file not already listed imports Semantic UI. An ESLint rule would have printed 75 warnings per rebuild, and CI unsets CI= for its build step, so it would guard nothing there. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-07-29 19:22:03 -06:00
}
/* Wide tables scroll inside their own container; the page never scrolls sideways. */
.wrolpi-table-scroll {
overflow-x: auto;
}