From 49ad1212028d4ed4b6111abd659d06f154e76fcc Mon Sep 17 00:00:00 2001 From: Claude Date: Sun, 29 Nov 2026 20:07:48 +0000 Subject: [PATCH 01/31] Start the working record of feature 454 --- specs/feature-454-top-navigation/log.md | 8 ++++++++ 1 file changed, 8 insertions(+) create mode 100644 specs/feature-454-top-navigation/log.md diff --git a/specs/feature-454-top-navigation/log.md b/specs/feature-454-top-navigation/log.md new file mode 100644 index 00000000..b8ed327d --- /dev/null +++ b/specs/feature-454-top-navigation/log.md @@ -0,0 +1,8 @@ +# Log: Feature #454 – app shell with a top navigation + +One line per pipeline step: date and time of day (UTC), step, member, result. Lead decisions and escalations +are quoted in full. + +| Date | Step | Member | Result | +| ---- | ---- | ------ | ------ | +| 2026-11-29 20:07 | 1 Intake | Orchestrator | Feature #454 (open, label enhancement, deps #451/#453 merged); work folder specs/feature-454-top-navigation on branch claude/beautiful-heisenberg-n3tgik off main 978863f | From 61372bbb5c6e028ea21839a0cc88e278cf9f4340 Mon Sep 17 00:00:00 2001 From: Claude Date: Sun, 29 Nov 2026 20:11:59 +0000 Subject: [PATCH 02/31] Add the spec draft of feature 454 --- specs/feature-454-top-navigation/log.md | 1 + specs/feature-454-top-navigation/spec.md | 138 +++++++++++++++++++++++ 2 files changed, 139 insertions(+) create mode 100644 specs/feature-454-top-navigation/spec.md diff --git a/specs/feature-454-top-navigation/log.md b/specs/feature-454-top-navigation/log.md index b8ed327d..4ab1ba4d 100644 --- a/specs/feature-454-top-navigation/log.md +++ b/specs/feature-454-top-navigation/log.md @@ -6,3 +6,4 @@ are quoted in full. | Date | Step | Member | Result | | ---- | ---- | ------ | ------ | | 2026-11-29 20:07 | 1 Intake | Orchestrator | Feature #454 (open, label enhancement, deps #451/#453 merged); work folder specs/feature-454-top-navigation on branch claude/beautiful-heisenberg-n3tgik off main 978863f | +| 2026-11-29 20:11 | 2a Spec | Lead | RESULT: ESCALATE — eight nav entries wrap into two rows at 1280 px; one row only from 1360 px. Options (a) row from 1360 px, (b) keep 1280 px with 8 px padding/16 px gaps, (c) keep 1280 px and wrap. Recommendation (a). (opus/medium · 92,195 tokens · 31 tool uses · 241 s · 60 in · 19,959 out · 1,893,421 cache read · 90,749 cache write · 615,925 weighted) | diff --git a/specs/feature-454-top-navigation/spec.md b/specs/feature-454-top-navigation/spec.md new file mode 100644 index 00000000..7d34f785 --- /dev/null +++ b/specs/feature-454-top-navigation/spec.md @@ -0,0 +1,138 @@ +# Spec: App shell with a top navigation instead of the drawer + +Source: Issue #454 (part of #450; builds on #451 and #453) +Status: Draft + +## Problem + +Every page today sits in a layout with a navigation drawer of up to 360 px on the left and a floating top bar card +above the content (`Components/Layout/MainLayout.razor`, `NavMenu.razor`). On a desktop the drawer takes about a +quarter of the width for eight links, and the top bar repeats on every page two values that belong to the dashboard +(*Protected assets*, *Last activity*), reloading them on every navigation. Since #453 the dashboard's sub line shows +both values (`docs/areas/web-ui.md`, *Dashboard*). The target look is in the issue's mockups +(`docs/ui-concept/flat-refresh/preview-dashboard.png`, `preview-runtime-containers.png`); the sizes and colors are the +issue's sections 1–4, which this spec does not restate. + +Two terms used below (N1): the **wide layout** applies from 1360 px viewport width on, the **narrow layout** below it. + +## Scenarios + +- S1: Given the wide layout, when any page opens, then one flat header runs across the top: the brand (a one-color + flat shield and `DockerUpdateGuard`, a link to `/`) on the left, the navigation row beside it, the dark-mode toggle + on the right. No drawer, no menu button, and neither *Protected assets* nor *Last activity* appear anywhere in the + layout. The header stays at the top while the page scrolls. +- S2: Given the wide layout, the navigation row (`nav`, `aria-label="Main"`) lists, in this order, Dashboard, + My Images, Observed Images, Runtime Containers, Docker Instances, Base Images, Vulnerabilities, Scan History, as text + links without icons. *My Images* appears only when `DockerUpdateGuard:DockerHub:UserName` and + `DockerUpdateGuard:DockerHub:Pat` are both set, *Base Images* only when at least one shared base image exists — the + conditions of today's navigation, evaluated once when the session starts and shared by the row and the drawer. The + entry today labelled *Shared Base Images* is labelled *Base Images*; its page keeps its title and route. +- S3: Given any layout, when the user is on `/`, then *Dashboard* is marked active (text in `--dug-text`, semibold, a + 2 px `--dug-primary` line at the bottom edge of the header in the row, `--dug-surface-subtle` in the drawer) and carries + `aria-current="page"`; on a list route or a route below it (`/runtime-containers/{instanceId}/{containerId}`, + `/observed-images/{id}`) its list entry is the one marked. Every other entry is muted and turns `--dug-link` on hover. +- S4: Given the narrow layout, when a page opens, then the navigation row is hidden and a menu button + (`aria-label="Toggle navigation"`) stands left of the brand. Pressing it opens a flat drawer from the left over the + content, with an overlay, holding the same entries one below the other and the version line at its bottom. Following + an entry, pressing Escape or clicking outside the drawer closes it. +- S5: Given any page, when the user scrolls to its end, then the last line inside the content container reads + `DockerUpdateGuard {version}` in 13 px muted text, the version resolved as today (`DockerUpdateGuard:DisplayVersion`, + else the version of the running build, else `unknown`). +- S6: Given any layout, when the user presses the dark-mode toggle (moon in the light theme, sun in the dark theme, + `aria-label="Toggle dark mode"`), then the theme switches and the choice is remembered as today + (`docs/areas/web-ui.md`, *Light and dark mode*); the header, the shield mark and the drawer follow the theme. +- S7: Given the browser shows the favicon, then it is the same flat one-color shield as the header mark, without + gradient and letters (Q1). + +## Errors and edge cases + +- E1: The check for shared base images fails: *Base Images* is hidden in the row and in the drawer, the failure is + logged as today (`LoadNavigation`), and nothing is shown to the user. +- E2: On `/error`, `/not-found` or an unknown route (rendered by the not-found page inside the layout) no entry is + marked active; these pages show the header and the version line like every other page. +- E3: On a detail route of a hidden entry (`/my-images/{id}` without Docker Hub credentials) no entry is marked active; + the page stays reachable by its route. +- E4: A query string does not change the active entry (`/vulnerabilities?page=2` marks *Vulnerabilities*). +- E5: The window is widened to the wide layout while the drawer is open: the drawer and its overlay disappear and the + row is shown. +- E6: Before the page is interactive (server-rendered first paint) the entries are plain links that navigate; the menu + button and the toggle act once the page is interactive, as today. +- E7: Below 400 px the product name next to the shield is hidden; the shield stays a link to `/`. +- E8: With all eight entries the row stays one line of the header's 60 px height at the narrowest wide-layout width + (N1), also with a classic 15 px scrollbar; it never wraps into a second header row. +- E9: A dashboard refresh signal or a navigation no longer makes the layout load anything; the dashboard still reloads + on the signal as today. + +## Non-functional requirements + +- N1: The wide layout starts at the narrowest width at which the eight entries fit one row with the issue's values + (10 px link padding, the mockup's 28 px gaps). Measured on the mockup in Chrome with the shipped Inter: at 1280 px + the row wraps into two lines (header 121 px instead of 61 px), at 1360 px it fits with about 30 px to spare. Hence + 1360 px, pending Q3. +- N2: No horizontal overflow at 390, 768, 1280, 1359 and 1360 px viewport width, in both themes. +- N3: Every control in the header and the drawer is a real `a` or `button`, at least 44 px high (entries in the row: + 60 px), and shows the 2 px focus outline of #451 when focused by keyboard. Text contrast stays at least 4.5:1 in both + themes; `prefers-reduced-motion` switches off the drawer's transition. +- N4: No new configuration, route, logged action or user-visible error text. The layout makes no database query of + its own beyond the navigation's base-image check (the dashboard summary query of today's top bar goes away). +- N5: The content container is centered, at most 1280 px wide, with the padding of the issue's section 4 (side padding + 32 px, 16 px at 960 px and below, 12 px below 600 px, as today). + +## Acceptance criteria + +- AC1: In the wide layout the header shows the brand, the navigation row and the dark-mode toggle, and no drawer or menu + button is rendered visibly (S1, E5, E8, N1). +- AC2: The entries, their labels (*Base Images*), their order and the conditions of *My Images* and *Base Images* are + those of S2, the same in row and drawer; the conditions are evaluated once per layout, the base-image check called + once, and its failure hides *Base Images*; the entries are links that navigate before the page is interactive (S2, + E1, E6). +- AC3: On `/` only *Dashboard* carries `aria-current="page"`; on a list route, a route below it and with a query string + exactly its entry does; on `/error`, `/not-found` and a detail route of a hidden entry none does (S3, E2, E3, E4). +- AC4: In the narrow layout the menu button opens the drawer with the entries and the version line; following an entry, + Escape and a click outside close it (S4). +- AC5: The layout shows neither *Protected assets* nor *Last activity*, requests no dashboard summary, and does not + react to navigation or the dashboard refresh signal; `GetDashboardSummaryAsync` and `DashboardSummaryViewData` are + removed (S1, E9, N4). +- AC6: Every page, the error and not-found pages included, ends with the line `DockerUpdateGuard {version}`, with a + configured and with a resolved version (S5, E2). +- AC7: The dark-mode toggle switches the theme, shows a moon in the light and a sun in the dark theme, and keeps + `aria-label="Toggle dark mode"`, the class `app-topbar__theme-toggle`, the storage under `dug-dark-mode`, the system + fallback and `dug-dark` on the layout (S6). +- AC8: The header mark, `logo-dg-shield.svg` and `favicon.svg` are the flat one-color shield without gradient and + letters; the header mark is in `--dug-primary` of the active theme (S1, S6, S7). +- AC9: No horizontal overflow at the widths of N2; controls meet N3; the content container meets N5 (N2, N3, N5, E7). +- AC10: `docs/areas/web-ui.md` describes the header, the navigation in both layouts, the active entry, the version line + and the refresh without the top bar, and `docs/ARCHITECTURE.md` section 9 the layout (all). + +## Out of scope + +- Page content, page titles (the *Shared Base Images* page keeps its title) and the other sub-issues of #450. +- Focus trapping inside the open drawer and moving focus back to the menu button after it closes, beyond what the + drawer component does by default. +- A favicon in more formats or sizes (PNG, `apple-touch-icon`) or one that follows the browser's color scheme. +- Keeping the row of a wider layout when only seven or six entries are shown: the breakpoint is fixed (N1). + +## Open questions + +- Q1: Should the favicon and the logo asset become the flat one-color shield as well, or only the header mark? + Answered: both (Lead decision), as the issue proposes, so the brand looks the same in the tab and in the header. + The favicon and `logo-dg-shield.svg` use the light accent `#2563EB` (a file cannot follow the theme); the header + mark follows `--dug-primary`. A shape-only change, no new asset format (Out of scope). +- Q2: Version line on every page, or only in the narrow-screen drawer and on one page? Answered: on every page and in + the narrow-screen drawer (Lead decision), as the issue's section 5 and its proposal say; it is the only place the + version is visible in the wide layout once the drawer is gone. +- Q3: At 1280 px the issue's values do not fit the eight entries into one row (N1 measurement). Escalated to the + Product Manager: (a) wide layout from 1360 px, all values as in the issue (recommended; this spec is written so); (b) + keep 1280 px and tighten the row to 8 px link padding and 16 px header gaps (fits with about 22 px, about 7 px with a + classic scrollbar); (c) keep 1280 px and the values and let the row wrap. Not answered yet: blocks the plan. + +## Area documents + +- `docs/areas/web-ui.md`, *General*: the layout is a sticky header (brand, navigation, dark-mode toggle) above the + content of at most 1280 px; the navigation's entries, labels, conditions and active entry; the narrow layout's menu + button and drawer; the version line at the end of every page and in the drawer; the bullet on the top bar values goes. + *Refresh without reload*: only dashboards reload, the top bar no longer exists. *Light and dark mode*: the toggle is in + the header. *Limits and errors*: the `LoadDashboardSummary` layout load goes, `LoadNavigation` stays (the *Base + Images* entry). +- `docs/ARCHITECTURE.md` section 9: the layout (`MainLayout`, the navigation shared by row and drawer) without the + summary load. \ No newline at end of file From 2e711022a2d49ceab70abba3e8c05d4f4c023b9a Mon Sep 17 00:00:00 2001 From: Claude Date: Sun, 29 Nov 2026 20:17:01 +0000 Subject: [PATCH 03/31] Log the Product Manager's answer for feature 454 --- specs/feature-454-top-navigation/log.md | 1 + 1 file changed, 1 insertion(+) diff --git a/specs/feature-454-top-navigation/log.md b/specs/feature-454-top-navigation/log.md index 4ab1ba4d..17e3b8bb 100644 --- a/specs/feature-454-top-navigation/log.md +++ b/specs/feature-454-top-navigation/log.md @@ -7,3 +7,4 @@ are quoted in full. | ---- | ---- | ------ | ------ | | 2026-11-29 20:07 | 1 Intake | Orchestrator | Feature #454 (open, label enhancement, deps #451/#453 merged); work folder specs/feature-454-top-navigation on branch claude/beautiful-heisenberg-n3tgik off main 978863f | | 2026-11-29 20:11 | 2a Spec | Lead | RESULT: ESCALATE — eight nav entries wrap into two rows at 1280 px; one row only from 1360 px. Options (a) row from 1360 px, (b) keep 1280 px with 8 px padding/16 px gaps, (c) keep 1280 px and wrap. Recommendation (a). (opus/medium · 92,195 tokens · 31 tool uses · 241 s · 60 in · 19,959 out · 1,893,421 cache read · 90,749 cache write · 615,925 weighted) | +| 2026-11-29 20:16 | 2a Spec | Product Manager | Answer to Lead's escalation: option (a), navigation row from 1360 px, drawer below, all values of the issue unchanged. | From ef8279597d81b5b6e34b39a53943eabbbc5f224b Mon Sep 17 00:00:00 2001 From: Claude Date: Sun, 29 Nov 2026 20:17:18 +0000 Subject: [PATCH 04/31] Close the spec of feature 454 --- specs/feature-454-top-navigation/log.md | 1 + specs/feature-454-top-navigation/spec.md | 8 ++++---- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/specs/feature-454-top-navigation/log.md b/specs/feature-454-top-navigation/log.md index 17e3b8bb..1e266080 100644 --- a/specs/feature-454-top-navigation/log.md +++ b/specs/feature-454-top-navigation/log.md @@ -8,3 +8,4 @@ are quoted in full. | 2026-11-29 20:07 | 1 Intake | Orchestrator | Feature #454 (open, label enhancement, deps #451/#453 merged); work folder specs/feature-454-top-navigation on branch claude/beautiful-heisenberg-n3tgik off main 978863f | | 2026-11-29 20:11 | 2a Spec | Lead | RESULT: ESCALATE — eight nav entries wrap into two rows at 1280 px; one row only from 1360 px. Options (a) row from 1360 px, (b) keep 1280 px with 8 px padding/16 px gaps, (c) keep 1280 px and wrap. Recommendation (a). (opus/medium · 92,195 tokens · 31 tool uses · 241 s · 60 in · 19,959 out · 1,893,421 cache read · 90,749 cache write · 615,925 weighted) | | 2026-11-29 20:16 | 2a Spec | Product Manager | Answer to Lead's escalation: option (a), navigation row from 1360 px, drawer below, all values of the issue unchanged. | +| 2026-11-29 20:17 | 2a Spec (answer) | Lead | RESULT: DONE — spec updated to option (a), Q3 answered, plan-check --spec clean. (opus/medium · 34,776 tokens · 6 tool uses · 21 s · 8 in · 1,631 out · 93,435 cache read · 34,258 cache write · 111,314 weighted) | diff --git a/specs/feature-454-top-navigation/spec.md b/specs/feature-454-top-navigation/spec.md index 7d34f785..06bc0fed 100644 --- a/specs/feature-454-top-navigation/spec.md +++ b/specs/feature-454-top-navigation/spec.md @@ -68,7 +68,7 @@ Two terms used below (N1): the **wide layout** applies from 1360 px viewport wid - N1: The wide layout starts at the narrowest width at which the eight entries fit one row with the issue's values (10 px link padding, the mockup's 28 px gaps). Measured on the mockup in Chrome with the shipped Inter: at 1280 px the row wraps into two lines (header 121 px instead of 61 px), at 1360 px it fits with about 30 px to spare. Hence - 1360 px, pending Q3. + 1360 px (Q3). - N2: No horizontal overflow at 390, 768, 1280, 1359 and 1360 px viewport width, in both themes. - N3: Every control in the header and the drawer is a real `a` or `button`, at least 44 px high (entries in the row: 60 px), and shows the 2 px focus outline of #451 when focused by keyboard. Text contrast stays at least 4.5:1 in both @@ -122,9 +122,9 @@ Two terms used below (N1): the **wide layout** applies from 1360 px viewport wid the narrow-screen drawer (Lead decision), as the issue's section 5 and its proposal say; it is the only place the version is visible in the wide layout once the drawer is gone. - Q3: At 1280 px the issue's values do not fit the eight entries into one row (N1 measurement). Escalated to the - Product Manager: (a) wide layout from 1360 px, all values as in the issue (recommended; this spec is written so); (b) - keep 1280 px and tighten the row to 8 px link padding and 16 px header gaps (fits with about 22 px, about 7 px with a - classic scrollbar); (c) keep 1280 px and the values and let the row wrap. Not answered yet: blocks the plan. + Product Manager: (a) wide layout from 1360 px, all values as in the issue; (b) keep 1280 px and tighten the row to + 8 px link padding and 16 px header gaps; (c) keep 1280 px and the values and let the row wrap. Answered: (a) + (Product Manager): the navigation row from 1360 px, the drawer below it, every value of the issue kept. ## Area documents From 2672f795644f530011adee1f093421a319be2adf Mon Sep 17 00:00:00 2001 From: Claude Date: Sun, 29 Nov 2026 20:20:08 +0000 Subject: [PATCH 05/31] Log the spec challenge of feature 454 --- specs/feature-454-top-navigation/log.md | 1 + 1 file changed, 1 insertion(+) diff --git a/specs/feature-454-top-navigation/log.md b/specs/feature-454-top-navigation/log.md index 1e266080..2593a578 100644 --- a/specs/feature-454-top-navigation/log.md +++ b/specs/feature-454-top-navigation/log.md @@ -9,3 +9,4 @@ are quoted in full. | 2026-11-29 20:11 | 2a Spec | Lead | RESULT: ESCALATE — eight nav entries wrap into two rows at 1280 px; one row only from 1360 px. Options (a) row from 1360 px, (b) keep 1280 px with 8 px padding/16 px gaps, (c) keep 1280 px and wrap. Recommendation (a). (opus/medium · 92,195 tokens · 31 tool uses · 241 s · 60 in · 19,959 out · 1,893,421 cache read · 90,749 cache write · 615,925 weighted) | | 2026-11-29 20:16 | 2a Spec | Product Manager | Answer to Lead's escalation: option (a), navigation row from 1360 px, drawer below, all values of the issue unchanged. | | 2026-11-29 20:17 | 2a Spec (answer) | Lead | RESULT: DONE — spec updated to option (a), Q3 answered, plan-check --spec clean. (opus/medium · 34,776 tokens · 6 tool uses · 21 s · 8 in · 1,631 out · 93,435 cache read · 34,258 cache write · 111,314 weighted) | +| 2026-11-29 20:20 | 2a Spec challenge | Devil's Advocate | VERDICT: OBJECTIONS 1 major, 7 minor. M1: header inner box must be 1280 px content width + padding under MudBlazor border-box reset, else row wraps at every width. m1 N5 side padding 32 px is new (today 24). m2 header mark inline SVG from token; fate of logo-dg-shield.svg. m3 drawer starts closed, closed after narrowing again; 1360 not a MudBlazor breakpoint. m4 viewport criteria checkable only via StylesheetReader on app.css. m5 HasBaseImagesAsync once per render vs persisted across prerender. m6 ApplicationTelemetryTests:265 moves to GetDashboardAsync RuntimeContainerCount. m7 README.md:108 and flat-refresh README:173 stale. (DA could not read the issue text: Q2 claim unverified.) (opus/medium · 72,001 tokens · 23 tool uses · 161 s · 46 in · 14,472 out · 1,106,753 cache read · 69,668 cache write · 429,657 weighted) | From 54b5ddc120569ea6d80e68ee87361fa751cf9a0a Mon Sep 17 00:00:00 2001 From: Claude Date: Sun, 29 Nov 2026 20:21:54 +0000 Subject: [PATCH 06/31] Revise the spec of feature 454 after the challenge --- specs/feature-454-top-navigation/log.md | 1 + specs/feature-454-top-navigation/spec.md | 66 +++++++++++++++++++----- 2 files changed, 53 insertions(+), 14 deletions(-) diff --git a/specs/feature-454-top-navigation/log.md b/specs/feature-454-top-navigation/log.md index 2593a578..03dcca24 100644 --- a/specs/feature-454-top-navigation/log.md +++ b/specs/feature-454-top-navigation/log.md @@ -10,3 +10,4 @@ are quoted in full. | 2026-11-29 20:16 | 2a Spec | Product Manager | Answer to Lead's escalation: option (a), navigation row from 1360 px, drawer below, all values of the issue unchanged. | | 2026-11-29 20:17 | 2a Spec (answer) | Lead | RESULT: DONE — spec updated to option (a), Q3 answered, plan-check --spec clean. (opus/medium · 34,776 tokens · 6 tool uses · 21 s · 8 in · 1,631 out · 93,435 cache read · 34,258 cache write · 111,314 weighted) | | 2026-11-29 20:20 | 2a Spec challenge | Devil's Advocate | VERDICT: OBJECTIONS 1 major, 7 minor. M1: header inner box must be 1280 px content width + padding under MudBlazor border-box reset, else row wraps at every width. m1 N5 side padding 32 px is new (today 24). m2 header mark inline SVG from token; fate of logo-dg-shield.svg. m3 drawer starts closed, closed after narrowing again; 1360 not a MudBlazor breakpoint. m4 viewport criteria checkable only via StylesheetReader on app.css. m5 HasBaseImagesAsync once per render vs persisted across prerender. m6 ApplicationTelemetryTests:265 moves to GetDashboardAsync RuntimeContainerCount. m7 README.md:108 and flat-refresh README:173 stale. (DA could not read the issue text: Q2 claim unverified.) (opus/medium · 72,001 tokens · 23 tool uses · 161 s · 46 in · 14,472 out · 1,106,753 cache read · 69,668 cache write · 429,657 weighted) | +| 2026-11-29 20:21 | 2a Spec revise (challenge) | Lead | RESULT: DONE — all 8 objections accepted and answered in Challenge section; plan-check --spec clean; m2/m3/m4/m5/m6 details left to plan. (opus/medium · 17,883 tokens · 21 tool uses · 93 s · 26 in · 8,845 out · 512,922 cache read · 17,016 cache write · 182,334 weighted · continued) | diff --git a/specs/feature-454-top-navigation/spec.md b/specs/feature-454-top-navigation/spec.md index 06bc0fed..3c53f23c 100644 --- a/specs/feature-454-top-navigation/spec.md +++ b/specs/feature-454-top-navigation/spec.md @@ -60,23 +60,30 @@ Two terms used below (N1): the **wide layout** applies from 1360 px viewport wid - E7: Below 400 px the product name next to the shield is hidden; the shield stays a link to `/`. - E8: With all eight entries the row stays one line of the header's 60 px height at the narrowest wide-layout width (N1), also with a classic 15 px scrollbar; it never wraps into a second header row. +- E10: The drawer is closed whenever a page loads in the narrow layout, and when the window is narrowed again after it + was widened (E5). +- E11: Between the server-rendered first paint and the interactive page the base-image check runs once per page load, + not again (`docs/areas/web-ui.md`: data of the first render is reused). - E9: A dashboard refresh signal or a navigation no longer makes the layout load anything; the dashboard still reloads on the signal as today. ## Non-functional requirements -- N1: The wide layout starts at the narrowest width at which the eight entries fit one row with the issue's values - (10 px link padding, the mockup's 28 px gaps). Measured on the mockup in Chrome with the shipped Inter: at 1280 px - the row wraps into two lines (header 121 px instead of 61 px), at 1360 px it fits with about 30 px to spare. Hence - 1360 px (Q3). +- N1: The header's inner row and the content container are centered, each with at most 1280 px of content width plus + its side padding (1344 px in all at 32 px), as in the mockup (`mockups/dashboard.html`). The wide layout starts at the + narrowest width at which the eight entries fit one row of that content width with the issue's values (10 px link + padding, the mockup's 28 px gaps). Measured on the mockup in Chrome with the shipped Inter: at 1280 px the row wraps + into two lines (header 121 px instead of 61 px), at 1360 px it fits with about 30 px to spare. Hence 1360 px (Q3); + from there on the row has the full 1280 px. - N2: No horizontal overflow at 390, 768, 1280, 1359 and 1360 px viewport width, in both themes. - N3: Every control in the header and the drawer is a real `a` or `button`, at least 44 px high (entries in the row: 60 px), and shows the 2 px focus outline of #451 when focused by keyboard. Text contrast stays at least 4.5:1 in both themes; `prefers-reduced-motion` switches off the drawer's transition. - N4: No new configuration, route, logged action or user-visible error text. The layout makes no database query of its own beyond the navigation's base-image check (the dashboard summary query of today's top bar goes away). -- N5: The content container is centered, at most 1280 px wide, with the padding of the issue's section 4 (side padding - 32 px, 16 px at 960 px and below, 12 px below 600 px, as today). +- N5: The content container is centered with the content width of N1 and the padding of the issue's section 4: 36 px + top, 48 px bottom, 32 px at the sides (today 24 px), shrinking as today to 16 px at 960 px and below and 12 px below + 600 px. ## Acceptance criteria @@ -84,22 +91,24 @@ Two terms used below (N1): the **wide layout** applies from 1360 px viewport wid button is rendered visibly (S1, E5, E8, N1). - AC2: The entries, their labels (*Base Images*), their order and the conditions of *My Images* and *Base Images* are those of S2, the same in row and drawer; the conditions are evaluated once per layout, the base-image check called - once, and its failure hides *Base Images*; the entries are links that navigate before the page is interactive (S2, - E1, E6). + once per page load, the interactive render included, and its failure hides *Base Images*; the entries are links that + navigate before the page is interactive (S2, E1, E6, E11). - AC3: On `/` only *Dashboard* carries `aria-current="page"`; on a list route, a route below it and with a query string exactly its entry does; on `/error`, `/not-found` and a detail route of a hidden entry none does (S3, E2, E3, E4). -- AC4: In the narrow layout the menu button opens the drawer with the entries and the version line; following an entry, - Escape and a click outside close it (S4). +- AC4: In the narrow layout the drawer starts closed; the menu button opens it with the entries and the version line; + following an entry, Escape and a click outside close it (S4, E10). - AC5: The layout shows neither *Protected assets* nor *Last activity*, requests no dashboard summary, and does not react to navigation or the dashboard refresh signal; `GetDashboardSummaryAsync` and `DashboardSummaryViewData` are - removed (S1, E9, N4). + removed, and the `dockerupdateguard.runtime_containers` gauge still equals the dashboard's container count (S1, E9, + N4). - AC6: Every page, the error and not-found pages included, ends with the line `DockerUpdateGuard {version}`, with a configured and with a resolved version (S5, E2). - AC7: The dark-mode toggle switches the theme, shows a moon in the light and a sun in the dark theme, and keeps `aria-label="Toggle dark mode"`, the class `app-topbar__theme-toggle`, the storage under `dug-dark-mode`, the system fallback and `dug-dark` on the layout (S6). - AC8: The header mark, `logo-dg-shield.svg` and `favicon.svg` are the flat one-color shield without gradient and - letters; the header mark is in `--dug-primary` of the active theme (S1, S6, S7). + letters; the header mark is in `--dug-primary` of the active theme and has the accessible name + `DockerUpdateGuard logo` (S1, S6, S7). - AC9: No horizontal overflow at the widths of N2; controls meet N3; the content container meets N5 (N2, N3, N5, E7). - AC10: `docs/areas/web-ui.md` describes the header, the navigation in both layouts, the active entry, the version line and the refresh without the top bar, and `docs/ARCHITECTURE.md` section 9 the layout (all). @@ -117,7 +126,8 @@ Two terms used below (N1): the **wide layout** applies from 1360 px viewport wid - Q1: Should the favicon and the logo asset become the flat one-color shield as well, or only the header mark? Answered: both (Lead decision), as the issue proposes, so the brand looks the same in the tab and in the header. The favicon and `logo-dg-shield.svg` use the light accent `#2563EB` (a file cannot follow the theme); the header - mark follows `--dug-primary`. A shape-only change, no new asset format (Out of scope). + mark follows `--dug-primary`. `logo-dg-shield.svg` stays as the brand asset even when the header no longer loads + it. A shape-only change, no new asset format (Out of scope). - Q2: Version line on every page, or only in the narrow-screen drawer and on one page? Answered: on every page and in the narrow-screen drawer (Lead decision), as the issue's section 5 and its proposal say; it is the only place the version is visible in the wide layout once the drawer is gone. @@ -135,4 +145,32 @@ Two terms used below (N1): the **wide layout** applies from 1360 px viewport wid the header. *Limits and errors*: the `LoadDashboardSummary` layout load goes, `LoadNavigation` stays (the *Base Images* entry). - `docs/ARCHITECTURE.md` section 9: the layout (`MainLayout`, the navigation shared by row and drawer) without the - summary load. \ No newline at end of file + summary load. +- Outside `docs/areas/`: `README.md`, the `DockerUpdateGuard:DisplayVersion` row (shown at the end of every page and in + the narrow-screen drawer); `docs/ui-concept/flat-refresh/README.md`, *What the mockups do not show*: the navigation + collapses below 1360 px. + +## Challenge + +- M1 (header and content width under `border-box`): accepted. Checked: the mockup's header box and `main` are + `max-width: 1280px` with 32 px padding and content-box sizing, and `MudBlazor.min.css` is loaded (`App.razor`). N1 + now gives both the 1280 px content width plus padding (1344 px), and from 1360 px the row's full 1280 px; E8 rests + on it. +- m1 (side padding today): accepted. Today's `.page-container` has 24 px; N5 now marks 32 px as new and keeps 16 px and + 12 px as today. +- m2 (header mark and theme): accepted. AC8 adds the accessible name; Q1 keeps `logo-dg-shield.svg` as the brand + asset (the issue's *Affected files* names it). How the mark takes the token (an inline shape, not an `img`) is for + the plan. +- m3 (drawer start state): accepted as E10 and in AC4. That 1360 px is no MudBlazor breakpoint is noted for the plan. +- m4 (viewport criteria): accepted for the plan, no spec change. AC1, AC9 and E8 stay behavioral; the plan checks them + against the stylesheet (the media-query pair, `nowrap`, the content width) and records the N1 measurement by hand in + the work folder. +- m5 (base-image check on prerendering): accepted. Checked: `NavMenu.razor.cs` calls `HasBaseImagesAsync` in + `OnInitializedAsync` without persisted state, and `docs/areas/web-ui.md` promises reuse. E11 and AC2 now require one + check per page load; how it is persisted is for the plan. +- m6 (telemetry test on the removed method): accepted. AC5 keeps the gauge equal to the dashboard's count; moving the + test from `GetDashboardSummaryAsync` to the dashboard's count is the plan's. +- m7 (documents outside the areas): accepted. Checked `README.md:108` and the concept README's "Below 1280 px"; + both are under *Area documents* now. `README.md:24` keeps *Shared Base Images* as the feature name. +- Q2 (unverified by the Devil's Advocate): checked against the issue. Its section 5 puts the version line at the end of + every page and at the bottom of the narrow-screen drawer, and its open question proposes "on every page". Q2 stands. \ No newline at end of file From 945f1aecfe0b6a86e6c8c81e0825f78332876eca Mon Sep 17 00:00:00 2001 From: Claude Date: Sun, 29 Nov 2026 20:29:24 +0000 Subject: [PATCH 07/31] Add plan and tasks of feature 454 --- ...w-shows-from-1360-px-and-a-drawer-below.md | 38 ++++ docs/decisions/README.md | 1 + specs/feature-454-top-navigation/log.md | 1 + specs/feature-454-top-navigation/plan.md | 213 ++++++++++++++++++ specs/feature-454-top-navigation/spec.md | 6 +- specs/feature-454-top-navigation/tasks.md | 14 ++ 6 files changed, 270 insertions(+), 3 deletions(-) create mode 100644 docs/decisions/0081-the-navigation-row-shows-from-1360-px-and-a-drawer-below.md create mode 100644 specs/feature-454-top-navigation/plan.md create mode 100644 specs/feature-454-top-navigation/tasks.md diff --git a/docs/decisions/0081-the-navigation-row-shows-from-1360-px-and-a-drawer-below.md b/docs/decisions/0081-the-navigation-row-shows-from-1360-px-and-a-drawer-below.md new file mode 100644 index 00000000..07b967ec --- /dev/null +++ b/docs/decisions/0081-the-navigation-row-shows-from-1360-px-and-a-drawer-below.md @@ -0,0 +1,38 @@ +# 0081: The navigation row shows from 1360 px, and a drawer below + +- **Status:** Proposed +- **Date:** 2026-11-29 +- **Area:** Web UI +- **Source:** Issue #454 +- **Supersedes:** — + +## Context + +The flat refresh (#450) replaces the navigation drawer by a row of links in a 60 px header. The issue asked for the +row from 1280 px on, with 10 px link padding and the mockup's 28 px gaps, inside a header whose content is at most +1280 px wide plus 32 px side padding. Measured on the mockup in Chrome with the shipped Inter, the eight entries do not +fit one row at a 1280 px viewport (the header grows to two rows, 121 px), and fit at 1360 px with about 30 px to spare. +1360 px is no MudBlazor breakpoint (`Lg` is 1280, `Xl` 1920), so MudBlazor's responsive drawer cannot switch there. + +## Options considered + +1. **Row from 1360 px, drawer below, every value of the issue kept (chosen, by the Product Manager)** — the look of + the mockup is kept; between 1280 and 1359 px a desktop window shows the menu button instead of the row. +2. **Row from 1280 px with 8 px link padding and 16 px header gaps** — fits, but with about 7 px to spare under a + classic 15 px scrollbar, so a longer label or another font metric wraps the header again. +3. **Row from 1280 px with the issue's values, allowed to wrap** — the header doubles its height on common laptop + widths and the sticky header covers twice as much content. +4. **MudBlazor's responsive drawer at `Lg` (1280 px)** — no own breakpoint code, but switches at the width where the + row does not fit (option 3). + +## Decision + +The layout shows the navigation row from a 1360 px viewport width on and the menu button with a temporary drawer +below it; the switch is one pair of media queries in `app.css`, and the layout closes an open drawer when the window +reaches 1360 px. The values are in [Web UI](../areas/web-ui.md#general). + +## Consequences + +The breakpoint is the project's own: a ninth entry or a longer label needs a new measurement and possibly a new +width. The drawer state needs a viewport subscription (MudBlazor's `IBrowserViewportService`) instead of the drawer's +own breakpoint. \ No newline at end of file diff --git a/docs/decisions/README.md b/docs/decisions/README.md index 1bd4daf7..5daa7899 100644 --- a/docs/decisions/README.md +++ b/docs/decisions/README.md @@ -146,4 +146,5 @@ once in the [area document](../areas/README.md) of the record's area, and the re | [0078](0078-mudblazor-elevation-shadows-are-switched-off-in-the-theme.md) | MudBlazor elevation shadows are switched off in the theme | Accepted | 2026-11-28 | | [0079](0079-statuses-map-to-tones-in-one-mapping-beside-the-chip-colors-of-unconverted-pages.md) | Statuses map to tones in one mapping, beside the chip colors of unconverted pages | Accepted | 2026-11-28 | | [0080](0080-the-dashboard-counts-the-containers-advisories-and-own-images-it-lists.md) | The dashboard counts the containers, advisories and own images it lists | Accepted | 2026-11-29 | +| [0081](0081-the-navigation-row-shows-from-1360-px-and-a-drawer-below.md) | The navigation row shows from 1360 px, and a drawer below | Proposed | 2026-11-29 | diff --git a/specs/feature-454-top-navigation/log.md b/specs/feature-454-top-navigation/log.md index 03dcca24..1b9d1f17 100644 --- a/specs/feature-454-top-navigation/log.md +++ b/specs/feature-454-top-navigation/log.md @@ -11,3 +11,4 @@ are quoted in full. | 2026-11-29 20:17 | 2a Spec (answer) | Lead | RESULT: DONE — spec updated to option (a), Q3 answered, plan-check --spec clean. (opus/medium · 34,776 tokens · 6 tool uses · 21 s · 8 in · 1,631 out · 93,435 cache read · 34,258 cache write · 111,314 weighted) | | 2026-11-29 20:20 | 2a Spec challenge | Devil's Advocate | VERDICT: OBJECTIONS 1 major, 7 minor. M1: header inner box must be 1280 px content width + padding under MudBlazor border-box reset, else row wraps at every width. m1 N5 side padding 32 px is new (today 24). m2 header mark inline SVG from token; fate of logo-dg-shield.svg. m3 drawer starts closed, closed after narrowing again; 1360 not a MudBlazor breakpoint. m4 viewport criteria checkable only via StylesheetReader on app.css. m5 HasBaseImagesAsync once per render vs persisted across prerender. m6 ApplicationTelemetryTests:265 moves to GetDashboardAsync RuntimeContainerCount. m7 README.md:108 and flat-refresh README:173 stale. (DA could not read the issue text: Q2 claim unverified.) (opus/medium · 72,001 tokens · 23 tool uses · 161 s · 46 in · 14,472 out · 1,106,753 cache read · 69,668 cache write · 429,657 weighted) | | 2026-11-29 20:21 | 2a Spec revise (challenge) | Lead | RESULT: DONE — all 8 objections accepted and answered in Challenge section; plan-check --spec clean; m2/m3/m4/m5/m6 details left to plan. (opus/medium · 17,883 tokens · 21 tool uses · 93 s · 26 in · 8,845 out · 512,922 cache read · 17,016 cache write · 182,334 weighted · continued) | +| 2026-11-29 20:29 | 2b Plan | Lead | RESULT: DONE — tier standard; security areas: logging/telemetry of external data, secrets in configuration; spec approved by Lead; decision 0081 (Proposed); plan challenge due. (opus/medium · 105,775 tokens · 52 tool uses · 441 s · 102 in · 40,769 out · 5,473,612 cache read · 105,183 cache write · 1,218,213 weighted · continued) | diff --git a/specs/feature-454-top-navigation/plan.md b/specs/feature-454-top-navigation/plan.md new file mode 100644 index 00000000..9fd053ca --- /dev/null +++ b/specs/feature-454-top-navigation/plan.md @@ -0,0 +1,213 @@ +# Plan: App shell with a top navigation instead of the drawer + +Source: Issue #454 | [spec.md](spec.md) +Tier: standard — a behavior change of the layout and the navigation that creates, changes or removes no security control. +Security areas touched: Logging and telemetry of external data (the `LoadNavigation` log call moves from `NavMenu` to `MainLayout`, the `LoadDashboardSummary` one goes); Secrets in configuration (`MainLayout` reads whether the Docker Hub PAT is set, as `NavMenu` does today; only the resulting flag is persisted) + +## Problem / root cause + +Feature: [spec.md](spec.md). + +## Verified facts + +| # | Claim | Evidence | Status | +| - | ----- | -------- | ------ | +| 1 | The layout is a responsive `MudDrawer` at `Breakpoint.Lg` holding `NavMenu`, a floating top bar and a `MudContainer` | `Components/Layout/MainLayout.razor:9-17,20-89` | confirmed | +| 2 | The drawer starts open | `MainLayout.razor.cs:178` (`_drawerOpen = true`) | confirmed | +| 3 | The layout loads the dashboard summary on init, on every navigation and on every refresh signal, and persists it under `MainLayout.DashboardSummary` | `MainLayout.razor.cs:23,272-283,397-412` | confirmed | +| 4 | `NavMenu` evaluates the My Images condition and calls `HasBaseImagesAsync` in `OnInitializedAsync` on both the prerender and the interactive render, nothing persisted | `NavMenu.razor.cs:150-155`; `Components/App.razor` (`Routes @rendermode="InteractiveServer"`) | confirmed | +| 5 | The version is resolved in `NavMenu.ResolveDisplayVersion` | `NavMenu.razor.cs:104-143` | confirmed | +| 6 | `GetDashboardSummaryAsync` and `DashboardSummaryViewData` are used only by `MainLayout`, `MainLayoutRenderTests`, `MainLayoutTests` and `ApplicationTelemetryTests:265` | `grep -rn "DashboardSummary" src` | confirmed | +| 7 | MudBlazor's stylesheet sets `*{box-sizing:border-box}`, so the mockup's content-box `max-width: 1280px; padding: 0 32px` becomes `max-width: 1344px` | `MudBlazor.min.css` 9.14.0; `mockups/dashboard.html:17,37` | confirmed | +| 8 | 1360 px is no MudBlazor breakpoint; `IBrowserViewportService.SubscribeAsync(Guid, Action, ResizeOptions?, bool)` reports the window width, with `ResizeOptions.NotifyOnBreakpointOnly` (default `true`) | `MudBlazor.xml` 9.14.0 | confirmed | +| 9 | A temporary `MudDrawer` draws an overlay and closes on a click on it (`OverlayAutoClose`, default `true`) | `MudBlazor.xml` 9.14.0, `MudDrawer.OverlayAutoClose` | confirmed | +| 10 | A temporary `MudDrawer` does not close on Escape by itself | to verify: the Tester's AC4 Escape test fails in step 5 before the layout's handler exists (`MudBlazor.xml` documents no Escape handling; the plan adds the handler either way) | unverified | +| 11 | The real viewport service raises the callback when the window crosses 1360 px with `NotifyOnBreakpointOnly = false` | to verify: manual (no browser in the session), the Dev in step 6 on a local run (Chrome, resize across 1360 px with the drawer open, then narrow again), result in `log.md` | unverified | +| 12 | The N1 widths (row wraps at 1280 px, fits at 1360 px) hold for the built layout | to verify: manual (spec N1 measured the mockup only), the Dev in step 6, viewport 1360 px with all eight entries and a classic scrollbar, plus N2's widths in both themes, result in `log.md` | unverified | +| 13 | Today's `.page-container` side padding is 24 px, 16 px at ≤ 960 px, 12 px below 600 px | `wwwroot/app.css:338-340,1105-1111,1198-1231` | confirmed | +| 14 | `favicon.svg` and `logo-dg-shield.svg` carry a gradient and the letters DG; the header uses ``, its only consumer | the two files; `MainLayout.razor:29`; `grep -rn logo-dg-shield src` | confirmed | +| 15 | The existing stylesheet tests pin `.mud-paper.app-topbar`, `.app-drawer .mud-drawer-content`, the `.mud-navmenu.app-nav-menu` link rules and `.app-brand__title` weight 600 | `AppStylesheetTests.cs:377,505,539-550` | confirmed | +| 16 | `web-ui.md` has 4899 words | count of whitespace-separated words | confirmed | + +## Tests per criterion + +| AC | Test(s) | Test file | +| -- | ------- | --------- | +| AC1 | `MainLayoutRendersHeaderWithBrandNavigationAndThemeToggle`; `AppStylesheetWideLayoutHidesMenuButtonAndDrawer`; `AppStylesheetHeaderRowIsOneNonWrappingLineOfContentWidth`; manual: Dev, local run, fact 12 | `MainLayoutRenderTests.cs`; `AppStylesheetTests.cs` | +| AC2 | `NavMenuRendersEntriesInOrderWithLabels` (DataRow per condition pair); `MainLayoutRendersSameEntriesInRowAndDrawer`; `MainLayoutCallsBaseImageCheckOnce`; `MainLayoutWithPersistedNavigationDoesNotCheckBaseImagesAgain`; `MainLayoutBaseImageCheckFailureHidesEntryAndLogs`; `NavMenuEntriesAreLinksWithoutInteractivity` | `NavMenuTests.cs`; `MainLayoutRenderTests.cs`; `MainLayoutPersistentStateTests.cs` | +| AC3 | `NavMenuIsActiveMatchesEntryRoute` (DataRows: `""`/`""`, `vulnerabilities`, `vulnerabilities?page=2`, `runtime-containers/a/b`, `observed-images/1`, `error`, `not-found`, `vulnerabilities-x`, `Vulnerabilities`); `NavMenuOnDashboardMarksOnlyDashboard`; `NavMenuOnHiddenEntryDetailMarksNoEntry` | `NavMenuTests.cs` | +| AC4 | `MainLayoutDrawerStartsClosed`; `MainLayoutMenuButtonOpensDrawerWithEntriesAndVersion`; `MainLayoutFollowingEntryClosesDrawer`; `MainLayoutEscapeClosesDrawer`; `MainLayoutWideViewportClosesOpenDrawer`; click outside: `OverlayAutoClose` stays at its default, asserted in `MainLayoutMenuButtonOpensDrawerWithEntriesAndVersion` | `MainLayoutRenderTests.cs` | +| AC5 | `MainLayoutRendersNoTopBarValues`; `MainLayoutNavigationAndRefreshSignalLoadNothing`; `ApplicationTelemetryRuntimeContainerGaugeEqualsDashboardCount` (adapted, see *Test files*) | `MainLayoutRenderTests.cs`; `ApplicationTelemetryTests.cs` | +| AC6 | `MainLayoutRendersVersionLineAfterBody` (DataRow configured `1.2.3` / unset → resolved, not `unknown` in a test host with an informational version) | `MainLayoutRenderTests.cs` | +| AC7 | `MainLayoutTogglingDarkModeButtonAppliesDarkLayoutClass` (kept); `MainLayoutThemeToggleShowsMoonInLightAndSunInDark` | `MainLayoutRenderTests.cs` | +| AC8 | `MainLayoutBrandMarkIsInlineShieldInPrimaryColor`; `AppBrandAssetsAreFlatOneColorShield` (DataRow per file) | `MainLayoutRenderTests.cs`; `AppBrandAssetsTests.cs` | +| AC9 | `AppStylesheetContentContainerHasContentWidthAndPadding`; `AppStylesheetHeaderControlsMeetTargetSizeAndFocusOutline`; `AppStylesheetNarrowestLayoutHidesProductName`; `AppStylesheetKeepsReducedMotionRule` (kept); `MainLayoutThemeStatusColorsReachMinimumContrast` (kept); manual: Dev, local run, N2 widths in both themes (fact 12) | `AppStylesheetTests.cs`; `MainLayoutRenderTests.cs` | +| AC10 | check: the Reviewer reads `docs/areas/web-ui.md` and `docs/ARCHITECTURE.md` §9 against the built layout (step 8) | — | + +## Approach + +**Navigation state, once per page load.** `MainLayout` owns a `NavigationViewData` (*Signatures*): in +`OnInitializedAsync` it takes it from persistent state under `MainLayout.Navigation` (replacing +`MainLayout.DashboardSummary`); otherwise it builds it — `ShowMyImages` from `IsDockerHubAccountConfigured`, +`DisplayVersion` from `ResolveDisplayVersion` (both moved unchanged from `NavMenu` as private members of `MainLayout`), +`ShowBaseImages` from `HasBaseImagesAsync` through `PageLoader.LoadAsync(…, Logger, "LoadNavigation", …)`, a failure +leaving it `false`. `RegisterOnPersisting` persists it; only the two flags and the version are persisted, never an +option value. The summary load, `OnLocationChanged`, `OnDashboardRefreshRequested`, the `NavigationManager` and +`DashboardRefreshState` injections, `GetProtectedAssetCount` and `GetLatestScanLabel` are removed. + +**NavMenu becomes presentational**, rendered twice by `MainLayout` (row and drawer) from the same +`NavigationViewData`: `