review: finish the sweep the first pass claimed

The review was right that completeness was not done.  Every finding held up.

Three more pages mounted a `PageContainer` inside a route that already
provides page chrome -- `ManageMap`, `MapPins`, `ManageZim` -- so they sat a
further 1em down and 1em in from the tab bar than the viewers beside them.
The same defect as ArchiveSettings, in a shape the scan could not see: it
keyed on `PageContainer` route wrappers, and Map and Zim wrap their content
in a `wrolpi-stack` div instead.  It now locates routers first and asks
whether the enclosing return provides chrome either way, resolves
`element={<ErrorBoundary><Page/></ErrorBoundary>}` as well as the bare form,
and knows about `class` components -- `ManageZim` is one, and a scan that
only knew functions reported it clean.

Five top-level blocks still added their own margin to the stack's gap: the
dashboard search row (52.8px against 17.6px, on the most-looked-at page in
the app), the Playlists filter row, both Docs filter rows, and the Map pins
filter.  The extension page's hint panel had the same compound against a
Mantine Stack's gap.

ControllerPage held its four panel sections in a plain wrapper, so the
admin page's stack saw one child and the panels kept sharing edges -- the
exact hole Settings had.

The dashboard was reported clean in the first pass and was not.  The sweep
measured wrapper-to-wrapper gaps, and that row's margin is INSIDE a Media
wrapper, so it never appeared: the measurement, not the page, was at fault.

Cypress gap assertions now derive from the stack's own `row-gap` instead of a
12-28px range that assumed the default interface scale and would have
false-failed a correct layout at a larger one.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
This commit is contained in:
Roland 2026-08-05 16:09:12 -06:00
parent 645ea73a00
commit 4e60309794
No known key found for this signature in database
GPG key ID: 1BA620CE6C9A4680
9 changed files with 125 additions and 65 deletions

View file

@ -5,7 +5,6 @@ import {
HandPointMessage,
humanFileSize,
InfoMessage,
PageContainer,
TabLinks,
useTitle,
WROLModeMessage
@ -366,13 +365,18 @@ function ManageMap() {
};
if (files === undefined) {
return <PageContainer>
return <>
<WROLModeMessage content='Cannot modify Map'/>
<ErrorMessage>Could not fetch map files</ErrorMessage>
</PageContainer>;
</>;
}
return <PageContainer>
/*
* A fragment, not a `PageContainer`. `MapRoute` already provides the page chrome -- a
* `wrolpi-stack` wrapper with its own top margin -- so a second one put this page a further
* 1em down and 1em in from the tab bar than the viewer beside it.
*/
return <>
<WROLModeMessage content='Cannot modify Map'/>
<Header as='h3'>Map Files</Header>
@ -420,7 +424,7 @@ function ManageMap() {
<HandPointMessage>
<p>You can also view the map at <a href={MAP_VIEWER_URI}>{MAP_VIEWER_URI}</a></p>
</HandPointMessage>
</PageContainer>
</>
}
const PIN_COLORS = ["red", "blue", "green", "yellow", "orange", "purple"];
@ -605,13 +609,15 @@ function MapPins() {
)
: pins;
return <PageContainer>
// A fragment for the same reason as ManageMap above. The filter carries no `marginBottom`
// either: it is a top-level block of the page, and the route's stack spaces it.
return <>
<TextInput
leftSection={<Icon name='search'/>}
placeholder='Filter by label or coordinates...'
value={filter}
onChange={(e) => setFilter(e.target.value)}
style={{marginBottom: '1em', width: '100%'}}
style={{width: '100%'}}
/>
<Media at='mobile'>
<SortableTable
@ -633,7 +639,7 @@ function MapPins() {
emptyRow={emptyRow}
/>
</Media>
</PageContainer>;
</>;
}
function MapPage() {