Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
39 commits
Select commit Hold shift + click to select a range
34c5200
Start working record for feature 452
claude Nov 28, 2026
8a42603
Add spec for feature 452
claude Nov 28, 2026
3ce7494
Log spec challenge for feature 452
claude Nov 28, 2026
64c94cf
Revise spec for feature 452
claude Nov 28, 2026
5788159
Add plan and tasks for feature 452
claude Nov 28, 2026
d416af2
Append plan challenge notes
claude Nov 28, 2026
afbb13d
Skeleton for the tone mapping
claude Nov 28, 2026
4131cf5
Tests first for the tone mapping
claude Nov 28, 2026
f367e15
Implement the tone mapping
claude Nov 28, 2026
03ef7cf
Cover the tone css names
claude Nov 28, 2026
1447cc9
Log coverage pass for the tone mapping
claude Nov 28, 2026
a62e200
Tick the tone mapping tasks
claude Nov 28, 2026
324a389
Skeleton for the shared components
claude Nov 28, 2026
437d79b
Tests first for the shared components
claude Nov 28, 2026
b075321
Implement the shared components
claude Nov 28, 2026
9cf759d
Log G2 coverage
claude Nov 28, 2026
acef2cf
Tests first for the vulnerability widgets
claude Nov 28, 2026
0e0bb32
Convert the vulnerability widgets to the shared components
claude Nov 28, 2026
c6233f8
Test the disabled rescan button
claude Nov 28, 2026
3ca7635
Tests first for the stylesheet
claude Nov 28, 2026
df2ee5c
Implement the stylesheet and documentation
claude Nov 28, 2026
efac710
Log G4 coverage
claude Nov 28, 2026
f1ae618
Log documentation step
claude Nov 28, 2026
63a010f
Gate stamp for feature 452
claude Nov 28, 2026
0941e9d
Fix the status indicator sentence in the Web UI area
claude Nov 28, 2026
4777d86
Log review decision
claude Nov 28, 2026
c5a7a3f
Tests for the review fixes
claude Nov 28, 2026
52f675c
Fix field selector specificity and disabled button size
claude Nov 28, 2026
430ad7a
Gate stamp after review fixes
claude Nov 28, 2026
9125141
Log delta review
claude Nov 28, 2026
ab83caa
Log delta decision
claude Nov 28, 2026
7ffa072
Test the shrunk label selectors
claude Nov 28, 2026
9d03e11
Add the autofill shrunk label rule
claude Nov 28, 2026
a254a7d
Log delta fix
claude Nov 28, 2026
0f6ceb8
Gate stamp after delta fix
claude Nov 28, 2026
ea88a3f
Log approving review
claude Nov 28, 2026
02c8ca6
Accept decision record 0079
claude Nov 28, 2026
f669b0a
Stamp the record status
claude Nov 28, 2026
3257bb2
Remove squad working record
claude Nov 28, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 5 additions & 2 deletions docs/ARCHITECTURE.md
Original file line number Diff line number Diff line change
Expand Up @@ -427,8 +427,11 @@ Pages, routes and what each page shows or triggers are specified in
fairly wide surface (one method per page/section).
- **`Components\Common`** holds cross-page building blocks: loading
skeletons and the vulnerability widgets shared between the
Vulnerabilities page and image/container detail pages, and the
`ContainerActionConfirmation` dialog.
Vulnerabilities page and image/container detail pages, the
`ContainerActionConfirmation` dialog, and the status chip, scan status
indicator, severity bar, page header and section panel, which take their
tone from `UI\StatusToneFormatter`
([decision 0079](decisions/0079-statuses-map-to-tones-in-one-mapping-beside-the-chip-colors-of-unconverted-pages.md)).
- **`IContainerActionService` (`Portainer\ContainerActionService`)** backs
the *Container actions* section of `RuntimeContainerDetail`. It is a
singleton that opens its own `IServiceScopeFactory` scope for every
Expand Down
28 changes: 25 additions & 3 deletions docs/areas/web-ui.md
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,24 @@ to read the state the other areas compute and to start manual scans; it computes
availability answer that arrives for an earlier route. A re-render with the same route identifier keeps the shown
record until its reload completes.

