From 176727ac60e7ffa5dc62e92fcf50ccb700828095 Mon Sep 17 00:00:00 2001 From: Claude Date: Mon, 30 Nov 2026 18:12:25 +0000 Subject: [PATCH 01/28] Start working record for feature 455 Co-Authored-By: Claude Sonnet 5.5 Claude-Session: https://claude.ai/code/session_018g33AT69TTfqZphLy7AF18 --- specs/feature-455-runtime-containers-columns/log.md | 8 ++++++++ 1 file changed, 8 insertions(+) create mode 100644 specs/feature-455-runtime-containers-columns/log.md diff --git a/specs/feature-455-runtime-containers-columns/log.md b/specs/feature-455-runtime-containers-columns/log.md new file mode 100644 index 00000000..eb6543b4 --- /dev/null +++ b/specs/feature-455-runtime-containers-columns/log.md @@ -0,0 +1,8 @@ +# Log: feature 455-runtime-containers-columns + +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-30 18:12 | 1 Intake | Orchestrator | Issue 455 (enhancement, open, feature): Runtime Containers list with separate update and vulnerability columns; dependencies 451 and 452 closed; work branch claude/intelligent-bardeen-iqz6vj off main 3568610 | From 0d6aa228b5439539ee4d88cc45b808f4f0219337 Mon Sep 17 00:00:00 2001 From: Claude Date: Mon, 30 Nov 2026 18:14:59 +0000 Subject: [PATCH 02/28] Write spec for feature 455 Co-Authored-By: Claude Sonnet 5.5 Claude-Session: https://claude.ai/code/session_018g33AT69TTfqZphLy7AF18 --- .../spec.md | 141 ++++++++++++++++++ 1 file changed, 141 insertions(+) create mode 100644 specs/feature-455-runtime-containers-columns/spec.md diff --git a/specs/feature-455-runtime-containers-columns/spec.md b/specs/feature-455-runtime-containers-columns/spec.md new file mode 100644 index 00000000..8f69c4a7 --- /dev/null +++ b/specs/feature-455-runtime-containers-columns/spec.md @@ -0,0 +1,141 @@ +# Spec: Runtime Containers list with separate update and vulnerability columns + +Source: Issue #455 +Status: Draft + +## Problem + +On `/runtime-containers` the last column, *Update State*, stacks the update state chip, the available version, a +*Runtime vulnerabilities* chip, compact severity chips, a count line, the last check with the rescan button and the +base image warning. Two unrelated questions — "is there an update?" and "is it vulnerable?" — share one cell, so rows +are tall and hard to scan. The own-image link is an icon explained only by a tooltip, and the page still has the old +header (eyebrow label, section description) instead of the flat components of #452. The target layout is the mockup +`docs/ui-concept/flat-refresh/preview-runtime-containers.png` (issue #455, *Scope*), refined by the decisions below. + +## Scenarios + +- S1: Given containers on two Docker instances, when the user opens Runtime Containers, then the page shows the header + `Runtime Containers` with the description `Active containers with their images, update state, vulnerabilities and + live resource usage.` and the primary button `Check image updates` on the right, and below it one panel + `Container inventory` whose meta text reads `{n} containers on {m} Docker instances` (`1 container`, `1 Docker + instance` in the singular; `m` is the number of distinct Docker instances in the list). The panel has no + description line, no eyebrow label appears, and the table is flush with the panel. +- S2: The table has the column heads Container, Instance, CPU, Memory, Network, Update and Vulnerabilities, in this + order; *Update State* no longer exists. Rows, their order and every value are those of today. +- S3: The Container cell shows the container name as a link to `/runtime-containers/{instanceId}/{containerId}`, below + it the tag (`16`, or `16 (16.3)` when the tag is an alias that resolves to a version). The snapshot time is no + longer shown in the list (Open questions). +- S4: For a container that runs an own image, the Container cell adds a third line `Own image · {own image name}` as a + text link to `/observed-images/{id}`; the icon link with its tooltip is gone. Other containers have no third line. +- S5: The Update cell shows the update state as a status chip in its tone (`Update available` orange, `Up to date` + green, `Manual review required` blue, `Failed` red, `No tag data`, `Not evaluated` and `Unsupported` neutral: *Shared + display* of [Web UI](../../docs/areas/web-ui.md)) and below it the available version when one is known, whatever + the state. +- S6: For a container whose image has active findings, the Vulnerabilities cell shows a chip with the highest severity + present (`Critical`, `High`, `Medium`, `Low`) in that severity's tone, below it `{count} active · {breakdown}`, the + breakdown listing the counts above 0 in the order critical, high, medium, low, unknown (`3 active · 1 critical, 2 + high`), then `Checked {time}`. The *Runtime vulnerabilities* chip and the compact severity chips are no longer shown. +- S7: For a container whose image has no active findings, the Vulnerabilities cell shows its vulnerability status as a + chip (`No findings` green, `Failed` red, `Not scanned`, `Not configured`, `Unsupported`, `Unavailable` neutral) and + below it `Checked {time}`, or `Never scanned` when the image was never checked; no count line. +- S8: When base images of the container's image have active findings, the Vulnerabilities cell adds a warning chip + `Base images affected` and below it the base image summary (`4 active finding(s) across 1 base image`, as today); + otherwise neither appears. +- S9: Every row's Vulnerabilities cell has the rescan icon button on its right, top-aligned, announced as `Rescan + vulnerabilities`; it behaves as today (disabled while it runs, its error message next to it, then the list reloads + and the refresh signal is sent). +- S10: The CPU, Memory and Network cells show the current value (`n/a` without one) and, below it, a sparkline of up + to the 12 latest samples: CPU and memory one line each, network one line for received and one for sent. The network + value reads `12.4 kB/s ↓ / 8.1 kB/s ↑` on one line. +- S11: Clicking `Check image updates` disables the button, which shows a progress indicator and `Checking image + updates...`; when the scan ends the list reloads and the refresh signal is sent, as today. +- S12: Below 960 px each row is a card with a label in front of each value, the sparklines as wide as the card. + +## Errors and edge cases + +- E1: A failed update check shows `Update check failed: ` as an error alert between the header and the panel, + as today; the button is enabled again. +- E2: A failed first load shows `Loading the containers failed: ` in place of the skeleton, as today. +- E3: While the first load runs, the page shows the table skeleton titled `Container inventory`. +- E4: Without containers, a panel shows `No runtime containers have been observed yet.`; no table, no meta text. +- E5: Active findings while the vulnerability status is not `Findings detected` (the last check failed or was + unavailable, and findings of an earlier check stay active): the severity chip and count line as in S6, followed by + the status chip in its tone (`Failed` red), so the failed check stays visible. Today the count line carries the + failure message instead. +- E6: Active findings that all have an unknown severity: the chip reads `Unknown` in the low tone, the line + `{count} active · {count} unknown`. +- E7: A container with fewer than two resource samples shows no sparkline; without a current value the cell shows + `n/a`. +- E8: Between 960 px and a panel width of 1100 px the table scrolls horizontally inside the panel; the page itself + never scrolls horizontally (390, 768 and 1280 px window width). +- E9: Container names, tags, own image names and summaries from Docker, registries and scanners are shown as text. + +## Non-functional requirements + +- N1: No change to which containers are listed, their order, or how update state, available update, vulnerability + status, findings and resource values are computed ([Update detection](../../docs/areas/update-detection.md), + [Vulnerabilities](../../docs/areas/vulnerabilities.md), [Docker instances](../../docs/areas/docker-instances.md)). +- N2: The prerendered list is still reused when the page becomes interactive (persistent component state). +- N3: Timestamps keep the UTC format `yyyy-MM-dd HH:mm UTC` of + [decision 0058](../../docs/decisions/0058-timestamps-are-shown-in-utc-with-an-explicit-suffix.md); the mockup's + local format is not taken over. +- N4: Sparklines are 22 px high, at most 96 px wide, a 1.6 px line of constant width without fill, hidden from screen + readers, colored with the chart tokens (CPU `--dug-chart-cpu`, memory `--dug-chart-memory`, received + `--dug-chart-net-rx`, sent `--dug-chart-net-tx`), in both themes. Column proportions 1.3 : 0.8 : 0.7 : 0.8 : 1.4 : + 1.05 : 1.5; the rescan button keeps its 44 × 44 px target. +- N5: The page uses the shared components and the tone mapping of #452 (decision 0079); its private chip-color helpers + are removed. + +## Acceptance criteria + +- AC1: The page shows one header with title, description and the `Check image updates` action, and a panel + `Container inventory` with the meta text `{n} container(s) on {m} Docker instance(s)` in singular and plural, without + eyebrow label or section description (S1). +- AC2: The table heads are Container, Instance, CPU, Memory, Network, Update and Vulnerabilities in this order (S2). +- AC3: The Container cell shows the name linked to the detail route, the tag with the resolved version of an alias in + parentheses, no snapshot time, and only for an own image `Own image · {name}` as a text link to + `/observed-images/{id}` (S3, S4, E9). +- AC4: The Update cell shows the update state as a status chip in the tone of the shared mapping and the available + version when one is known (S5). +- AC5: The Vulnerabilities cell shows, with active findings, the chip of the highest severity (`Unknown` in the low tone + when only unknown severities are counted), the line `{count} active · {breakdown}` and the status chip when the + status is not `Findings detected`; without active findings the status chip and no count line (S6, S7, E5, E6). +- AC6: The Vulnerabilities cell shows `Checked {time}` or `Never scanned` and the rescan button announced as `Rescan + vulnerabilities`, and the `Base images affected` chip with the base image summary only when base images have active + findings (S8, S9). +- AC7: CPU, Memory and Network show the current value or `n/a`, the network value on one line, and a sparkline in the + chart tokens only with at least two samples (S10, E7, N4). +- AC8: *Check image updates* and *Rescan* behave as before: disabled with progress while running, the same error + messages, the reload and the refresh signal; load error, skeleton, empty state and persistent state as before (S9, + S11, E1–E4, N1, N2). +- AC9: Below 960 px the rows are labelled cards, and the page has no horizontal overflow at 390, 768 and 1280 px (S12, + E8). +- AC10: `docs/areas/web-ui.md` describes the page's columns as built, and the page has no private chip-color helpers + (N3, N5). + +## Out of scope + +- Sorting, filtering or paging of the list. +- Container actions through Portainer on the list (#280: they live on the detail page). +- The header navigation (#454) and the other pages of #450, including the Docker instance detail page's container + table; the old formatters stay for the pages not yet converted (decision 0079). + +## Open questions + +- The container cell shows the snapshot time (`RecordedAtUtc`) today; keep it as a fourth line or remove it? + Answered: removed (the issue's proposal). The detail page shows it (`Observed {time}`) one click away, and + the time of the last vulnerability check stays in the row. +- The issue's count line example `3 active · 1 critical, 2 high` does not match today's line, which shows + `{count} active · {assessment message}` (`The vulnerability provider reported 3 finding(s)`, or a failure message). + Answered: the line shows the severity breakdown of the example (it replaces the removed severity chips, as the issue + says); a failed last check is kept visible by its status chip (E5). +- Which chip shows when findings are active but the status is not `Findings detected`? Answered: E5. + +## Area documents + +- `docs/areas/web-ui.md`, *Pages and routes*: the Runtime Containers row names the seven columns and what each shows + (container with tag, alias version and own-image link; instance; CPU, memory and network with trends of up to the 12 + latest samples; update state and available version; vulnerabilities with highest severity or status, count line, + last check, rescan and base image warning), and the header's meta text. *Shared display* gains that a list's + vulnerability chip shows the highest active severity (`Unknown` in the low tone) and the count line's breakdown + order. From 56701b9318d675d6f6ecaed31fcfdaedb4e21770 Mon Sep 17 00:00:00 2001 From: Claude Date: Mon, 30 Nov 2026 18:15:07 +0000 Subject: [PATCH 03/28] Log the spec step of feature 455 --- specs/feature-455-runtime-containers-columns/log.md | 1 + 1 file changed, 1 insertion(+) diff --git a/specs/feature-455-runtime-containers-columns/log.md b/specs/feature-455-runtime-containers-columns/log.md index eb6543b4..cfa2f868 100644 --- a/specs/feature-455-runtime-containers-columns/log.md +++ b/specs/feature-455-runtime-containers-columns/log.md @@ -6,3 +6,4 @@ are quoted in full. | Date | Step | Member | Result | | ---- | ---- | ------ | ------ | | 2026-11-30 18:12 | 1 Intake | Orchestrator | Issue 455 (enhancement, open, feature): Runtime Containers list with separate update and vulnerability columns; dependencies 451 and 452 closed; work branch claude/intelligent-bardeen-iqz6vj off main 3568610 | +| 2026-11-30 18:15 | 2a Spec | Lead | RESULT: DONE. spec.md written (12 scenarios, 10 criteria); RecordedAtUtc removed from the list; count line shows a severity breakdown; status chip also shown after a failed check with active findings (opus/medium · 90,555 tokens · 21 tool uses · 86 s · 40 in · 8,054 out · 1,273,864 cache read · 90,447 cache write · 434,124 weighted) | From aa8126d4a3a6a24b9eaa41d8d5c9684c39d5240d Mon Sep 17 00:00:00 2001 From: Claude Date: Mon, 30 Nov 2026 18:16:58 +0000 Subject: [PATCH 04/28] Log the spec challenge of feature 455 --- specs/feature-455-runtime-containers-columns/log.md | 1 + 1 file changed, 1 insertion(+) diff --git a/specs/feature-455-runtime-containers-columns/log.md b/specs/feature-455-runtime-containers-columns/log.md index cfa2f868..bf322e88 100644 --- a/specs/feature-455-runtime-containers-columns/log.md +++ b/specs/feature-455-runtime-containers-columns/log.md @@ -7,3 +7,4 @@ are quoted in full. | ---- | ---- | ------ | ------ | | 2026-11-30 18:12 | 1 Intake | Orchestrator | Issue 455 (enhancement, open, feature): Runtime Containers list with separate update and vulnerability columns; dependencies 451 and 452 closed; work branch claude/intelligent-bardeen-iqz6vj off main 3568610 | | 2026-11-30 18:15 | 2a Spec | Lead | RESULT: DONE. spec.md written (12 scenarios, 10 criteria); RecordedAtUtc removed from the list; count line shows a severity breakdown; status chip also shown after a failed check with active findings (opus/medium · 90,555 tokens · 21 tool uses · 86 s · 40 in · 8,054 out · 1,273,864 cache read · 90,447 cache write · 434,124 weighted) | +| 2026-11-30 18:16 | 2a Spec challenge | Devil's Advocate | VERDICT: OBJECTIONS 1 major, 3 minor. Major: the rescan layout (Checked time left, button right) needs a change to VulnerabilityRescanControl, shared with MyImages and ObservedImages, which are out of scope; spec must decide (layout option or page-scoped CSS) and place the error message and tooltip. Minor: AC9 must check 1024 px table and 959 px cards (MudBlazor Breakpoint.Md is 1280 px today); S7 omits status Findings detected with 0 active findings; order of the Vulnerabilities cell lines with base images not fixed (opus/medium · 72,611 tokens · 21 tool uses · 103 s · 38 in · 10,643 out · 923,259 cache read · 70,232 cache write · 374,412 weighted) | From 8121a6a65d8ce0c8aa2a1ee0253cd9315adb2f60 Mon Sep 17 00:00:00 2001 From: Claude Date: Mon, 30 Nov 2026 18:18:06 +0000 Subject: [PATCH 05/28] Revise spec of feature 455 after the challenge --- .../log.md | 1 + .../spec.md | 71 ++++++++++++++----- 2 files changed, 54 insertions(+), 18 deletions(-) diff --git a/specs/feature-455-runtime-containers-columns/log.md b/specs/feature-455-runtime-containers-columns/log.md index bf322e88..66cfd164 100644 --- a/specs/feature-455-runtime-containers-columns/log.md +++ b/specs/feature-455-runtime-containers-columns/log.md @@ -8,3 +8,4 @@ are quoted in full. | 2026-11-30 18:12 | 1 Intake | Orchestrator | Issue 455 (enhancement, open, feature): Runtime Containers list with separate update and vulnerability columns; dependencies 451 and 452 closed; work branch claude/intelligent-bardeen-iqz6vj off main 3568610 | | 2026-11-30 18:15 | 2a Spec | Lead | RESULT: DONE. spec.md written (12 scenarios, 10 criteria); RecordedAtUtc removed from the list; count line shows a severity breakdown; status chip also shown after a failed check with active findings (opus/medium · 90,555 tokens · 21 tool uses · 86 s · 40 in · 8,054 out · 1,273,864 cache read · 90,447 cache write · 434,124 weighted) | | 2026-11-30 18:16 | 2a Spec challenge | Devil's Advocate | VERDICT: OBJECTIONS 1 major, 3 minor. Major: the rescan layout (Checked time left, button right) needs a change to VulnerabilityRescanControl, shared with MyImages and ObservedImages, which are out of scope; spec must decide (layout option or page-scoped CSS) and place the error message and tooltip. Minor: AC9 must check 1024 px table and 959 px cards (MudBlazor Breakpoint.Md is 1280 px today); S7 omits status Findings detected with 0 active findings; order of the Vulnerabilities cell lines with base images not fixed (opus/medium · 72,611 tokens · 21 tool uses · 103 s · 38 in · 10,643 out · 923,259 cache read · 70,232 cache write · 374,412 weighted) | +| 2026-11-30 18:18 | 2a Spec revise (challenge) | Lead | RESULT: DONE. All four objections accepted: other pages keep today's VulnerabilityRescanControl rendering (S9a), card breakpoint of this page moves to 960 px, Findings detected with 0 active findings (E10), line order fixed in S9 and AC6 (opus/medium · 21,330 tokens · 13 tool uses · 57 s · 14 in · 6,632 out · 626,320 cache read · 11,425 cache write · 157,542 weighted · continued) | diff --git a/specs/feature-455-runtime-containers-columns/spec.md b/specs/feature-455-runtime-containers-columns/spec.md index 8f69c4a7..01668a80 100644 --- a/specs/feature-455-runtime-containers-columns/spec.md +++ b/specs/feature-455-runtime-containers-columns/spec.md @@ -36,20 +36,30 @@ header (eyebrow label, section description) instead of the flat components of #4 breakdown listing the counts above 0 in the order critical, high, medium, low, unknown (`3 active · 1 critical, 2 high`), then `Checked {time}`. The *Runtime vulnerabilities* chip and the compact severity chips are no longer shown. - S7: For a container whose image has no active findings, the Vulnerabilities cell shows its vulnerability status as a - chip (`No findings` green, `Failed` red, `Not scanned`, `Not configured`, `Unsupported`, `Unavailable` neutral) and - below it `Checked {time}`, or `Never scanned` when the image was never checked; no count line. + chip (`No findings` green, `Failed` red, `Not scanned`, `Not configured`, `Unsupported`, `Unavailable` neutral; + `Findings detected` in the low tone, E10) and below it `Checked {time}`, or `Never scanned` when the image was never + checked; no count line. - S8: When base images of the container's image have active findings, the Vulnerabilities cell adds a warning chip `Base images affected` and below it the base image summary (`4 active finding(s) across 1 base image`, as today); otherwise neither appears. -- S9: Every row's Vulnerabilities cell has the rescan icon button on its right, top-aligned, announced as `Rescan - vulnerabilities`; it behaves as today (disabled while it runs, its error message next to it, then the list reloads - and the refresh signal is sent). +- S9: Every row's Vulnerabilities cell has two parts. The left part holds, one below the other and in this order: the + chip line (S6/S7, with E5's status chip beside the severity chip), the count line (S6 only), `Checked {time}` or + `Never scanned`, the rescan error message when the last rescan from this row failed, then `Base images affected` and + its summary (S8 only). The right part holds only the rescan icon button, top-aligned, announced as `Rescan + vulnerabilities`, with today's tooltip `Rescan for vulnerabilities now`. The rescan behaves as today: disabled while + it runs, then the list reloads and the refresh signal is sent; its error text is today's + (`Vulnerability rescan failed: `). +- S9a: My Images and Observed Images, which use the same rescan control, keep today's rendering (time and button side + by side, the error after them) until their own sub-issue of #450 (#458). - S10: The CPU, Memory and Network cells show the current value (`n/a` without one) and, below it, a sparkline of up to the 12 latest samples: CPU and memory one line each, network one line for received and one for sent. The network value reads `12.4 kB/s ↓ / 8.1 kB/s ↑` on one line. - S11: Clicking `Check image updates` disables the button, which shows a progress indicator and `Checking image updates...`; when the scan ends the list reloads and the refresh signal is sent, as today. -- S12: Below 960 px each row is a card with a label in front of each value, the sparklines as wide as the card. +- S12: Below 960 px each row is a card with a label in front of each value, the sparklines as wide as the card; from + 960 px on the page shows the table with its column heads. Today the page switches to cards already below 1280 px + (`Breakpoint.Md` of MudBlazor 9.14.0, `max-width: 1280px`), while the app styles cards only below 960 px; the card + breakpoint of this page moves to 960 px. ## Errors and edge cases @@ -59,16 +69,20 @@ header (eyebrow label, section description) instead of the flat components of #4 - E3: While the first load runs, the page shows the table skeleton titled `Container inventory`. - E4: Without containers, a panel shows `No runtime containers have been observed yet.`; no table, no meta text. - E5: Active findings while the vulnerability status is not `Findings detected` (the last check failed or was - unavailable, and findings of an earlier check stay active): the severity chip and count line as in S6, followed by - the status chip in its tone (`Failed` red), so the failed check stays visible. Today the count line carries the - failure message instead. + unavailable, and findings of an earlier check stay active): the severity chip with the status chip in its tone + (`Failed` red) beside it on the chip line, then the count line as in S6, so the failed check stays visible. Today + the count line carries the failure message instead. - E6: Active findings that all have an unknown severity: the chip reads `Unknown` in the low tone, the line `{count} active · {count} unknown`. - E7: A container with fewer than two resource samples shows no sparkline; without a current value the cell shows `n/a`. -- E8: Between 960 px and a panel width of 1100 px the table scrolls horizontally inside the panel; the page itself - never scrolls horizontally (390, 768 and 1280 px window width). +- E8: From 960 px on, while the panel is narrower than 1100 px (a 1024 px window, say), the table keeps its column + heads and scrolls horizontally inside the panel; the page itself never scrolls horizontally (390, 768, 1024 and + 1280 px window width). - E9: Container names, tags, own image names and summaries from Docker, registries and scanners are shown as text. +- E10: Status `Findings detected` with no active finding (the status is the image version's stored assessment status, + the count only its active findings): the chip reads `Findings detected` in the low tone (the shared mapping with an + empty severity summary), no count line. ## Non-functional requirements @@ -99,17 +113,20 @@ header (eyebrow label, section description) instead of the flat components of #4 version when one is known (S5). - AC5: The Vulnerabilities cell shows, with active findings, the chip of the highest severity (`Unknown` in the low tone when only unknown severities are counted), the line `{count} active · {breakdown}` and the status chip when the - status is not `Findings detected`; without active findings the status chip and no count line (S6, S7, E5, E6). -- AC6: The Vulnerabilities cell shows `Checked {time}` or `Never scanned` and the rescan button announced as `Rescan - vulnerabilities`, and the `Base images affected` chip with the base image summary only when base images have active - findings (S8, S9). + status is not `Findings detected`; without active findings the status chip (`Findings detected` in the low tone) + and no count line (S6, S7, E5, E6, E10). +- AC6: The Vulnerabilities cell's left part shows, in this order, the chip line, the count line, `Checked {time}` or + `Never scanned`, a failed rescan's error message, and the `Base images affected` chip with the base image summary + only when base images have active findings; its right part only the rescan button announced as `Rescan + vulnerabilities` with the tooltip `Rescan for vulnerabilities now`. My Images and Observed Images render the rescan + control as before (S8, S9, S9a). - AC7: CPU, Memory and Network show the current value or `n/a`, the network value on one line, and a sparkline in the chart tokens only with at least two samples (S10, E7, N4). - AC8: *Check image updates* and *Rescan* behave as before: disabled with progress while running, the same error messages, the reload and the refresh signal; load error, skeleton, empty state and persistent state as before (S9, S11, E1–E4, N1, N2). -- AC9: Below 960 px the rows are labelled cards, and the page has no horizontal overflow at 390, 768 and 1280 px (S12, - E8). +- AC9: At 959 px the rows are labelled cards; at 1024 px the table shows its column heads and scrolls horizontally + inside the panel; the page has no horizontal overflow at 390, 768, 1024 and 1280 px (S12, E8). - AC10: `docs/areas/web-ui.md` describes the page's columns as built, and the page has no private chip-color helpers (N3, N5). @@ -118,7 +135,10 @@ header (eyebrow label, section description) instead of the flat components of #4 - Sorting, filtering or paging of the list. - Container actions through Portainer on the list (#280: they live on the detail page). - The header navigation (#454) and the other pages of #450, including the Docker instance detail page's container - table; the old formatters stay for the pages not yet converted (decision 0079). + table and the rescan layout of My Images and Observed Images (#458, S9a); the old formatters stay for the pages not + yet converted (decision 0079). The other list pages keep `Breakpoint.Md`, so they still switch to cards below + 1280 px, which `docs/areas/web-ui.md` (*Shared display*, "Below 960 px each row is a bordered card") does not say; + that defect is reported for their sub-issues, not fixed here. ## Open questions @@ -139,3 +159,18 @@ header (eyebrow label, section description) instead of the flat components of #4 last check, rescan and base image warning), and the header's meta text. *Shared display* gains that a list's vulnerability chip shows the highest active severity (`Unknown` in the low tone) and the count line's breakdown order. + +## Challenge + +1. Major — the split rescan layout needs a change to the shared `VulnerabilityRescanControl`, also used by My Images + and Observed Images. Accepted: those two pages keep today's rendering (S9a, AC6, *Out of scope*); whether the + control gets a layout parameter or the page a scoped CSS rule is the plan's choice. The error message goes in the + left part directly under `Checked {time}` / `Never scanned`, the tooltip stays on the button (S9). +2. Minor — the page switches to cards below 1280 px today (`Breakpoint.Md`, MudBlazor 9.14.0 `max-width: 1280px`), + not 960 px. Accepted and confirmed in MudBlazor's stylesheet: S12 and E8 state the move to 960 px, AC9 checks 959 + and 1024 px. The area document's 960 px sentence is wrong for the other list pages; that is named under *Out of + scope* for their sub-issues. +3. Minor — `Findings detected` with no active finding was missing. Accepted: E10, S7 and AC5. +4. Minor — the cell's line order. Accepted with one difference: E5's status chip stands beside the severity chip on + the chip line (both are chips, and the issue's item 1 is the chip line), not after the count line; the order is in + S9 and checked by AC6. From aab66713335e486c5fd09b6f5b927050eced51d4 Mon Sep 17 00:00:00 2001 From: Claude Date: Mon, 30 Nov 2026 18:23:58 +0000 Subject: [PATCH 06/28] Write plan and tasks for feature 455 --- ...-keeps-a-failed-checks-status-beside-it.md | 38 ++++ docs/decisions/README.md | 1 + .../log.md | 1 + .../plan.md | 198 ++++++++++++++++++ .../spec.md | 13 +- .../tasks.md | 14 ++ 6 files changed, 261 insertions(+), 4 deletions(-) create mode 100644 docs/decisions/0082-the-runtime-container-list-names-the-highest-active-severity-and-keeps-a-failed-checks-status-beside-it.md create mode 100644 specs/feature-455-runtime-containers-columns/plan.md create mode 100644 specs/feature-455-runtime-containers-columns/tasks.md diff --git a/docs/decisions/0082-the-runtime-container-list-names-the-highest-active-severity-and-keeps-a-failed-checks-status-beside-it.md b/docs/decisions/0082-the-runtime-container-list-names-the-highest-active-severity-and-keeps-a-failed-checks-status-beside-it.md new file mode 100644 index 00000000..19e876e4 --- /dev/null +++ b/docs/decisions/0082-the-runtime-container-list-names-the-highest-active-severity-and-keeps-a-failed-checks-status-beside-it.md @@ -0,0 +1,38 @@ +# 0082: The runtime container list names the highest active severity and keeps a failed check's status beside it + +- **Status:** Proposed +- **Date:** 2026-11-30 +- **Area:** Web UI +- **Source:** Issue #455 +- **Supersedes:** — + +## Context + +The flat refresh (#450) gives the Runtime Containers list a Vulnerabilities column of its own. Issue #455 replaces the +*Runtime vulnerabilities* chip and the compact severity chips by one chip and one line: the highest severity present +and `{count} active · {breakdown}`. The list item carries two independent values: the image version's stored +assessment status and its active findings. A failed or unavailable check leaves the findings of an earlier check active +while the status turns `Failed` or `Unavailable`. Until now the count line showed the stored assessment message, which +after such a check is the failure message, so the failure was visible. A severity chip alone would hide it. + +## Options considered + +1. **Severity chip, and the status chip beside it whenever the status is not `Findings detected` (chosen)** — the + failed check stays visible in the row as a red `Failed` chip; such rows show two chips. +2. **Severity chip only** — the mockup's look in every row, but after a failed check the row looks as if the findings + were current, and nothing says the check failed. +3. **Status chip only, in the tone of the highest severity** — one chip per row, but `Findings detected` says less than + the severity the issue asks for, and a failed check would still lose its severity. +4. **Keep the assessment message as the count line** — shows the failure text, but the line no longer carries the + severities the removed chips showed. + +## Decision + +With active findings the Vulnerabilities cell of the runtime container list shows the highest active severity as its +chip and the severity counts as its count line; a status other than `Findings detected` is shown as a second chip +beside it. The texts, tones and order are stated in [Web UI](../areas/web-ui.md). + +## Consequences + +The stored assessment message no longer appears on the list; the detail page still shows it. The pages converted later +in #450 (My Images, Observed Images) can take the same cell; whether they do is decided in their issues. diff --git a/docs/decisions/README.md b/docs/decisions/README.md index 1cbd1154..620ead9b 100644 --- a/docs/decisions/README.md +++ b/docs/decisions/README.md @@ -147,4 +147,5 @@ once in the [area document](../areas/README.md) of the record's area, and the re | [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 | Accepted | 2026-11-29 | +| [0082](0082-the-runtime-container-list-names-the-highest-active-severity-and-keeps-a-failed-checks-status-beside-it.md) | The runtime container list names the highest active severity and keeps a failed check's status beside it | Proposed | 2026-11-30 | diff --git a/specs/feature-455-runtime-containers-columns/log.md b/specs/feature-455-runtime-containers-columns/log.md index 66cfd164..56442e51 100644 --- a/specs/feature-455-runtime-containers-columns/log.md +++ b/specs/feature-455-runtime-containers-columns/log.md @@ -9,3 +9,4 @@ are quoted in full. | 2026-11-30 18:15 | 2a Spec | Lead | RESULT: DONE. spec.md written (12 scenarios, 10 criteria); RecordedAtUtc removed from the list; count line shows a severity breakdown; status chip also shown after a failed check with active findings (opus/medium · 90,555 tokens · 21 tool uses · 86 s · 40 in · 8,054 out · 1,273,864 cache read · 90,447 cache write · 434,124 weighted) | | 2026-11-30 18:16 | 2a Spec challenge | Devil's Advocate | VERDICT: OBJECTIONS 1 major, 3 minor. Major: the rescan layout (Checked time left, button right) needs a change to VulnerabilityRescanControl, shared with MyImages and ObservedImages, which are out of scope; spec must decide (layout option or page-scoped CSS) and place the error message and tooltip. Minor: AC9 must check 1024 px table and 959 px cards (MudBlazor Breakpoint.Md is 1280 px today); S7 omits status Findings detected with 0 active findings; order of the Vulnerabilities cell lines with base images not fixed (opus/medium · 72,611 tokens · 21 tool uses · 103 s · 38 in · 10,643 out · 923,259 cache read · 70,232 cache write · 374,412 weighted) | | 2026-11-30 18:18 | 2a Spec revise (challenge) | Lead | RESULT: DONE. All four objections accepted: other pages keep today's VulnerabilityRescanControl rendering (S9a), card breakpoint of this page moves to 960 px, Findings detected with 0 active findings (E10), line order fixed in S9 and AC6 (opus/medium · 21,330 tokens · 13 tool uses · 57 s · 14 in · 6,632 out · 626,320 cache read · 11,425 cache write · 157,542 weighted · continued) | +| 2026-11-30 18:23 | 2b Plan | Lead | RESULT: DONE. Spec approved by Lead; plan.md and tasks.md written, tier standard, no security areas; decision record 0082 (Proposed); rescan control gets LeadingContent/TrailingContent fragments; page moves to Breakpoint.Sm (opus/medium · 68,836 tokens · 37 tool uses · 341 s · 72 in · 35,591 out · 5,144,090 cache read · 67,954 cache write · 1,040,348 weighted · continued) | diff --git a/specs/feature-455-runtime-containers-columns/plan.md b/specs/feature-455-runtime-containers-columns/plan.md new file mode 100644 index 00000000..ad6649de --- /dev/null +++ b/specs/feature-455-runtime-containers-columns/plan.md @@ -0,0 +1,198 @@ +# Plan: Runtime Containers list with separate update and vulnerability columns + +Source: Issue #455 | [spec.md](spec.md) +Tier: standard — a user-visible behavior change of one page and one shared component, no security control. +Security areas touched: none + +## Problem / root cause + +See [spec.md](spec.md), *Problem*. + +## Verified facts + +| # | Claim | Evidence | Status | +| - | ----- | -------- | ------ | +| 1 | The update state, available version, vulnerability chips, count line, rescan control and base image chip share one cell | `Components/Pages/RuntimeContainers.razor:127-145` | confirmed | +| 2 | Today's count line is `{count} active · {assessment message}`, not the severity breakdown of the issue's example | `RuntimeContainers.razor:137`; `VulnerabilitySummary = imageVersion.VulnerabilityAssessmentMessage`, `UI/ApplicationViewService.cs:1369`; message texts `Images/VulnerabilityEnrichmentService.cs:349,372,460` | confirmed | +| 3 | Active findings and assessment status are independent: a failed check leaves earlier findings active | `ApplicationViewService.cs:1366-1368`; failure path writes status/message only, `VulnerabilityEnrichmentService.cs:343-352` | confirmed | +| 4 | `ActiveVulnerabilityFindingCount` equals `VulnerabilitySeveritySummary.TotalCount` | both from the same lookup, `ApplicationViewService.cs:1366-1367` | confirmed | +| 5 | `HighestSeverity` returns `Critical`/`High`/`Medium`/`Low`, `Unknown` for only other severities; `GetSeverityTone("Unknown")` is low; `GetStatusTone("Findings detected", empty)` is low | `UI/VulnerabilitySeveritySummaryViewData.cs:43-68`; `UI/StatusToneFormatter.cs` | confirmed | +| 6 | Every update state and vulnerability status text has a tone in the shared mapping | `StatusToneFormatter.cs:23-45`; texts `ApplicationViewService.cs:231-237`, `VulnerabilityViewMapper.cs:193-205` | confirmed | +| 7 | The list keeps up to 12 samples; a sparkline needs at least two | `RuntimeListResourceHistoryCount = 12`, `ApplicationViewService.cs:25`; `HasResourceHistory`, `RuntimeContainers.razor.cs` | confirmed | +| 8 | `VulnerabilityRescanControl` renders time and button in one inline-flex div, the error after it; My Images and Observed Images use it | `Components/Common/VulnerabilityRescanControl.razor:1-13`, `app.css:571-581`; `MyImages.razor:85`, `ObservedImages.razor:143` | confirmed | +| 9 | MudBlazor 9.14.0 shows `mud-md-table` cards at `max-width: 1280px`, `mud-sm-table` at `max-width: 960px`; `.mud-table-container` has `overflow-x: auto` | `MudBlazor.min.css` of the 9.14.0 package | confirmed | +| 10 | `Breakpoint.Sm` puts the class `mud-sm-table` on the table | to verify: the Tester's render test `RuntimeContainersRenderTableSwitchesToCardsBelow960Px` (step 5) | unverified | +| 11 | The app's card frame applies below 960 px only | `app.css:1117` `@media (max-width: 959.98px)` | confirmed | +| 12 | `PageHeader`, `SectionPanel` (`Meta`, `Flush`), `StatusChip`, `TableSkeleton` exist with the parameters the page needs | `Components/Common/*.razor.cs` | confirmed | +| 13 | Chart and link tokens exist in both themes | `app.css:31,55-60,83,107` | confirmed | +| 14 | The detail page still shows the snapshot time and a failed check's message | `RuntimeContainerDetail.razor:54,107`; `VulnerabilityAssessmentCard.razor:36-39` | confirmed | +| 15 | `DashboardTextFormatter.FormatCount` gives `{n} {singular|plural}` | `UI/DashboardTextFormatter.cs:67` | confirmed | +| 16 | `web-ui.md` has 4,896 words (limit 5,000) | `plan-check.py` *Areas* line | confirmed | + +## Tests per criterion + +Test names follow *Layout* (`.squad/stack.md`); each carries its `[TestCategory("ACn")]`. + +| AC | Test(s) | Test file | +| -- | ------- | --------- | +| AC1 | `RuntimeContainersRenderShowsHeaderWithActionAndInventoryPanel` (title, description, button text, panel title, meta, no `page-eyebrow`, no `section-description`); `RuntimeContainerListFormatterFormatInventoryMetaUsesSingularAndPlural` (DataRows: 1 container/1 instance; 2 containers on one instance; 23 on 2) | `RuntimeContainersRenderTests.cs`; `RuntimeContainerListFormatterTests.cs` | +| AC2 | `RuntimeContainersRenderShowsSevenColumnHeadsInOrder` (no `Update State`) | `RuntimeContainersRenderTests.cs` | +| AC3 | `RuntimeContainersRenderContainerCellWithAliasAndOwnImageShowsOwnImageLink` (href, text `Own image · {name}`, `16 (16.3)`); `RuntimeContainersRenderContainerCellWithoutOwnImageShowsNameAndTagOnly` (no own-image line, no snapshot time, no tooltip icon link); `RuntimeContainersRenderEncodesExternalTexts` (a `` name is text) | `RuntimeContainersRenderTests.cs` | +| AC4 | `RuntimeContainersRenderUpdateCellShowsStateChipInItsTone` (DataRows for the seven states and their tone class); `RuntimeContainersRenderUpdateCellShowsAvailableVersionOnlyWhenKnown` | `RuntimeContainersRenderTests.cs` | +| AC5 | `RuntimeContainerListFormatterFormatActiveFindingsListsCountsInSeverityOrder` (DataRows: `3 active · 1 critical, 2 high`; all five kinds; only unknown; zero → empty); `RuntimeContainerListFormatterIsStatusShownBesideSeverityOnlyForOtherStatuses`; `RuntimeContainersRenderFindingsShowHighestSeverityChipAndCountLine` (no `Runtime vulnerabilities`, no compact chips); `RuntimeContainersRenderUnknownSeverityFindingsShowUnknownChipInLowTone`; `RuntimeContainersRenderFailedCheckWithFindingsShowsStatusChipBesideSeverity`; `RuntimeContainersRenderWithoutFindingsShowsStatusChipInItsTone` (DataRows for the six statuses, and `Findings detected` with zero findings in the low tone, no count line) | `RuntimeContainerListFormatterTests.cs`; `RuntimeContainersRenderTests.cs` | +| AC6 | `RuntimeContainersRenderVulnerabilityCellOrdersItsLines` (chip line, count line, `Checked …`, base image chip and summary, by markup position; button outside the details part); `RuntimeContainersRenderBaseImageWarningOnlyWithAffectedBaseImages`; `RuntimeContainersRenderNeverScannedImageShowsNeverScanned`; `VulnerabilityRescanControlWithLeadingAndTrailingContentRendersSplitLayout`; `VulnerabilityRescanControlFailedRescanInSplitLayoutShowsErrorBeforeTrailingContentAsync`; `VulnerabilityRescanControlWithoutContentKeepsInlineLayout` (no `--split` class; existing tests unchanged) | `RuntimeContainersRenderTests.cs`; `VulnerabilityRescanControlTests.cs` | +| AC7 | `RuntimeContainersRenderResourceCellsShowNotAvailableWithoutUsage`; `RuntimeContainersRenderSparklinesNeedTwoSamples` (none with one, CPU/memory/two network paths with two); `RuntimeContainersRenderNetworkValueIsOneElement`; existing `AppStylesheetLinksAndSparklinesUseTokenColors`; `AppStylesheetRuntimeContainersSparklinesAreThinFixedSizeLines` (height 22px, max-width 96px, stroke-width 1.6, `vector-effect: non-scaling-stroke`, `fill: none`); `AppStylesheetRuntimeContainersNetworkValueDoesNotWrap` | `RuntimeContainersRenderTests.cs`; `AppStylesheetTests.cs`; `AppStylesheetRuntimeContainersTests.cs` | +| AC8 | existing `RuntimeContainersFailedUpdateCheckShowsFixedReasonAndLogsAsync`, `RuntimeContainersLoadFailureShowsFixedErrorAndLogs`, `RuntimeContainersSuccessfulUpdateCheckAfterLoadFailureShowsList`, `RuntimeContainersRestoresFromPersistentState`, `RuntimeContainersPersistsLoadedStateForPrerender`, the existing `VulnerabilityRescanControlTests`; new `RuntimeContainersRunningUpdateCheckDisablesButtonWithProgress`; `RuntimeContainersRescanReloadsListAndNotifiesDashboardAsync`; `RuntimeContainersRenderEmptyListShowsEmptyState`; `RuntimeContainersRenderLoadingShowsTableSkeletonWithTitle` | `RuntimeContainersTests.cs`; `RuntimeContainersPersistentStateTests.cs`; `VulnerabilityRescanControlTests.cs`; `RuntimeContainersRenderTests.cs` | +| AC9 | `RuntimeContainersRenderTableSwitchesToCardsBelow960Px` (class `mud-sm-table`, every cell has its `data-label`); `AppStylesheetRuntimeContainersTableScrollsInsidePanelFrom960Px` (`min-width: 1100px` and the seven column widths only inside `@media (min-width: 960px)`); manual: Product Manager in step 9 on a local `docker compose` build of the branch head (`DOCKER.md`), window widths 390, 768, 959, 1024 and 1280 px | `RuntimeContainersRenderTests.cs`; `AppStylesheetRuntimeContainersTests.cs` | +| AC10 | check: the Reviewer in step 8 reads the *Pages and routes* row against the built page and finds no `GetUpdateStateColor`, `GetVulnerabilityStatusColor` or `MudChip` in `RuntimeContainers.razor(.cs)` | — | + +## Approach + +**Header and panel.** `PageHeader` with `Title`, `Description` and the existing button (unchanged behavior) in +`Actions`; the error alert stays between header and panel. The list sits in `SectionPanel Title="Container inventory" +Meta="@RuntimeContainerListFormatter.FormatInventoryMeta(_containers)" Flush="true"`; loading: `TableSkeleton +Title="Container inventory"`, load error and the `empty-state-panel` empty state as today. `FormatInventoryMeta` counts distinct `DockerInstanceId`s and joins +two `DashboardTextFormatter.FormatCount` results with ` on `. + +**Table.** `Breakpoint="Breakpoint.Sm"`, seven `MudTh`/`MudTd` with the `DataLabel`s of the heads. Column widths in +`app.css` inside `@media (min-width: 960px)`: `.runtime-containers-table .mud-table-root { min-width: 1100px }` and +widths 17.2 %, 10.6 %, 9.3 %, 10.6 %, 18.5 %, 13.9 %, 19.9 % by column class (`__container`, `__instance`, `__cpu`, +`__memory`, `__network`, `__update`, `__vulnerabilities`); MudBlazor's `.mud-table-container` scrolls. The +`__update-state`, `__name` and `__name-icon*` rules go. + +**Container cell.** Name as `table-link` (semibold), the tag line as today in `table-secondary`, and only with +`LinkedObservedImageId` a `MudLink` `Own image · {LinkedObservedImageName}` to `/observed-images/{id}`, also +`table-secondary`. No `RecordedAtUtc`, no tooltip, no icon. + +**Update cell.** `StatusChip Text=UpdateState Tone=StatusToneFormatter.GetStatusTone(UpdateState)`, below it the +available version in a `__version` span (13 px, weight 500, tabular figures) when not empty. + +**Vulnerabilities cell.** One `VulnerabilityRescanControl` with two new fragments: +- `LeadingContent`: the chip line — with `VulnerabilitySeveritySummary.TotalCount > 0` a `StatusChip` with + `HighestSeverity` and `GetSeverityTone`, plus, when `IsStatusShownBesideSeverity`, a `StatusChip` with the status and + `GetStatusTone(status)`; otherwise one `StatusChip` with the status and `GetStatusTone(status, summary)` — then, with + findings, the count line `FormatActiveFindings(summary)` in `--dug-text`, 13 px. +- `TrailingContent`: with `ActiveBaseImageVulnerabilityFindingCount > 0` a `StatusChip` `Base images affected` + (`StatusTone.Warning`) and the base image summary. + +When either fragment is set the control renders +`div.vulnerability-rescan-control.vulnerability-rescan-control--split` holding +`div.vulnerability-rescan-control__details` (leading content, the `Checked …`/`Never scanned` span, the error span when +set, trailing content, stacked) and after it the unchanged tooltip and icon button, the grid's second column, +`align-self: start`. Without fragments the markup is exactly today's. `FormatActiveFindings` returns +`{TotalCount} active · ` plus the counts above 0 as `{n} critical`, `high`, `medium`, `low`, `unknown` joined with +`, `, and an empty string for a total of 0. `IsStatusShownBesideSeverity` is true when the summary's total is above 0 +and the status is not `Findings detected` (ordinal, ignoring case). + +**Resource cells.** Values and paths as today; `BuildSparklinePath` and its 100 × 26 view box stay (its tests +unchanged). CSS: sparkline box `height: 22px; max-width: 96px`, lines `stroke-width: 1.6; vector-effect: +non-scaling-stroke; fill: none`; in the cards `max-width: 100%` as today; the network value `white-space: nowrap`. + +**Cleanup.** `GetUpdateStateColor` and `GetVulnerabilityStatusColor` are removed; `VulnerabilitySeverityChips` and +`VulnerabilityDisplayFormatter` stay for other pages (decision 0079). The page loses `@using MudBlazor` only if nothing +else needs it. + +**Breakpoint edge.** A window exactly 960 px wide shows MudBlazor's cards without the app's frame (spec, S12); +named in the follow-up below, not fixed here. + +**Stale criterion ids.** In `RuntimeContainersTests.cs` and `VulnerabilityRescanControlTests.cs` the Tester replaces +the categories of earlier features by this feature's id where the test asserts one of its criteria (the rows above), +and removes the others, so `plan-check.py --matrix` counts no stale test. + +Layout: as the spec's S1–S12 and the above; anything they leave open (spacing, gaps) is free for the Tester, +approved in step 9. + +Early draft PR: no + +## Options considered + +1. **Render-fragment parameters on `VulnerabilityRescanControl` (chosen)** — the control keeps the rescan logic, the + error and the tooltip in one place; the other pages pass no fragment and keep today's markup. +2. **Page-scoped CSS on today's markup** (`display: contents` and grid placement) — no component change, but the + button must span a variable number of lines and MudTooltip's wrapper element, so the layout rests on MudBlazor's + internal markup. +3. **The page renders its own time, button and error** — duplicates the rescan call, its error handling and logging + (the quality gate's duplication condition), and the two copies drift. +4. **Status chip only, or severity chip only** — rejected in decision 0082. +5. **Keep `Breakpoint.Md` and restyle 960–1280 px cards** — the spec asks for the table from 960 px (AC9). + +## Affected projects and types + +| Project | Type / file | Change | +| ------- | ----------- | ------ | +| DockerUpdateGuard | `Components/Pages/RuntimeContainers.razor` | rewritten markup | +| DockerUpdateGuard | `Components/Pages/RuntimeContainers.razor.cs` | two color helpers removed | +| DockerUpdateGuard | `Components/Common/VulnerabilityRescanControl.razor(.cs)` | two fragment parameters, split layout | +| DockerUpdateGuard | `UI/RuntimeContainerListFormatter.cs` | new | +| DockerUpdateGuard | `wwwroot/app.css` | `.runtime-containers-table*` rules, `--split` rules | + +## Signatures (for the Dev's skeleton) + +`src/DockerUpdateGuard/UI/RuntimeContainerListFormatter.cs`: +- `internal static class RuntimeContainerListFormatter` +- `public static string FormatInventoryMeta(IReadOnlyList containers)` +- `public static string FormatActiveFindings(VulnerabilitySeveritySummaryViewData summary)` +- `public static bool IsStatusShownBesideSeverity(RuntimeContainerListItemData container)` + +`VulnerabilityRescanControl`: +- `public RenderFragment? LeadingContent { get; set; }` +- `public RenderFragment? TrailingContent { get; set; }` + +Both are component parameters (with the Parameter attribute). + +`RuntimeContainers.GetUpdateStateColor` and `RuntimeContainers.GetVulnerabilityStatusColor` are removed (private). +The skeleton holds the new markup of the page for real only after group G2; in G1 it adds the members above. + +## Test files + +- `src/Tests/DockerUpdateGuard.Tests/RuntimeContainerListFormatterTests.cs` (new) +- `src/Tests/DockerUpdateGuard.Tests/RuntimeContainersRenderTests.cs` (new) +- `src/Tests/DockerUpdateGuard.Tests/AppStylesheetRuntimeContainersTests.cs` (new) +- `src/Tests/DockerUpdateGuard.Tests/VulnerabilityRescanControlTests.cs` (extended) +- `src/Tests/DockerUpdateGuard.Tests/RuntimeContainersTests.cs` (extended, ids retagged) + +Existing test call sites of a changed signature: none (the new parameters are optional; no test calls the removed +private helpers). `RuntimeContainersPersistentStateTests.cs` and `AppStylesheetTests.cs` stay unchanged. + +Files no unit test can cover: none. + +## Areas + +- `docs/areas/web-ui.md (+70 words)`: the Runtime Containers row of *Pages and routes*, a sentence in *Shared display* + on the list's vulnerability chip and count line, the *Rescan (per image)* row of *Actions*. The document stays below + `AREA_MAX_WORDS` (4,896 + 70); the Dev keeps the additions within that budget. + +## Documentation updates + +- `docs/areas/web-ui.md` (Dev, once G2 is green): *Pages and routes*, Runtime Containers row — the header meta text and + the seven columns as built (container with tag, alias version and own-image link; instance; CPU, memory, network + with trends of up to the 12 latest samples; update state and available version; vulnerabilities with highest + severity or status, count line, last check, rescan, base image warning), linking decision 0082. *Shared display* — + the list's severity chip (`Unknown` in the low tone), the status chip beside it for a status other than `Findings + detected`, the count line `{count} active · {n} critical, …` in the order critical, high, medium, low, unknown. + *Actions*, *Rescan (per image)* — "with it the time of the last check" instead of "next to it". *Related decisions* — + 0082. +- `docs/ARCHITECTURE.md`, `README.md`: none (no change to the component list or features). + +## Architecture check + +No guarantee of `.squad/project.md` or `docs/ARCHITECTURE.md` changes: the page still reads only +`IApplicationViewService`, the actions and the refresh signal are unchanged, and `Components/Common` keeps its role. + +## Security considerations + +- [x] No limits. +- [x] None: the actions keep their fixed-reason messages; texts from Docker, registries and scanners are rendered + HTML-encoded by Razor (AC3 test). + +## Decision records + +- `docs/decisions/0082-the-runtime-container-list-names-the-highest-active-severity-and-keeps-a-failed-checks-status-beside-it.md` + (Proposed) + +## Out of scope / follow-ups + +- Proposed issue: "[UI] Align the row-card breakpoint with MudBlazor's small table breakpoint" — the app's card frame + starts below 960 px (`max-width: 959.98px`) while `Breakpoint.Sm` cards include 960 px, and the other list pages still + use `Breakpoint.Md` (cards up to 1280 px, unframed from 960 px), which `web-ui.md` *Shared display* does not say. + Body: the facts 9 and 11 above, the affected pages, and the decision to take for the shared rule. diff --git a/specs/feature-455-runtime-containers-columns/spec.md b/specs/feature-455-runtime-containers-columns/spec.md index 01668a80..55c5fbfd 100644 --- a/specs/feature-455-runtime-containers-columns/spec.md +++ b/specs/feature-455-runtime-containers-columns/spec.md @@ -1,7 +1,7 @@ # Spec: Runtime Containers list with separate update and vulnerability columns Source: Issue #455 -Status: Draft +Status: Approved by Lead ## Problem @@ -59,7 +59,9 @@ header (eyebrow label, section description) instead of the flat components of #4 - S12: Below 960 px each row is a card with a label in front of each value, the sparklines as wide as the card; from 960 px on the page shows the table with its column heads. Today the page switches to cards already below 1280 px (`Breakpoint.Md` of MudBlazor 9.14.0, `max-width: 1280px`), while the app styles cards only below 960 px; the card - breakpoint of this page moves to 960 px. + breakpoint of this page moves to 960 px. At a window exactly 960 px wide MudBlazor already shows its cards (its + small-screen query includes 960 px) while the app's card frame starts below it, so that single width shows unframed + cards, as every list page does between 960 and 1280 px today (*Out of scope*). ## Errors and edge cases @@ -138,7 +140,9 @@ header (eyebrow label, section description) instead of the flat components of #4 table and the rescan layout of My Images and Observed Images (#458, S9a); the old formatters stay for the pages not yet converted (decision 0079). The other list pages keep `Breakpoint.Md`, so they still switch to cards below 1280 px, which `docs/areas/web-ui.md` (*Shared display*, "Below 960 px each row is a bordered card") does not say; - that defect is reported for their sub-issues, not fixed here. + that defect is reported for their sub-issues, not fixed here, together with aligning the app's card frame + (`max-width: 959.98px`) with MudBlazor's small-screen query (`max-width: 960px`), which S12's single 960 px width + needs. ## Open questions @@ -158,7 +162,8 @@ header (eyebrow label, section description) instead of the flat components of #4 latest samples; update state and available version; vulnerabilities with highest severity or status, count line, last check, rescan and base image warning), and the header's meta text. *Shared display* gains that a list's vulnerability chip shows the highest active severity (`Unknown` in the low tone) and the count line's breakdown - order. + order. The *Actions* row *Rescan (per image)* says the time of the last check stands with the button, not "next to + it" (on this page it stands in the cell's left part). ## Challenge diff --git a/specs/feature-455-runtime-containers-columns/tasks.md b/specs/feature-455-runtime-containers-columns/tasks.md new file mode 100644 index 00000000..4efa7801 --- /dev/null +++ b/specs/feature-455-runtime-containers-columns/tasks.md @@ -0,0 +1,14 @@ +# Tasks: Runtime Containers list with separate update and vulnerability columns + +Plan: [plan.md](plan.md) + +| # | Group | Task | Files | Criteria | Depends on | Owner | Done | +| - | ----- | ---- | ----- | -------- | ---------- | ----- | ---- | +| 1 | G1 | Skeleton: `RuntimeContainerListFormatter` with `FormatInventoryMeta`, `FormatActiveFindings`, `IsStatusShownBesideSeverity`, and the `RenderFragment` parameters `LeadingContent`, `TrailingContent` of `VulnerabilityRescanControl` (*Signatures*) | `src/DockerUpdateGuard/UI/RuntimeContainerListFormatter.cs`, `src/DockerUpdateGuard/Components/Common/VulnerabilityRescanControl.razor.cs` | AC1, AC5, AC6 | — | Dev | [ ] | +| 2 | G1 | Failing tests for the formatter and the split rescan layout; retag stale ids in `VulnerabilityRescanControlTests.cs` | `src/Tests/DockerUpdateGuard.Tests/RuntimeContainerListFormatterTests.cs`, `src/Tests/DockerUpdateGuard.Tests/VulnerabilityRescanControlTests.cs` | AC1, AC5, AC6, AC8 | 1 | Tester | [ ] | +| 3 | G1 | Implement the formatter and the split layout with its `--split` CSS | `src/DockerUpdateGuard/UI/RuntimeContainerListFormatter.cs`, `src/DockerUpdateGuard/Components/Common/VulnerabilityRescanControl.razor*`, `src/DockerUpdateGuard/wwwroot/app.css` | AC1, AC5, AC6 | 2 | Dev | [ ] | +| 4 | G2 | Skeleton: no new API (the page's helpers are removed in task 6) | — | AC10 | 3 | Dev | [ ] | +| 5 | G2 | Failing render and stylesheet tests of the page; retag stale ids in `RuntimeContainersTests.cs` | `src/Tests/DockerUpdateGuard.Tests/RuntimeContainersRenderTests.cs`, `src/Tests/DockerUpdateGuard.Tests/AppStylesheetRuntimeContainersTests.cs`, `src/Tests/DockerUpdateGuard.Tests/RuntimeContainersTests.cs` | AC1–AC9 | 4 | Tester | [ ] | +| 6 | G2 | Rewrite the page markup, remove the color helpers, rework the `.runtime-containers-table*` rules | `src/DockerUpdateGuard/Components/Pages/RuntimeContainers.razor*`, `src/DockerUpdateGuard/wwwroot/app.css` | AC1–AC10 | 5 | Dev | [ ] | +| 7 | G2 | Update `docs/areas/web-ui.md` as *Documentation updates* says, against the green code | `docs/areas/web-ui.md` | AC10 | 6 | Dev | [ ] | +| 8 | PM | Manual check of AC9 at 390, 768, 959, 1024 and 1280 px on a local build of the branch head | — | AC9 | 7 | Product Manager | [ ] | From 611ec115f766b7b7eb40aca48b71647695534723 Mon Sep 17 00:00:00 2001 From: Claude Date: Mon, 30 Nov 2026 18:26:03 +0000 Subject: [PATCH 07/28] Add the plan challenge notes of feature 455 --- .../log.md | 2 ++ .../plan.md | 27 +++++++++++++++++++ 2 files changed, 29 insertions(+) diff --git a/specs/feature-455-runtime-containers-columns/log.md b/specs/feature-455-runtime-containers-columns/log.md index 56442e51..ad23d535 100644 --- a/specs/feature-455-runtime-containers-columns/log.md +++ b/specs/feature-455-runtime-containers-columns/log.md @@ -10,3 +10,5 @@ are quoted in full. | 2026-11-30 18:16 | 2a Spec challenge | Devil's Advocate | VERDICT: OBJECTIONS 1 major, 3 minor. Major: the rescan layout (Checked time left, button right) needs a change to VulnerabilityRescanControl, shared with MyImages and ObservedImages, which are out of scope; spec must decide (layout option or page-scoped CSS) and place the error message and tooltip. Minor: AC9 must check 1024 px table and 959 px cards (MudBlazor Breakpoint.Md is 1280 px today); S7 omits status Findings detected with 0 active findings; order of the Vulnerabilities cell lines with base images not fixed (opus/medium · 72,611 tokens · 21 tool uses · 103 s · 38 in · 10,643 out · 923,259 cache read · 70,232 cache write · 374,412 weighted) | | 2026-11-30 18:18 | 2a Spec revise (challenge) | Lead | RESULT: DONE. All four objections accepted: other pages keep today's VulnerabilityRescanControl rendering (S9a), card breakpoint of this page moves to 960 px, Findings detected with 0 active findings (E10), line order fixed in S9 and AC6 (opus/medium · 21,330 tokens · 13 tool uses · 57 s · 14 in · 6,632 out · 626,320 cache read · 11,425 cache write · 157,542 weighted · continued) | | 2026-11-30 18:23 | 2b Plan | Lead | RESULT: DONE. Spec approved by Lead; plan.md and tasks.md written, tier standard, no security areas; decision record 0082 (Proposed); rescan control gets LeadingContent/TrailingContent fragments; page moves to Breakpoint.Sm (opus/medium · 68,836 tokens · 37 tool uses · 341 s · 72 in · 35,591 out · 5,144,090 cache read · 67,954 cache write · 1,040,348 weighted · continued) | +| 2026-11-30 18:25 | 2b Plan challenge | Devil's Advocate | VERDICT: OBJECTIONS 0 major, 3 minor. (1) split layout: .vulnerability-rescan-control .table-secondary inline rule would put lines side by side, make them block in __details and assert in a stylesheet test; (2) card-mode rules for __container, __update, __vulnerabilities stacking after __update-state rules are removed; (3) table-only rules must use @media (min-width: 960.02px) so they never overlap MudBlazor's 960 px card query (opus/medium · 79,977 tokens · 17 tool uses · 111 s · 32 in · 10,683 out · 875,707 cache read · 77,472 cache write · 388,145 weighted) | +| 2026-11-30 18:26 | 2b Challenge notes | Orchestrator | minor objections appended verbatim to plan.md | diff --git a/specs/feature-455-runtime-containers-columns/plan.md b/specs/feature-455-runtime-containers-columns/plan.md index ad6649de..cb73609e 100644 --- a/specs/feature-455-runtime-containers-columns/plan.md +++ b/specs/feature-455-runtime-containers-columns/plan.md @@ -196,3 +196,30 @@ No guarantee of `.squad/project.md` or `docs/ARCHITECTURE.md` changes: the page starts below 960 px (`max-width: 959.98px`) while `Breakpoint.Sm` cards include 960 px, and the other list pages still use `Breakpoint.Md` (cards up to 1280 px, unframed from 960 px), which `web-ui.md` *Shared display* does not say. Body: the facts 9 and 11 above, the affected pages, and the decision to take for the shared rule. + +## Challenge notes + +Devil's Advocate, plan mode: feature 455 (Runtime Containers columns) + +I checked the plan's claims against the code at aab6671. They hold: +- Fact 3: a failed check writes only the status, message and time and leaves the findings active (`Images/VulnerabilityEnrichmentService.cs:337-357`, `:458`). Decision 0082's second chip is needed. +- Fact 5: `HighestSeverity` returns `Unknown` when only `OtherCount` is set (`UI/VulnerabilitySeveritySummaryViewData.cs:43-68`), and `GetSeverityTone` falls back to low (`UI/StatusToneFormatter.cs`). +- Facts 6 and 8: all seven update-state texts (`ApplicationViewService.cs:227-239`) and all seven vulnerability-status texts (`VulnerabilityViewMapper.cs:193-205`) have a tone. The rescan control is used only on MyImages:85, ObservedImages:143 and RuntimeContainers:139. +- Fact 9: MudBlazor 9.14.0 has `mud-sm-table` at `max-width: 960px` and `mud-md-table` at `max-width: 1280px` (`/root/.nuget/packages/mudblazor/9.14.0/staticwebassets/MudBlazor.min.css`). +- The signatures and test setup work: `InternalsVisibleTo` exists (`AssemblyInfo.cs:3`), so `internal static` is testable; the `SectionPanel` and `PageHeader` parameters exist; `FormatCount(int, string, string)` exists. +- The existing page tests survive: `Find("button")` in `RuntimeContainersTests.cs:109,186` still finds the header button first. +- `web-ui.md` has 4,896 words. + +On need, alternatives and scope: option 1 (fragments on the rescan control) is sound, and the other pages keep today's markup. + +### Objections + +1. **minor**: with the existing CSS, the split layout puts its lines side by side instead of stacking them. `app.css:578-581` sets `.vulnerability-rescan-control .table-secondary { display: inline; margin-top: 0 }`. In the split layout that rule also hits every `table-secondary` inside `__details`: `Checked …`, the rescan error and the base image summary. With the inline chips next to them, they run on one line. Instruction for the Dev: in the `--split` rules, make the `table-secondary` lines inside `__details` block-level again (`display: block`), or scope the inline rule to the control without `--split`. Instruction for the Tester: add a stylesheet assertion for that rule. The planned markup test `VulnerabilityRescanControlWithLeadingAndTrailingContentRendersSplitLayout` cannot catch this. + +2. **minor**: the plan gives no card-mode rule for the multi-line cells once the `__update-state` rules go. Below 960 px every cell is `display: flex; justify-content: space-between; align-items: center` (`app.css:1117` onward, `.section-table .mud-table-body .mud-table-cell`). Only `__update-state` gets `flex-direction: column` (`app.css:1152-1160`), and the plan deletes those rules. Without a replacement: + - the Container cell (name link, tag line, `Own image · …` link) lays out as one row; + - so does the Update cell (chip and version). + + S12 asks for "a label in front of each value". Instruction for the Dev: inside the `max-width: 959.98px` block, add a rule for `__container`, `__update` and `__vulnerabilities` that keeps the label first and stacks the cell's lines, the way `__update-state` does today. Instruction for the Tester: assert that rule in `AppStylesheetRuntimeContainersTests`. + +3. **minor**: the `min-width: 1100px` rule also applies at exactly 960 px, where MudBlazor already shows cards. The plan puts `.runtime-containers-table .mud-table-root { min-width: 1100px }` and the column widths in `@media (min-width: 960px)`. MudBlazor's card query is `max-width: 960px`, so at 960 px the unframed cards (S12) are also forced 1100 px wide and scroll inside the panel. Instruction for the Dev and Tester: use `@media (min-width: 960.02px)` for the table-only rules, so they never overlap MudBlazor's card query. `AppStylesheetRuntimeContainersTableScrollsInsidePanelFrom960Px` should then assert that query instead of `min-width: 960px`. From c26295641a82966e4760eb6240cc905ff70d9b90 Mon Sep 17 00:00:00 2001 From: Claude Date: Mon, 30 Nov 2026 18:28:29 +0000 Subject: [PATCH 08/28] Add the skeleton of group G1 Co-Authored-By: Claude Sonnet 5.5 Claude-Session: https://claude.ai/code/session_018g33AT69TTfqZphLy7AF18 --- .../log.md | 1 + .../tasks.md | 2 +- .../VulnerabilityRescanControl.razor.cs | 12 ++++++ .../UI/RuntimeContainerListFormatter.cs | 41 +++++++++++++++++++ 4 files changed, 55 insertions(+), 1 deletion(-) create mode 100644 src/DockerUpdateGuard/UI/RuntimeContainerListFormatter.cs diff --git a/specs/feature-455-runtime-containers-columns/log.md b/specs/feature-455-runtime-containers-columns/log.md index ad23d535..4ebc75b4 100644 --- a/specs/feature-455-runtime-containers-columns/log.md +++ b/specs/feature-455-runtime-containers-columns/log.md @@ -12,3 +12,4 @@ are quoted in full. | 2026-11-30 18:23 | 2b Plan | Lead | RESULT: DONE. Spec approved by Lead; plan.md and tasks.md written, tier standard, no security areas; decision record 0082 (Proposed); rescan control gets LeadingContent/TrailingContent fragments; page moves to Breakpoint.Sm (opus/medium · 68,836 tokens · 37 tool uses · 341 s · 72 in · 35,591 out · 5,144,090 cache read · 67,954 cache write · 1,040,348 weighted · continued) | | 2026-11-30 18:25 | 2b Plan challenge | Devil's Advocate | VERDICT: OBJECTIONS 0 major, 3 minor. (1) split layout: .vulnerability-rescan-control .table-secondary inline rule would put lines side by side, make them block in __details and assert in a stylesheet test; (2) card-mode rules for __container, __update, __vulnerabilities stacking after __update-state rules are removed; (3) table-only rules must use @media (min-width: 960.02px) so they never overlap MudBlazor's 960 px card query (opus/medium · 79,977 tokens · 17 tool uses · 111 s · 32 in · 10,683 out · 875,707 cache read · 77,472 cache write · 388,145 weighted) | | 2026-11-30 18:26 | 2b Challenge notes | Orchestrator | minor objections appended verbatim to plan.md | +| 2026-11-30 18:28 | 4 Skeleton (G1) | Dev | RESULT: DONE. RuntimeContainerListFormatter (3 members, bodies throw) and LeadingContent/TrailingContent parameters added; Release build 0 warnings, no pragmas, no deviations (sonnet/medium · 89,199 tokens · 11 tool uses · 130 s · 18 in · 4,300 out · 672,453 cache read · 88,426 cache write · 199,296 weighted) | diff --git a/specs/feature-455-runtime-containers-columns/tasks.md b/specs/feature-455-runtime-containers-columns/tasks.md index 4efa7801..c441e39c 100644 --- a/specs/feature-455-runtime-containers-columns/tasks.md +++ b/specs/feature-455-runtime-containers-columns/tasks.md @@ -4,7 +4,7 @@ Plan: [plan.md](plan.md) | # | Group | Task | Files | Criteria | Depends on | Owner | Done | | - | ----- | ---- | ----- | -------- | ---------- | ----- | ---- | -| 1 | G1 | Skeleton: `RuntimeContainerListFormatter` with `FormatInventoryMeta`, `FormatActiveFindings`, `IsStatusShownBesideSeverity`, and the `RenderFragment` parameters `LeadingContent`, `TrailingContent` of `VulnerabilityRescanControl` (*Signatures*) | `src/DockerUpdateGuard/UI/RuntimeContainerListFormatter.cs`, `src/DockerUpdateGuard/Components/Common/VulnerabilityRescanControl.razor.cs` | AC1, AC5, AC6 | — | Dev | [ ] | +| 1 | G1 | Skeleton: `RuntimeContainerListFormatter` with `FormatInventoryMeta`, `FormatActiveFindings`, `IsStatusShownBesideSeverity`, and the `RenderFragment` parameters `LeadingContent`, `TrailingContent` of `VulnerabilityRescanControl` (*Signatures*) | `src/DockerUpdateGuard/UI/RuntimeContainerListFormatter.cs`, `src/DockerUpdateGuard/Components/Common/VulnerabilityRescanControl.razor.cs` | AC1, AC5, AC6 | — | Dev | [x] | | 2 | G1 | Failing tests for the formatter and the split rescan layout; retag stale ids in `VulnerabilityRescanControlTests.cs` | `src/Tests/DockerUpdateGuard.Tests/RuntimeContainerListFormatterTests.cs`, `src/Tests/DockerUpdateGuard.Tests/VulnerabilityRescanControlTests.cs` | AC1, AC5, AC6, AC8 | 1 | Tester | [ ] | | 3 | G1 | Implement the formatter and the split layout with its `--split` CSS | `src/DockerUpdateGuard/UI/RuntimeContainerListFormatter.cs`, `src/DockerUpdateGuard/Components/Common/VulnerabilityRescanControl.razor*`, `src/DockerUpdateGuard/wwwroot/app.css` | AC1, AC5, AC6 | 2 | Dev | [ ] | | 4 | G2 | Skeleton: no new API (the page's helpers are removed in task 6) | — | AC10 | 3 | Dev | [ ] | diff --git a/src/DockerUpdateGuard/Components/Common/VulnerabilityRescanControl.razor.cs b/src/DockerUpdateGuard/Components/Common/VulnerabilityRescanControl.razor.cs index f486adfb..7704e017 100644 --- a/src/DockerUpdateGuard/Components/Common/VulnerabilityRescanControl.razor.cs +++ b/src/DockerUpdateGuard/Components/Common/VulnerabilityRescanControl.razor.cs @@ -46,6 +46,18 @@ public partial class VulnerabilityRescanControl [Parameter] public EventCallback OnRescanned { get; set; } + /// + /// Optional content rendered before the rescan controls + /// + [Parameter] + public RenderFragment? LeadingContent { get; set; } + + /// + /// Optional content rendered after the rescan controls + /// + [Parameter] + public RenderFragment? TrailingContent { get; set; } + /// /// Service-scope factory /// diff --git a/src/DockerUpdateGuard/UI/RuntimeContainerListFormatter.cs b/src/DockerUpdateGuard/UI/RuntimeContainerListFormatter.cs new file mode 100644 index 00000000..abac7795 --- /dev/null +++ b/src/DockerUpdateGuard/UI/RuntimeContainerListFormatter.cs @@ -0,0 +1,41 @@ +namespace DockerUpdateGuard.UI; + +/// +/// Composes the texts and display decisions of the runtime container list +/// +internal static class RuntimeContainerListFormatter +{ + #region Methods + + /// + /// Formats the inventory meta text shown in the page header + /// + /// Listed runtime containers + /// Meta text + public static string FormatInventoryMeta(IReadOnlyList containers) + { + throw new InvalidOperationException("Skeleton: not implemented"); + } + + /// + /// Formats the count line of the active findings + /// + /// Active finding counts per severity + /// Count line + public static string FormatActiveFindings(VulnerabilitySeveritySummaryViewData summary) + { + throw new InvalidOperationException("Skeleton: not implemented"); + } + + /// + /// Determines whether the vulnerability status is shown as a chip beside the severity chip + /// + /// Listed runtime container + /// true when the status chip is shown + public static bool IsStatusShownBesideSeverity(RuntimeContainerListItemData container) + { + throw new InvalidOperationException("Skeleton: not implemented"); + } + + #endregion // Methods +} \ No newline at end of file From ab41c29e52529d8f16f1076bcb6b7361080703b5 Mon Sep 17 00:00:00 2001 From: Claude Date: Mon, 30 Nov 2026 18:32:10 +0000 Subject: [PATCH 09/28] Add the failing tests of group G1 Co-Authored-By: Claude Sonnet 5.5 Claude-Session: https://claude.ai/code/session_018g33AT69TTfqZphLy7AF18 --- .../log.md | 1 + .../tasks.md | 2 +- .../AppStylesheetRescanControlTests.cs | 67 +++++++++++ .../RuntimeContainerListFormatterTests.cs | 104 ++++++++++++++++++ .../VulnerabilityRescanControlTests.cs | 87 ++++++++++++++- 5 files changed, 257 insertions(+), 4 deletions(-) create mode 100644 src/Tests/DockerUpdateGuard.Tests/AppStylesheetRescanControlTests.cs create mode 100644 src/Tests/DockerUpdateGuard.Tests/RuntimeContainerListFormatterTests.cs diff --git a/specs/feature-455-runtime-containers-columns/log.md b/specs/feature-455-runtime-containers-columns/log.md index 4ebc75b4..bb3360db 100644 --- a/specs/feature-455-runtime-containers-columns/log.md +++ b/specs/feature-455-runtime-containers-columns/log.md @@ -13,3 +13,4 @@ are quoted in full. | 2026-11-30 18:25 | 2b Plan challenge | Devil's Advocate | VERDICT: OBJECTIONS 0 major, 3 minor. (1) split layout: .vulnerability-rescan-control .table-secondary inline rule would put lines side by side, make them block in __details and assert in a stylesheet test; (2) card-mode rules for __container, __update, __vulnerabilities stacking after __update-state rules are removed; (3) table-only rules must use @media (min-width: 960.02px) so they never overlap MudBlazor's 960 px card query (opus/medium · 79,977 tokens · 17 tool uses · 111 s · 32 in · 10,683 out · 875,707 cache read · 77,472 cache write · 388,145 weighted) | | 2026-11-30 18:26 | 2b Challenge notes | Orchestrator | minor objections appended verbatim to plan.md | | 2026-11-30 18:28 | 4 Skeleton (G1) | Dev | RESULT: DONE. RuntimeContainerListFormatter (3 members, bodies throw) and LeadingContent/TrailingContent parameters added; Release build 0 warnings, no pragmas, no deviations (sonnet/medium · 89,199 tokens · 11 tool uses · 130 s · 18 in · 4,300 out · 672,453 cache read · 88,426 cache write · 199,296 weighted) | +| 2026-11-30 18:32 | 5 Tests first (G1) | Tester | RESULT: DONE. 14 formatter cases, 2 split-layout tests and 1 stylesheet test fail on the skeleton (confirmed by the orchestrator: 17 failed, 7 existing passed); stale ids retagged. Deferred: VulnerabilityRescanControlWithoutContentKeepsInlineLayout (sonnet/medium · 120,258 tokens · 16 tool uses · 179 s · 32 in · 11,737 out · 1,567,477 cache read · 66,587 cache write · 298,698 weighted) | diff --git a/specs/feature-455-runtime-containers-columns/tasks.md b/specs/feature-455-runtime-containers-columns/tasks.md index c441e39c..abd3face 100644 --- a/specs/feature-455-runtime-containers-columns/tasks.md +++ b/specs/feature-455-runtime-containers-columns/tasks.md @@ -5,7 +5,7 @@ Plan: [plan.md](plan.md) | # | Group | Task | Files | Criteria | Depends on | Owner | Done | | - | ----- | ---- | ----- | -------- | ---------- | ----- | ---- | | 1 | G1 | Skeleton: `RuntimeContainerListFormatter` with `FormatInventoryMeta`, `FormatActiveFindings`, `IsStatusShownBesideSeverity`, and the `RenderFragment` parameters `LeadingContent`, `TrailingContent` of `VulnerabilityRescanControl` (*Signatures*) | `src/DockerUpdateGuard/UI/RuntimeContainerListFormatter.cs`, `src/DockerUpdateGuard/Components/Common/VulnerabilityRescanControl.razor.cs` | AC1, AC5, AC6 | — | Dev | [x] | -| 2 | G1 | Failing tests for the formatter and the split rescan layout; retag stale ids in `VulnerabilityRescanControlTests.cs` | `src/Tests/DockerUpdateGuard.Tests/RuntimeContainerListFormatterTests.cs`, `src/Tests/DockerUpdateGuard.Tests/VulnerabilityRescanControlTests.cs` | AC1, AC5, AC6, AC8 | 1 | Tester | [ ] | +| 2 | G1 | Failing tests for the formatter and the split rescan layout; retag stale ids in `VulnerabilityRescanControlTests.cs` | `src/Tests/DockerUpdateGuard.Tests/RuntimeContainerListFormatterTests.cs`, `src/Tests/DockerUpdateGuard.Tests/VulnerabilityRescanControlTests.cs` | AC1, AC5, AC6, AC8 | 1 | Tester | [x] | | 3 | G1 | Implement the formatter and the split layout with its `--split` CSS | `src/DockerUpdateGuard/UI/RuntimeContainerListFormatter.cs`, `src/DockerUpdateGuard/Components/Common/VulnerabilityRescanControl.razor*`, `src/DockerUpdateGuard/wwwroot/app.css` | AC1, AC5, AC6 | 2 | Dev | [ ] | | 4 | G2 | Skeleton: no new API (the page's helpers are removed in task 6) | — | AC10 | 3 | Dev | [ ] | | 5 | G2 | Failing render and stylesheet tests of the page; retag stale ids in `RuntimeContainersTests.cs` | `src/Tests/DockerUpdateGuard.Tests/RuntimeContainersRenderTests.cs`, `src/Tests/DockerUpdateGuard.Tests/AppStylesheetRuntimeContainersTests.cs`, `src/Tests/DockerUpdateGuard.Tests/RuntimeContainersTests.cs` | AC1–AC9 | 4 | Tester | [ ] | diff --git a/src/Tests/DockerUpdateGuard.Tests/AppStylesheetRescanControlTests.cs b/src/Tests/DockerUpdateGuard.Tests/AppStylesheetRescanControlTests.cs new file mode 100644 index 00000000..06d152d7 --- /dev/null +++ b/src/Tests/DockerUpdateGuard.Tests/AppStylesheetRescanControlTests.cs @@ -0,0 +1,67 @@ +using DockerUpdateGuard.Tests.Helper; + +namespace DockerUpdateGuard.Tests; + +/// +/// Tests for the rules of wwwroot/app.css that style the vulnerability rescan control +/// +[TestClass] +public class AppStylesheetRescanControlTests +{ + #region Constants + + /// + /// Shipped stylesheet below the host project directory + /// + private const string StylesheetPath = "wwwroot/app.css"; + + /// + /// Class of the split layout + /// + private const string SplitClass = "vulnerability-rescan-control--split"; + + #endregion // Constants + + #region Methods + + /// + /// Verify the lines of the split layout's details part are block-level again, although the control's inline rule hits every secondary text of the control + /// + [TestMethod] + [TestCategory("AC6")] + public void AppStylesheetRescanControlSplitDetailsLinesAreBlockLevel() + { + var rules = StylesheetReader.GetRules(StylesheetReader.ReadHostFile(StylesheetPath)) + .SelectMany(rule => StylesheetReader.SplitTopLevel(rule.Selector, ',').Select(entry => (Entry: entry, rule.Body))) + .Where(rule => rule.Entry.Contains("table-secondary", StringComparison.Ordinal)) + .ToList(); + var blockRules = rules.Where(rule => rule.Entry.Contains(SplitClass, StringComparison.Ordinal) + && rule.Entry.Contains("__details", StringComparison.Ordinal) + && HasDisplay(rule.Body, "block")) + .ToList(); + var inlineRules = rules.Where(rule => HasDisplay(rule.Body, "inline")) + .ToList(); + var inlineScopedAway = inlineRules.Count > 0 + && inlineRules.All(rule => rule.Entry.Contains($":not(.{SplitClass})", StringComparison.Ordinal)); + + Assert.IsTrue(blockRules.Count > 0 || inlineScopedAway, "The table-secondary lines inside the split layout's details part must be display: block, or the inline rule must exclude the split layout"); + } + + #endregion // Methods + + #region Helper methods + + /// + /// Check whether a rule body sets display to a value + /// + /// Rule body + /// Expected display value + /// true when the body declares it + private static bool HasDisplay(string body, string value) + { + return StylesheetReader.GetDeclarationList(body) + .Any(declaration => declaration.Name == "display" && declaration.Value == value); + } + + #endregion // Helper methods +} \ No newline at end of file diff --git a/src/Tests/DockerUpdateGuard.Tests/RuntimeContainerListFormatterTests.cs b/src/Tests/DockerUpdateGuard.Tests/RuntimeContainerListFormatterTests.cs new file mode 100644 index 00000000..f7754ce2 --- /dev/null +++ b/src/Tests/DockerUpdateGuard.Tests/RuntimeContainerListFormatterTests.cs @@ -0,0 +1,104 @@ +using DockerUpdateGuard.UI; + +namespace DockerUpdateGuard.Tests; + +/// +/// Tests for +/// +[TestClass] +public class RuntimeContainerListFormatterTests +{ + #region Methods + + /// + /// Verify the inventory meta text counts containers and distinct Docker instances with singular and plural nouns + /// + /// Number of listed containers + /// Number of distinct Docker instances + /// Expected meta text + [TestMethod] + [TestCategory("AC1")] + [DataRow(1, 1, "1 container on 1 Docker instance")] + [DataRow(2, 1, "2 containers on 1 Docker instance")] + [DataRow(23, 2, "23 containers on 2 Docker instances")] + public void RuntimeContainerListFormatterFormatInventoryMetaUsesSingularAndPlural(int containerCount, int instanceCount, string expected) + { + var instanceIds = Enumerable.Range(0, instanceCount).Select(_ => Guid.NewGuid()).ToList(); + var containers = Enumerable.Range(0, containerCount) + .Select(index => new RuntimeContainerListItemData + { + DockerInstanceId = instanceIds[index % instanceCount], + ContainerName = $"container-{index}" + }) + .ToList(); + + var meta = RuntimeContainerListFormatter.FormatInventoryMeta(containers); + + Assert.AreEqual(expected, meta, "The meta text must count containers and distinct Docker instances"); + } + + /// + /// Verify the count line lists the counts above zero in the order critical, high, medium, low, unknown + /// + /// Critical count + /// High count + /// Medium count + /// Low count + /// Unknown count + /// Expected count line + [TestMethod] + [TestCategory("AC5")] + [DataRow(1, 2, 0, 0, 0, "3 active · 1 critical, 2 high")] + [DataRow(1, 2, 3, 4, 5, "15 active · 1 critical, 2 high, 3 medium, 4 low, 5 unknown")] + [DataRow(0, 0, 0, 0, 4, "4 active · 4 unknown")] + [DataRow(0, 0, 0, 0, 0, "")] + public void RuntimeContainerListFormatterFormatActiveFindingsListsCountsInSeverityOrder(int critical, int high, int medium, int low, int other, string expected) + { + var summary = new VulnerabilitySeveritySummaryViewData + { + CriticalCount = critical, + HighCount = high, + MediumCount = medium, + LowCount = low, + OtherCount = other, + }; + + var line = RuntimeContainerListFormatter.FormatActiveFindings(summary); + + Assert.AreEqual(expected, line, "The count line must list the counts above zero in severity order"); + } + + /// + /// Verify the status chip stands beside the severity chip only with active findings and a status other than Findings detected + /// + /// Active high findings + /// Vulnerability status + /// Expected decision + [TestMethod] + [TestCategory("AC5")] + [DataRow(2, "Failed", true)] + [DataRow(2, "Unavailable", true)] + [DataRow(2, "No findings", true)] + [DataRow(2, "Findings detected", false)] + [DataRow(2, "findings detected", false)] + [DataRow(0, "Failed", false)] + [DataRow(0, "Findings detected", false)] + public void RuntimeContainerListFormatterIsStatusShownBesideSeverityOnlyForOtherStatuses(int highCount, string status, bool expected) + { + var container = new RuntimeContainerListItemData + { + VulnerabilityStatus = status, + ActiveVulnerabilityFindingCount = highCount, + VulnerabilitySeveritySummary = new VulnerabilitySeveritySummaryViewData + { + HighCount = highCount + }, + }; + + var shown = RuntimeContainerListFormatter.IsStatusShownBesideSeverity(container); + + Assert.AreEqual(expected, shown, $"The status '{status}' with {highCount} active findings must decide the status chip as expected"); + } + + #endregion // Methods +} \ No newline at end of file diff --git a/src/Tests/DockerUpdateGuard.Tests/VulnerabilityRescanControlTests.cs b/src/Tests/DockerUpdateGuard.Tests/VulnerabilityRescanControlTests.cs index 4b2ff4ff..1c68b84b 100644 --- a/src/Tests/DockerUpdateGuard.Tests/VulnerabilityRescanControlTests.cs +++ b/src/Tests/DockerUpdateGuard.Tests/VulnerabilityRescanControlTests.cs @@ -29,7 +29,7 @@ public class VulnerabilityRescanControlTests /// /// Task [TestMethod] - [TestCategory("AC3")] + [TestCategory("AC6")] public async Task VulnerabilityRescanControlWithCheckedAtShowsUtcTimestampAsync() { var testContext = BlazorTestContextFactory.Create(); @@ -156,7 +156,7 @@ public async Task VulnerabilityRescanControlWithoutCheckedAtShowsNeverScannedAsy /// /// Task [TestMethod] - [TestCategory("AC10")] + [TestCategory("AC6")] public async Task VulnerabilityRescanControlButtonHasAriaLabelAndTooltip() { var testContext = BlazorTestContextFactory.Create(); @@ -178,7 +178,7 @@ public async Task VulnerabilityRescanControlButtonHasAriaLabelAndTooltip() /// /// Task [TestMethod] - [TestCategory("AC10")] + [TestCategory("AC8")] public async Task VulnerabilityRescanControlRunningRescanDisablesButton() { var testContext = BlazorTestContextFactory.Create(); @@ -205,5 +205,86 @@ public async Task VulnerabilityRescanControlRunningRescanDisablesButton() } } + /// + /// Verify leading and trailing content render in the split layout: details part with the content around the time, then the button + /// + /// Task + [TestMethod] + [TestCategory("AC6")] + public async Task VulnerabilityRescanControlWithLeadingAndTrailingContentRendersSplitLayout() + { + var testContext = BlazorTestContextFactory.Create(); + + await using (testContext) + { + testContext.Services.AddSingleton(Substitute.For()); + + var component = RenderSplit(testContext); + var root = component.Find("div.vulnerability-rescan-control.vulnerability-rescan-control--split"); + var details = root.QuerySelector("div.vulnerability-rescan-control__details"); + var markup = root.InnerHtml; + + Assert.IsNotNull(details, "The split layout must wrap its lines in a details part"); + Assert.IsNull(details.QuerySelector("button"), "The rescan button must stay outside the details part"); + Assert.IsNotNull(root.QuerySelector("button"), "The split layout must still render the rescan button"); + Assert.IsLessThan(markup.IndexOf("Checked 2026-11-23", StringComparison.Ordinal), markup.IndexOf("LEADING-LINE", StringComparison.Ordinal), "The leading content must come before the check time"); + Assert.IsLessThan(markup.IndexOf("TRAILING-LINE", StringComparison.Ordinal), markup.IndexOf("Checked 2026-11-23", StringComparison.Ordinal), "The trailing content must come after the check time"); + Assert.IsLessThan(markup.IndexOf(" + /// Verify a failed rescan in the split layout shows its error inside the details part after the check time and before the trailing content + /// + /// Task + [TestMethod] + [TestCategory("AC6")] + public async Task VulnerabilityRescanControlFailedRescanInSplitLayoutShowsErrorBeforeTrailingContentAsync() + { + var testContext = BlazorTestContextFactory.Create(); + + await using (testContext) + { + var enrichmentService = Substitute.For(); + + enrichmentService.RefreshImageVersionAsync(Arg.Any(), Arg.Any(), Arg.Any()) + .Returns(Task.FromException(new ReportableException("provider is not configured"))); + + testContext.Services.AddSingleton(enrichmentService); + testContext.Services.AddSingleton>(new TestLogger()); + + var component = RenderSplit(testContext); + + await component.Find("button").ClickAsync().ConfigureAwait(false); + + var details = component.Find("div.vulnerability-rescan-control__details"); + var markup = details.InnerHtml; + var errorIndex = markup.IndexOf("Vulnerability rescan failed: provider is not configured", StringComparison.Ordinal); + + Assert.IsGreaterThanOrEqualTo(0, errorIndex, "The error must be shown inside the details part"); + Assert.IsLessThan(errorIndex, markup.IndexOf("Checked 2026-11-23", StringComparison.Ordinal), "The error must come after the check time"); + Assert.IsLessThan(markup.IndexOf("TRAILING-LINE", StringComparison.Ordinal), errorIndex, "The error must come before the trailing content"); + } + } + #endregion // Methods + + #region Helper methods + + /// + /// Render the control with marked leading and trailing content + /// + /// Test context + /// Rendered control + private static IRenderedComponent RenderSplit(BunitContext testContext) + { + return testContext.Render(parameters => parameters.Add(control => control.ImageVersionId, Guid.NewGuid()) + .Add(control => control.CheckedAtUtc, new DateTimeOffset(2026, 11, 23, 23, 27, 0, TimeSpan.FromHours(2))) + .Add(control => control.LeadingContent, builder => builder.AddMarkupContent(0, "LEADING-LINE")) + .Add(control => control.TrailingContent, builder => builder.AddMarkupContent(0, "TRAILING-LINE"))); + } + + #endregion // Helper methods } \ No newline at end of file From 36d5f4bbb08d7421593930cd7c7aa9fcc3f11336 Mon Sep 17 00:00:00 2001 From: Claude Date: Mon, 30 Nov 2026 18:33:59 +0000 Subject: [PATCH 10/28] Implement the formatter and split rescan layout of group G1 Co-Authored-By: Claude Sonnet 5.5 Claude-Session: https://claude.ai/code/session_018g33AT69TTfqZphLy7AF18 --- .../log.md | 1 + .../Common/VulnerabilityRescanControl.razor | 48 ++++++++++++++----- .../UI/RuntimeContainerListFormatter.cs | 42 ++++++++++++++-- src/DockerUpdateGuard/wwwroot/app.css | 24 ++++++++++ 4 files changed, 100 insertions(+), 15 deletions(-) diff --git a/specs/feature-455-runtime-containers-columns/log.md b/specs/feature-455-runtime-containers-columns/log.md index bb3360db..fa5479aa 100644 --- a/specs/feature-455-runtime-containers-columns/log.md +++ b/specs/feature-455-runtime-containers-columns/log.md @@ -14,3 +14,4 @@ are quoted in full. | 2026-11-30 18:26 | 2b Challenge notes | Orchestrator | minor objections appended verbatim to plan.md | | 2026-11-30 18:28 | 4 Skeleton (G1) | Dev | RESULT: DONE. RuntimeContainerListFormatter (3 members, bodies throw) and LeadingContent/TrailingContent parameters added; Release build 0 warnings, no pragmas, no deviations (sonnet/medium · 89,199 tokens · 11 tool uses · 130 s · 18 in · 4,300 out · 672,453 cache read · 88,426 cache write · 199,296 weighted) | | 2026-11-30 18:32 | 5 Tests first (G1) | Tester | RESULT: DONE. 14 formatter cases, 2 split-layout tests and 1 stylesheet test fail on the skeleton (confirmed by the orchestrator: 17 failed, 7 existing passed); stale ids retagged. Deferred: VulnerabilityRescanControlWithoutContentKeepsInlineLayout (sonnet/medium · 120,258 tokens · 16 tool uses · 179 s · 32 in · 11,737 out · 1,567,477 cache read · 66,587 cache write · 298,698 weighted) | +| 2026-11-30 18:33 | 6 Implement (G1) | Dev | RESULT: DONE. Formatter implemented, split layout of VulnerabilityRescanControl with --split CSS (details lines block-level); Release build 0 warnings, DockerUpdateGuard.Tests 2803/2803 green; coverage and analyzer gates not yet run (sonnet/medium · 102,438 tokens · 7 tool uses · 98 s · 14 in · 4,277 out · 611,692 cache read · 46,514 cache write · 140,711 weighted) | diff --git a/src/DockerUpdateGuard/Components/Common/VulnerabilityRescanControl.razor b/src/DockerUpdateGuard/Components/Common/VulnerabilityRescanControl.razor index 54e4296e..74783b34 100644 --- a/src/DockerUpdateGuard/Components/Common/VulnerabilityRescanControl.razor +++ b/src/DockerUpdateGuard/Components/Common/VulnerabilityRescanControl.razor @@ -1,14 +1,38 @@ -
- @(CheckedAtUtc is DateTimeOffset checkedAtUtc ? $"Checked {TimestampFormatter.Format(checkedAtUtc)}" : "Never scanned") - - - -
-@if (string.IsNullOrWhiteSpace(_errorMessage) == false) +@if (LeadingContent is not null || TrailingContent is not null) { - @_errorMessage +
+
+ @LeadingContent + @(CheckedAtUtc is DateTimeOffset splitCheckedAtUtc ? $"Checked {TimestampFormatter.Format(splitCheckedAtUtc)}" : "Never scanned") + @if (string.IsNullOrWhiteSpace(_errorMessage) == false) + { + @_errorMessage + } + @TrailingContent +
+ + + +
} +else +{ +
+ @(CheckedAtUtc is DateTimeOffset checkedAtUtc ? $"Checked {TimestampFormatter.Format(checkedAtUtc)}" : "Never scanned") + + + +
+ @if (string.IsNullOrWhiteSpace(_errorMessage) == false) + { + @_errorMessage + } +} \ No newline at end of file diff --git a/src/DockerUpdateGuard/UI/RuntimeContainerListFormatter.cs b/src/DockerUpdateGuard/UI/RuntimeContainerListFormatter.cs index abac7795..914a3df2 100644 --- a/src/DockerUpdateGuard/UI/RuntimeContainerListFormatter.cs +++ b/src/DockerUpdateGuard/UI/RuntimeContainerListFormatter.cs @@ -14,7 +14,11 @@ internal static class RuntimeContainerListFormatter /// Meta text public static string FormatInventoryMeta(IReadOnlyList containers) { - throw new InvalidOperationException("Skeleton: not implemented"); + var instanceCount = containers.Select(container => container.DockerInstanceId) + .Distinct() + .Count(); + + return $"{DashboardTextFormatter.FormatCount(containers.Count, "container", "containers")} on {DashboardTextFormatter.FormatCount(instanceCount, "Docker instance", "Docker instances")}"; } /// @@ -24,7 +28,20 @@ public static string FormatInventoryMeta(IReadOnlyListCount line public static string FormatActiveFindings(VulnerabilitySeveritySummaryViewData summary) { - throw new InvalidOperationException("Skeleton: not implemented"); + if (summary.TotalCount == 0) + { + return string.Empty; + } + + var counts = new List(); + + AddCount(counts, summary.CriticalCount, "critical"); + AddCount(counts, summary.HighCount, "high"); + AddCount(counts, summary.MediumCount, "medium"); + AddCount(counts, summary.LowCount, "low"); + AddCount(counts, summary.OtherCount, "unknown"); + + return $"{summary.TotalCount} active · {string.Join(", ", counts)}"; } /// @@ -34,8 +51,27 @@ public static string FormatActiveFindings(VulnerabilitySeveritySummaryViewData s /// true when the status chip is shown public static bool IsStatusShownBesideSeverity(RuntimeContainerListItemData container) { - throw new InvalidOperationException("Skeleton: not implemented"); + return container.VulnerabilitySeveritySummary.TotalCount > 0 + && string.Equals(container.VulnerabilityStatus, "Findings detected", StringComparison.OrdinalIgnoreCase) == false; } #endregion // Methods + + #region Helper methods + + /// + /// Adds a count text when the count is above zero + /// + /// Count texts + /// Count + /// Severity label + private static void AddCount(List counts, int count, string label) + { + if (count > 0) + { + counts.Add($"{count} {label}"); + } + } + + #endregion // Helper methods } \ No newline at end of file diff --git a/src/DockerUpdateGuard/wwwroot/app.css b/src/DockerUpdateGuard/wwwroot/app.css index cb26e654..436dd9ca 100644 --- a/src/DockerUpdateGuard/wwwroot/app.css +++ b/src/DockerUpdateGuard/wwwroot/app.css @@ -580,6 +580,30 @@ a { margin-top: 0; } +.vulnerability-rescan-control--split { + display: grid; + grid-template-columns: minmax(0, 1fr) auto; + align-items: start; + gap: 0.35rem; +} + +.vulnerability-rescan-control--split > .mud-tooltip-root { + align-self: start; +} + +.vulnerability-rescan-control__details { + display: flex; + flex-direction: column; + align-items: flex-start; + gap: 0.2rem; + min-width: 0; +} + +.vulnerability-rescan-control--split .vulnerability-rescan-control__details .table-secondary { + display: block; + margin-top: 0; +} + .section-table { font-variant-numeric: tabular-nums; } From 5a4d8d2fc2a2e59de8eee27401a05ccd4501185c Mon Sep 17 00:00:00 2001 From: Claude Date: Mon, 30 Nov 2026 18:38:07 +0000 Subject: [PATCH 11/28] Cover the split rescan layout of group G1 Co-Authored-By: Claude Sonnet 5.5 Claude-Session: https://claude.ai/code/session_018g33AT69TTfqZphLy7AF18 --- .../log.md | 1 + .../tasks.md | 2 +- .../VulnerabilityRescanControlTests.cs | 69 +++++++++++++++++++ 3 files changed, 71 insertions(+), 1 deletion(-) diff --git a/specs/feature-455-runtime-containers-columns/log.md b/specs/feature-455-runtime-containers-columns/log.md index fa5479aa..23679ba8 100644 --- a/specs/feature-455-runtime-containers-columns/log.md +++ b/specs/feature-455-runtime-containers-columns/log.md @@ -15,3 +15,4 @@ are quoted in full. | 2026-11-30 18:28 | 4 Skeleton (G1) | Dev | RESULT: DONE. RuntimeContainerListFormatter (3 members, bodies throw) and LeadingContent/TrailingContent parameters added; Release build 0 warnings, no pragmas, no deviations (sonnet/medium · 89,199 tokens · 11 tool uses · 130 s · 18 in · 4,300 out · 672,453 cache read · 88,426 cache write · 199,296 weighted) | | 2026-11-30 18:32 | 5 Tests first (G1) | Tester | RESULT: DONE. 14 formatter cases, 2 split-layout tests and 1 stylesheet test fail on the skeleton (confirmed by the orchestrator: 17 failed, 7 existing passed); stale ids retagged. Deferred: VulnerabilityRescanControlWithoutContentKeepsInlineLayout (sonnet/medium · 120,258 tokens · 16 tool uses · 179 s · 32 in · 11,737 out · 1,567,477 cache read · 66,587 cache write · 298,698 weighted) | | 2026-11-30 18:33 | 6 Implement (G1) | Dev | RESULT: DONE. Formatter implemented, split layout of VulnerabilityRescanControl with --split CSS (details lines block-level); Release build 0 warnings, DockerUpdateGuard.Tests 2803/2803 green; coverage and analyzer gates not yet run (sonnet/medium · 102,438 tokens · 7 tool uses · 98 s · 14 in · 4,277 out · 611,692 cache read · 46,514 cache write · 140,711 weighted) | +| 2026-11-30 18:38 | 6 Coverage (G1) | Tester | RESULT: DONE. Deferred test VulnerabilityRescanControlWithoutContentKeepsInlineLayout plus two single-fragment tests added; coverage gate: new/changed code 100 % (29/29 lines, 18/18 conditions), overall 95.3 %; 2806 tests green (sonnet/medium · 90,518 tokens · 8 tool uses · 177 s · 14 in · 3,771 out · 563,396 cache read · 34,081 cache write · 117,810 weighted) | diff --git a/specs/feature-455-runtime-containers-columns/tasks.md b/specs/feature-455-runtime-containers-columns/tasks.md index abd3face..c65d6fa8 100644 --- a/specs/feature-455-runtime-containers-columns/tasks.md +++ b/specs/feature-455-runtime-containers-columns/tasks.md @@ -6,7 +6,7 @@ Plan: [plan.md](plan.md) | - | ----- | ---- | ----- | -------- | ---------- | ----- | ---- | | 1 | G1 | Skeleton: `RuntimeContainerListFormatter` with `FormatInventoryMeta`, `FormatActiveFindings`, `IsStatusShownBesideSeverity`, and the `RenderFragment` parameters `LeadingContent`, `TrailingContent` of `VulnerabilityRescanControl` (*Signatures*) | `src/DockerUpdateGuard/UI/RuntimeContainerListFormatter.cs`, `src/DockerUpdateGuard/Components/Common/VulnerabilityRescanControl.razor.cs` | AC1, AC5, AC6 | — | Dev | [x] | | 2 | G1 | Failing tests for the formatter and the split rescan layout; retag stale ids in `VulnerabilityRescanControlTests.cs` | `src/Tests/DockerUpdateGuard.Tests/RuntimeContainerListFormatterTests.cs`, `src/Tests/DockerUpdateGuard.Tests/VulnerabilityRescanControlTests.cs` | AC1, AC5, AC6, AC8 | 1 | Tester | [x] | -| 3 | G1 | Implement the formatter and the split layout with its `--split` CSS | `src/DockerUpdateGuard/UI/RuntimeContainerListFormatter.cs`, `src/DockerUpdateGuard/Components/Common/VulnerabilityRescanControl.razor*`, `src/DockerUpdateGuard/wwwroot/app.css` | AC1, AC5, AC6 | 2 | Dev | [ ] | +| 3 | G1 | Implement the formatter and the split layout with its `--split` CSS | `src/DockerUpdateGuard/UI/RuntimeContainerListFormatter.cs`, `src/DockerUpdateGuard/Components/Common/VulnerabilityRescanControl.razor*`, `src/DockerUpdateGuard/wwwroot/app.css` | AC1, AC5, AC6 | 2 | Dev | [x] | | 4 | G2 | Skeleton: no new API (the page's helpers are removed in task 6) | — | AC10 | 3 | Dev | [ ] | | 5 | G2 | Failing render and stylesheet tests of the page; retag stale ids in `RuntimeContainersTests.cs` | `src/Tests/DockerUpdateGuard.Tests/RuntimeContainersRenderTests.cs`, `src/Tests/DockerUpdateGuard.Tests/AppStylesheetRuntimeContainersTests.cs`, `src/Tests/DockerUpdateGuard.Tests/RuntimeContainersTests.cs` | AC1–AC9 | 4 | Tester | [ ] | | 6 | G2 | Rewrite the page markup, remove the color helpers, rework the `.runtime-containers-table*` rules | `src/DockerUpdateGuard/Components/Pages/RuntimeContainers.razor*`, `src/DockerUpdateGuard/wwwroot/app.css` | AC1–AC10 | 5 | Dev | [ ] | diff --git a/src/Tests/DockerUpdateGuard.Tests/VulnerabilityRescanControlTests.cs b/src/Tests/DockerUpdateGuard.Tests/VulnerabilityRescanControlTests.cs index 1c68b84b..2b973143 100644 --- a/src/Tests/DockerUpdateGuard.Tests/VulnerabilityRescanControlTests.cs +++ b/src/Tests/DockerUpdateGuard.Tests/VulnerabilityRescanControlTests.cs @@ -269,6 +269,75 @@ public async Task VulnerabilityRescanControlFailedRescanInSplitLayoutShowsErrorB } } + /// + /// Verify without leading and trailing content the control keeps the inline markup: no split class and no details part + /// + /// Task + [TestMethod] + [TestCategory("AC6")] + public async Task VulnerabilityRescanControlWithoutContentKeepsInlineLayout() + { + var testContext = BlazorTestContextFactory.Create(); + + await using (testContext) + { + testContext.Services.AddSingleton(Substitute.For()); + + var component = testContext.Render(parameters => parameters.Add(control => control.ImageVersionId, Guid.NewGuid()) + .Add(control => control.CheckedAtUtc, new DateTimeOffset(2026, 11, 23, 23, 27, 0, TimeSpan.FromHours(2)))); + + Assert.IsNotNull(component.Find("div.vulnerability-rescan-control"), "The inline layout must keep the control root"); + Assert.IsEmpty(component.FindAll("div.vulnerability-rescan-control--split"), "Without content the control must not render the split class"); + Assert.IsEmpty(component.FindAll("div.vulnerability-rescan-control__details"), "Without content the control must not render a details part"); + Assert.Contains("Checked 2026-11-23 21:27 UTC", component.Markup, "The inline layout must still show the check time"); + } + } + + /// + /// Verify the split layout with only trailing content and no check time shows the never-scanned hint inside the details part + /// + /// Task + [TestMethod] + [TestCategory("AC6")] + public async Task VulnerabilityRescanControlWithOnlyTrailingContentShowsNeverScannedInSplitLayout() + { + var testContext = BlazorTestContextFactory.Create(); + + await using (testContext) + { + testContext.Services.AddSingleton(Substitute.For()); + + var component = testContext.Render(parameters => parameters.Add(control => control.ImageVersionId, Guid.NewGuid()) + .Add(control => control.TrailingContent, builder => builder.AddMarkupContent(0, "TRAILING-LINE"))); + var details = component.Find("div.vulnerability-rescan-control--split div.vulnerability-rescan-control__details"); + + Assert.Contains("Never scanned", details.InnerHtml, "The split layout must show the never-scanned hint without a check time"); + Assert.Contains("TRAILING-LINE", details.InnerHtml, "Trailing content alone must select the split layout"); + } + } + + /// + /// Verify the split layout with only leading content selects the split layout + /// + /// Task + [TestMethod] + [TestCategory("AC6")] + public async Task VulnerabilityRescanControlWithOnlyLeadingContentRendersSplitLayout() + { + var testContext = BlazorTestContextFactory.Create(); + + await using (testContext) + { + testContext.Services.AddSingleton(Substitute.For()); + + var component = testContext.Render(parameters => parameters.Add(control => control.ImageVersionId, Guid.NewGuid()) + .Add(control => control.LeadingContent, builder => builder.AddMarkupContent(0, "LEADING-LINE"))); + var details = component.Find("div.vulnerability-rescan-control--split div.vulnerability-rescan-control__details"); + + Assert.Contains("LEADING-LINE", details.InnerHtml, "Leading content alone must select the split layout"); + } + } + #endregion // Methods #region Helper methods From 269b54f44ada85f7ac637b37996bea5d13f88394 Mon Sep 17 00:00:00 2001 From: Claude Date: Mon, 30 Nov 2026 18:38:12 +0000 Subject: [PATCH 12/28] Log the skipped skeleton of group G2 --- specs/feature-455-runtime-containers-columns/log.md | 1 + specs/feature-455-runtime-containers-columns/tasks.md | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/specs/feature-455-runtime-containers-columns/log.md b/specs/feature-455-runtime-containers-columns/log.md index 23679ba8..1711ff85 100644 --- a/specs/feature-455-runtime-containers-columns/log.md +++ b/specs/feature-455-runtime-containers-columns/log.md @@ -16,3 +16,4 @@ are quoted in full. | 2026-11-30 18:32 | 5 Tests first (G1) | Tester | RESULT: DONE. 14 formatter cases, 2 split-layout tests and 1 stylesheet test fail on the skeleton (confirmed by the orchestrator: 17 failed, 7 existing passed); stale ids retagged. Deferred: VulnerabilityRescanControlWithoutContentKeepsInlineLayout (sonnet/medium · 120,258 tokens · 16 tool uses · 179 s · 32 in · 11,737 out · 1,567,477 cache read · 66,587 cache write · 298,698 weighted) | | 2026-11-30 18:33 | 6 Implement (G1) | Dev | RESULT: DONE. Formatter implemented, split layout of VulnerabilityRescanControl with --split CSS (details lines block-level); Release build 0 warnings, DockerUpdateGuard.Tests 2803/2803 green; coverage and analyzer gates not yet run (sonnet/medium · 102,438 tokens · 7 tool uses · 98 s · 14 in · 4,277 out · 611,692 cache read · 46,514 cache write · 140,711 weighted) | | 2026-11-30 18:38 | 6 Coverage (G1) | Tester | RESULT: DONE. Deferred test VulnerabilityRescanControlWithoutContentKeepsInlineLayout plus two single-fragment tests added; coverage gate: new/changed code 100 % (29/29 lines, 18/18 conditions), overall 95.3 %; 2806 tests green (sonnet/medium · 90,518 tokens · 8 tool uses · 177 s · 14 in · 3,771 out · 563,396 cache read · 34,081 cache write · 117,810 weighted) | +| 2026-11-30 18:38 | 4 Skeleton skipped (G2) | Orchestrator | skipped — plan *Signatures*: G2 adds no API (tasks.md task 4), the page's helpers are only removed | diff --git a/specs/feature-455-runtime-containers-columns/tasks.md b/specs/feature-455-runtime-containers-columns/tasks.md index c65d6fa8..10a49d98 100644 --- a/specs/feature-455-runtime-containers-columns/tasks.md +++ b/specs/feature-455-runtime-containers-columns/tasks.md @@ -7,7 +7,7 @@ Plan: [plan.md](plan.md) | 1 | G1 | Skeleton: `RuntimeContainerListFormatter` with `FormatInventoryMeta`, `FormatActiveFindings`, `IsStatusShownBesideSeverity`, and the `RenderFragment` parameters `LeadingContent`, `TrailingContent` of `VulnerabilityRescanControl` (*Signatures*) | `src/DockerUpdateGuard/UI/RuntimeContainerListFormatter.cs`, `src/DockerUpdateGuard/Components/Common/VulnerabilityRescanControl.razor.cs` | AC1, AC5, AC6 | — | Dev | [x] | | 2 | G1 | Failing tests for the formatter and the split rescan layout; retag stale ids in `VulnerabilityRescanControlTests.cs` | `src/Tests/DockerUpdateGuard.Tests/RuntimeContainerListFormatterTests.cs`, `src/Tests/DockerUpdateGuard.Tests/VulnerabilityRescanControlTests.cs` | AC1, AC5, AC6, AC8 | 1 | Tester | [x] | | 3 | G1 | Implement the formatter and the split layout with its `--split` CSS | `src/DockerUpdateGuard/UI/RuntimeContainerListFormatter.cs`, `src/DockerUpdateGuard/Components/Common/VulnerabilityRescanControl.razor*`, `src/DockerUpdateGuard/wwwroot/app.css` | AC1, AC5, AC6 | 2 | Dev | [x] | -| 4 | G2 | Skeleton: no new API (the page's helpers are removed in task 6) | — | AC10 | 3 | Dev | [ ] | +| 4 | G2 | Skeleton: no new API (the page's helpers are removed in task 6) | — | AC10 | 3 | Dev | [x] | | 5 | G2 | Failing render and stylesheet tests of the page; retag stale ids in `RuntimeContainersTests.cs` | `src/Tests/DockerUpdateGuard.Tests/RuntimeContainersRenderTests.cs`, `src/Tests/DockerUpdateGuard.Tests/AppStylesheetRuntimeContainersTests.cs`, `src/Tests/DockerUpdateGuard.Tests/RuntimeContainersTests.cs` | AC1–AC9 | 4 | Tester | [ ] | | 6 | G2 | Rewrite the page markup, remove the color helpers, rework the `.runtime-containers-table*` rules | `src/DockerUpdateGuard/Components/Pages/RuntimeContainers.razor*`, `src/DockerUpdateGuard/wwwroot/app.css` | AC1–AC10 | 5 | Dev | [ ] | | 7 | G2 | Update `docs/areas/web-ui.md` as *Documentation updates* says, against the green code | `docs/areas/web-ui.md` | AC10 | 6 | Dev | [ ] | From f8eac4fe085ee6707e301ea4a00487b1248a9d62 Mon Sep 17 00:00:00 2001 From: Claude Date: Mon, 30 Nov 2026 18:43:58 +0000 Subject: [PATCH 13/28] Add the failing tests of group G2 Co-Authored-By: Claude Sonnet 5.5 Claude-Session: https://claude.ai/code/session_018g33AT69TTfqZphLy7AF18 --- .../log.md | 1 + .../tasks.md | 2 +- .../AppStylesheetRuntimeContainersTests.cs | 146 ++++ .../RuntimeContainersRenderTests.cs | 635 ++++++++++++++++++ .../RuntimeContainersTests.cs | 6 +- 5 files changed, 786 insertions(+), 4 deletions(-) create mode 100644 src/Tests/DockerUpdateGuard.Tests/AppStylesheetRuntimeContainersTests.cs create mode 100644 src/Tests/DockerUpdateGuard.Tests/RuntimeContainersRenderTests.cs diff --git a/specs/feature-455-runtime-containers-columns/log.md b/specs/feature-455-runtime-containers-columns/log.md index 1711ff85..a7791242 100644 --- a/specs/feature-455-runtime-containers-columns/log.md +++ b/specs/feature-455-runtime-containers-columns/log.md @@ -17,3 +17,4 @@ are quoted in full. | 2026-11-30 18:33 | 6 Implement (G1) | Dev | RESULT: DONE. Formatter implemented, split layout of VulnerabilityRescanControl with --split CSS (details lines block-level); Release build 0 warnings, DockerUpdateGuard.Tests 2803/2803 green; coverage and analyzer gates not yet run (sonnet/medium · 102,438 tokens · 7 tool uses · 98 s · 14 in · 4,277 out · 611,692 cache read · 46,514 cache write · 140,711 weighted) | | 2026-11-30 18:38 | 6 Coverage (G1) | Tester | RESULT: DONE. Deferred test VulnerabilityRescanControlWithoutContentKeepsInlineLayout plus two single-fragment tests added; coverage gate: new/changed code 100 % (29/29 lines, 18/18 conditions), overall 95.3 %; 2806 tests green (sonnet/medium · 90,518 tokens · 8 tool uses · 177 s · 14 in · 3,771 out · 563,396 cache read · 34,081 cache write · 117,810 weighted) | | 2026-11-30 18:38 | 4 Skeleton skipped (G2) | Orchestrator | skipped — plan *Signatures*: G2 adds no API (tasks.md task 4), the page's helpers are only removed | +| 2026-11-30 18:43 | 5 Tests first (G2) | Tester | RESULT: DONE. 22 page render cases and 13 stylesheet cases (42 incl. DataRows) fail on the current page (confirmed by the orchestrator: 42 failed, 6 existing passed); fact 10 confirmed (Breakpoint.Sm gives mud-sm-table); stale ids retagged. Deferred: RuntimeContainersRunningUpdateCheckDisablesButtonWithProgress, RuntimeContainersRescanReloadsListAndNotifiesDashboardAsync, RuntimeContainersRenderEmptyListShowsEmptyState, RuntimeContainersRenderLoadingShowsTableSkeletonWithTitle, RuntimeContainersRenderEncodesExternalTexts (sonnet/medium · 56,209 tokens · 18 tool uses · 309 s · 36 in · 26,991 out · 2,560,507 cache read · 118,364 cache write · 538,997 weighted · continued from 5 Tests first (G1)) | diff --git a/specs/feature-455-runtime-containers-columns/tasks.md b/specs/feature-455-runtime-containers-columns/tasks.md index 10a49d98..8c24064a 100644 --- a/specs/feature-455-runtime-containers-columns/tasks.md +++ b/specs/feature-455-runtime-containers-columns/tasks.md @@ -8,7 +8,7 @@ Plan: [plan.md](plan.md) | 2 | G1 | Failing tests for the formatter and the split rescan layout; retag stale ids in `VulnerabilityRescanControlTests.cs` | `src/Tests/DockerUpdateGuard.Tests/RuntimeContainerListFormatterTests.cs`, `src/Tests/DockerUpdateGuard.Tests/VulnerabilityRescanControlTests.cs` | AC1, AC5, AC6, AC8 | 1 | Tester | [x] | | 3 | G1 | Implement the formatter and the split layout with its `--split` CSS | `src/DockerUpdateGuard/UI/RuntimeContainerListFormatter.cs`, `src/DockerUpdateGuard/Components/Common/VulnerabilityRescanControl.razor*`, `src/DockerUpdateGuard/wwwroot/app.css` | AC1, AC5, AC6 | 2 | Dev | [x] | | 4 | G2 | Skeleton: no new API (the page's helpers are removed in task 6) | — | AC10 | 3 | Dev | [x] | -| 5 | G2 | Failing render and stylesheet tests of the page; retag stale ids in `RuntimeContainersTests.cs` | `src/Tests/DockerUpdateGuard.Tests/RuntimeContainersRenderTests.cs`, `src/Tests/DockerUpdateGuard.Tests/AppStylesheetRuntimeContainersTests.cs`, `src/Tests/DockerUpdateGuard.Tests/RuntimeContainersTests.cs` | AC1–AC9 | 4 | Tester | [ ] | +| 5 | G2 | Failing render and stylesheet tests of the page; retag stale ids in `RuntimeContainersTests.cs` | `src/Tests/DockerUpdateGuard.Tests/RuntimeContainersRenderTests.cs`, `src/Tests/DockerUpdateGuard.Tests/AppStylesheetRuntimeContainersTests.cs`, `src/Tests/DockerUpdateGuard.Tests/RuntimeContainersTests.cs` | AC1–AC9 | 4 | Tester | [x] | | 6 | G2 | Rewrite the page markup, remove the color helpers, rework the `.runtime-containers-table*` rules | `src/DockerUpdateGuard/Components/Pages/RuntimeContainers.razor*`, `src/DockerUpdateGuard/wwwroot/app.css` | AC1–AC10 | 5 | Dev | [ ] | | 7 | G2 | Update `docs/areas/web-ui.md` as *Documentation updates* says, against the green code | `docs/areas/web-ui.md` | AC10 | 6 | Dev | [ ] | | 8 | PM | Manual check of AC9 at 390, 768, 959, 1024 and 1280 px on a local build of the branch head | — | AC9 | 7 | Product Manager | [ ] | diff --git a/src/Tests/DockerUpdateGuard.Tests/AppStylesheetRuntimeContainersTests.cs b/src/Tests/DockerUpdateGuard.Tests/AppStylesheetRuntimeContainersTests.cs new file mode 100644 index 00000000..cb1752e2 --- /dev/null +++ b/src/Tests/DockerUpdateGuard.Tests/AppStylesheetRuntimeContainersTests.cs @@ -0,0 +1,146 @@ +using DockerUpdateGuard.Tests.Helper; + +namespace DockerUpdateGuard.Tests; + +/// +/// Tests for the rules of wwwroot/app.css that style the runtime containers table +/// +[TestClass] +public class AppStylesheetRuntimeContainersTests +{ + #region Constants + + /// + /// Shipped stylesheet below the host project directory + /// + private const string StylesheetPath = "wwwroot/app.css"; + + /// + /// Media context of the table layout, which starts above MudBlazor's card query that includes 960 px + /// + private const string TableContext = "@media (min-width: 960.02px)"; + + /// + /// Media context of the card layout of table rows + /// + private const string RowCardContext = "@media (max-width: 959.98px)"; + + /// + /// Prefix of the page's class names + /// + private const string Prefix = "runtime-containers-table__"; + + #endregion // Constants + + #region Methods + + /// + /// Verify the sparklines are thin fixed-size lines + /// + [TestMethod] + [TestCategory("AC7")] + public void AppStylesheetRuntimeContainersSparklinesAreThinFixedSizeLines() + { + var box = GetTopLevelDeclarations(entry => entry.EndsWith($"{Prefix}sparkline", StringComparison.Ordinal) || entry.EndsWith($"{Prefix}sparkline svg", StringComparison.Ordinal)); + var line = GetTopLevelDeclarations(entry => entry.EndsWith($"{Prefix}sparkline-line", StringComparison.Ordinal)); + + Assert.AreEqual("22px", box.GetValueOrDefault("height"), "The sparkline must be 22 px high"); + Assert.AreEqual("96px", box.GetValueOrDefault("max-width"), "The sparkline must be at most 96 px wide"); + Assert.AreEqual("1.6", line.GetValueOrDefault("stroke-width"), "The line must be 1.6 wide"); + Assert.AreEqual("non-scaling-stroke", line.GetValueOrDefault("vector-effect"), "The line width must not scale with the box"); + Assert.AreEqual("none", line.GetValueOrDefault("fill"), "The line must have no fill"); + } + + /// + /// Verify a rule keeps the network value on one line + /// + [TestMethod] + [TestCategory("AC7")] + public void AppStylesheetRuntimeContainersNetworkValueDoesNotWrap() + { + var declarations = GetTopLevelDeclarations(entry => entry.Contains($"{Prefix}network", StringComparison.Ordinal)); + + Assert.AreEqual("nowrap", declarations.GetValueOrDefault("white-space"), "A rule of the network column or value must set white-space: nowrap"); + } + + /// + /// Verify the table-only rules sit in the media query above MudBlazor's card query and nowhere else + /// + /// End of the selector + /// Property name + /// Property value + [TestMethod] + [TestCategory("AC9")] + [DataRow(".runtime-containers-table .mud-table-root", "min-width", "1100px")] + [DataRow($"{Prefix}container", "width", "17.2%")] + [DataRow($"{Prefix}instance", "width", "10.6%")] + [DataRow($"{Prefix}cpu", "width", "9.3%")] + [DataRow($"{Prefix}memory", "width", "10.6%")] + [DataRow($"{Prefix}network", "width", "18.5%")] + [DataRow($"{Prefix}update", "width", "13.9%")] + [DataRow($"{Prefix}vulnerabilities", "width", "19.9%")] + public void AppStylesheetRuntimeContainersTableScrollsInsidePanelFrom960Px(string selectorEnd, string property, string value) + { + var contexts = GetEntries().Where(rule => rule.Entry.EndsWith(selectorEnd, StringComparison.Ordinal) + && StylesheetReader.GetDeclarationList(rule.Body).Any(declaration => declaration.Name == property && declaration.Value == value)) + .Select(rule => rule.Context) + .ToList(); + + Assert.IsNotEmpty(contexts, $"A rule for '{selectorEnd}' must set {property}: {value}"); + Assert.IsTrue(contexts.All(context => context == TableContext), $"The {property} of '{selectorEnd}' must be set only inside {TableContext}"); + } + + /// + /// Verify the cards stack the lines of the multi-line cells, with the label first + /// + /// Column class suffix + [TestMethod] + [TestCategory("AC9")] + [DataRow("container")] + [DataRow("update")] + [DataRow("vulnerabilities")] + public void AppStylesheetRuntimeContainersCardCellsStackTheirLines(string column) + { + var declarations = GetEntries().Where(rule => rule.Context == RowCardContext && rule.Entry.EndsWith($"{Prefix}{column}", StringComparison.Ordinal)) + .SelectMany(rule => StylesheetReader.GetDeclarationList(rule.Body)) + .ToDictionary(declaration => declaration.Name, declaration => declaration.Value); + + Assert.AreEqual("column", declarations.GetValueOrDefault("flex-direction"), $"The {column} cell must stack its lines in the card"); + Assert.AreEqual("flex-start", declarations.GetValueOrDefault("align-items"), $"The {column} cell must start its lines at the label's edge"); + } + + #endregion // Methods + + #region Helper methods + + /// + /// Merge the declarations of the top-level rules whose selector entry matches + /// + /// Selector entry predicate + /// Property name to value, later rules winning + private static Dictionary GetTopLevelDeclarations(Func match) + { + var merged = new Dictionary(); + + foreach (var rule in GetEntries().Where(rule => rule.Context.Length == 0 && match(rule.Entry))) + { + foreach (var (name, value) in StylesheetReader.GetDeclarationList(rule.Body)) + { + merged[name] = value; + } + } + + return merged; + } + + /// + /// Read every selector of every rule of the stylesheet, in every media context + /// + /// Selector, rule body and media context + private static List<(string Entry, string Body, string Context)> GetEntries() + { + return [.. StylesheetReader.GetRules(StylesheetReader.ReadHostFile(StylesheetPath)).SelectMany(rule => StylesheetReader.SplitTopLevel(rule.Selector, ',').Select(entry => (entry, rule.Body, rule.Context)))]; + } + + #endregion // Helper methods +} \ No newline at end of file diff --git a/src/Tests/DockerUpdateGuard.Tests/RuntimeContainersRenderTests.cs b/src/Tests/DockerUpdateGuard.Tests/RuntimeContainersRenderTests.cs new file mode 100644 index 00000000..546e86f9 --- /dev/null +++ b/src/Tests/DockerUpdateGuard.Tests/RuntimeContainersRenderTests.cs @@ -0,0 +1,635 @@ +using Bunit; + +using DockerUpdateGuard.Components.Pages; +using DockerUpdateGuard.Images.Interfaces; +using DockerUpdateGuard.Tests.Data; +using DockerUpdateGuard.Tests.Helper; +using DockerUpdateGuard.UI; + +using Microsoft.Extensions.DependencyInjection; +using Microsoft.Extensions.Logging; + +using NSubstitute; + +namespace DockerUpdateGuard.Tests; + +/// +/// Render tests for the list of +/// +[TestClass] +public class RuntimeContainersRenderTests +{ + #region Constants + + /// + /// Selector of the Vulnerabilities cell + /// + private const string VulnerabilitiesCell = "td.runtime-containers-table__vulnerabilities"; + + /// + /// Selector of the details part of the rescan control + /// + private const string DetailsPart = "div.vulnerability-rescan-control__details"; + + #endregion // Constants + + #region Fields + + /// + /// Column heads in order + /// + private static readonly string[] _columnHeads = ["Container", "Instance", "CPU", "Memory", "Network", "Update", "Vulnerabilities"]; + + /// + /// Class suffixes of the resource columns + /// + private static readonly string[] _resourceColumns = ["cpu", "memory", "network"]; + + /// + /// Lines of the details part in their expected order + /// + private static readonly string[] _detailLines = [">High<", "3 active · 3 high", "Checked 2026-11-23 21:27 UTC", "Base images affected", "4 active finding(s) across 1 base image"]; + + #endregion // Fields + + #region Methods + + /// + /// Verify the page shows one header with its action and the inventory panel with the meta text and no old header parts + /// + /// Task + [TestMethod] + [TestCategory("AC1")] + public async Task RuntimeContainersRenderShowsHeaderWithActionAndInventoryPanel() + { + var instanceId = Guid.NewGuid(); + var testContext = CreateContext([CreateContainer(instanceId, "web"), CreateContainer(instanceId, "db")]); + + await using (testContext) + { + var page = testContext.Render(); + + Assert.AreEqual("Runtime Containers", page.Find("h1.dug-page-header__title").TextContent.Trim(), "The header must carry the page title"); + Assert.AreEqual("Active containers with their images, update state, vulnerabilities and live resource usage.", page.Find("p.dug-page-header__description").TextContent.Trim(), "The header must carry the description"); + Assert.AreEqual("Check image updates", page.Find("div.dug-page-header__actions button").TextContent.Trim(), "The action must stand in the header"); + Assert.AreEqual("Container inventory", page.Find("h2.dug-panel__title").TextContent.Trim(), "The list must sit in the inventory panel"); + Assert.AreEqual("2 containers on 1 Docker instance", page.Find("span.dug-panel__meta").TextContent.Trim(), "The panel must show the inventory meta text"); + Assert.IsEmpty(page.FindAll(".page-eyebrow"), "The eyebrow label must be gone"); + Assert.IsEmpty(page.FindAll(".section-description"), "The section description must be gone"); + } + } + + /// + /// Verify the table has the seven column heads in order and no Update State head + /// + /// Task + [TestMethod] + [TestCategory("AC2")] + public async Task RuntimeContainersRenderShowsSevenColumnHeadsInOrder() + { + var testContext = CreateContext([CreateContainer(Guid.NewGuid(), "web")]); + + await using (testContext) + { + var page = testContext.Render(); + var heads = page.FindAll("th").Select(head => head.TextContent.Trim()).ToList(); + + Assert.AreSequenceEqual(_columnHeads, heads, "The heads must be the seven columns in order"); + Assert.DoesNotContain("Update State", page.Markup, "The Update State head must no longer exist"); + } + } + + /// + /// Verify the Container cell shows the name link, the tag with the resolved version and the own image link + /// + /// Task + [TestMethod] + [TestCategory("AC3")] + public async Task RuntimeContainersRenderContainerCellWithAliasAndOwnImageShowsOwnImageLink() + { + var instanceId = Guid.NewGuid(); + var imageId = Guid.NewGuid(); + var container = CreateContainer(instanceId, "web"); + + container.ContainerId = "abc123"; + container.CurrentTag = "16"; + container.ResolvedVersionTag = "16.3"; + container.LinkedObservedImageId = imageId; + container.LinkedObservedImageName = "my/web"; + + var testContext = CreateContext([container]); + + await using (testContext) + { + var page = testContext.Render(); + var cell = page.Find("td.runtime-containers-table__container"); + var nameLink = cell.QuerySelector($"a[href='/runtime-containers/{instanceId}/abc123']"); + var imageLink = cell.QuerySelector($"a[href='/observed-images/{imageId}']"); + + Assert.IsNotNull(nameLink, "The name must link to the detail route"); + Assert.AreEqual("web", nameLink.TextContent.Trim(), "The link text must be the container name"); + Assert.IsNotNull(imageLink, "An own image must be linked"); + Assert.AreEqual("Own image · my/web", imageLink.TextContent.Trim(), "The own image line must read 'Own image · {name}'"); + Assert.Contains("16 (16.3)", cell.TextContent, "The tag must show the resolved version in parentheses"); + } + } + + /// + /// Verify a container without an own image shows only name and tag: no own image line, no snapshot time, no icon link + /// + /// Task + [TestMethod] + [TestCategory("AC3")] + public async Task RuntimeContainersRenderContainerCellWithoutOwnImageShowsNameAndTagOnly() + { + var container = CreateContainer(Guid.NewGuid(), "web"); + + container.CurrentTag = "16"; + container.RecordedAtUtc = new DateTimeOffset(2026, 11, 23, 21, 27, 0, TimeSpan.Zero); + + var testContext = CreateContext([container]); + + await using (testContext) + { + var page = testContext.Render(); + var cell = page.Find("td.runtime-containers-table__container"); + + Assert.DoesNotContain("Own image", cell.TextContent, "Without an own image there must be no own image line"); + Assert.DoesNotContain("2026-11-23", cell.TextContent, "The snapshot time must no longer be shown"); + Assert.IsEmpty(cell.QuerySelectorAll("a[href^='/observed-images/']"), "There must be no link to an observed image"); + Assert.IsEmpty(cell.QuerySelectorAll("svg"), "There must be no icon link"); + Assert.Contains("16", cell.TextContent, "The tag must be shown"); + } + } + + /// + /// Verify the update state chip carries the tone of the shared mapping + /// + /// Update state + /// Expected tone CSS name + /// Task + [TestMethod] + [TestCategory("AC4")] + [DataRow("Update available", "warning")] + [DataRow("Up to date", "success")] + [DataRow("Manual review required", "info")] + [DataRow("Failed", "danger")] + [DataRow("No tag data", "neutral")] + [DataRow("Not evaluated", "neutral")] + [DataRow("Unsupported", "neutral")] + public async Task RuntimeContainersRenderUpdateCellShowsStateChipInItsTone(string state, string tone) + { + var container = CreateContainer(Guid.NewGuid(), "web"); + + container.UpdateState = state; + + var testContext = CreateContext([container]); + + await using (testContext) + { + var page = testContext.Render(); + var chip = page.Find("td.runtime-containers-table__update span.dug-chip"); + + Assert.AreEqual(state, chip.TextContent.Trim(), "The chip must show the update state"); + Assert.IsTrue(chip.ClassList.Contains($"dug-chip--{tone}"), $"The state '{state}' must be shown in the {tone} tone"); + } + } + + /// + /// Verify the available version shows whatever the state, and only when one is known + /// + /// Task + [TestMethod] + [TestCategory("AC4")] + public async Task RuntimeContainersRenderUpdateCellShowsAvailableVersionOnlyWhenKnown() + { + var known = CreateContainer(Guid.NewGuid(), "known"); + var unknown = CreateContainer(Guid.NewGuid(), "unknown"); + + known.UpdateState = "Failed"; + known.AvailableUpdateVersionTag = "17.1"; + unknown.AvailableUpdateVersionTag = null; + + var testContext = CreateContext([known, unknown]); + + await using (testContext) + { + var page = testContext.Render(); + var cells = page.FindAll("td.runtime-containers-table__update"); + + Assert.AreEqual("17.1", cells[0].QuerySelector("span.runtime-containers-table__version")?.TextContent.Trim(), "A known version must be shown below the chip"); + Assert.IsNull(cells[1].QuerySelector("span.runtime-containers-table__version"), "Without a known version nothing must be shown"); + } + } + + /// + /// Verify findings show the highest severity chip and the count line, without the old chips + /// + /// Task + [TestMethod] + [TestCategory("AC5")] + public async Task RuntimeContainersRenderFindingsShowHighestSeverityChipAndCountLine() + { + var container = CreateContainer(Guid.NewGuid(), "web"); + + SetFindings(container, "Findings detected", 1, 2, 0, 0, 0); + + var testContext = CreateContext([container]); + + await using (testContext) + { + var page = testContext.Render(); + var cell = page.Find(VulnerabilitiesCell); + var chips = cell.QuerySelectorAll("span.dug-chip").ToList(); + + Assert.HasCount(1, chips, "Findings with the status Findings detected must show one chip"); + Assert.AreEqual("Critical", chips[0].TextContent.Trim(), "The chip must name the highest severity"); + Assert.IsTrue(chips[0].ClassList.Contains("dug-chip--critical"), "The chip must be in the severity's tone"); + Assert.Contains("3 active · 1 critical, 2 high", cell.TextContent, "The count line must list the breakdown"); + Assert.DoesNotContain("Runtime vulnerabilities", page.Markup, "The Runtime vulnerabilities chip must be gone"); + Assert.IsEmpty(page.FindAll(".mud-chip"), "The compact severity chips must be gone"); + } + } + + /// + /// Verify findings of unknown severity only show an Unknown chip in the low tone + /// + /// Task + [TestMethod] + [TestCategory("AC5")] + public async Task RuntimeContainersRenderUnknownSeverityFindingsShowUnknownChipInLowTone() + { + var container = CreateContainer(Guid.NewGuid(), "web"); + + SetFindings(container, "Findings detected", 0, 0, 0, 0, 4); + + var testContext = CreateContext([container]); + + await using (testContext) + { + var page = testContext.Render(); + var cell = page.Find(VulnerabilitiesCell); + var chip = cell.QuerySelector("span.dug-chip"); + + Assert.IsNotNull(chip, "A chip must be shown"); + Assert.AreEqual("Unknown", chip.TextContent.Trim(), "The chip must read Unknown"); + Assert.IsTrue(chip.ClassList.Contains("dug-chip--low"), "The chip must be in the low tone"); + Assert.Contains("4 active · 4 unknown", cell.TextContent, "The count line must list the unknown findings"); + } + } + + /// + /// Verify a failed check with earlier findings shows the status chip beside the severity chip + /// + /// Task + [TestMethod] + [TestCategory("AC5")] + public async Task RuntimeContainersRenderFailedCheckWithFindingsShowsStatusChipBesideSeverity() + { + var container = CreateContainer(Guid.NewGuid(), "web"); + + SetFindings(container, "Failed", 0, 2, 0, 0, 0); + + var testContext = CreateContext([container]); + + await using (testContext) + { + var page = testContext.Render(); + var cell = page.Find(VulnerabilitiesCell); + var chips = cell.QuerySelectorAll("span.dug-chip").ToList(); + + Assert.HasCount(2, chips, "The severity chip and the status chip must both be shown"); + Assert.AreEqual("High", chips[0].TextContent.Trim(), "The severity chip must come first"); + Assert.AreEqual("Failed", chips[1].TextContent.Trim(), "The status chip must stand beside it"); + Assert.IsTrue(chips[1].ClassList.Contains("dug-chip--danger"), "The failed status must be in the danger tone"); + Assert.Contains("2 active · 2 high", cell.TextContent, "The count line must still be shown"); + } + } + + /// + /// Verify without active findings the status chip shows in its tone and no count line follows + /// + /// Vulnerability status + /// Expected tone CSS name + /// Task + [TestMethod] + [TestCategory("AC5")] + [DataRow("No findings", "success")] + [DataRow("Failed", "danger")] + [DataRow("Not scanned", "neutral")] + [DataRow("Not configured", "neutral")] + [DataRow("Unsupported", "neutral")] + [DataRow("Unavailable", "neutral")] + [DataRow("Findings detected", "low")] + public async Task RuntimeContainersRenderWithoutFindingsShowsStatusChipInItsTone(string status, string tone) + { + var container = CreateContainer(Guid.NewGuid(), "web"); + + container.VulnerabilityStatus = status; + + var testContext = CreateContext([container]); + + await using (testContext) + { + var page = testContext.Render(); + var cell = page.Find(VulnerabilitiesCell); + var chips = cell.QuerySelectorAll("span.dug-chip").ToList(); + + Assert.HasCount(1, chips, "Without findings only the status chip must be shown"); + Assert.AreEqual(status, chips[0].TextContent.Trim(), "The chip must show the status"); + Assert.IsTrue(chips[0].ClassList.Contains($"dug-chip--{tone}"), $"The status '{status}' must be shown in the {tone} tone"); + Assert.DoesNotContain(" active", cell.TextContent, "Without findings there must be no count line"); + } + } + + /// + /// Verify the lines of the Vulnerabilities cell come in the specified order and the button stays outside the details part + /// + /// Task + [TestMethod] + [TestCategory("AC6")] + public async Task RuntimeContainersRenderVulnerabilityCellOrdersItsLines() + { + var container = CreateContainer(Guid.NewGuid(), "web"); + + SetFindings(container, "Findings detected", 0, 3, 0, 0, 0); + container.VulnerabilityCheckedAtUtc = new DateTimeOffset(2026, 11, 23, 21, 27, 0, TimeSpan.Zero); + container.ActiveBaseImageVulnerabilityFindingCount = 4; + container.BaseImageVulnerabilitySummary = "4 active finding(s) across 1 base image"; + + var testContext = CreateContext([container]); + + await using (testContext) + { + var page = testContext.Render(); + var cell = page.Find(VulnerabilitiesCell); + var details = cell.QuerySelector(DetailsPart); + + Assert.IsNotNull(details, "The left part must be the details part of the split rescan control"); + Assert.IsNull(details.QuerySelector("button"), "The rescan button must be outside the details part"); + Assert.IsNotNull(cell.QuerySelector("button[aria-label='Rescan vulnerabilities']"), "The rescan button must stay in the cell"); + + var markup = details.InnerHtml; + var positions = _detailLines.Select(text => markup.IndexOf(text, StringComparison.Ordinal)) + .ToList(); + + Assert.DoesNotContain(-1, positions, "Every line must be inside the details part"); + Assert.AreSequenceEqual(positions.Order().ToList(), positions, "The lines must come in the order chip, count, check time, base image chip, base image summary"); + } + } + + /// + /// Verify the base image warning shows only when base images have active findings + /// + /// Task + [TestMethod] + [TestCategory("AC6")] + public async Task RuntimeContainersRenderBaseImageWarningOnlyWithAffectedBaseImages() + { + var affected = CreateContainer(Guid.NewGuid(), "affected"); + var clean = CreateContainer(Guid.NewGuid(), "clean"); + + affected.ActiveBaseImageVulnerabilityFindingCount = 1; + affected.BaseImageVulnerabilitySummary = "1 active finding(s) across 1 base image"; + clean.BaseImageVulnerabilitySummary = "must not be shown"; + + var testContext = CreateContext([affected, clean]); + + await using (testContext) + { + var page = testContext.Render(); + var cells = page.FindAll(VulnerabilitiesCell); + var affectedDetails = cells[0].QuerySelector(DetailsPart); + var cleanDetails = cells[1].QuerySelector(DetailsPart); + + Assert.IsNotNull(affectedDetails, "The affected row must use the split layout"); + Assert.IsNotNull(cleanDetails, "The clean row must use the split layout"); + Assert.Contains("Base images affected", affectedDetails.TextContent, "The warning must show in the details part"); + Assert.Contains("1 active finding(s) across 1 base image", affectedDetails.TextContent, "The base image summary must show"); + Assert.DoesNotContain("Base images affected", cleanDetails.TextContent, "Without affected base images there must be no warning"); + Assert.DoesNotContain("must not be shown", cells[1].TextContent, "Without affected base images there must be no summary"); + } + } + + /// + /// Verify an image that was never scanned shows Never scanned in the details part + /// + /// Task + [TestMethod] + [TestCategory("AC6")] + public async Task RuntimeContainersRenderNeverScannedImageShowsNeverScanned() + { + var container = CreateContainer(Guid.NewGuid(), "web"); + + container.VulnerabilityCheckedAtUtc = null; + + var testContext = CreateContext([container]); + + await using (testContext) + { + var page = testContext.Render(); + var details = page.Find($"{VulnerabilitiesCell} {DetailsPart}"); + + Assert.Contains("Never scanned", details.TextContent, "An image never checked must show Never scanned"); + } + } + + /// + /// Verify the resource cells show n/a without a current usage and no sparkline + /// + /// Task + [TestMethod] + [TestCategory("AC7")] + public async Task RuntimeContainersRenderResourceCellsShowNotAvailableWithoutUsage() + { + var container = CreateContainer(Guid.NewGuid(), "web"); + + container.CurrentResourceUsage = null; + + var testContext = CreateContext([container]); + + await using (testContext) + { + var page = testContext.Render(); + + foreach (var column in _resourceColumns) + { + var cell = page.Find($"td.runtime-containers-table__{column}"); + + Assert.AreEqual("n/a", cell.TextContent.Trim(), $"The {column} cell must show n/a"); + Assert.IsEmpty(cell.QuerySelectorAll("svg"), $"The {column} cell must show no sparkline"); + } + } + } + + /// + /// Verify a sparkline needs two samples and the network cell draws two lines + /// + /// Task + [TestMethod] + [TestCategory("AC7")] + public async Task RuntimeContainersRenderSparklinesNeedTwoSamples() + { + var single = CreateContainer(Guid.NewGuid(), "single"); + var pair = CreateContainer(Guid.NewGuid(), "double"); + + single.ResourceUsageHistory = [CreateUsage(0)]; + pair.ResourceUsageHistory = [CreateUsage(0), CreateUsage(1)]; + + var testContext = CreateContext([single, pair]); + + await using (testContext) + { + var page = testContext.Render(); + var rows = page.FindAll("tbody tr"); + + foreach (var column in _resourceColumns) + { + Assert.IsEmpty(rows[0].QuerySelectorAll($"td.runtime-containers-table__{column} svg"), $"One sample must not draw a {column} sparkline"); + } + + Assert.HasCount(1, rows[1].QuerySelectorAll("td.runtime-containers-table__cpu svg path"), "Two samples must draw one CPU line"); + Assert.HasCount(1, rows[1].QuerySelectorAll("td.runtime-containers-table__memory svg path"), "Two samples must draw one memory line"); + Assert.HasCount(2, rows[1].QuerySelectorAll("td.runtime-containers-table__network svg path"), "Two samples must draw a received and a sent line"); + } + } + + /// + /// Verify the network value is a single element so that it can stay on one line + /// + /// Task + [TestMethod] + [TestCategory("AC7")] + public async Task RuntimeContainersRenderNetworkValueIsOneElement() + { + var container = CreateContainer(Guid.NewGuid(), "web"); + var usage = container.CurrentResourceUsage!; + var expected = $"{ResourceUsageFormatter.FormatBytesPerSecond(usage.NetworkRxBytesPerSecond)} ↓ / {ResourceUsageFormatter.FormatBytesPerSecond(usage.NetworkTxBytesPerSecond)} ↑"; + var testContext = CreateContext([container]); + + await using (testContext) + { + var page = testContext.Render(); + var cell = page.Find("td.runtime-containers-table__network"); + var valueElements = cell.QuerySelectorAll("*").Where(element => element.ChildElementCount == 0 && element.TextContent.Trim() == expected).ToList(); + + Assert.HasCount(1, valueElements, "The whole network value must be the text of one element"); + } + } + + /// + /// Verify the table switches to cards below 960 px, which is the small-screen breakpoint of MudBlazor, and every cell carries its label + /// + /// Task + [TestMethod] + [TestCategory("AC9")] + public async Task RuntimeContainersRenderTableSwitchesToCardsBelow960Px() + { + var testContext = CreateContext([CreateContainer(Guid.NewGuid(), "web")]); + + await using (testContext) + { + var page = testContext.Render(); + var cells = page.FindAll("tbody td"); + var labels = cells.Select(cell => cell.GetAttribute("data-label")).ToList(); + + Assert.IsNotEmpty(page.FindAll(".mud-sm-table"), "The table must use the small-screen card breakpoint (class mud-sm-table)"); + Assert.IsEmpty(page.FindAll(".mud-md-table"), "The table must not use the medium breakpoint"); + Assert.AreSequenceEqual(_columnHeads, labels, "Every cell must carry the label of its head"); + } + } + + #endregion // Methods + + #region Helper methods + + /// + /// Create a test context with the page's services and a list the view service returns + /// + /// Listed containers + /// Test context + private static BunitContext CreateContext(IReadOnlyList containers) + { + var testContext = BlazorTestContextFactory.Create(); + var viewService = Substitute.For(); + + viewService.GetRuntimeContainersAsync(Arg.Any()) + .Returns(containers); + + testContext.Services.AddSingleton(viewService); + testContext.Services.AddSingleton(Substitute.For()); + testContext.Services.AddSingleton(new DashboardRefreshState()); + testContext.Services.AddSingleton>(new TestLogger()); + + return testContext; + } + + /// + /// Create a container with a status without findings and a current resource usage + /// + /// Docker instance identifier + /// Container name + /// Container + private static RuntimeContainerListItemData CreateContainer(Guid instanceId, string name) + { + return new RuntimeContainerListItemData + { + DockerInstanceId = instanceId, + ContainerId = $"id-{name}", + ContainerName = name, + DockerInstanceName = "Production", + ImageVersionId = Guid.NewGuid(), + CurrentTag = "latest", + UpdateState = "Up to date", + VulnerabilityStatus = "No findings", + VulnerabilityCheckedAtUtc = new DateTimeOffset(2026, 11, 23, 21, 27, 0, TimeSpan.Zero), + CurrentResourceUsage = CreateUsage(0), + }; + } + + /// + /// Set a vulnerability status and the active finding counts of a container + /// + /// Container + /// Vulnerability status + /// Critical count + /// High count + /// Medium count + /// Low count + /// Unknown count + private static void SetFindings(RuntimeContainerListItemData container, string status, int critical, int high, int medium, int low, int other) + { + var summary = new VulnerabilitySeveritySummaryViewData + { + CriticalCount = critical, + HighCount = high, + MediumCount = medium, + LowCount = low, + OtherCount = other, + }; + + container.VulnerabilityStatus = status; + container.VulnerabilitySeveritySummary = summary; + container.ActiveVulnerabilityFindingCount = summary.TotalCount; + } + + /// + /// Create a resource usage sample + /// + /// Minutes after the base time + /// Sample + private static ResourceUsagePointViewData CreateUsage(int minutes) + { + return new ResourceUsagePointViewData + { + CpuPercent = 12.5m + minutes, + MemoryUsageBytes = 1048576L * (100 + minutes), + MemoryLimitBytes = 1048576L * 512, + NetworkRxBytesPerSecond = 2048m + minutes, + NetworkTxBytesPerSecond = 1024m + minutes, + RecordedAtUtc = new DateTimeOffset(2026, 11, 23, 21, 0, 0, TimeSpan.Zero).AddMinutes(minutes), + }; + } + + #endregion // Helper methods +} \ No newline at end of file diff --git a/src/Tests/DockerUpdateGuard.Tests/RuntimeContainersTests.cs b/src/Tests/DockerUpdateGuard.Tests/RuntimeContainersTests.cs index 7c1bda4b..b0d55cff 100644 --- a/src/Tests/DockerUpdateGuard.Tests/RuntimeContainersTests.cs +++ b/src/Tests/DockerUpdateGuard.Tests/RuntimeContainersTests.cs @@ -83,6 +83,7 @@ public void RuntimeContainersBuildSparklinePathEmptyValuesReturnsEmptyString() /// /// Task [TestMethod] + [TestCategory("AC8")] public async Task RuntimeContainersFailedUpdateCheckShowsFixedReasonAndLogsAsync() { var testContext = BlazorTestContextFactory.Create(); @@ -118,8 +119,7 @@ public async Task RuntimeContainersFailedUpdateCheckShowsFixedReasonAndLogsAsync /// /// Task [TestMethod] - [TestCategory("AC1")] - [TestCategory("AC2")] + [TestCategory("AC8")] public async Task RuntimeContainersLoadFailureShowsFixedErrorAndLogs() { var exception = new InvalidOperationException("secret text"); @@ -150,7 +150,7 @@ public async Task RuntimeContainersLoadFailureShowsFixedErrorAndLogs() /// /// Task [TestMethod] - [TestCategory("AC4")] + [TestCategory("AC8")] public async Task RuntimeContainersSuccessfulUpdateCheckAfterLoadFailureShowsList() { var exception = new InvalidOperationException("secret text"); From 3f22a1127cbccd6320b70675469340fa114f1324 Mon Sep 17 00:00:00 2001 From: Claude Date: Mon, 30 Nov 2026 18:46:54 +0000 Subject: [PATCH 14/28] Implement the Runtime Containers page of group G2 Co-Authored-By: Claude Sonnet 5.5 Claude-Session: https://claude.ai/code/session_018g33AT69TTfqZphLy7AF18 --- docs/areas/web-ui.md | 7 +- .../log.md | 1 + .../tasks.md | 4 +- .../Components/Pages/RuntimeContainers.razor | 233 +++++++++--------- .../Pages/RuntimeContainers.razor.cs | 41 --- src/DockerUpdateGuard/wwwroot/app.css | 94 ++++--- 6 files changed, 191 insertions(+), 189 deletions(-) diff --git a/docs/areas/web-ui.md b/docs/areas/web-ui.md index 7cd7a14b..51ee0bea 100644 --- a/docs/areas/web-ui.md +++ b/docs/areas/web-ui.md @@ -62,6 +62,7 @@ to read the state the other areas compute and to start manual scans; it computes - The status of a vulnerability assessment, `Findings detected`, takes the tone of its highest severity with at least one finding (critical, high, medium or low); without a counted known severity it is low. Any other status ignores the severities, so `Failed` stays red. A severity chip uses the tone of its own severity; an unknown one is low. +- The runtime container list shows the highest active severity as chip (`Unknown` in the low tone), beside it the status chip for a status other than `Findings detected`, and the count line `{count} active · {n} critical, …` in the order critical, high, medium, low, unknown. - The severity bar shows the active findings as segments in the order critical, high, medium, low, each as wide as its count and at least 4 px; findings of an unknown severity count as low. A legend lists the counts and the bar is announced as `Severity distribution: ...`. Without findings nothing is shown. @@ -79,7 +80,7 @@ to read the state the other areas compute and to start manual scans; it computes | `/my-images/{id}` | My Image details | One observed image: reference, latest scan, derived-runtime hint, running containers, base image chain, update findings with tag candidates, and — when there are any — vulnerability findings and its 20 most recent scan runs | | `/observed-images` | Observed Images | The registration form and the manually registered images with latest scan, active update findings, derived-runtime hint and vulnerability status | | `/observed-images/{id}` | Observed Image detail | One observed image: reference, latest scan, whether it is an own or a manual image, derived-runtime hint, running containers (own images only), base image chain, vulnerability findings and update findings with tag candidates; no scan history | -| `/runtime-containers` | Runtime Containers | Every currently known container with instance, tag (and the version an alias resolves to), CPU, memory and network usage with a short trend of up to the 12 latest samples, update state, available update and vulnerability status; a link to the own image when the container runs one | +| `/runtime-containers` | Runtime Containers | Header text `{n} containers on {m} Docker instances`; seven columns: container (name, tag with the version an alias resolves to, link to the own image), instance, CPU, memory and network usage with a trend of up to the 12 latest samples, update state with the available version, and vulnerabilities (chip, count line, last check, rescan, base image warning); [0082](../decisions/0082-the-runtime-container-list-names-the-highest-active-severity-and-keeps-a-failed-checks-status-beside-it.md) | | `/runtime-containers/{instanceId}/{containerId}` | Runtime Container detail | One container: image and digest, Compose project, linked own image, update state and message, derived-runtime hint, base image chain, resource usage history, manual tag preference, available tag candidates, update findings, vulnerability findings and the scans of its 20 most recent snapshots; for a container of a Docker instance with Portainer enabled, the *Container actions* section with the 20 most recent action runs of the container | | `/docker-instances` | Docker Instances | Configured Docker instances with endpoint, connection kind, latest runtime scan status and time, current resource usage and number of containers; with exactly one instance its current usage and usage history are shown on this page directly | | `/docker-instances/{id}` | Docker Instance detail | The containers currently observed on one instance with linked own image and resource usage | @@ -106,7 +107,7 @@ to read the state the other areas compute and to start manual scans; it computes | Register and scan | Observed Images | Registers an image from name (trimmed), image reference and optional description ([Image catalog](image-catalog.md)), scans it immediately as a manual observed-image scan and opens its detail page; a reference already tracked as an enabled own image is rejected with an `Open own image` link to that image and starts no scan | | Check image updates | Runtime Containers | Runs a manual runtime container scan of all enabled Docker instances | | Refresh vulnerabilities | Scan History, shown only when vulnerability scanning is enabled | Runs a manual vulnerability refresh of all live images; the page also shows when the next scheduled refresh is expected | -| Rescan (per image) | Observed Images, My Images, Runtime Containers | Runs a manual vulnerability refresh of that one image version; next to it the time of the last check or "Never scanned"; the button is announced as `Rescan vulnerabilities` | +| Rescan (per image) | Observed Images, My Images, Runtime Containers | Runs a manual vulnerability refresh of that one image version; with it the time of the last check or "Never scanned"; the button is announced as `Rescan vulnerabilities` | | Select / Clear selection | Runtime Container detail | Stores or removes a manual tag preference for that container ([Update detection](update-detection.md)); it does not change or redeploy the container | | Start / Stop / Restart | Runtime Container detail, *Container actions* section | Starts, stops or restarts that container through Portainer after a confirmation, and records the action as an action run ([Container actions](container-actions.md)) | @@ -341,6 +342,8 @@ never their values. map to tones in one mapping, beside the chip colors of unconverted pages. - [0080](../decisions/0080-the-dashboard-counts-the-containers-advisories-and-own-images-it-lists.md) — The dashboard counts the containers, advisories and own images it lists. +- [0082](../decisions/0082-the-runtime-container-list-names-the-highest-active-severity-and-keeps-a-failed-checks-status-beside-it.md) — The + runtime container list names the highest active severity and keeps a failed check's status beside it. ## Not here diff --git a/specs/feature-455-runtime-containers-columns/log.md b/specs/feature-455-runtime-containers-columns/log.md index a7791242..f4528dc7 100644 --- a/specs/feature-455-runtime-containers-columns/log.md +++ b/specs/feature-455-runtime-containers-columns/log.md @@ -18,3 +18,4 @@ are quoted in full. | 2026-11-30 18:38 | 6 Coverage (G1) | Tester | RESULT: DONE. Deferred test VulnerabilityRescanControlWithoutContentKeepsInlineLayout plus two single-fragment tests added; coverage gate: new/changed code 100 % (29/29 lines, 18/18 conditions), overall 95.3 %; 2806 tests green (sonnet/medium · 90,518 tokens · 8 tool uses · 177 s · 14 in · 3,771 out · 563,396 cache read · 34,081 cache write · 117,810 weighted) | | 2026-11-30 18:38 | 4 Skeleton skipped (G2) | Orchestrator | skipped — plan *Signatures*: G2 adds no API (tasks.md task 4), the page's helpers are only removed | | 2026-11-30 18:43 | 5 Tests first (G2) | Tester | RESULT: DONE. 22 page render cases and 13 stylesheet cases (42 incl. DataRows) fail on the current page (confirmed by the orchestrator: 42 failed, 6 existing passed); fact 10 confirmed (Breakpoint.Sm gives mud-sm-table); stale ids retagged. Deferred: RuntimeContainersRunningUpdateCheckDisablesButtonWithProgress, RuntimeContainersRescanReloadsListAndNotifiesDashboardAsync, RuntimeContainersRenderEmptyListShowsEmptyState, RuntimeContainersRenderLoadingShowsTableSkeletonWithTitle, RuntimeContainersRenderEncodesExternalTexts (sonnet/medium · 56,209 tokens · 18 tool uses · 309 s · 36 in · 26,991 out · 2,560,507 cache read · 118,364 cache write · 538,997 weighted · continued from 5 Tests first (G1)) | +| 2026-11-30 18:46 | 6 Implement (G2) | Dev | RESULT: DONE. Page rewritten (PageHeader, SectionPanel, seven columns, StatusChip, split rescan control, Breakpoint.Sm), color helpers removed, CSS reworked, web-ui.md updated (4,971 words); build 0 warnings, 2848/2848 green; figure-check: 16 hits on the 1280 px value, all other quantities, left unchanged (sonnet/medium · 39,717 tokens · 13 tool uses · 162 s · 24 in · 9,478 out · 1,348,140 cache read · 88,653 cache write · 293,044 weighted · continued) | diff --git a/specs/feature-455-runtime-containers-columns/tasks.md b/specs/feature-455-runtime-containers-columns/tasks.md index 8c24064a..8fcc2cdc 100644 --- a/specs/feature-455-runtime-containers-columns/tasks.md +++ b/specs/feature-455-runtime-containers-columns/tasks.md @@ -9,6 +9,6 @@ Plan: [plan.md](plan.md) | 3 | G1 | Implement the formatter and the split layout with its `--split` CSS | `src/DockerUpdateGuard/UI/RuntimeContainerListFormatter.cs`, `src/DockerUpdateGuard/Components/Common/VulnerabilityRescanControl.razor*`, `src/DockerUpdateGuard/wwwroot/app.css` | AC1, AC5, AC6 | 2 | Dev | [x] | | 4 | G2 | Skeleton: no new API (the page's helpers are removed in task 6) | — | AC10 | 3 | Dev | [x] | | 5 | G2 | Failing render and stylesheet tests of the page; retag stale ids in `RuntimeContainersTests.cs` | `src/Tests/DockerUpdateGuard.Tests/RuntimeContainersRenderTests.cs`, `src/Tests/DockerUpdateGuard.Tests/AppStylesheetRuntimeContainersTests.cs`, `src/Tests/DockerUpdateGuard.Tests/RuntimeContainersTests.cs` | AC1–AC9 | 4 | Tester | [x] | -| 6 | G2 | Rewrite the page markup, remove the color helpers, rework the `.runtime-containers-table*` rules | `src/DockerUpdateGuard/Components/Pages/RuntimeContainers.razor*`, `src/DockerUpdateGuard/wwwroot/app.css` | AC1–AC10 | 5 | Dev | [ ] | -| 7 | G2 | Update `docs/areas/web-ui.md` as *Documentation updates* says, against the green code | `docs/areas/web-ui.md` | AC10 | 6 | Dev | [ ] | +| 6 | G2 | Rewrite the page markup, remove the color helpers, rework the `.runtime-containers-table*` rules | `src/DockerUpdateGuard/Components/Pages/RuntimeContainers.razor*`, `src/DockerUpdateGuard/wwwroot/app.css` | AC1–AC10 | 5 | Dev | [x] | +| 7 | G2 | Update `docs/areas/web-ui.md` as *Documentation updates* says, against the green code | `docs/areas/web-ui.md` | AC10 | 6 | Dev | [x] | | 8 | PM | Manual check of AC9 at 390, 768, 959, 1024 and 1280 px on a local build of the branch head | — | AC9 | 7 | Product Manager | [ ] | diff --git a/src/DockerUpdateGuard/Components/Pages/RuntimeContainers.razor b/src/DockerUpdateGuard/Components/Pages/RuntimeContainers.razor index 9254bf31..53bac526 100644 --- a/src/DockerUpdateGuard/Components/Pages/RuntimeContainers.razor +++ b/src/DockerUpdateGuard/Components/Pages/RuntimeContainers.razor @@ -3,30 +3,28 @@ Runtime Containers - + + + + @if (_isBusy) + { + + Checking image updates... + } + else + { + Check image updates + } + + + @if (string.IsNullOrWhiteSpace(_errorMessage) == false) { @@ -52,99 +50,108 @@ } else { - -
- Container inventory - Current runtime state correlated with own-image shortcuts, update results, vulnerabilities, and resource usage. -
- + + - Container - Instance - CPU - Memory - Network - Update State + Container + Instance + CPU + Memory + Network + Update + Vulnerabilities - - -
- @context.ContainerName - @if (context.LinkedObservedImageId is Guid observedImageId) + + + @context.ContainerName + @if (string.IsNullOrWhiteSpace(context.ResolvedVersionTag)) + { + @context.CurrentTag + } + else + { + @($"{context.CurrentTag} ({context.ResolvedVersionTag})") + } + @if (context.LinkedObservedImageId is Guid observedImageId) + { + @($"Own image · {context.LinkedObservedImageName ?? "linked image"}") + } + + @context.DockerInstanceName + +
@FormatCpu(context.CurrentResourceUsage)
+ @if (HasResourceHistory(context)) + { +
+ +
+ } +
+ +
@FormatMemory(context.CurrentResourceUsage)
+ @if (HasResourceHistory(context)) + { +
+ +
+ } +
+ +
@FormatNetwork(context.CurrentResourceUsage)
+ @if (HasResourceHistory(context)) + { +
+ +
+ } +
+ + + @if (string.IsNullOrWhiteSpace(context.AvailableUpdateVersionTag) == false) + { + @context.AvailableUpdateVersionTag + } + + + + + + @if (context.VulnerabilitySeveritySummary.TotalCount > 0) + { + + @if (RuntimeContainerListFormatter.IsStatusShownBesideSeverity(context)) + { + + } + } + else + { + + } + + @if (context.VulnerabilitySeveritySummary.TotalCount > 0) { - - - - - + @RuntimeContainerListFormatter.FormatActiveFindings(context.VulnerabilitySeveritySummary) } -
- @if (string.IsNullOrWhiteSpace(context.ResolvedVersionTag)) - { - @context.CurrentTag - } - else - { - @($"{context.CurrentTag} ({context.ResolvedVersionTag})") - } - @TimestampFormatter.Format(context.RecordedAtUtc) -
- @context.DockerInstanceName - -
@FormatCpu(context.CurrentResourceUsage)
- @if (HasResourceHistory(context)) - { -
- -
- } -
- -
@FormatMemory(context.CurrentResourceUsage)
- @if (HasResourceHistory(context)) - { -
- -
- } -
- -
@FormatNetwork(context.CurrentResourceUsage)
- @if (HasResourceHistory(context)) - { -
- -
- } -
- - @context.UpdateState - @if (string.IsNullOrWhiteSpace(context.AvailableUpdateVersionTag) == false) - { - @context.AvailableUpdateVersionTag - } - @if (context.ActiveVulnerabilityFindingCount > 0) - { - Runtime vulnerabilities - - @($"{context.ActiveVulnerabilityFindingCount} active · {context.VulnerabilitySummary}") - } - - @if (context.ActiveBaseImageVulnerabilityFindingCount > 0) - { - Base images affected - @context.BaseImageVulnerabilitySummary - } - + + + @if (context.ActiveBaseImageVulnerabilityFindingCount > 0) + { + + @context.BaseImageVulnerabilitySummary + } + +
+ - + } - + \ No newline at end of file diff --git a/src/DockerUpdateGuard/Components/Pages/RuntimeContainers.razor.cs b/src/DockerUpdateGuard/Components/Pages/RuntimeContainers.razor.cs index 514c83ab..312ce26f 100644 --- a/src/DockerUpdateGuard/Components/Pages/RuntimeContainers.razor.cs +++ b/src/DockerUpdateGuard/Components/Pages/RuntimeContainers.razor.cs @@ -8,8 +8,6 @@ using Microsoft.AspNetCore.Components; -using MudBlazor; - namespace DockerUpdateGuard.Components.Pages; /// @@ -106,45 +104,6 @@ public sealed partial class RuntimeContainers : IDisposable #region Static methods - /// - /// Resolve the chip color for an update state - /// - /// Update state - /// Chip color - private static Color GetUpdateStateColor(string? state) - { - if (string.IsNullOrWhiteSpace(state)) - { - return Color.Default; - } - - return state.ToUpperInvariant() switch - { - "UPDATE AVAILABLE" => Color.Warning, - "UP TO DATE" => Color.Success, - "MANUAL REVIEW REQUIRED" => Color.Info, - "FAILED" => Color.Error, - "UNSUPPORTED" => Color.Default, - _ => Color.Info, - }; - } - - /// - /// Resolve the chip color for a vulnerability status - /// - /// Vulnerability status - /// Severity summary of the active findings - /// Chip color - private static Color GetVulnerabilityStatusColor(string? status, VulnerabilitySeveritySummaryViewData? severitySummary) - { - if (string.IsNullOrWhiteSpace(status)) - { - return Color.Default; - } - - return VulnerabilityDisplayFormatter.GetStatusColor(status, severitySummary); - } - /// /// Format CPU usage /// diff --git a/src/DockerUpdateGuard/wwwroot/app.css b/src/DockerUpdateGuard/wwwroot/app.css index 436dd9ca..8d30c1e3 100644 --- a/src/DockerUpdateGuard/wwwroot/app.css +++ b/src/DockerUpdateGuard/wwwroot/app.css @@ -1007,56 +1007,59 @@ a { box-shadow: inset 3px 0 0 var(--dug-sev-low); } -.runtime-containers-table .runtime-containers-table__resource { - width: 1%; - white-space: nowrap; -} - -.runtime-containers-table .runtime-containers-table__update-state { +.runtime-containers-table .runtime-containers-table__container, +.runtime-containers-table .runtime-containers-table__update, +.runtime-containers-table .runtime-containers-table__vulnerabilities { min-width: 0; white-space: normal; + overflow-wrap: anywhere; } -.runtime-containers-table .runtime-containers-table__update-state .table-secondary { - overflow-wrap: anywhere; +.runtime-containers-table .runtime-containers-table__container .table-secondary { + display: block; } -.runtime-containers-table .runtime-containers-table__name { - display: inline-flex; - align-items: center; - gap: 0.45rem; +.runtime-containers-table .runtime-containers-table__network { + white-space: nowrap; } -.runtime-containers-table .runtime-containers-table__name-icon-link { - display: inline-flex; - align-items: center; - color: var(--dug-primary); +.runtime-containers-table .runtime-containers-table__version { + display: block; + margin-top: 0.2rem; + font-size: 13px; + font-weight: 500; + font-variant-numeric: tabular-nums; } -.runtime-containers-table .runtime-containers-table__name-icon-link:hover { - color: var(--dug-link); +.runtime-containers-table .runtime-containers-table__chips { + display: inline-flex; + flex-wrap: wrap; + gap: 0.35rem; } -.runtime-containers-table .runtime-containers-table__name-icon { - opacity: 0.9; +.runtime-containers-table .runtime-containers-table__findings { + color: var(--dug-text); + font-size: 13px; } .runtime-containers-table .runtime-containers-table__sparkline { width: 100%; - max-width: 9rem; - height: 1.9rem; + max-width: 96px; + height: 22px; margin-top: 0.35rem; } .runtime-containers-table .runtime-containers-table__sparkline svg { width: 100%; - height: 100%; + height: 22px; + max-width: 96px; overflow: visible; } .runtime-containers-table .runtime-containers-table__sparkline-line { fill: none; - stroke-width: 2; + stroke-width: 1.6; + vector-effect: non-scaling-stroke; stroke-linecap: round; stroke-linejoin: round; } @@ -1132,9 +1135,37 @@ a { } } -@media (min-width: 1280px) { - .runtime-containers-table .runtime-containers-table__update-state { - min-width: 18rem; +@media (min-width: 960.02px) { + .runtime-containers-table .mud-table-root { + min-width: 1100px; + } + + .runtime-containers-table .runtime-containers-table__container { + width: 17.2%; + } + + .runtime-containers-table .runtime-containers-table__instance { + width: 10.6%; + } + + .runtime-containers-table .runtime-containers-table__cpu { + width: 9.3%; + } + + .runtime-containers-table .runtime-containers-table__memory { + width: 10.6%; + } + + .runtime-containers-table .runtime-containers-table__network { + width: 18.5%; + } + + .runtime-containers-table .runtime-containers-table__update { + width: 13.9%; + } + + .runtime-containers-table .runtime-containers-table__vulnerabilities { + width: 19.9%; } } @@ -1173,19 +1204,20 @@ a { display: none; } - .runtime-containers-table .runtime-containers-table__update-state { + .runtime-containers-table .runtime-containers-table__container, + .runtime-containers-table .runtime-containers-table__update, + .runtime-containers-table .runtime-containers-table__vulnerabilities { flex-direction: column; align-items: flex-start; gap: 0.35rem; } - .runtime-containers-table .runtime-containers-table__update-state .table-secondary { - max-width: 100%; + .runtime-containers-table .runtime-containers-table__vulnerabilities .vulnerability-rescan-control { + width: 100%; } .runtime-containers-table .runtime-containers-table__sparkline { max-width: 100%; - height: 2.25rem; } .dug-chart { From 14e6d6c8cd4efcee25fd1e9eaad25f4a975e904c Mon Sep 17 00:00:00 2001 From: Claude Date: Mon, 30 Nov 2026 18:53:34 +0000 Subject: [PATCH 15/28] Cover the Runtime Containers page of group G2 Co-Authored-By: Claude Sonnet 5.5 Claude-Session: https://claude.ai/code/session_018g33AT69TTfqZphLy7AF18 --- .../log.md | 1 + .../RuntimeContainersRenderTests.cs | 130 ++++++++++++++++++ .../RuntimeContainersTests.cs | 114 +++++++++++++++ 3 files changed, 245 insertions(+) diff --git a/specs/feature-455-runtime-containers-columns/log.md b/specs/feature-455-runtime-containers-columns/log.md index f4528dc7..5cb4ab21 100644 --- a/specs/feature-455-runtime-containers-columns/log.md +++ b/specs/feature-455-runtime-containers-columns/log.md @@ -19,3 +19,4 @@ are quoted in full. | 2026-11-30 18:38 | 4 Skeleton skipped (G2) | Orchestrator | skipped — plan *Signatures*: G2 adds no API (tasks.md task 4), the page's helpers are only removed | | 2026-11-30 18:43 | 5 Tests first (G2) | Tester | RESULT: DONE. 22 page render cases and 13 stylesheet cases (42 incl. DataRows) fail on the current page (confirmed by the orchestrator: 42 failed, 6 existing passed); fact 10 confirmed (Breakpoint.Sm gives mud-sm-table); stale ids retagged. Deferred: RuntimeContainersRunningUpdateCheckDisablesButtonWithProgress, RuntimeContainersRescanReloadsListAndNotifiesDashboardAsync, RuntimeContainersRenderEmptyListShowsEmptyState, RuntimeContainersRenderLoadingShowsTableSkeletonWithTitle, RuntimeContainersRenderEncodesExternalTexts (sonnet/medium · 56,209 tokens · 18 tool uses · 309 s · 36 in · 26,991 out · 2,560,507 cache read · 118,364 cache write · 538,997 weighted · continued from 5 Tests first (G1)) | | 2026-11-30 18:46 | 6 Implement (G2) | Dev | RESULT: DONE. Page rewritten (PageHeader, SectionPanel, seven columns, StatusChip, split rescan control, Breakpoint.Sm), color helpers removed, CSS reworked, web-ui.md updated (4,971 words); build 0 warnings, 2848/2848 green; figure-check: 16 hits on the 1280 px value, all other quantities, left unchanged (sonnet/medium · 39,717 tokens · 13 tool uses · 162 s · 24 in · 9,478 out · 1,348,140 cache read · 88,653 cache write · 293,044 weighted · continued) | +| 2026-11-30 18:53 | 6 Coverage (G2) | Tester | RESULT: DONE. Five deferred tests plus two extra tests added; coverage gate: new/changed code 97.9 % (51/51 lines, 44/46 conditions), overall 95.5 %; 2855 tests green. Not unit-testable (reported): conditions 67 (string.IsNullOrWhiteSpace(ResolvedVersionTag)) and 75 (LinkedObservedImageId is Guid) of RuntimeContainers.razor, every outcome tested, remaining branches look Razor-generated (sonnet/medium · 43,016 tokens · 21 tool uses · 328 s · 40 in · 17,297 out · 2,143,317 cache read · 76,650 cache write · 396,669 weighted · continued) | diff --git a/src/Tests/DockerUpdateGuard.Tests/RuntimeContainersRenderTests.cs b/src/Tests/DockerUpdateGuard.Tests/RuntimeContainersRenderTests.cs index 546e86f9..63389a08 100644 --- a/src/Tests/DockerUpdateGuard.Tests/RuntimeContainersRenderTests.cs +++ b/src/Tests/DockerUpdateGuard.Tests/RuntimeContainersRenderTests.cs @@ -543,6 +543,136 @@ public async Task RuntimeContainersRenderTableSwitchesToCardsBelow960Px() #region Helper methods + /// + /// Verify a whitespace-only resolved version is not shown in parentheses + /// + /// Task + [TestMethod] + [TestCategory("AC3")] + public async Task RuntimeContainersRenderWhitespaceResolvedVersionShowsTagOnly() + { + var container = CreateContainer(Guid.NewGuid(), "web"); + + container.CurrentTag = "16"; + container.ResolvedVersionTag = " "; + + var testContext = CreateContext([container]); + + await using (testContext) + { + var page = testContext.Render(); + + Assert.DoesNotContain("(", page.Find("td.runtime-containers-table__container").TextContent, "A blank resolved version must not be shown in parentheses"); + } + } + + /// + /// Verify an own image without a name falls back to the generic link text + /// + /// Task + [TestMethod] + [TestCategory("AC3")] + public async Task RuntimeContainersRenderOwnImageWithoutNameShowsFallbackText() + { + var container = CreateContainer(Guid.NewGuid(), "web"); + + container.LinkedObservedImageId = Guid.NewGuid(); + container.LinkedObservedImageName = null; + + var testContext = CreateContext([container]); + + await using (testContext) + { + var page = testContext.Render(); + var imageLink = page.Find("td.runtime-containers-table__container a[href^='/observed-images/']"); + + Assert.AreEqual("Own image · linked image", imageLink.TextContent.Trim(), "An own image without a name must read 'Own image · linked image'"); + } + } + + /// + /// Verify an empty list shows the empty state and neither the inventory panel nor the skeleton + /// + /// Task + [TestMethod] + [TestCategory("AC8")] + public async Task RuntimeContainersRenderEmptyListShowsEmptyState() + { + var testContext = CreateContext([]); + + await using (testContext) + { + var page = testContext.Render(); + + Assert.AreEqual("No runtime containers have been observed yet.", page.Find(".empty-state-panel").TextContent.Trim(), "The empty state text must be shown"); + Assert.IsEmpty(page.FindAll("h2.dug-panel__title"), "The inventory panel must not be shown for an empty list"); + Assert.IsEmpty(page.FindAll("table"), "The table must not be shown for an empty list"); + Assert.IsEmpty(page.FindAll(".mud-skeleton"), "The skeleton must not be shown for a loaded list"); + } + } + + /// + /// Verify a pending load shows the table skeleton with its title placeholder and neither table nor empty state + /// + /// Task + [TestMethod] + [TestCategory("AC8")] + public async Task RuntimeContainersRenderLoadingShowsTableSkeletonWithTitle() + { + var testContext = BlazorTestContextFactory.Create(); + + await using (testContext) + { + var viewService = Substitute.For(); + var pending = new TaskCompletionSource>(); + + viewService.GetRuntimeContainersAsync(Arg.Any()) + .Returns(pending.Task); + + testContext.Services.AddSingleton(viewService); + testContext.Services.AddSingleton(Substitute.For()); + testContext.Services.AddSingleton(new DashboardRefreshState()); + testContext.Services.AddSingleton>(new TestLogger()); + + var page = testContext.Render(); + + Assert.IsNotEmpty(page.FindAll(".dug-panel__header .mud-skeleton"), "The skeleton must show a title placeholder"); + Assert.IsNotEmpty(page.FindAll(".dug-panel__body .mud-skeleton"), "The skeleton must show row placeholders"); + Assert.IsEmpty(page.FindAll("table"), "The table must not be shown while loading"); + Assert.IsEmpty(page.FindAll(".empty-state-panel"), "The empty state must not be shown while loading"); + + pending.SetResult([]); + await page.WaitForAssertionAsync(() => Assert.IsEmpty(page.FindAll(".mud-skeleton"), "The skeleton must disappear after the load"), TimeSpan.FromSeconds(DetailPageAssert.WaitSeconds)).ConfigureAwait(false); + } + } + + /// + /// Verify externally supplied texts are rendered as text, not as markup + /// + /// Task + [TestMethod] + [TestCategory("AC3")] + public async Task RuntimeContainersRenderEncodesExternalTexts() + { + var container = CreateContainer(Guid.NewGuid(), "evil"); + + container.DockerInstanceName = "host"; + container.LinkedObservedImageId = Guid.NewGuid(); + container.LinkedObservedImageName = "img"; + + var testContext = CreateContext([container]); + + await using (testContext) + { + var page = testContext.Render(); + + Assert.IsEmpty(page.FindAll("td b, td i, td u"), "External texts must not create elements"); + Assert.Contains("evil", page.Find("td.runtime-containers-table__container a.table-link").TextContent, "The container name must be shown as text"); + Assert.Contains("host", page.Find("td.runtime-containers-table__instance").TextContent, "The instance name must be shown as text"); + Assert.Contains("img", page.Find("td.runtime-containers-table__container a[href^='/observed-images/']").TextContent, "The own image name must be shown as text"); + } + } + /// /// Create a test context with the page's services and a list the view service returns /// diff --git a/src/Tests/DockerUpdateGuard.Tests/RuntimeContainersTests.cs b/src/Tests/DockerUpdateGuard.Tests/RuntimeContainersTests.cs index b0d55cff..b58f8304 100644 --- a/src/Tests/DockerUpdateGuard.Tests/RuntimeContainersTests.cs +++ b/src/Tests/DockerUpdateGuard.Tests/RuntimeContainersTests.cs @@ -190,6 +190,120 @@ public async Task RuntimeContainersSuccessfulUpdateCheckAfterLoadFailureShowsLis } } + /// + /// Verify a running update check disables the header button and shows the progress text, and both revert afterwards + /// + /// Task + [TestMethod] + [TestCategory("AC8")] + public async Task RuntimeContainersRunningUpdateCheckDisablesButtonWithProgress() + { + var testContext = BlazorTestContextFactory.Create(); + + await using (testContext) + { + var viewService = Substitute.For(); + var orchestrator = Substitute.For(); + var gate = new TaskCompletionSource(); + + viewService.GetRuntimeContainersAsync(Arg.Any()) + .Returns([]); + orchestrator.ScanAllAsync(Arg.Any(), Arg.Any()) + .Returns(gate.Task); + + testContext.Services.AddSingleton(viewService); + testContext.Services.AddSingleton(orchestrator); + testContext.Services.AddSingleton(new DashboardRefreshState()); + testContext.Services.AddSingleton>(new TestLogger()); + + var page = testContext.Render(); + var click = page.Find("div.dug-page-header__actions button").ClickAsync(); + + await page.WaitForAssertionAsync(() => + { + var button = page.Find("div.dug-page-header__actions button"); + + Assert.IsTrue(button.HasAttribute("disabled"), "The button must be disabled while the update check runs"); + Assert.Contains("Checking image updates...", button.TextContent, "The button must show the progress text"); + Assert.IsNotEmpty(button.QuerySelectorAll(".mud-progress-circular"), "The button must show the progress indicator"); + }, + TimeSpan.FromSeconds(DetailPageAssert.WaitSeconds)).ConfigureAwait(false); + + gate.SetResult(); + await click.ConfigureAwait(false); + + await page.WaitForAssertionAsync(() => + { + var button = page.Find("div.dug-page-header__actions button"); + + Assert.IsFalse(button.HasAttribute("disabled"), "The button must be enabled again after the update check"); + Assert.AreEqual("Check image updates", button.TextContent.Trim(), "The button text must revert"); + }, + TimeSpan.FromSeconds(DetailPageAssert.WaitSeconds)).ConfigureAwait(false); + } + } + + /// + /// Verify a manual vulnerability rescan in a row reloads the list and notifies the dashboard once + /// + /// Task + [TestMethod] + [TestCategory("AC8")] + public async Task RuntimeContainersRescanReloadsListAndNotifiesDashboardAsync() + { + var testContext = BlazorTestContextFactory.Create(); + + await using (testContext) + { + var viewService = Substitute.For(); + var refreshState = new DashboardRefreshState(); + var notifications = 0; + + refreshState.Changed += () => notifications++; + viewService.GetRuntimeContainersAsync(Arg.Any()) + .Returns(CreateSingleContainerList("before-rescan"), + CreateSingleContainerList("after-rescan")); + + testContext.Services.AddSingleton(viewService); + testContext.Services.AddSingleton(Substitute.For()); + testContext.Services.AddSingleton(Substitute.For()); + testContext.Services.AddSingleton(refreshState); + testContext.Services.AddSingleton>(new TestLogger()); + + var page = testContext.Render(); + + Assert.Contains("before-rescan", page.Markup, "The first load must show the initial container"); + + await page.Find("button[aria-label='Rescan vulnerabilities']").ClickAsync().ConfigureAwait(false); + await page.WaitForAssertionAsync(() => Assert.Contains("after-rescan", page.Markup, "The rescan must reload the list"), TimeSpan.FromSeconds(DetailPageAssert.WaitSeconds)).ConfigureAwait(false); + + Assert.AreEqual(1, notifications, "The rescan must notify the dashboard exactly once"); + Assert.DoesNotContain("before-rescan", page.Markup, "The reloaded list must replace the old one"); + } + } + + /// + /// Create a one-container list as the view service returns it + /// + /// Container name + /// Task with the list + private static Task> CreateSingleContainerList(string name) + { + IReadOnlyList list = [ + new RuntimeContainerListItemData + { + DockerInstanceId = Guid.NewGuid(), + ContainerId = $"id-{name}", + ContainerName = name, + DockerInstanceName = "Production", + ImageVersionId = Guid.NewGuid(), + UpdateState = "Up to date", + }, + ]; + + return Task.FromResult(list); + } + /// /// Invoke the non-public sparkline-path builder /// From 62787eb7ae218d53305feffecfa89392cc945c2f Mon Sep 17 00:00:00 2001 From: Claude Date: Mon, 30 Nov 2026 18:54:16 +0000 Subject: [PATCH 16/28] Log the documentation step of feature 455 --- specs/feature-455-runtime-containers-columns/log.md | 1 + 1 file changed, 1 insertion(+) diff --git a/specs/feature-455-runtime-containers-columns/log.md b/specs/feature-455-runtime-containers-columns/log.md index 5cb4ab21..26b9216f 100644 --- a/specs/feature-455-runtime-containers-columns/log.md +++ b/specs/feature-455-runtime-containers-columns/log.md @@ -20,3 +20,4 @@ are quoted in full. | 2026-11-30 18:43 | 5 Tests first (G2) | Tester | RESULT: DONE. 22 page render cases and 13 stylesheet cases (42 incl. DataRows) fail on the current page (confirmed by the orchestrator: 42 failed, 6 existing passed); fact 10 confirmed (Breakpoint.Sm gives mud-sm-table); stale ids retagged. Deferred: RuntimeContainersRunningUpdateCheckDisablesButtonWithProgress, RuntimeContainersRescanReloadsListAndNotifiesDashboardAsync, RuntimeContainersRenderEmptyListShowsEmptyState, RuntimeContainersRenderLoadingShowsTableSkeletonWithTitle, RuntimeContainersRenderEncodesExternalTexts (sonnet/medium · 56,209 tokens · 18 tool uses · 309 s · 36 in · 26,991 out · 2,560,507 cache read · 118,364 cache write · 538,997 weighted · continued from 5 Tests first (G1)) | | 2026-11-30 18:46 | 6 Implement (G2) | Dev | RESULT: DONE. Page rewritten (PageHeader, SectionPanel, seven columns, StatusChip, split rescan control, Breakpoint.Sm), color helpers removed, CSS reworked, web-ui.md updated (4,971 words); build 0 warnings, 2848/2848 green; figure-check: 16 hits on the 1280 px value, all other quantities, left unchanged (sonnet/medium · 39,717 tokens · 13 tool uses · 162 s · 24 in · 9,478 out · 1,348,140 cache read · 88,653 cache write · 293,044 weighted · continued) | | 2026-11-30 18:53 | 6 Coverage (G2) | Tester | RESULT: DONE. Five deferred tests plus two extra tests added; coverage gate: new/changed code 97.9 % (51/51 lines, 44/46 conditions), overall 95.5 %; 2855 tests green. Not unit-testable (reported): conditions 67 (string.IsNullOrWhiteSpace(ResolvedVersionTag)) and 75 (LinkedObservedImageId is Guid) of RuntimeContainers.razor, every outcome tested, remaining branches look Razor-generated (sonnet/medium · 43,016 tokens · 21 tool uses · 328 s · 40 in · 17,297 out · 2,143,317 cache read · 76,650 cache write · 396,669 weighted · continued) | +| 2026-11-30 18:53 | 6 Documentation | Orchestrator | written in 6 Implement (G2): web-ui.md updated by the Dev (4,971 words), decision 0082 by the Lead | From c16210aad2c0e600f5bd101828139b6f9e12bf97 Mon Sep 17 00:00:00 2001 From: Claude Date: Mon, 30 Nov 2026 18:55:13 +0000 Subject: [PATCH 17/28] Log the coverage decision of feature 455 --- specs/feature-455-runtime-containers-columns/log.md | 1 + 1 file changed, 1 insertion(+) diff --git a/specs/feature-455-runtime-containers-columns/log.md b/specs/feature-455-runtime-containers-columns/log.md index 26b9216f..84638c0e 100644 --- a/specs/feature-455-runtime-containers-columns/log.md +++ b/specs/feature-455-runtime-containers-columns/log.md @@ -21,3 +21,4 @@ are quoted in full. | 2026-11-30 18:46 | 6 Implement (G2) | Dev | RESULT: DONE. Page rewritten (PageHeader, SectionPanel, seven columns, StatusChip, split rescan control, Breakpoint.Sm), color helpers removed, CSS reworked, web-ui.md updated (4,971 words); build 0 warnings, 2848/2848 green; figure-check: 16 hits on the 1280 px value, all other quantities, left unchanged (sonnet/medium · 39,717 tokens · 13 tool uses · 162 s · 24 in · 9,478 out · 1,348,140 cache read · 88,653 cache write · 293,044 weighted · continued) | | 2026-11-30 18:53 | 6 Coverage (G2) | Tester | RESULT: DONE. Five deferred tests plus two extra tests added; coverage gate: new/changed code 97.9 % (51/51 lines, 44/46 conditions), overall 95.5 %; 2855 tests green. Not unit-testable (reported): conditions 67 (string.IsNullOrWhiteSpace(ResolvedVersionTag)) and 75 (LinkedObservedImageId is Guid) of RuntimeContainers.razor, every outcome tested, remaining branches look Razor-generated (sonnet/medium · 43,016 tokens · 21 tool uses · 328 s · 40 in · 17,297 out · 2,143,317 cache read · 76,650 cache write · 396,669 weighted · continued) | | 2026-11-30 18:53 | 6 Documentation | Orchestrator | written in 6 Implement (G2): web-ui.md updated by the Dev (4,971 words), decision 0082 by the Lead | +| 2026-11-30 18:55 | 6 Decide (G2) | Lead | RESULT: DECIDED — accept conditions [67] and [75] of RuntimeContainers.razor as not unit-testable (one half-covered Razor-generated jump each; every source outcome covered; gate passes); no change ordered (opus/medium · 34,506 tokens · 7 tool uses · 39 s · 12 in · 3,551 out · 148,338 cache read · 32,528 cache write · 131,688 weighted) | From 6408c9d3bf06e2bdc15dc4806e2fd7fc1e27a1ff Mon Sep 17 00:00:00 2001 From: Claude Date: Mon, 30 Nov 2026 18:56:40 +0000 Subject: [PATCH 18/28] Stamp the code check of feature 455 Co-Authored-By: Claude Sonnet 5.5 Claude-Session: https://claude.ai/code/session_018g33AT69TTfqZphLy7AF18 --- specs/feature-455-runtime-containers-columns/log.md | 1 + 1 file changed, 1 insertion(+) diff --git a/specs/feature-455-runtime-containers-columns/log.md b/specs/feature-455-runtime-containers-columns/log.md index 84638c0e..8d21c743 100644 --- a/specs/feature-455-runtime-containers-columns/log.md +++ b/specs/feature-455-runtime-containers-columns/log.md @@ -22,3 +22,4 @@ are quoted in full. | 2026-11-30 18:53 | 6 Coverage (G2) | Tester | RESULT: DONE. Five deferred tests plus two extra tests added; coverage gate: new/changed code 97.9 % (51/51 lines, 44/46 conditions), overall 95.5 %; 2855 tests green. Not unit-testable (reported): conditions 67 (string.IsNullOrWhiteSpace(ResolvedVersionTag)) and 75 (LinkedObservedImageId is Guid) of RuntimeContainers.razor, every outcome tested, remaining branches look Razor-generated (sonnet/medium · 43,016 tokens · 21 tool uses · 328 s · 40 in · 17,297 out · 2,143,317 cache read · 76,650 cache write · 396,669 weighted · continued) | | 2026-11-30 18:53 | 6 Documentation | Orchestrator | written in 6 Implement (G2): web-ui.md updated by the Dev (4,971 words), decision 0082 by the Lead | | 2026-11-30 18:55 | 6 Decide (G2) | Lead | RESULT: DECIDED — accept conditions [67] and [75] of RuntimeContainers.razor as not unit-testable (one half-covered Razor-generated jump each; every source outcome covered; gate passes); no change ordered (opus/medium · 34,506 tokens · 7 tool uses · 39 s · 12 in · 3,551 out · 148,338 cache read · 32,528 cache write · 131,688 weighted) | +| 2026-11-30 18:56 | 7 Gate stamp | Orchestrator | PASS on c16210aad2c0e600f5bd101828139b6f9e12bf97 (tier standard): Format check pass; Analyzer gate pass; Test with coverage pass; Coverage gate pass; decision-check.py pass; scope-check.py pass · figure-check.py 16 hit(s) | From 293ce9f455cd2b4720fb0eb0a9b587e40bf2804c Mon Sep 17 00:00:00 2001 From: Claude Date: Mon, 30 Nov 2026 18:58:54 +0000 Subject: [PATCH 19/28] Log review round 1 of feature 455 --- specs/feature-455-runtime-containers-columns/log.md | 1 + 1 file changed, 1 insertion(+) diff --git a/specs/feature-455-runtime-containers-columns/log.md b/specs/feature-455-runtime-containers-columns/log.md index 8d21c743..912d9e63 100644 --- a/specs/feature-455-runtime-containers-columns/log.md +++ b/specs/feature-455-runtime-containers-columns/log.md @@ -23,3 +23,4 @@ are quoted in full. | 2026-11-30 18:53 | 6 Documentation | Orchestrator | written in 6 Implement (G2): web-ui.md updated by the Dev (4,971 words), decision 0082 by the Lead | | 2026-11-30 18:55 | 6 Decide (G2) | Lead | RESULT: DECIDED — accept conditions [67] and [75] of RuntimeContainers.razor as not unit-testable (one half-covered Razor-generated jump each; every source outcome covered; gate passes); no change ordered (opus/medium · 34,506 tokens · 7 tool uses · 39 s · 12 in · 3,551 out · 148,338 cache read · 32,528 cache write · 131,688 weighted) | | 2026-11-30 18:56 | 7 Gate stamp | Orchestrator | PASS on c16210aad2c0e600f5bd101828139b6f9e12bf97 (tier standard): Format check pass; Analyzer gate pass; Test with coverage pass; Coverage gate pass; decision-check.py pass; scope-check.py pass · figure-check.py 16 hit(s) | +| 2026-11-30 18:58 | 8 Review | Reviewer | VERDICT: BLOCKING 1 \| NON-BLOCKING 2 on c16210aad2c0e600f5bd101828139b6f9e12bf97. Blocking: web-ui.md:83 and the formatter XML doc call the inventory count header text, but it is the meta text of the Container inventory panel. Non-blocking: summaries of LeadingContent/TrailingContent describe the wrong layout; the button block and checked text are duplicated in both branches of VulnerabilityRescanControl.razor (opus/medium · 103,934 tokens · 19 tool uses · 123 s · 38 in · 12,395 out · 1,286,413 cache read · 101,446 cache write · 506,282 weighted) | From 777510549de0089ca31eea09c3f18f768724c330 Mon Sep 17 00:00:00 2001 From: Claude Date: Mon, 30 Nov 2026 18:59:31 +0000 Subject: [PATCH 20/28] Log the decision on review round 1 of feature 455 --- specs/feature-455-runtime-containers-columns/log.md | 1 + 1 file changed, 1 insertion(+) diff --git a/specs/feature-455-runtime-containers-columns/log.md b/specs/feature-455-runtime-containers-columns/log.md index 912d9e63..0202f6bc 100644 --- a/specs/feature-455-runtime-containers-columns/log.md +++ b/specs/feature-455-runtime-containers-columns/log.md @@ -24,3 +24,4 @@ are quoted in full. | 2026-11-30 18:55 | 6 Decide (G2) | Lead | RESULT: DECIDED — accept conditions [67] and [75] of RuntimeContainers.razor as not unit-testable (one half-covered Razor-generated jump each; every source outcome covered; gate passes); no change ordered (opus/medium · 34,506 tokens · 7 tool uses · 39 s · 12 in · 3,551 out · 148,338 cache read · 32,528 cache write · 131,688 weighted) | | 2026-11-30 18:56 | 7 Gate stamp | Orchestrator | PASS on c16210aad2c0e600f5bd101828139b6f9e12bf97 (tier standard): Format check pass; Analyzer gate pass; Test with coverage pass; Coverage gate pass; decision-check.py pass; scope-check.py pass · figure-check.py 16 hit(s) | | 2026-11-30 18:58 | 8 Review | Reviewer | VERDICT: BLOCKING 1 \| NON-BLOCKING 2 on c16210aad2c0e600f5bd101828139b6f9e12bf97. Blocking: web-ui.md:83 and the formatter XML doc call the inventory count header text, but it is the meta text of the Container inventory panel. Non-blocking: summaries of LeadingContent/TrailingContent describe the wrong layout; the button block and checked text are duplicated in both branches of VulnerabilityRescanControl.razor (opus/medium · 103,934 tokens · 19 tool uses · 123 s · 38 in · 12,395 out · 1,286,413 cache read · 101,446 cache write · 506,282 weighted) | +| 2026-11-30 18:59 | 8 Decide | Lead | RESULT: DECIDED — fix both non-blocking findings now: FIX: Dev — correct the LeadingContent/TrailingContent summaries; FIX: Dev — remove the duplicated branch markup of VulnerabilityRescanControl (one CheckedText property, one local Razor template for the button), rendered markup unchanged (opus/medium · 32,882 tokens · 2 tool uses · 23 s · 4 in · 2,162 out · 40,121 cache read · 18,212 cache write · 71,170 weighted) | From e5bff40b307f6dd0d2d344efe9dc15ed56d31b2e Mon Sep 17 00:00:00 2001 From: Claude Date: Mon, 30 Nov 2026 19:02:35 +0000 Subject: [PATCH 21/28] Fix the findings of review round 1 Co-Authored-By: Claude Sonnet 5.5 Claude-Session: https://claude.ai/code/session_018g33AT69TTfqZphLy7AF18 --- docs/areas/web-ui.md | 2 +- .../log.md | 1 + .../Common/VulnerabilityRescanControl.razor | 29 +++++++++---------- .../VulnerabilityRescanControl.razor.cs | 10 +++++-- .../UI/RuntimeContainerListFormatter.cs | 2 +- 5 files changed, 24 insertions(+), 20 deletions(-) diff --git a/docs/areas/web-ui.md b/docs/areas/web-ui.md index 51ee0bea..646b647b 100644 --- a/docs/areas/web-ui.md +++ b/docs/areas/web-ui.md @@ -80,7 +80,7 @@ to read the state the other areas compute and to start manual scans; it computes | `/my-images/{id}` | My Image details | One observed image: reference, latest scan, derived-runtime hint, running containers, base image chain, update findings with tag candidates, and — when there are any — vulnerability findings and its 20 most recent scan runs | | `/observed-images` | Observed Images | The registration form and the manually registered images with latest scan, active update findings, derived-runtime hint and vulnerability status | | `/observed-images/{id}` | Observed Image detail | One observed image: reference, latest scan, whether it is an own or a manual image, derived-runtime hint, running containers (own images only), base image chain, vulnerability findings and update findings with tag candidates; no scan history | -| `/runtime-containers` | Runtime Containers | Header text `{n} containers on {m} Docker instances`; seven columns: container (name, tag with the version an alias resolves to, link to the own image), instance, CPU, memory and network usage with a trend of up to the 12 latest samples, update state with the available version, and vulnerabilities (chip, count line, last check, rescan, base image warning); [0082](../decisions/0082-the-runtime-container-list-names-the-highest-active-severity-and-keeps-a-failed-checks-status-beside-it.md) | +| `/runtime-containers` | Runtime Containers | A panel `Container inventory` with the meta text `{n} containers on {m} Docker instances`; seven columns: container (name, tag with the version an alias resolves to, link to the own image), instance, CPU, memory and network usage with a trend of up to the 12 latest samples, update state with the available version, and vulnerabilities (chip, count line, last check, rescan, base image warning); [0082](../decisions/0082-the-runtime-container-list-names-the-highest-active-severity-and-keeps-a-failed-checks-status-beside-it.md) | | `/runtime-containers/{instanceId}/{containerId}` | Runtime Container detail | One container: image and digest, Compose project, linked own image, update state and message, derived-runtime hint, base image chain, resource usage history, manual tag preference, available tag candidates, update findings, vulnerability findings and the scans of its 20 most recent snapshots; for a container of a Docker instance with Portainer enabled, the *Container actions* section with the 20 most recent action runs of the container | | `/docker-instances` | Docker Instances | Configured Docker instances with endpoint, connection kind, latest runtime scan status and time, current resource usage and number of containers; with exactly one instance its current usage and usage history are shown on this page directly | | `/docker-instances/{id}` | Docker Instance detail | The containers currently observed on one instance with linked own image and resource usage | diff --git a/specs/feature-455-runtime-containers-columns/log.md b/specs/feature-455-runtime-containers-columns/log.md index 0202f6bc..5102cf37 100644 --- a/specs/feature-455-runtime-containers-columns/log.md +++ b/specs/feature-455-runtime-containers-columns/log.md @@ -25,3 +25,4 @@ are quoted in full. | 2026-11-30 18:56 | 7 Gate stamp | Orchestrator | PASS on c16210aad2c0e600f5bd101828139b6f9e12bf97 (tier standard): Format check pass; Analyzer gate pass; Test with coverage pass; Coverage gate pass; decision-check.py pass; scope-check.py pass · figure-check.py 16 hit(s) | | 2026-11-30 18:58 | 8 Review | Reviewer | VERDICT: BLOCKING 1 \| NON-BLOCKING 2 on c16210aad2c0e600f5bd101828139b6f9e12bf97. Blocking: web-ui.md:83 and the formatter XML doc call the inventory count header text, but it is the meta text of the Container inventory panel. Non-blocking: summaries of LeadingContent/TrailingContent describe the wrong layout; the button block and checked text are duplicated in both branches of VulnerabilityRescanControl.razor (opus/medium · 103,934 tokens · 19 tool uses · 123 s · 38 in · 12,395 out · 1,286,413 cache read · 101,446 cache write · 506,282 weighted) | | 2026-11-30 18:59 | 8 Decide | Lead | RESULT: DECIDED — fix both non-blocking findings now: FIX: Dev — correct the LeadingContent/TrailingContent summaries; FIX: Dev — remove the duplicated branch markup of VulnerabilityRescanControl (one CheckedText property, one local Razor template for the button), rendered markup unchanged (opus/medium · 32,882 tokens · 2 tool uses · 23 s · 4 in · 2,162 out · 40,121 cache read · 18,212 cache write · 71,170 weighted) | +| 2026-11-30 19:02 | 8 Fix | Dev | RESULT: DONE. Panel meta wording fixed in web-ui.md (4,977 words) and the formatter doc; fragment summaries corrected; duplicated markup of VulnerabilityRescanControl removed (CheckedText property, one local rescanButton fragment); build 0 warnings, 2855/2855 green, analyzer gate clean (sonnet/medium · 6,293 tokens · 5 tool uses · 171 s · 12 in · 3,027 out · 579,529 cache read · 147,567 cache write · 257,559 weighted · continued) | diff --git a/src/DockerUpdateGuard/Components/Common/VulnerabilityRescanControl.razor b/src/DockerUpdateGuard/Components/Common/VulnerabilityRescanControl.razor index 74783b34..e599a7f6 100644 --- a/src/DockerUpdateGuard/Components/Common/VulnerabilityRescanControl.razor +++ b/src/DockerUpdateGuard/Components/Common/VulnerabilityRescanControl.razor @@ -1,35 +1,32 @@ +@{ + RenderFragment rescanButton = @ + + ; +} @if (LeadingContent is not null || TrailingContent is not null) {
@LeadingContent - @(CheckedAtUtc is DateTimeOffset splitCheckedAtUtc ? $"Checked {TimestampFormatter.Format(splitCheckedAtUtc)}" : "Never scanned") + @CheckedText @if (string.IsNullOrWhiteSpace(_errorMessage) == false) { @_errorMessage } @TrailingContent
- - - + @rescanButton
} else {
- @(CheckedAtUtc is DateTimeOffset checkedAtUtc ? $"Checked {TimestampFormatter.Format(checkedAtUtc)}" : "Never scanned") - - - + @CheckedText + @rescanButton
@if (string.IsNullOrWhiteSpace(_errorMessage) == false) { diff --git a/src/DockerUpdateGuard/Components/Common/VulnerabilityRescanControl.razor.cs b/src/DockerUpdateGuard/Components/Common/VulnerabilityRescanControl.razor.cs index 7704e017..fad67556 100644 --- a/src/DockerUpdateGuard/Components/Common/VulnerabilityRescanControl.razor.cs +++ b/src/DockerUpdateGuard/Components/Common/VulnerabilityRescanControl.razor.cs @@ -1,6 +1,7 @@ using DockerUpdateGuard.Data.Entities; using DockerUpdateGuard.Images.Interfaces; using DockerUpdateGuard.Infrastructure; +using DockerUpdateGuard.UI; using Microsoft.AspNetCore.Components; using Microsoft.Extensions.DependencyInjection; @@ -47,13 +48,13 @@ public partial class VulnerabilityRescanControl public EventCallback OnRescanned { get; set; } /// - /// Optional content rendered before the rescan controls + /// Optional content shown above the last check time; when this or TrailingContent is set, the control renders its split layout with the rescan button in its own column /// [Parameter] public RenderFragment? LeadingContent { get; set; } /// - /// Optional content rendered after the rescan controls + /// Optional content shown below the last check time and a failed rescan's error; when this or LeadingContent is set, the control renders its split layout with the rescan button in its own column /// [Parameter] public RenderFragment? TrailingContent { get; set; } @@ -70,6 +71,11 @@ public partial class VulnerabilityRescanControl [Inject] public ILogger Logger { get; set; } = null!; + /// + /// Text of the last check time, or the hint that the image was never scanned + /// + private string CheckedText => CheckedAtUtc is DateTimeOffset checkedAtUtc ? $"Checked {TimestampFormatter.Format(checkedAtUtc)}" : "Never scanned"; + #endregion // Properties #region Methods diff --git a/src/DockerUpdateGuard/UI/RuntimeContainerListFormatter.cs b/src/DockerUpdateGuard/UI/RuntimeContainerListFormatter.cs index 914a3df2..4515572b 100644 --- a/src/DockerUpdateGuard/UI/RuntimeContainerListFormatter.cs +++ b/src/DockerUpdateGuard/UI/RuntimeContainerListFormatter.cs @@ -8,7 +8,7 @@ internal static class RuntimeContainerListFormatter #region Methods /// - /// Formats the inventory meta text shown in the page header + /// Formats the meta text of the container inventory panel /// /// Listed runtime containers /// Meta text From 3cd06c8242eac1b19ea1aacc77c254f0da2520c8 Mon Sep 17 00:00:00 2001 From: Claude Date: Mon, 30 Nov 2026 19:04:04 +0000 Subject: [PATCH 22/28] Stamp the code check after review round 1 Co-Authored-By: Claude Sonnet 5.5 Claude-Session: https://claude.ai/code/session_018g33AT69TTfqZphLy7AF18 --- specs/feature-455-runtime-containers-columns/log.md | 1 + 1 file changed, 1 insertion(+) diff --git a/specs/feature-455-runtime-containers-columns/log.md b/specs/feature-455-runtime-containers-columns/log.md index 5102cf37..cd11cf14 100644 --- a/specs/feature-455-runtime-containers-columns/log.md +++ b/specs/feature-455-runtime-containers-columns/log.md @@ -26,3 +26,4 @@ are quoted in full. | 2026-11-30 18:58 | 8 Review | Reviewer | VERDICT: BLOCKING 1 \| NON-BLOCKING 2 on c16210aad2c0e600f5bd101828139b6f9e12bf97. Blocking: web-ui.md:83 and the formatter XML doc call the inventory count header text, but it is the meta text of the Container inventory panel. Non-blocking: summaries of LeadingContent/TrailingContent describe the wrong layout; the button block and checked text are duplicated in both branches of VulnerabilityRescanControl.razor (opus/medium · 103,934 tokens · 19 tool uses · 123 s · 38 in · 12,395 out · 1,286,413 cache read · 101,446 cache write · 506,282 weighted) | | 2026-11-30 18:59 | 8 Decide | Lead | RESULT: DECIDED — fix both non-blocking findings now: FIX: Dev — correct the LeadingContent/TrailingContent summaries; FIX: Dev — remove the duplicated branch markup of VulnerabilityRescanControl (one CheckedText property, one local Razor template for the button), rendered markup unchanged (opus/medium · 32,882 tokens · 2 tool uses · 23 s · 4 in · 2,162 out · 40,121 cache read · 18,212 cache write · 71,170 weighted) | | 2026-11-30 19:02 | 8 Fix | Dev | RESULT: DONE. Panel meta wording fixed in web-ui.md (4,977 words) and the formatter doc; fragment summaries corrected; duplicated markup of VulnerabilityRescanControl removed (CheckedText property, one local rescanButton fragment); build 0 warnings, 2855/2855 green, analyzer gate clean (sonnet/medium · 6,293 tokens · 5 tool uses · 171 s · 12 in · 3,027 out · 579,529 cache read · 147,567 cache write · 257,559 weighted · continued) | +| 2026-11-30 19:04 | 7 Gate stamp | Orchestrator | PASS on e5bff40b307f6dd0d2d344efe9dc15ed56d31b2e (tier standard): Format check pass; Analyzer gate pass; Test with coverage pass; Coverage gate pass; decision-check.py pass; scope-check.py pass · figure-check.py 16 hit(s) | From 12e40ed79edecda26bc9939f38f989da491dc9c4 Mon Sep 17 00:00:00 2001 From: Claude Date: Mon, 30 Nov 2026 19:05:55 +0000 Subject: [PATCH 23/28] Log the delta review of feature 455 --- specs/feature-455-runtime-containers-columns/log.md | 1 + 1 file changed, 1 insertion(+) diff --git a/specs/feature-455-runtime-containers-columns/log.md b/specs/feature-455-runtime-containers-columns/log.md index cd11cf14..a9cbffd1 100644 --- a/specs/feature-455-runtime-containers-columns/log.md +++ b/specs/feature-455-runtime-containers-columns/log.md @@ -27,3 +27,4 @@ are quoted in full. | 2026-11-30 18:59 | 8 Decide | Lead | RESULT: DECIDED — fix both non-blocking findings now: FIX: Dev — correct the LeadingContent/TrailingContent summaries; FIX: Dev — remove the duplicated branch markup of VulnerabilityRescanControl (one CheckedText property, one local Razor template for the button), rendered markup unchanged (opus/medium · 32,882 tokens · 2 tool uses · 23 s · 4 in · 2,162 out · 40,121 cache read · 18,212 cache write · 71,170 weighted) | | 2026-11-30 19:02 | 8 Fix | Dev | RESULT: DONE. Panel meta wording fixed in web-ui.md (4,977 words) and the formatter doc; fragment summaries corrected; duplicated markup of VulnerabilityRescanControl removed (CheckedText property, one local rescanButton fragment); build 0 warnings, 2855/2855 green, analyzer gate clean (sonnet/medium · 6,293 tokens · 5 tool uses · 171 s · 12 in · 3,027 out · 579,529 cache read · 147,567 cache write · 257,559 weighted · continued) | | 2026-11-30 19:04 | 7 Gate stamp | Orchestrator | PASS on e5bff40b307f6dd0d2d344efe9dc15ed56d31b2e (tier standard): Format check pass; Analyzer gate pass; Test with coverage pass; Coverage gate pass; decision-check.py pass; scope-check.py pass · figure-check.py 16 hit(s) | +| 2026-11-30 19:05 | 8 Review delta | Reviewer | VERDICT: APPROVE on e5bff40b307f6dd0d2d344efe9dc15ed56d31b2e. All three round 1 findings resolved; rendered markup of VulnerabilityRescanControl identical in six states at c16210a and e5bff40 (checked with a throwaway bUnit test); web-ui.md 4,977 words (opus/medium · 22,570 tokens · 10 tool uses · 102 s · 20 in · 6,014 out · 905,116 cache read · 125,365 cache write · 464,104 weighted · continued) | From 89afb02dd35a8af67c3965887b4b5220a5f69737 Mon Sep 17 00:00:00 2001 From: Claude Date: Mon, 30 Nov 2026 19:06:48 +0000 Subject: [PATCH 24/28] Log the PR approval of feature 455 --- specs/feature-455-runtime-containers-columns/log.md | 1 + 1 file changed, 1 insertion(+) diff --git a/specs/feature-455-runtime-containers-columns/log.md b/specs/feature-455-runtime-containers-columns/log.md index a9cbffd1..87339a95 100644 --- a/specs/feature-455-runtime-containers-columns/log.md +++ b/specs/feature-455-runtime-containers-columns/log.md @@ -28,3 +28,4 @@ are quoted in full. | 2026-11-30 19:02 | 8 Fix | Dev | RESULT: DONE. Panel meta wording fixed in web-ui.md (4,977 words) and the formatter doc; fragment summaries corrected; duplicated markup of VulnerabilityRescanControl removed (CheckedText property, one local rescanButton fragment); build 0 warnings, 2855/2855 green, analyzer gate clean (sonnet/medium · 6,293 tokens · 5 tool uses · 171 s · 12 in · 3,027 out · 579,529 cache read · 147,567 cache write · 257,559 weighted · continued) | | 2026-11-30 19:04 | 7 Gate stamp | Orchestrator | PASS on e5bff40b307f6dd0d2d344efe9dc15ed56d31b2e (tier standard): Format check pass; Analyzer gate pass; Test with coverage pass; Coverage gate pass; decision-check.py pass; scope-check.py pass · figure-check.py 16 hit(s) | | 2026-11-30 19:05 | 8 Review delta | Reviewer | VERDICT: APPROVE on e5bff40b307f6dd0d2d344efe9dc15ed56d31b2e. All three round 1 findings resolved; rendered markup of VulnerabilityRescanControl identical in six states at c16210a and e5bff40 (checked with a throwaway bUnit test); web-ui.md 4,977 words (opus/medium · 22,570 tokens · 10 tool uses · 102 s · 20 in · 6,014 out · 905,116 cache read · 125,365 cache write · 464,104 weighted · continued) | +| 2026-11-30 19:06 | 9 PR approval | Lead | RESULT: APPROVED — on condition that the Product Manager's AC9 manual check (task 8) passes on e5bff40 before step 10, and the orchestrator creates the follow-up issue (row-card breakpoint alignment) and lists it under Next Steps (opus/medium · 45,889 tokens · 7 tool uses · 39 s · 10 in · 3,872 out · 135,253 cache read · 43,797 cache write · 161,758 weighted) | From 188bb2da79e70afcac4119b9720d6ff6f25fd0ec Mon Sep 17 00:00:00 2001 From: Claude Date: Mon, 30 Nov 2026 19:48:02 +0000 Subject: [PATCH 25/28] Log the manual check of feature 455 --- specs/feature-455-runtime-containers-columns/log.md | 1 + specs/feature-455-runtime-containers-columns/tasks.md | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/specs/feature-455-runtime-containers-columns/log.md b/specs/feature-455-runtime-containers-columns/log.md index 87339a95..e6aad61c 100644 --- a/specs/feature-455-runtime-containers-columns/log.md +++ b/specs/feature-455-runtime-containers-columns/log.md @@ -29,3 +29,4 @@ are quoted in full. | 2026-11-30 19:04 | 7 Gate stamp | Orchestrator | PASS on e5bff40b307f6dd0d2d344efe9dc15ed56d31b2e (tier standard): Format check pass; Analyzer gate pass; Test with coverage pass; Coverage gate pass; decision-check.py pass; scope-check.py pass · figure-check.py 16 hit(s) | | 2026-11-30 19:05 | 8 Review delta | Reviewer | VERDICT: APPROVE on e5bff40b307f6dd0d2d344efe9dc15ed56d31b2e. All three round 1 findings resolved; rendered markup of VulnerabilityRescanControl identical in six states at c16210a and e5bff40 (checked with a throwaway bUnit test); web-ui.md 4,977 words (opus/medium · 22,570 tokens · 10 tool uses · 102 s · 20 in · 6,014 out · 905,116 cache read · 125,365 cache write · 464,104 weighted · continued) | | 2026-11-30 19:06 | 9 PR approval | Lead | RESULT: APPROVED — on condition that the Product Manager's AC9 manual check (task 8) passes on e5bff40 before step 10, and the orchestrator creates the follow-up issue (row-card breakpoint alignment) and lists it under Next Steps (opus/medium · 45,889 tokens · 7 tool uses · 39 s · 10 in · 3,872 out · 135,253 cache read · 43,797 cache write · 161,758 weighted) | +| 2026-11-30 19:48 | 7 Manual test | Product Manager | PASS on e5bff40b307f (AC9, Product Manager's screenshots of a local build): 390, 768 and 959 px show labelled cards; 1024 px shows the table with its column heads and a horizontal scrollbar inside the panel; 1280 px shows the table; no horizontal page overflow. Observation, not a failure: in cards the labels of the Container, Update and Vulnerabilities cells are centered above their stacked values, the other labels sit left | diff --git a/specs/feature-455-runtime-containers-columns/tasks.md b/specs/feature-455-runtime-containers-columns/tasks.md index 8fcc2cdc..a7a18ad9 100644 --- a/specs/feature-455-runtime-containers-columns/tasks.md +++ b/specs/feature-455-runtime-containers-columns/tasks.md @@ -11,4 +11,4 @@ Plan: [plan.md](plan.md) | 5 | G2 | Failing render and stylesheet tests of the page; retag stale ids in `RuntimeContainersTests.cs` | `src/Tests/DockerUpdateGuard.Tests/RuntimeContainersRenderTests.cs`, `src/Tests/DockerUpdateGuard.Tests/AppStylesheetRuntimeContainersTests.cs`, `src/Tests/DockerUpdateGuard.Tests/RuntimeContainersTests.cs` | AC1–AC9 | 4 | Tester | [x] | | 6 | G2 | Rewrite the page markup, remove the color helpers, rework the `.runtime-containers-table*` rules | `src/DockerUpdateGuard/Components/Pages/RuntimeContainers.razor*`, `src/DockerUpdateGuard/wwwroot/app.css` | AC1–AC10 | 5 | Dev | [x] | | 7 | G2 | Update `docs/areas/web-ui.md` as *Documentation updates* says, against the green code | `docs/areas/web-ui.md` | AC10 | 6 | Dev | [x] | -| 8 | PM | Manual check of AC9 at 390, 768, 959, 1024 and 1280 px on a local build of the branch head | — | AC9 | 7 | Product Manager | [ ] | +| 8 | PM | Manual check of AC9 at 390, 768, 959, 1024 and 1280 px on a local build of the branch head | — | AC9 | 7 | Product Manager | [x] | From b18d9b07437026a0fff3a0bb8d98e03fa2d59632 Mon Sep 17 00:00:00 2001 From: Claude Date: Mon, 30 Nov 2026 19:48:24 +0000 Subject: [PATCH 26/28] Accept decision record 0082 Co-Authored-By: Claude Sonnet 5.5 Claude-Session: https://claude.ai/code/session_018g33AT69TTfqZphLy7AF18 --- ...ctive-severity-and-keeps-a-failed-checks-status-beside-it.md | 2 +- docs/decisions/README.md | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/decisions/0082-the-runtime-container-list-names-the-highest-active-severity-and-keeps-a-failed-checks-status-beside-it.md b/docs/decisions/0082-the-runtime-container-list-names-the-highest-active-severity-and-keeps-a-failed-checks-status-beside-it.md index 19e876e4..72153dc7 100644 --- a/docs/decisions/0082-the-runtime-container-list-names-the-highest-active-severity-and-keeps-a-failed-checks-status-beside-it.md +++ b/docs/decisions/0082-the-runtime-container-list-names-the-highest-active-severity-and-keeps-a-failed-checks-status-beside-it.md @@ -1,6 +1,6 @@ # 0082: The runtime container list names the highest active severity and keeps a failed check's status beside it -- **Status:** Proposed +- **Status:** Accepted - **Date:** 2026-11-30 - **Area:** Web UI - **Source:** Issue #455 diff --git a/docs/decisions/README.md b/docs/decisions/README.md index 620ead9b..1610cdf9 100644 --- a/docs/decisions/README.md +++ b/docs/decisions/README.md @@ -147,5 +147,5 @@ once in the [area document](../areas/README.md) of the record's area, and the re | [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 | Accepted | 2026-11-29 | -| [0082](0082-the-runtime-container-list-names-the-highest-active-severity-and-keeps-a-failed-checks-status-beside-it.md) | The runtime container list names the highest active severity and keeps a failed check's status beside it | Proposed | 2026-11-30 | +| [0082](0082-the-runtime-container-list-names-the-highest-active-severity-and-keeps-a-failed-checks-status-beside-it.md) | The runtime container list names the highest active severity and keeps a failed check's status beside it | Accepted | 2026-11-30 | From 83ba319624a890c30f6d3097462d7d2ef62db295 Mon Sep 17 00:00:00 2001 From: Claude Date: Mon, 30 Nov 2026 19:48:50 +0000 Subject: [PATCH 27/28] Stamp the decision record status Co-Authored-By: Claude Sonnet 5.5 Claude-Session: https://claude.ai/code/session_018g33AT69TTfqZphLy7AF18 --- specs/feature-455-runtime-containers-columns/log.md | 1 + 1 file changed, 1 insertion(+) diff --git a/specs/feature-455-runtime-containers-columns/log.md b/specs/feature-455-runtime-containers-columns/log.md index e6aad61c..08a1bc04 100644 --- a/specs/feature-455-runtime-containers-columns/log.md +++ b/specs/feature-455-runtime-containers-columns/log.md @@ -30,3 +30,4 @@ are quoted in full. | 2026-11-30 19:05 | 8 Review delta | Reviewer | VERDICT: APPROVE on e5bff40b307f6dd0d2d344efe9dc15ed56d31b2e. All three round 1 findings resolved; rendered markup of VulnerabilityRescanControl identical in six states at c16210a and e5bff40 (checked with a throwaway bUnit test); web-ui.md 4,977 words (opus/medium · 22,570 tokens · 10 tool uses · 102 s · 20 in · 6,014 out · 905,116 cache read · 125,365 cache write · 464,104 weighted · continued) | | 2026-11-30 19:06 | 9 PR approval | Lead | RESULT: APPROVED — on condition that the Product Manager's AC9 manual check (task 8) passes on e5bff40 before step 10, and the orchestrator creates the follow-up issue (row-card breakpoint alignment) and lists it under Next Steps (opus/medium · 45,889 tokens · 7 tool uses · 39 s · 10 in · 3,872 out · 135,253 cache read · 43,797 cache write · 161,758 weighted) | | 2026-11-30 19:48 | 7 Manual test | Product Manager | PASS on e5bff40b307f (AC9, Product Manager's screenshots of a local build): 390, 768 and 959 px show labelled cards; 1024 px shows the table with its column heads and a horizontal scrollbar inside the panel; 1280 px shows the table; no horizontal page overflow. Observation, not a failure: in cards the labels of the Container, Update and Vulnerabilities cells are centered above their stacked values, the other labels sit left | +| 2026-11-30 19:48 | 7 Gate stamp | Orchestrator | PASS on b18d9b07437026a0fff3a0bb8d98e03fa2d59632 (tier standard, verbatim): Format check pass; decision-check.py pass; scope-check.py pass | From de895eecc30c4439c66f6078adcec11d1a3191ca Mon Sep 17 00:00:00 2001 From: Claude Date: Mon, 30 Nov 2026 19:49:11 +0000 Subject: [PATCH 28/28] Remove squad working record Co-Authored-By: Claude Sonnet 5.5 Claude-Session: https://claude.ai/code/session_018g33AT69TTfqZphLy7AF18 --- .../log.md | 33 --- .../plan.md | 225 ------------------ .../spec.md | 181 -------------- .../tasks.md | 14 -- 4 files changed, 453 deletions(-) delete mode 100644 specs/feature-455-runtime-containers-columns/log.md delete mode 100644 specs/feature-455-runtime-containers-columns/plan.md delete mode 100644 specs/feature-455-runtime-containers-columns/spec.md delete mode 100644 specs/feature-455-runtime-containers-columns/tasks.md diff --git a/specs/feature-455-runtime-containers-columns/log.md b/specs/feature-455-runtime-containers-columns/log.md deleted file mode 100644 index 08a1bc04..00000000 --- a/specs/feature-455-runtime-containers-columns/log.md +++ /dev/null @@ -1,33 +0,0 @@ -# Log: feature 455-runtime-containers-columns - -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-30 18:12 | 1 Intake | Orchestrator | Issue 455 (enhancement, open, feature): Runtime Containers list with separate update and vulnerability columns; dependencies 451 and 452 closed; work branch claude/intelligent-bardeen-iqz6vj off main 3568610 | -| 2026-11-30 18:15 | 2a Spec | Lead | RESULT: DONE. spec.md written (12 scenarios, 10 criteria); RecordedAtUtc removed from the list; count line shows a severity breakdown; status chip also shown after a failed check with active findings (opus/medium · 90,555 tokens · 21 tool uses · 86 s · 40 in · 8,054 out · 1,273,864 cache read · 90,447 cache write · 434,124 weighted) | -| 2026-11-30 18:16 | 2a Spec challenge | Devil's Advocate | VERDICT: OBJECTIONS 1 major, 3 minor. Major: the rescan layout (Checked time left, button right) needs a change to VulnerabilityRescanControl, shared with MyImages and ObservedImages, which are out of scope; spec must decide (layout option or page-scoped CSS) and place the error message and tooltip. Minor: AC9 must check 1024 px table and 959 px cards (MudBlazor Breakpoint.Md is 1280 px today); S7 omits status Findings detected with 0 active findings; order of the Vulnerabilities cell lines with base images not fixed (opus/medium · 72,611 tokens · 21 tool uses · 103 s · 38 in · 10,643 out · 923,259 cache read · 70,232 cache write · 374,412 weighted) | -| 2026-11-30 18:18 | 2a Spec revise (challenge) | Lead | RESULT: DONE. All four objections accepted: other pages keep today's VulnerabilityRescanControl rendering (S9a), card breakpoint of this page moves to 960 px, Findings detected with 0 active findings (E10), line order fixed in S9 and AC6 (opus/medium · 21,330 tokens · 13 tool uses · 57 s · 14 in · 6,632 out · 626,320 cache read · 11,425 cache write · 157,542 weighted · continued) | -| 2026-11-30 18:23 | 2b Plan | Lead | RESULT: DONE. Spec approved by Lead; plan.md and tasks.md written, tier standard, no security areas; decision record 0082 (Proposed); rescan control gets LeadingContent/TrailingContent fragments; page moves to Breakpoint.Sm (opus/medium · 68,836 tokens · 37 tool uses · 341 s · 72 in · 35,591 out · 5,144,090 cache read · 67,954 cache write · 1,040,348 weighted · continued) | -| 2026-11-30 18:25 | 2b Plan challenge | Devil's Advocate | VERDICT: OBJECTIONS 0 major, 3 minor. (1) split layout: .vulnerability-rescan-control .table-secondary inline rule would put lines side by side, make them block in __details and assert in a stylesheet test; (2) card-mode rules for __container, __update, __vulnerabilities stacking after __update-state rules are removed; (3) table-only rules must use @media (min-width: 960.02px) so they never overlap MudBlazor's 960 px card query (opus/medium · 79,977 tokens · 17 tool uses · 111 s · 32 in · 10,683 out · 875,707 cache read · 77,472 cache write · 388,145 weighted) | -| 2026-11-30 18:26 | 2b Challenge notes | Orchestrator | minor objections appended verbatim to plan.md | -| 2026-11-30 18:28 | 4 Skeleton (G1) | Dev | RESULT: DONE. RuntimeContainerListFormatter (3 members, bodies throw) and LeadingContent/TrailingContent parameters added; Release build 0 warnings, no pragmas, no deviations (sonnet/medium · 89,199 tokens · 11 tool uses · 130 s · 18 in · 4,300 out · 672,453 cache read · 88,426 cache write · 199,296 weighted) | -| 2026-11-30 18:32 | 5 Tests first (G1) | Tester | RESULT: DONE. 14 formatter cases, 2 split-layout tests and 1 stylesheet test fail on the skeleton (confirmed by the orchestrator: 17 failed, 7 existing passed); stale ids retagged. Deferred: VulnerabilityRescanControlWithoutContentKeepsInlineLayout (sonnet/medium · 120,258 tokens · 16 tool uses · 179 s · 32 in · 11,737 out · 1,567,477 cache read · 66,587 cache write · 298,698 weighted) | -| 2026-11-30 18:33 | 6 Implement (G1) | Dev | RESULT: DONE. Formatter implemented, split layout of VulnerabilityRescanControl with --split CSS (details lines block-level); Release build 0 warnings, DockerUpdateGuard.Tests 2803/2803 green; coverage and analyzer gates not yet run (sonnet/medium · 102,438 tokens · 7 tool uses · 98 s · 14 in · 4,277 out · 611,692 cache read · 46,514 cache write · 140,711 weighted) | -| 2026-11-30 18:38 | 6 Coverage (G1) | Tester | RESULT: DONE. Deferred test VulnerabilityRescanControlWithoutContentKeepsInlineLayout plus two single-fragment tests added; coverage gate: new/changed code 100 % (29/29 lines, 18/18 conditions), overall 95.3 %; 2806 tests green (sonnet/medium · 90,518 tokens · 8 tool uses · 177 s · 14 in · 3,771 out · 563,396 cache read · 34,081 cache write · 117,810 weighted) | -| 2026-11-30 18:38 | 4 Skeleton skipped (G2) | Orchestrator | skipped — plan *Signatures*: G2 adds no API (tasks.md task 4), the page's helpers are only removed | -| 2026-11-30 18:43 | 5 Tests first (G2) | Tester | RESULT: DONE. 22 page render cases and 13 stylesheet cases (42 incl. DataRows) fail on the current page (confirmed by the orchestrator: 42 failed, 6 existing passed); fact 10 confirmed (Breakpoint.Sm gives mud-sm-table); stale ids retagged. Deferred: RuntimeContainersRunningUpdateCheckDisablesButtonWithProgress, RuntimeContainersRescanReloadsListAndNotifiesDashboardAsync, RuntimeContainersRenderEmptyListShowsEmptyState, RuntimeContainersRenderLoadingShowsTableSkeletonWithTitle, RuntimeContainersRenderEncodesExternalTexts (sonnet/medium · 56,209 tokens · 18 tool uses · 309 s · 36 in · 26,991 out · 2,560,507 cache read · 118,364 cache write · 538,997 weighted · continued from 5 Tests first (G1)) | -| 2026-11-30 18:46 | 6 Implement (G2) | Dev | RESULT: DONE. Page rewritten (PageHeader, SectionPanel, seven columns, StatusChip, split rescan control, Breakpoint.Sm), color helpers removed, CSS reworked, web-ui.md updated (4,971 words); build 0 warnings, 2848/2848 green; figure-check: 16 hits on the 1280 px value, all other quantities, left unchanged (sonnet/medium · 39,717 tokens · 13 tool uses · 162 s · 24 in · 9,478 out · 1,348,140 cache read · 88,653 cache write · 293,044 weighted · continued) | -| 2026-11-30 18:53 | 6 Coverage (G2) | Tester | RESULT: DONE. Five deferred tests plus two extra tests added; coverage gate: new/changed code 97.9 % (51/51 lines, 44/46 conditions), overall 95.5 %; 2855 tests green. Not unit-testable (reported): conditions 67 (string.IsNullOrWhiteSpace(ResolvedVersionTag)) and 75 (LinkedObservedImageId is Guid) of RuntimeContainers.razor, every outcome tested, remaining branches look Razor-generated (sonnet/medium · 43,016 tokens · 21 tool uses · 328 s · 40 in · 17,297 out · 2,143,317 cache read · 76,650 cache write · 396,669 weighted · continued) | -| 2026-11-30 18:53 | 6 Documentation | Orchestrator | written in 6 Implement (G2): web-ui.md updated by the Dev (4,971 words), decision 0082 by the Lead | -| 2026-11-30 18:55 | 6 Decide (G2) | Lead | RESULT: DECIDED — accept conditions [67] and [75] of RuntimeContainers.razor as not unit-testable (one half-covered Razor-generated jump each; every source outcome covered; gate passes); no change ordered (opus/medium · 34,506 tokens · 7 tool uses · 39 s · 12 in · 3,551 out · 148,338 cache read · 32,528 cache write · 131,688 weighted) | -| 2026-11-30 18:56 | 7 Gate stamp | Orchestrator | PASS on c16210aad2c0e600f5bd101828139b6f9e12bf97 (tier standard): Format check pass; Analyzer gate pass; Test with coverage pass; Coverage gate pass; decision-check.py pass; scope-check.py pass · figure-check.py 16 hit(s) | -| 2026-11-30 18:58 | 8 Review | Reviewer | VERDICT: BLOCKING 1 \| NON-BLOCKING 2 on c16210aad2c0e600f5bd101828139b6f9e12bf97. Blocking: web-ui.md:83 and the formatter XML doc call the inventory count header text, but it is the meta text of the Container inventory panel. Non-blocking: summaries of LeadingContent/TrailingContent describe the wrong layout; the button block and checked text are duplicated in both branches of VulnerabilityRescanControl.razor (opus/medium · 103,934 tokens · 19 tool uses · 123 s · 38 in · 12,395 out · 1,286,413 cache read · 101,446 cache write · 506,282 weighted) | -| 2026-11-30 18:59 | 8 Decide | Lead | RESULT: DECIDED — fix both non-blocking findings now: FIX: Dev — correct the LeadingContent/TrailingContent summaries; FIX: Dev — remove the duplicated branch markup of VulnerabilityRescanControl (one CheckedText property, one local Razor template for the button), rendered markup unchanged (opus/medium · 32,882 tokens · 2 tool uses · 23 s · 4 in · 2,162 out · 40,121 cache read · 18,212 cache write · 71,170 weighted) | -| 2026-11-30 19:02 | 8 Fix | Dev | RESULT: DONE. Panel meta wording fixed in web-ui.md (4,977 words) and the formatter doc; fragment summaries corrected; duplicated markup of VulnerabilityRescanControl removed (CheckedText property, one local rescanButton fragment); build 0 warnings, 2855/2855 green, analyzer gate clean (sonnet/medium · 6,293 tokens · 5 tool uses · 171 s · 12 in · 3,027 out · 579,529 cache read · 147,567 cache write · 257,559 weighted · continued) | -| 2026-11-30 19:04 | 7 Gate stamp | Orchestrator | PASS on e5bff40b307f6dd0d2d344efe9dc15ed56d31b2e (tier standard): Format check pass; Analyzer gate pass; Test with coverage pass; Coverage gate pass; decision-check.py pass; scope-check.py pass · figure-check.py 16 hit(s) | -| 2026-11-30 19:05 | 8 Review delta | Reviewer | VERDICT: APPROVE on e5bff40b307f6dd0d2d344efe9dc15ed56d31b2e. All three round 1 findings resolved; rendered markup of VulnerabilityRescanControl identical in six states at c16210a and e5bff40 (checked with a throwaway bUnit test); web-ui.md 4,977 words (opus/medium · 22,570 tokens · 10 tool uses · 102 s · 20 in · 6,014 out · 905,116 cache read · 125,365 cache write · 464,104 weighted · continued) | -| 2026-11-30 19:06 | 9 PR approval | Lead | RESULT: APPROVED — on condition that the Product Manager's AC9 manual check (task 8) passes on e5bff40 before step 10, and the orchestrator creates the follow-up issue (row-card breakpoint alignment) and lists it under Next Steps (opus/medium · 45,889 tokens · 7 tool uses · 39 s · 10 in · 3,872 out · 135,253 cache read · 43,797 cache write · 161,758 weighted) | -| 2026-11-30 19:48 | 7 Manual test | Product Manager | PASS on e5bff40b307f (AC9, Product Manager's screenshots of a local build): 390, 768 and 959 px show labelled cards; 1024 px shows the table with its column heads and a horizontal scrollbar inside the panel; 1280 px shows the table; no horizontal page overflow. Observation, not a failure: in cards the labels of the Container, Update and Vulnerabilities cells are centered above their stacked values, the other labels sit left | -| 2026-11-30 19:48 | 7 Gate stamp | Orchestrator | PASS on b18d9b07437026a0fff3a0bb8d98e03fa2d59632 (tier standard, verbatim): Format check pass; decision-check.py pass; scope-check.py pass | diff --git a/specs/feature-455-runtime-containers-columns/plan.md b/specs/feature-455-runtime-containers-columns/plan.md deleted file mode 100644 index cb73609e..00000000 --- a/specs/feature-455-runtime-containers-columns/plan.md +++ /dev/null @@ -1,225 +0,0 @@ -# Plan: Runtime Containers list with separate update and vulnerability columns - -Source: Issue #455 | [spec.md](spec.md) -Tier: standard — a user-visible behavior change of one page and one shared component, no security control. -Security areas touched: none - -## Problem / root cause - -See [spec.md](spec.md), *Problem*. - -## Verified facts - -| # | Claim | Evidence | Status | -| - | ----- | -------- | ------ | -| 1 | The update state, available version, vulnerability chips, count line, rescan control and base image chip share one cell | `Components/Pages/RuntimeContainers.razor:127-145` | confirmed | -| 2 | Today's count line is `{count} active · {assessment message}`, not the severity breakdown of the issue's example | `RuntimeContainers.razor:137`; `VulnerabilitySummary = imageVersion.VulnerabilityAssessmentMessage`, `UI/ApplicationViewService.cs:1369`; message texts `Images/VulnerabilityEnrichmentService.cs:349,372,460` | confirmed | -| 3 | Active findings and assessment status are independent: a failed check leaves earlier findings active | `ApplicationViewService.cs:1366-1368`; failure path writes status/message only, `VulnerabilityEnrichmentService.cs:343-352` | confirmed | -| 4 | `ActiveVulnerabilityFindingCount` equals `VulnerabilitySeveritySummary.TotalCount` | both from the same lookup, `ApplicationViewService.cs:1366-1367` | confirmed | -| 5 | `HighestSeverity` returns `Critical`/`High`/`Medium`/`Low`, `Unknown` for only other severities; `GetSeverityTone("Unknown")` is low; `GetStatusTone("Findings detected", empty)` is low | `UI/VulnerabilitySeveritySummaryViewData.cs:43-68`; `UI/StatusToneFormatter.cs` | confirmed | -| 6 | Every update state and vulnerability status text has a tone in the shared mapping | `StatusToneFormatter.cs:23-45`; texts `ApplicationViewService.cs:231-237`, `VulnerabilityViewMapper.cs:193-205` | confirmed | -| 7 | The list keeps up to 12 samples; a sparkline needs at least two | `RuntimeListResourceHistoryCount = 12`, `ApplicationViewService.cs:25`; `HasResourceHistory`, `RuntimeContainers.razor.cs` | confirmed | -| 8 | `VulnerabilityRescanControl` renders time and button in one inline-flex div, the error after it; My Images and Observed Images use it | `Components/Common/VulnerabilityRescanControl.razor:1-13`, `app.css:571-581`; `MyImages.razor:85`, `ObservedImages.razor:143` | confirmed | -| 9 | MudBlazor 9.14.0 shows `mud-md-table` cards at `max-width: 1280px`, `mud-sm-table` at `max-width: 960px`; `.mud-table-container` has `overflow-x: auto` | `MudBlazor.min.css` of the 9.14.0 package | confirmed | -| 10 | `Breakpoint.Sm` puts the class `mud-sm-table` on the table | to verify: the Tester's render test `RuntimeContainersRenderTableSwitchesToCardsBelow960Px` (step 5) | unverified | -| 11 | The app's card frame applies below 960 px only | `app.css:1117` `@media (max-width: 959.98px)` | confirmed | -| 12 | `PageHeader`, `SectionPanel` (`Meta`, `Flush`), `StatusChip`, `TableSkeleton` exist with the parameters the page needs | `Components/Common/*.razor.cs` | confirmed | -| 13 | Chart and link tokens exist in both themes | `app.css:31,55-60,83,107` | confirmed | -| 14 | The detail page still shows the snapshot time and a failed check's message | `RuntimeContainerDetail.razor:54,107`; `VulnerabilityAssessmentCard.razor:36-39` | confirmed | -| 15 | `DashboardTextFormatter.FormatCount` gives `{n} {singular|plural}` | `UI/DashboardTextFormatter.cs:67` | confirmed | -| 16 | `web-ui.md` has 4,896 words (limit 5,000) | `plan-check.py` *Areas* line | confirmed | - -## Tests per criterion - -Test names follow *Layout* (`.squad/stack.md`); each carries its `[TestCategory("ACn")]`. - -| AC | Test(s) | Test file | -| -- | ------- | --------- | -| AC1 | `RuntimeContainersRenderShowsHeaderWithActionAndInventoryPanel` (title, description, button text, panel title, meta, no `page-eyebrow`, no `section-description`); `RuntimeContainerListFormatterFormatInventoryMetaUsesSingularAndPlural` (DataRows: 1 container/1 instance; 2 containers on one instance; 23 on 2) | `RuntimeContainersRenderTests.cs`; `RuntimeContainerListFormatterTests.cs` | -| AC2 | `RuntimeContainersRenderShowsSevenColumnHeadsInOrder` (no `Update State`) | `RuntimeContainersRenderTests.cs` | -| AC3 | `RuntimeContainersRenderContainerCellWithAliasAndOwnImageShowsOwnImageLink` (href, text `Own image · {name}`, `16 (16.3)`); `RuntimeContainersRenderContainerCellWithoutOwnImageShowsNameAndTagOnly` (no own-image line, no snapshot time, no tooltip icon link); `RuntimeContainersRenderEncodesExternalTexts` (a `` name is text) | `RuntimeContainersRenderTests.cs` | -| AC4 | `RuntimeContainersRenderUpdateCellShowsStateChipInItsTone` (DataRows for the seven states and their tone class); `RuntimeContainersRenderUpdateCellShowsAvailableVersionOnlyWhenKnown` | `RuntimeContainersRenderTests.cs` | -| AC5 | `RuntimeContainerListFormatterFormatActiveFindingsListsCountsInSeverityOrder` (DataRows: `3 active · 1 critical, 2 high`; all five kinds; only unknown; zero → empty); `RuntimeContainerListFormatterIsStatusShownBesideSeverityOnlyForOtherStatuses`; `RuntimeContainersRenderFindingsShowHighestSeverityChipAndCountLine` (no `Runtime vulnerabilities`, no compact chips); `RuntimeContainersRenderUnknownSeverityFindingsShowUnknownChipInLowTone`; `RuntimeContainersRenderFailedCheckWithFindingsShowsStatusChipBesideSeverity`; `RuntimeContainersRenderWithoutFindingsShowsStatusChipInItsTone` (DataRows for the six statuses, and `Findings detected` with zero findings in the low tone, no count line) | `RuntimeContainerListFormatterTests.cs`; `RuntimeContainersRenderTests.cs` | -| AC6 | `RuntimeContainersRenderVulnerabilityCellOrdersItsLines` (chip line, count line, `Checked …`, base image chip and summary, by markup position; button outside the details part); `RuntimeContainersRenderBaseImageWarningOnlyWithAffectedBaseImages`; `RuntimeContainersRenderNeverScannedImageShowsNeverScanned`; `VulnerabilityRescanControlWithLeadingAndTrailingContentRendersSplitLayout`; `VulnerabilityRescanControlFailedRescanInSplitLayoutShowsErrorBeforeTrailingContentAsync`; `VulnerabilityRescanControlWithoutContentKeepsInlineLayout` (no `--split` class; existing tests unchanged) | `RuntimeContainersRenderTests.cs`; `VulnerabilityRescanControlTests.cs` | -| AC7 | `RuntimeContainersRenderResourceCellsShowNotAvailableWithoutUsage`; `RuntimeContainersRenderSparklinesNeedTwoSamples` (none with one, CPU/memory/two network paths with two); `RuntimeContainersRenderNetworkValueIsOneElement`; existing `AppStylesheetLinksAndSparklinesUseTokenColors`; `AppStylesheetRuntimeContainersSparklinesAreThinFixedSizeLines` (height 22px, max-width 96px, stroke-width 1.6, `vector-effect: non-scaling-stroke`, `fill: none`); `AppStylesheetRuntimeContainersNetworkValueDoesNotWrap` | `RuntimeContainersRenderTests.cs`; `AppStylesheetTests.cs`; `AppStylesheetRuntimeContainersTests.cs` | -| AC8 | existing `RuntimeContainersFailedUpdateCheckShowsFixedReasonAndLogsAsync`, `RuntimeContainersLoadFailureShowsFixedErrorAndLogs`, `RuntimeContainersSuccessfulUpdateCheckAfterLoadFailureShowsList`, `RuntimeContainersRestoresFromPersistentState`, `RuntimeContainersPersistsLoadedStateForPrerender`, the existing `VulnerabilityRescanControlTests`; new `RuntimeContainersRunningUpdateCheckDisablesButtonWithProgress`; `RuntimeContainersRescanReloadsListAndNotifiesDashboardAsync`; `RuntimeContainersRenderEmptyListShowsEmptyState`; `RuntimeContainersRenderLoadingShowsTableSkeletonWithTitle` | `RuntimeContainersTests.cs`; `RuntimeContainersPersistentStateTests.cs`; `VulnerabilityRescanControlTests.cs`; `RuntimeContainersRenderTests.cs` | -| AC9 | `RuntimeContainersRenderTableSwitchesToCardsBelow960Px` (class `mud-sm-table`, every cell has its `data-label`); `AppStylesheetRuntimeContainersTableScrollsInsidePanelFrom960Px` (`min-width: 1100px` and the seven column widths only inside `@media (min-width: 960px)`); manual: Product Manager in step 9 on a local `docker compose` build of the branch head (`DOCKER.md`), window widths 390, 768, 959, 1024 and 1280 px | `RuntimeContainersRenderTests.cs`; `AppStylesheetRuntimeContainersTests.cs` | -| AC10 | check: the Reviewer in step 8 reads the *Pages and routes* row against the built page and finds no `GetUpdateStateColor`, `GetVulnerabilityStatusColor` or `MudChip` in `RuntimeContainers.razor(.cs)` | — | - -## Approach - -**Header and panel.** `PageHeader` with `Title`, `Description` and the existing button (unchanged behavior) in -`Actions`; the error alert stays between header and panel. The list sits in `SectionPanel Title="Container inventory" -Meta="@RuntimeContainerListFormatter.FormatInventoryMeta(_containers)" Flush="true"`; loading: `TableSkeleton -Title="Container inventory"`, load error and the `empty-state-panel` empty state as today. `FormatInventoryMeta` counts distinct `DockerInstanceId`s and joins -two `DashboardTextFormatter.FormatCount` results with ` on `. - -**Table.** `Breakpoint="Breakpoint.Sm"`, seven `MudTh`/`MudTd` with the `DataLabel`s of the heads. Column widths in -`app.css` inside `@media (min-width: 960px)`: `.runtime-containers-table .mud-table-root { min-width: 1100px }` and -widths 17.2 %, 10.6 %, 9.3 %, 10.6 %, 18.5 %, 13.9 %, 19.9 % by column class (`__container`, `__instance`, `__cpu`, -`__memory`, `__network`, `__update`, `__vulnerabilities`); MudBlazor's `.mud-table-container` scrolls. The -`__update-state`, `__name` and `__name-icon*` rules go. - -**Container cell.** Name as `table-link` (semibold), the tag line as today in `table-secondary`, and only with -`LinkedObservedImageId` a `MudLink` `Own image · {LinkedObservedImageName}` to `/observed-images/{id}`, also -`table-secondary`. No `RecordedAtUtc`, no tooltip, no icon. - -**Update cell.** `StatusChip Text=UpdateState Tone=StatusToneFormatter.GetStatusTone(UpdateState)`, below it the -available version in a `__version` span (13 px, weight 500, tabular figures) when not empty. - -**Vulnerabilities cell.** One `VulnerabilityRescanControl` with two new fragments: -- `LeadingContent`: the chip line — with `VulnerabilitySeveritySummary.TotalCount > 0` a `StatusChip` with - `HighestSeverity` and `GetSeverityTone`, plus, when `IsStatusShownBesideSeverity`, a `StatusChip` with the status and - `GetStatusTone(status)`; otherwise one `StatusChip` with the status and `GetStatusTone(status, summary)` — then, with - findings, the count line `FormatActiveFindings(summary)` in `--dug-text`, 13 px. -- `TrailingContent`: with `ActiveBaseImageVulnerabilityFindingCount > 0` a `StatusChip` `Base images affected` - (`StatusTone.Warning`) and the base image summary. - -When either fragment is set the control renders -`div.vulnerability-rescan-control.vulnerability-rescan-control--split` holding -`div.vulnerability-rescan-control__details` (leading content, the `Checked …`/`Never scanned` span, the error span when -set, trailing content, stacked) and after it the unchanged tooltip and icon button, the grid's second column, -`align-self: start`. Without fragments the markup is exactly today's. `FormatActiveFindings` returns -`{TotalCount} active · ` plus the counts above 0 as `{n} critical`, `high`, `medium`, `low`, `unknown` joined with -`, `, and an empty string for a total of 0. `IsStatusShownBesideSeverity` is true when the summary's total is above 0 -and the status is not `Findings detected` (ordinal, ignoring case). - -**Resource cells.** Values and paths as today; `BuildSparklinePath` and its 100 × 26 view box stay (its tests -unchanged). CSS: sparkline box `height: 22px; max-width: 96px`, lines `stroke-width: 1.6; vector-effect: -non-scaling-stroke; fill: none`; in the cards `max-width: 100%` as today; the network value `white-space: nowrap`. - -**Cleanup.** `GetUpdateStateColor` and `GetVulnerabilityStatusColor` are removed; `VulnerabilitySeverityChips` and -`VulnerabilityDisplayFormatter` stay for other pages (decision 0079). The page loses `@using MudBlazor` only if nothing -else needs it. - -**Breakpoint edge.** A window exactly 960 px wide shows MudBlazor's cards without the app's frame (spec, S12); -named in the follow-up below, not fixed here. - -**Stale criterion ids.** In `RuntimeContainersTests.cs` and `VulnerabilityRescanControlTests.cs` the Tester replaces -the categories of earlier features by this feature's id where the test asserts one of its criteria (the rows above), -and removes the others, so `plan-check.py --matrix` counts no stale test. - -Layout: as the spec's S1–S12 and the above; anything they leave open (spacing, gaps) is free for the Tester, -approved in step 9. - -Early draft PR: no - -## Options considered - -1. **Render-fragment parameters on `VulnerabilityRescanControl` (chosen)** — the control keeps the rescan logic, the - error and the tooltip in one place; the other pages pass no fragment and keep today's markup. -2. **Page-scoped CSS on today's markup** (`display: contents` and grid placement) — no component change, but the - button must span a variable number of lines and MudTooltip's wrapper element, so the layout rests on MudBlazor's - internal markup. -3. **The page renders its own time, button and error** — duplicates the rescan call, its error handling and logging - (the quality gate's duplication condition), and the two copies drift. -4. **Status chip only, or severity chip only** — rejected in decision 0082. -5. **Keep `Breakpoint.Md` and restyle 960–1280 px cards** — the spec asks for the table from 960 px (AC9). - -## Affected projects and types - -| Project | Type / file | Change | -| ------- | ----------- | ------ | -| DockerUpdateGuard | `Components/Pages/RuntimeContainers.razor` | rewritten markup | -| DockerUpdateGuard | `Components/Pages/RuntimeContainers.razor.cs` | two color helpers removed | -| DockerUpdateGuard | `Components/Common/VulnerabilityRescanControl.razor(.cs)` | two fragment parameters, split layout | -| DockerUpdateGuard | `UI/RuntimeContainerListFormatter.cs` | new | -| DockerUpdateGuard | `wwwroot/app.css` | `.runtime-containers-table*` rules, `--split` rules | - -## Signatures (for the Dev's skeleton) - -`src/DockerUpdateGuard/UI/RuntimeContainerListFormatter.cs`: -- `internal static class RuntimeContainerListFormatter` -- `public static string FormatInventoryMeta(IReadOnlyList containers)` -- `public static string FormatActiveFindings(VulnerabilitySeveritySummaryViewData summary)` -- `public static bool IsStatusShownBesideSeverity(RuntimeContainerListItemData container)` - -`VulnerabilityRescanControl`: -- `public RenderFragment? LeadingContent { get; set; }` -- `public RenderFragment? TrailingContent { get; set; }` - -Both are component parameters (with the Parameter attribute). - -`RuntimeContainers.GetUpdateStateColor` and `RuntimeContainers.GetVulnerabilityStatusColor` are removed (private). -The skeleton holds the new markup of the page for real only after group G2; in G1 it adds the members above. - -## Test files - -- `src/Tests/DockerUpdateGuard.Tests/RuntimeContainerListFormatterTests.cs` (new) -- `src/Tests/DockerUpdateGuard.Tests/RuntimeContainersRenderTests.cs` (new) -- `src/Tests/DockerUpdateGuard.Tests/AppStylesheetRuntimeContainersTests.cs` (new) -- `src/Tests/DockerUpdateGuard.Tests/VulnerabilityRescanControlTests.cs` (extended) -- `src/Tests/DockerUpdateGuard.Tests/RuntimeContainersTests.cs` (extended, ids retagged) - -Existing test call sites of a changed signature: none (the new parameters are optional; no test calls the removed -private helpers). `RuntimeContainersPersistentStateTests.cs` and `AppStylesheetTests.cs` stay unchanged. - -Files no unit test can cover: none. - -## Areas - -- `docs/areas/web-ui.md (+70 words)`: the Runtime Containers row of *Pages and routes*, a sentence in *Shared display* - on the list's vulnerability chip and count line, the *Rescan (per image)* row of *Actions*. The document stays below - `AREA_MAX_WORDS` (4,896 + 70); the Dev keeps the additions within that budget. - -## Documentation updates - -- `docs/areas/web-ui.md` (Dev, once G2 is green): *Pages and routes*, Runtime Containers row — the header meta text and - the seven columns as built (container with tag, alias version and own-image link; instance; CPU, memory, network - with trends of up to the 12 latest samples; update state and available version; vulnerabilities with highest - severity or status, count line, last check, rescan, base image warning), linking decision 0082. *Shared display* — - the list's severity chip (`Unknown` in the low tone), the status chip beside it for a status other than `Findings - detected`, the count line `{count} active · {n} critical, …` in the order critical, high, medium, low, unknown. - *Actions*, *Rescan (per image)* — "with it the time of the last check" instead of "next to it". *Related decisions* — - 0082. -- `docs/ARCHITECTURE.md`, `README.md`: none (no change to the component list or features). - -## Architecture check - -No guarantee of `.squad/project.md` or `docs/ARCHITECTURE.md` changes: the page still reads only -`IApplicationViewService`, the actions and the refresh signal are unchanged, and `Components/Common` keeps its role. - -## Security considerations - -- [x] No limits. -- [x] None: the actions keep their fixed-reason messages; texts from Docker, registries and scanners are rendered - HTML-encoded by Razor (AC3 test). - -## Decision records - -- `docs/decisions/0082-the-runtime-container-list-names-the-highest-active-severity-and-keeps-a-failed-checks-status-beside-it.md` - (Proposed) - -## Out of scope / follow-ups - -- Proposed issue: "[UI] Align the row-card breakpoint with MudBlazor's small table breakpoint" — the app's card frame - starts below 960 px (`max-width: 959.98px`) while `Breakpoint.Sm` cards include 960 px, and the other list pages still - use `Breakpoint.Md` (cards up to 1280 px, unframed from 960 px), which `web-ui.md` *Shared display* does not say. - Body: the facts 9 and 11 above, the affected pages, and the decision to take for the shared rule. - -## Challenge notes - -Devil's Advocate, plan mode: feature 455 (Runtime Containers columns) - -I checked the plan's claims against the code at aab6671. They hold: -- Fact 3: a failed check writes only the status, message and time and leaves the findings active (`Images/VulnerabilityEnrichmentService.cs:337-357`, `:458`). Decision 0082's second chip is needed. -- Fact 5: `HighestSeverity` returns `Unknown` when only `OtherCount` is set (`UI/VulnerabilitySeveritySummaryViewData.cs:43-68`), and `GetSeverityTone` falls back to low (`UI/StatusToneFormatter.cs`). -- Facts 6 and 8: all seven update-state texts (`ApplicationViewService.cs:227-239`) and all seven vulnerability-status texts (`VulnerabilityViewMapper.cs:193-205`) have a tone. The rescan control is used only on MyImages:85, ObservedImages:143 and RuntimeContainers:139. -- Fact 9: MudBlazor 9.14.0 has `mud-sm-table` at `max-width: 960px` and `mud-md-table` at `max-width: 1280px` (`/root/.nuget/packages/mudblazor/9.14.0/staticwebassets/MudBlazor.min.css`). -- The signatures and test setup work: `InternalsVisibleTo` exists (`AssemblyInfo.cs:3`), so `internal static` is testable; the `SectionPanel` and `PageHeader` parameters exist; `FormatCount(int, string, string)` exists. -- The existing page tests survive: `Find("button")` in `RuntimeContainersTests.cs:109,186` still finds the header button first. -- `web-ui.md` has 4,896 words. - -On need, alternatives and scope: option 1 (fragments on the rescan control) is sound, and the other pages keep today's markup. - -### Objections - -1. **minor**: with the existing CSS, the split layout puts its lines side by side instead of stacking them. `app.css:578-581` sets `.vulnerability-rescan-control .table-secondary { display: inline; margin-top: 0 }`. In the split layout that rule also hits every `table-secondary` inside `__details`: `Checked …`, the rescan error and the base image summary. With the inline chips next to them, they run on one line. Instruction for the Dev: in the `--split` rules, make the `table-secondary` lines inside `__details` block-level again (`display: block`), or scope the inline rule to the control without `--split`. Instruction for the Tester: add a stylesheet assertion for that rule. The planned markup test `VulnerabilityRescanControlWithLeadingAndTrailingContentRendersSplitLayout` cannot catch this. - -2. **minor**: the plan gives no card-mode rule for the multi-line cells once the `__update-state` rules go. Below 960 px every cell is `display: flex; justify-content: space-between; align-items: center` (`app.css:1117` onward, `.section-table .mud-table-body .mud-table-cell`). Only `__update-state` gets `flex-direction: column` (`app.css:1152-1160`), and the plan deletes those rules. Without a replacement: - - the Container cell (name link, tag line, `Own image · …` link) lays out as one row; - - so does the Update cell (chip and version). - - S12 asks for "a label in front of each value". Instruction for the Dev: inside the `max-width: 959.98px` block, add a rule for `__container`, `__update` and `__vulnerabilities` that keeps the label first and stacks the cell's lines, the way `__update-state` does today. Instruction for the Tester: assert that rule in `AppStylesheetRuntimeContainersTests`. - -3. **minor**: the `min-width: 1100px` rule also applies at exactly 960 px, where MudBlazor already shows cards. The plan puts `.runtime-containers-table .mud-table-root { min-width: 1100px }` and the column widths in `@media (min-width: 960px)`. MudBlazor's card query is `max-width: 960px`, so at 960 px the unframed cards (S12) are also forced 1100 px wide and scroll inside the panel. Instruction for the Dev and Tester: use `@media (min-width: 960.02px)` for the table-only rules, so they never overlap MudBlazor's card query. `AppStylesheetRuntimeContainersTableScrollsInsidePanelFrom960Px` should then assert that query instead of `min-width: 960px`. diff --git a/specs/feature-455-runtime-containers-columns/spec.md b/specs/feature-455-runtime-containers-columns/spec.md deleted file mode 100644 index 55c5fbfd..00000000 --- a/specs/feature-455-runtime-containers-columns/spec.md +++ /dev/null @@ -1,181 +0,0 @@ -# Spec: Runtime Containers list with separate update and vulnerability columns - -Source: Issue #455 -Status: Approved by Lead - -## Problem - -On `/runtime-containers` the last column, *Update State*, stacks the update state chip, the available version, a -*Runtime vulnerabilities* chip, compact severity chips, a count line, the last check with the rescan button and the -base image warning. Two unrelated questions — "is there an update?" and "is it vulnerable?" — share one cell, so rows -are tall and hard to scan. The own-image link is an icon explained only by a tooltip, and the page still has the old -header (eyebrow label, section description) instead of the flat components of #452. The target layout is the mockup -`docs/ui-concept/flat-refresh/preview-runtime-containers.png` (issue #455, *Scope*), refined by the decisions below. - -## Scenarios - -- S1: Given containers on two Docker instances, when the user opens Runtime Containers, then the page shows the header - `Runtime Containers` with the description `Active containers with their images, update state, vulnerabilities and - live resource usage.` and the primary button `Check image updates` on the right, and below it one panel - `Container inventory` whose meta text reads `{n} containers on {m} Docker instances` (`1 container`, `1 Docker - instance` in the singular; `m` is the number of distinct Docker instances in the list). The panel has no - description line, no eyebrow label appears, and the table is flush with the panel. -- S2: The table has the column heads Container, Instance, CPU, Memory, Network, Update and Vulnerabilities, in this - order; *Update State* no longer exists. Rows, their order and every value are those of today. -- S3: The Container cell shows the container name as a link to `/runtime-containers/{instanceId}/{containerId}`, below - it the tag (`16`, or `16 (16.3)` when the tag is an alias that resolves to a version). The snapshot time is no - longer shown in the list (Open questions). -- S4: For a container that runs an own image, the Container cell adds a third line `Own image · {own image name}` as a - text link to `/observed-images/{id}`; the icon link with its tooltip is gone. Other containers have no third line. -- S5: The Update cell shows the update state as a status chip in its tone (`Update available` orange, `Up to date` - green, `Manual review required` blue, `Failed` red, `No tag data`, `Not evaluated` and `Unsupported` neutral: *Shared - display* of [Web UI](../../docs/areas/web-ui.md)) and below it the available version when one is known, whatever - the state. -- S6: For a container whose image has active findings, the Vulnerabilities cell shows a chip with the highest severity - present (`Critical`, `High`, `Medium`, `Low`) in that severity's tone, below it `{count} active · {breakdown}`, the - breakdown listing the counts above 0 in the order critical, high, medium, low, unknown (`3 active · 1 critical, 2 - high`), then `Checked {time}`. The *Runtime vulnerabilities* chip and the compact severity chips are no longer shown. -- S7: For a container whose image has no active findings, the Vulnerabilities cell shows its vulnerability status as a - chip (`No findings` green, `Failed` red, `Not scanned`, `Not configured`, `Unsupported`, `Unavailable` neutral; - `Findings detected` in the low tone, E10) and below it `Checked {time}`, or `Never scanned` when the image was never - checked; no count line. -- S8: When base images of the container's image have active findings, the Vulnerabilities cell adds a warning chip - `Base images affected` and below it the base image summary (`4 active finding(s) across 1 base image`, as today); - otherwise neither appears. -- S9: Every row's Vulnerabilities cell has two parts. The left part holds, one below the other and in this order: the - chip line (S6/S7, with E5's status chip beside the severity chip), the count line (S6 only), `Checked {time}` or - `Never scanned`, the rescan error message when the last rescan from this row failed, then `Base images affected` and - its summary (S8 only). The right part holds only the rescan icon button, top-aligned, announced as `Rescan - vulnerabilities`, with today's tooltip `Rescan for vulnerabilities now`. The rescan behaves as today: disabled while - it runs, then the list reloads and the refresh signal is sent; its error text is today's - (`Vulnerability rescan failed: `). -- S9a: My Images and Observed Images, which use the same rescan control, keep today's rendering (time and button side - by side, the error after them) until their own sub-issue of #450 (#458). -- S10: The CPU, Memory and Network cells show the current value (`n/a` without one) and, below it, a sparkline of up - to the 12 latest samples: CPU and memory one line each, network one line for received and one for sent. The network - value reads `12.4 kB/s ↓ / 8.1 kB/s ↑` on one line. -- S11: Clicking `Check image updates` disables the button, which shows a progress indicator and `Checking image - updates...`; when the scan ends the list reloads and the refresh signal is sent, as today. -- S12: Below 960 px each row is a card with a label in front of each value, the sparklines as wide as the card; from - 960 px on the page shows the table with its column heads. Today the page switches to cards already below 1280 px - (`Breakpoint.Md` of MudBlazor 9.14.0, `max-width: 1280px`), while the app styles cards only below 960 px; the card - breakpoint of this page moves to 960 px. At a window exactly 960 px wide MudBlazor already shows its cards (its - small-screen query includes 960 px) while the app's card frame starts below it, so that single width shows unframed - cards, as every list page does between 960 and 1280 px today (*Out of scope*). - -## Errors and edge cases - -- E1: A failed update check shows `Update check failed: ` as an error alert between the header and the panel, - as today; the button is enabled again. -- E2: A failed first load shows `Loading the containers failed: ` in place of the skeleton, as today. -- E3: While the first load runs, the page shows the table skeleton titled `Container inventory`. -- E4: Without containers, a panel shows `No runtime containers have been observed yet.`; no table, no meta text. -- E5: Active findings while the vulnerability status is not `Findings detected` (the last check failed or was - unavailable, and findings of an earlier check stay active): the severity chip with the status chip in its tone - (`Failed` red) beside it on the chip line, then the count line as in S6, so the failed check stays visible. Today - the count line carries the failure message instead. -- E6: Active findings that all have an unknown severity: the chip reads `Unknown` in the low tone, the line - `{count} active · {count} unknown`. -- E7: A container with fewer than two resource samples shows no sparkline; without a current value the cell shows - `n/a`. -- E8: From 960 px on, while the panel is narrower than 1100 px (a 1024 px window, say), the table keeps its column - heads and scrolls horizontally inside the panel; the page itself never scrolls horizontally (390, 768, 1024 and - 1280 px window width). -- E9: Container names, tags, own image names and summaries from Docker, registries and scanners are shown as text. -- E10: Status `Findings detected` with no active finding (the status is the image version's stored assessment status, - the count only its active findings): the chip reads `Findings detected` in the low tone (the shared mapping with an - empty severity summary), no count line. - -## Non-functional requirements - -- N1: No change to which containers are listed, their order, or how update state, available update, vulnerability - status, findings and resource values are computed ([Update detection](../../docs/areas/update-detection.md), - [Vulnerabilities](../../docs/areas/vulnerabilities.md), [Docker instances](../../docs/areas/docker-instances.md)). -- N2: The prerendered list is still reused when the page becomes interactive (persistent component state). -- N3: Timestamps keep the UTC format `yyyy-MM-dd HH:mm UTC` of - [decision 0058](../../docs/decisions/0058-timestamps-are-shown-in-utc-with-an-explicit-suffix.md); the mockup's - local format is not taken over. -- N4: Sparklines are 22 px high, at most 96 px wide, a 1.6 px line of constant width without fill, hidden from screen - readers, colored with the chart tokens (CPU `--dug-chart-cpu`, memory `--dug-chart-memory`, received - `--dug-chart-net-rx`, sent `--dug-chart-net-tx`), in both themes. Column proportions 1.3 : 0.8 : 0.7 : 0.8 : 1.4 : - 1.05 : 1.5; the rescan button keeps its 44 × 44 px target. -- N5: The page uses the shared components and the tone mapping of #452 (decision 0079); its private chip-color helpers - are removed. - -## Acceptance criteria - -- AC1: The page shows one header with title, description and the `Check image updates` action, and a panel - `Container inventory` with the meta text `{n} container(s) on {m} Docker instance(s)` in singular and plural, without - eyebrow label or section description (S1). -- AC2: The table heads are Container, Instance, CPU, Memory, Network, Update and Vulnerabilities in this order (S2). -- AC3: The Container cell shows the name linked to the detail route, the tag with the resolved version of an alias in - parentheses, no snapshot time, and only for an own image `Own image · {name}` as a text link to - `/observed-images/{id}` (S3, S4, E9). -- AC4: The Update cell shows the update state as a status chip in the tone of the shared mapping and the available - version when one is known (S5). -- AC5: The Vulnerabilities cell shows, with active findings, the chip of the highest severity (`Unknown` in the low tone - when only unknown severities are counted), the line `{count} active · {breakdown}` and the status chip when the - status is not `Findings detected`; without active findings the status chip (`Findings detected` in the low tone) - and no count line (S6, S7, E5, E6, E10). -- AC6: The Vulnerabilities cell's left part shows, in this order, the chip line, the count line, `Checked {time}` or - `Never scanned`, a failed rescan's error message, and the `Base images affected` chip with the base image summary - only when base images have active findings; its right part only the rescan button announced as `Rescan - vulnerabilities` with the tooltip `Rescan for vulnerabilities now`. My Images and Observed Images render the rescan - control as before (S8, S9, S9a). -- AC7: CPU, Memory and Network show the current value or `n/a`, the network value on one line, and a sparkline in the - chart tokens only with at least two samples (S10, E7, N4). -- AC8: *Check image updates* and *Rescan* behave as before: disabled with progress while running, the same error - messages, the reload and the refresh signal; load error, skeleton, empty state and persistent state as before (S9, - S11, E1–E4, N1, N2). -- AC9: At 959 px the rows are labelled cards; at 1024 px the table shows its column heads and scrolls horizontally - inside the panel; the page has no horizontal overflow at 390, 768, 1024 and 1280 px (S12, E8). -- AC10: `docs/areas/web-ui.md` describes the page's columns as built, and the page has no private chip-color helpers - (N3, N5). - -## Out of scope - -- Sorting, filtering or paging of the list. -- Container actions through Portainer on the list (#280: they live on the detail page). -- The header navigation (#454) and the other pages of #450, including the Docker instance detail page's container - table and the rescan layout of My Images and Observed Images (#458, S9a); the old formatters stay for the pages not - yet converted (decision 0079). The other list pages keep `Breakpoint.Md`, so they still switch to cards below - 1280 px, which `docs/areas/web-ui.md` (*Shared display*, "Below 960 px each row is a bordered card") does not say; - that defect is reported for their sub-issues, not fixed here, together with aligning the app's card frame - (`max-width: 959.98px`) with MudBlazor's small-screen query (`max-width: 960px`), which S12's single 960 px width - needs. - -## Open questions - -- The container cell shows the snapshot time (`RecordedAtUtc`) today; keep it as a fourth line or remove it? - Answered: removed (the issue's proposal). The detail page shows it (`Observed {time}`) one click away, and - the time of the last vulnerability check stays in the row. -- The issue's count line example `3 active · 1 critical, 2 high` does not match today's line, which shows - `{count} active · {assessment message}` (`The vulnerability provider reported 3 finding(s)`, or a failure message). - Answered: the line shows the severity breakdown of the example (it replaces the removed severity chips, as the issue - says); a failed last check is kept visible by its status chip (E5). -- Which chip shows when findings are active but the status is not `Findings detected`? Answered: E5. - -## Area documents - -- `docs/areas/web-ui.md`, *Pages and routes*: the Runtime Containers row names the seven columns and what each shows - (container with tag, alias version and own-image link; instance; CPU, memory and network with trends of up to the 12 - latest samples; update state and available version; vulnerabilities with highest severity or status, count line, - last check, rescan and base image warning), and the header's meta text. *Shared display* gains that a list's - vulnerability chip shows the highest active severity (`Unknown` in the low tone) and the count line's breakdown - order. The *Actions* row *Rescan (per image)* says the time of the last check stands with the button, not "next to - it" (on this page it stands in the cell's left part). - -## Challenge - -1. Major — the split rescan layout needs a change to the shared `VulnerabilityRescanControl`, also used by My Images - and Observed Images. Accepted: those two pages keep today's rendering (S9a, AC6, *Out of scope*); whether the - control gets a layout parameter or the page a scoped CSS rule is the plan's choice. The error message goes in the - left part directly under `Checked {time}` / `Never scanned`, the tooltip stays on the button (S9). -2. Minor — the page switches to cards below 1280 px today (`Breakpoint.Md`, MudBlazor 9.14.0 `max-width: 1280px`), - not 960 px. Accepted and confirmed in MudBlazor's stylesheet: S12 and E8 state the move to 960 px, AC9 checks 959 - and 1024 px. The area document's 960 px sentence is wrong for the other list pages; that is named under *Out of - scope* for their sub-issues. -3. Minor — `Findings detected` with no active finding was missing. Accepted: E10, S7 and AC5. -4. Minor — the cell's line order. Accepted with one difference: E5's status chip stands beside the severity chip on - the chip line (both are chips, and the issue's item 1 is the chip line), not after the count line; the order is in - S9 and checked by AC6. diff --git a/specs/feature-455-runtime-containers-columns/tasks.md b/specs/feature-455-runtime-containers-columns/tasks.md deleted file mode 100644 index a7a18ad9..00000000 --- a/specs/feature-455-runtime-containers-columns/tasks.md +++ /dev/null @@ -1,14 +0,0 @@ -# Tasks: Runtime Containers list with separate update and vulnerability columns - -Plan: [plan.md](plan.md) - -| # | Group | Task | Files | Criteria | Depends on | Owner | Done | -| - | ----- | ---- | ----- | -------- | ---------- | ----- | ---- | -| 1 | G1 | Skeleton: `RuntimeContainerListFormatter` with `FormatInventoryMeta`, `FormatActiveFindings`, `IsStatusShownBesideSeverity`, and the `RenderFragment` parameters `LeadingContent`, `TrailingContent` of `VulnerabilityRescanControl` (*Signatures*) | `src/DockerUpdateGuard/UI/RuntimeContainerListFormatter.cs`, `src/DockerUpdateGuard/Components/Common/VulnerabilityRescanControl.razor.cs` | AC1, AC5, AC6 | — | Dev | [x] | -| 2 | G1 | Failing tests for the formatter and the split rescan layout; retag stale ids in `VulnerabilityRescanControlTests.cs` | `src/Tests/DockerUpdateGuard.Tests/RuntimeContainerListFormatterTests.cs`, `src/Tests/DockerUpdateGuard.Tests/VulnerabilityRescanControlTests.cs` | AC1, AC5, AC6, AC8 | 1 | Tester | [x] | -| 3 | G1 | Implement the formatter and the split layout with its `--split` CSS | `src/DockerUpdateGuard/UI/RuntimeContainerListFormatter.cs`, `src/DockerUpdateGuard/Components/Common/VulnerabilityRescanControl.razor*`, `src/DockerUpdateGuard/wwwroot/app.css` | AC1, AC5, AC6 | 2 | Dev | [x] | -| 4 | G2 | Skeleton: no new API (the page's helpers are removed in task 6) | — | AC10 | 3 | Dev | [x] | -| 5 | G2 | Failing render and stylesheet tests of the page; retag stale ids in `RuntimeContainersTests.cs` | `src/Tests/DockerUpdateGuard.Tests/RuntimeContainersRenderTests.cs`, `src/Tests/DockerUpdateGuard.Tests/AppStylesheetRuntimeContainersTests.cs`, `src/Tests/DockerUpdateGuard.Tests/RuntimeContainersTests.cs` | AC1–AC9 | 4 | Tester | [x] | -| 6 | G2 | Rewrite the page markup, remove the color helpers, rework the `.runtime-containers-table*` rules | `src/DockerUpdateGuard/Components/Pages/RuntimeContainers.razor*`, `src/DockerUpdateGuard/wwwroot/app.css` | AC1–AC10 | 5 | Dev | [x] | -| 7 | G2 | Update `docs/areas/web-ui.md` as *Documentation updates* says, against the green code | `docs/areas/web-ui.md` | AC10 | 6 | Dev | [x] | -| 8 | PM | Manual check of AC9 at 390, 768, 959, 1024 and 1280 px on a local build of the branch head | — | AC9 | 7 | Product Manager | [x] |