### Shared display

- The shared components show a status as a chip in the tone of its text, compared ignoring letter case: green for
`Succeeded`, `Up to date` and `No findings`; orange for `Partial`, `Update available`, `Paused` and `Restarting`;
red for `Failed`; blue for `Running` and `Manual review required`; every other text, an unknown, empty or missing
one included, is neutral. A status chip takes its colors from the theme's chip color pairs; the scan status
indicator shows a dot in the tone's color beside the status text, which alone carries the meaning.
- 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 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.
- Tables use a sentence-case head with hairlines, hairline rows, tabular figures and a subtle hovered row. Below 960
px each row is a bordered card with the large radius.
- Buttons are not uppercase. Primary and secondary buttons and the fields are at least 44 px high; error and
disabled buttons keep MudBlazor's look. The per-image rescan button is announced as `Rescan vulnerabilities`.

### Pages and routes

| Route | Page | Shows |
Expand Down Expand Up @@ -88,7 +106,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" |
| 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` |
| 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)) |

Expand Down Expand Up @@ -178,8 +196,9 @@ never their values.
the drawer and filled buttons), and no lift, scaling or shadow when a card, link or button is hovered or pressed.
Menus, popovers (tooltips excepted) and dialogs are separated from the content by a hairline border; dialogs and snackbars also keep the drop shadow MudBlazor's own stylesheet gives them.
- In the dark theme the dark values apply to the whole document, so menus, popovers and dialogs are dark too.
- Text and status labels keep a contrast of at least 4.5:1 against their background in both themes; filled status
chips and buttons of the dark theme draw their label in the dark page color.
- Text and status labels keep a contrast of at least 4.5:1 against their background in both themes; filled
buttons and MudBlazor status chips of the dark theme draw their label in the dark page color; the shared
status chips take theirs from the tone's chip color pair.
- Text is set in Inter; page titles, entity names, the figures of the dashboard's metric cards and the product name
are set in Space Grotesk. Both fonts and the styles are served by the application itself; the browser loads
nothing from another host for them, and until a font has loaded the text shows in a fallback font.
Expand Down Expand Up @@ -273,6 +292,9 @@ never their values.
- [0078](../decisions/0078-mudblazor-elevation-shadows-are-switched-off-in-the-theme.md) β€” MudBlazor elevation
shadows are switched off in the theme.

- [0079](../decisions/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.

## Not here

- How update states, recommended tags, tag candidates and manual tag preferences are evaluated in
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
# 0079: Statuses map to tones in one mapping, beside the chip colors of unconverted pages

- **Status:** Accepted
- **Date:** 2026-11-28
- **Area:** Web UI
- **Source:** Issue #452
- **Supersedes:** β€”

## Context

The flat refresh (#450) colors statuses from the design tokens of #451 through plain elements, not MudBlazor chips.
Today scan statuses get a MudBlazor `Color` from `UI/ScanStatusDisplayFormatter.cs`, vulnerability statuses and
severities from `UI/VulnerabilityDisplayFormatter.cs`, update states from two private copies in the runtime container
pages, and every runtime status is a fixed info chip. Issue #452 builds the shared components but converts no page:
the pages keep binding MudBlazor colors until their own sub-issues.

## Options considered

1. **A new tone type and one tone mapping in `UI/`, next to the existing formatters, which stay until no page uses
them (chosen)** β€” the components get one mapping for every status kind and severity; the pages and their tests stay
untouched. Two mappings live side by side until the page sub-issues remove the old ones.
2. **Rename `VulnerabilityDisplayFormatter` and make it return tones** β€” one formatter at once, but every page that
binds its MudBlazor colors (four list pages, three detail pages, the Vulnerabilities page) would have to change
now, which the issue rules out.
3. **Let each formatter return a tone besides its color** β€” no new type of mapping, but the mapping of one status
would stay spread over three classes plus the page copies, which is what #452 removes.

## Decision

Statuses and severities map to a `StatusTone` in `UI/StatusToneFormatter.cs`, the only mapping the shared components
use; `ScanStatusDisplayFormatter` and `VulnerabilityDisplayFormatter` stay unchanged for the pages that have not
adopted the components. The tones of each value are stated in [Web UI](../areas/web-ui.md).

## Consequences

Until the last page sub-issue of #450, a scan status can be colored by both mappings, and they differ for `Pending`
(orange in the old one, neutral in the new one; the application never stores it) and for update states and
vulnerability statuses the old mappings default to blue. Each page sub-issue removes the page's private mappings, and
the last one deletes the two old formatters with their tests.
1 change: 1 addition & 0 deletions docs/decisions/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -139,4 +139,5 @@ once in the [area document](../areas/README.md) of the record's area, and the re
| [0076](0076-the-dotnet-release-index-is-parsed-as-a-remote-json-object-and-an-entry-that-is-not-one-is-left-out.md) | The .NET release index is parsed as a remote JSON object, and an entry that is not one is left out | Accepted | 2026-11-28 |
| [0077](0077-the-dark-theme-tokens-apply-to-the-whole-document-while-the-layout-is-dark.md) | The dark theme's tokens apply to the whole document while the layout is dark | Accepted | 2026-11-28 |
| [0078](0078-mudblazor-elevation-shadows-are-switched-off-in-the-theme.md) | MudBlazor elevation shadows are switched off in the theme | Accepted | 2026-11-28 |
| [0079](0079-statuses-map-to-tones-in-one-mapping-beside-the-chip-colors-of-unconverted-pages.md) | Statuses map to tones in one mapping, beside the chip colors of unconverted pages | Accepted | 2026-11-28 |
<!-- project:end index -->
22 changes: 22 additions & 0 deletions src/DockerUpdateGuard/Components/Common/PageHeader.razor
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
<header class="dug-page-header">
@if (Breadcrumb is not null)
{
<div class="dug-page-header__breadcrumb">@Breadcrumb</div>
}
<div class="dug-page-header__main">
<div class="dug-page-header__text">
<div class="dug-page-header__title-row">
<h1 class="dug-page-header__title">@Title</h1>
@TitleContent
</div>
@if (string.IsNullOrWhiteSpace(Description) == false)
{
<p class="dug-page-header__description">@Description</p>
}
</div>
@if (Actions is not null)
{
<div class="dug-page-header__actions">@Actions</div>
}
</div>
</header>
44 changes: 44 additions & 0 deletions src/DockerUpdateGuard/Components/Common/PageHeader.razor.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
using Microsoft.AspNetCore.Components;

namespace DockerUpdateGuard.Components.Common;

/// <summary>
/// Page header with title, description, breadcrumb and actions
/// </summary>
public partial class PageHeader
{
#region Properties

/// <summary>
/// Page title
/// </summary>
[Parameter]
[EditorRequired]
public string Title { get; set; } = string.Empty;

/// <summary>
/// Description below the title
/// </summary>
[Parameter]
public string? Description { get; set; }

/// <summary>
/// Actions shown beside the title
/// </summary>
[Parameter]
public RenderFragment? Actions { get; set; }

/// <summary>
/// Breadcrumb shown above the title
/// </summary>
[Parameter]
public RenderFragment? Breadcrumb { get; set; }

/// <summary>
/// Content shown next to the title in the title row
/// </summary>
[Parameter]
public RenderFragment? TitleContent { get; set; }

#endregion // Properties
}
17 changes: 10 additions & 7 deletions src/DockerUpdateGuard/Components/Common/PageHeaderSkeleton.razor
Original file line number Diff line number Diff line change
@@ -1,7 +1,10 @@
<MudPaper Class="hero-panel">
<MudStack Spacing="2">
<MudSkeleton Width="120px" Height="14px" Animation="Animation.Wave" />
<MudSkeleton Width="45%" Height="38px" Animation="Animation.Wave" />
<MudSkeleton Width="70%" Height="18px" Animation="Animation.Wave" />
</MudStack>
</MudPaper>
<header class="dug-page-header">
<div class="dug-page-header__main">
<div class="dug-page-header__text">
<MudStack Spacing="2">
<MudSkeleton Width="45%" Height="34px" Animation="Animation.Wave" />
<MudSkeleton Width="70%" Height="18px" Animation="Animation.Wave" />
</MudStack>
</div>
</div>
</header>
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
namespace DockerUpdateGuard.Components.Common;

/// <summary>
/// Skeleton placeholder that mirrors the hero page header while data is loading
/// Skeleton placeholder that mirrors the page header while data is loading
/// </summary>
public sealed partial class PageHeaderSkeleton;
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
<span class="@CssClass"><span class="dug-status__dot" aria-hidden="true"></span><span class="dug-status__text">@Status</span></span>
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
using DockerUpdateGuard.UI;

using Microsoft.AspNetCore.Components;

namespace DockerUpdateGuard.Components.Common;

/// <summary>
/// Status dot with text for a scan status
/// </summary>
public partial class ScanStatusIndicator
{
#region Properties

/// <summary>
/// Scan status text
/// </summary>
[Parameter]
public string? Status { get; set; }

/// <summary>
/// CSS classes of the indicator
/// </summary>
private string CssClass => $"dug-status dug-status--{StatusToneFormatter.GetCssName(StatusToneFormatter.GetStatusTone(Status))}";

#endregion // Properties
}
14 changes: 14 additions & 0 deletions src/DockerUpdateGuard/Components/Common/SectionPanel.razor
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
<section class="@CssClass">
<div class="dug-panel__header">
<h2 class="dug-panel__title">@Title</h2>
@if (HeaderContent is not null)
{
<div class="dug-panel__header-content">@HeaderContent</div>
}
else if (string.IsNullOrWhiteSpace(Meta) == false)
{
<span class="dug-panel__meta">@Meta</span>
}
</div>
<div class="dug-panel__body">@ChildContent</div>
</section>
49 changes: 49 additions & 0 deletions src/DockerUpdateGuard/Components/Common/SectionPanel.razor.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
using Microsoft.AspNetCore.Components;

namespace DockerUpdateGuard.Components.Common;

/// <summary>
/// Panel with a titled header and a body
/// </summary>
public partial class SectionPanel
{
#region Properties

/// <summary>
/// Panel title
/// </summary>
[Parameter]
[EditorRequired]
public string Title { get; set; } = string.Empty;

/// <summary>
/// Meta text beside the title
/// </summary>
[Parameter]
public string? Meta { get; set; }

/// <summary>
/// Header content shown instead of the meta text
/// </summary>
[Parameter]
public RenderFragment? HeaderContent { get; set; }

/// <summary>
/// Panel body
/// </summary>
[Parameter]
public RenderFragment? ChildContent { get; set; }

/// <summary>
/// Indicates whether the body has no padding
/// </summary>
[Parameter]
public bool Flush { get; set; }

/// <summary>
/// CSS classes of the panel
/// </summary>
private string CssClass => Flush ? "dug-panel dug-panel--flush" : "dug-panel";

#endregion // Properties
}
17 changes: 17 additions & 0 deletions src/DockerUpdateGuard/Components/Common/SeverityBar.razor
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
@if (Segments.Count > 0)
{
<div class="dug-severity">
<div class="dug-severity__bar" role="img" aria-label="@Label">
@foreach (var segment in Segments)
{
<span class="dug-severity__segment dug-severity__segment--@segment.Name" style="flex-grow: @segment.Count"></span>
}
</div>
<div class="dug-severity__legend">
@foreach (var segment in Segments)
{
<span>@segment.Count @segment.Name</span>
}
</div>
</div>
}
Loading