Skip to content

Service updates: dependency bumps, themed health dashboard, environment driven home page - #19

Merged
Digiman merged 14 commits into
mainfrom
feature/service-updates
Sep 29, 2026
Merged

Digiman merged 14 commits into
mainfrom
feature/service-updates

Conversation

@Digiman

@Digiman Digiman commented Sep 28, 2026 •

Copy link
Copy Markdown
Owner

Summary

Aggregates the three open Dependabot PRs and adds the next round of service improvements:
a themed health check dashboard, removal of the obsolete tye setup, and a home page that follows
the environment it runs in.

Aggregated dependency updates

Package From To
github/codeql-action (workflow) 3 4
Facet, Facet.Dashboard, Facet.Extensions 6.6.8 6.6.12
Microsoft.AspNetCore.Mvc.Testing 10.0.11 10.0.12
Microsoft.Extensions.Configuration 10.0.11 10.0.12
Microsoft.Extensions.Configuration.Abstractions 10.0.11 10.0.12
Microsoft.Extensions.DependencyInjection.Abstractions 10.0.11 10.0.12
Microsoft.Extensions.Hosting 10.0.11 10.0.12
Microsoft.Extensions.Logging.Abstractions 10.0.11 10.0.12
Microsoft.Extensions.Options 10.0.11 10.0.12
Microsoft.Extensions.Options.ConfigurationExtensions 10.0.11 10.0.12
Microsoft.Extensions.Options.DataAnnotations 10.0.11 10.0.12
Microsoft.NET.Test.Sdk 18.9.0 18.10.1
Scalar.AspNetCore 2.17.1 2.17.10
coverlet.collector 10.0.1 10.1.0

Source PRs: #13, #17, #18 (#18 was a strict subset of #17).

Health check dashboard styling and logo

  • The dashboard is a packaged SPA, so it is themed through a stylesheet loaded after its own one,
    configured with HealthCheckOptions:CustomStylesheet (a path relative to wwwroot)
  • wwwroot/css/healthcheck-dashboard.css overrides the dashboard CSS custom properties (palette,
    fonts, surfaces), adds a dark mode and points --logoImageUrl at
    wwwroot/images/healthcheck-logo.svg - the default logo is a remote image, so this also removes
    the external request
  • A configured stylesheet that is missing from wwwroot is logged as a warning and the dashboard
    falls back to its defaults instead of failing the startup
  • The dashboard page title now comes from HealthCheckOptions:HeaderText
  • Stylelint is disabled in super-linter: its standard config rejects the camelCase custom
    properties and BEM class names of the packaged dashboard that the theme has to override

tye removed

tye.yaml is gone - the service is hosted with the .NET CLI and Docker Compose, and Aspire will
provide the local orchestration later.

Environment driven home page

  • / is a Razor Page (Pages/Index.cshtml) instead of a static wwwroot/index.html
  • HomePageOptions configures the title, description, environment badge, the documentation and
    health check link groups, and any extra links
  • Swagger, Scalar and Facet links follow SwaggerEnabled; when they are expected but turned off the
    page says the documentation is not available instead of silently showing fewer buttons
  • The health dashboard link follows HealthCheckOptions:HealthCheckUiEnabled
  • HomePageOptions:Enabled=false skips Razor Pages registration entirely and / returns 404
  • appsettings.Production.json is the sample of a production deployment: no Swagger, no Scalar, no
    environment badge, plus an internal runbook link
  • Styles moved to wwwroot/css/home.css, icons live in wwwroot/icons (new facets.svg)

Tests

52 tests pass (11 Application + 41 Api, up from 40):

  • HealthCheckUiTests: dashboard title from configuration, custom stylesheet loaded after the
    default one, stylesheet and logo served, fallback when the stylesheet is missing
  • HomePageModelTests: links for documentation on/off, dashboard link on/off, link groups disabled,
    custom links (enabled/disabled, new tab, icon), title/description/environment badge, and the
    shipped appsettings.Production.json sample
  • Test projects now copy the API wwwroot to their output, so static web assets (home page styles,
    dashboard theme, logo) are served as in a real run

Verification

  • dotnet build -c Release: succeeded, 0 warnings, 0 errors
  • dotnet test: 52/52 passed
  • dotnet format --verify-no-changes: clean
  • Manual runs: Local shows Swagger, Scalar, Facets, Health status and Health dashboard with a
    Local badge; Production shows only health links, the runbook link and the documentation note,
    and /swagger returns 404; the dashboard serves the custom stylesheet and the logo

The Health Checks UI is a packaged single page application, so the theme is
applied with a stylesheet registered through AddCustomStylesheet and loaded
after the dashboard defaults. The logo is served from wwwroot instead of the
remote image the dashboard ships with.

- HealthCheckOptions.CustomStylesheet resolves the file from wwwroot and falls
  back to the dashboard defaults with a warning when it is not found
- Page title of the dashboard now comes from HealthCheckOptions.HeaderText
- Added HealthCheckUiTests and wwwroot copy for the test host
The project is hosted with the .NET CLI and Docker Compose; Aspire will
replace the local orchestration setup later.
The static index.html showed the same four buttons everywhere, including the
UIs that a production deployment does not expose. The page is now a Razor Page
whose links are derived from the configuration of the running environment.

- HomePageOptions configures the page: title, description, environment badge,
  documentation and health check groups, and extra links
- Swagger, Scalar and Facet links follow SwaggerEnabled; the page states that
  the documentation is not available instead of silently dropping the links
- appsettings.Production.json is the sample of a deployment without docs
- The page can be turned off completely, then / returns 404
- Styles and icons moved to wwwroot/css/home.css and wwwroot/icons
@Digiman Digiman changed the title Service updates: aggregated dependency bumps and Common package references Service updates: dependency bumps, themed health dashboard, environment driven home page Sep 28, 2026
{
// the shipped appsettings.Production.json is the sample of a deployment without Swagger
var configuration = new ConfigurationBuilder()
.AddJsonFile(Path.Combine(AppContext.BaseDirectory, "appsettings.Production.json"), optional: false)
- Disable the CSS prettier linter as well: prettier style is not enforced for
  any language in this repository
- Use the 'style sheet' and 'URL' spellings the natural language linter expects
Dashboard:
- Reworked the palette on a light/dark pair and checked every text and
  background combination for at least WCAG AA contrast (4.5:1)
- The dark palette is now complete: the table header, the status tags and the
  aside had light-on-light combinations, the table header text was effectively
  invisible before
- Secondary text and the base font size follow the theme

Home page:
- Theme switch with System, Light and Dark, rendered as a radio group so it
  works with the keyboard and screen readers
- The choice is stored in the browser and applied before the first paint by
  wwwroot/js/theme.js, and the system theme is followed live
- HomePageOptions.DefaultTheme sets where the switch starts
- The script is a separate file because the security headers policy does not
  allow inline scripts outside local development
The home page theme script is now written in the standard style enforced by
super-linter (2 space indent, no semicolons, const instead of var), verified
locally with standard, and the JavaScript prettier linter is disabled like the
other prettier linters of this repository.
The page had a centered hero with the title, the environment badge and the
theme switch stacked on top of each other, which pushed the actual content
below the fold and repeated the title in two places.

- A sticky top bar now carries the service mark and name on the left, the
  environment badge and the theme switch on the right
- The title moved into the top bar, so the document keeps a single h1 and the
  content starts right below the bar
- Description, link cards and the notes stay in the content area; an empty
  state was added for a service without links
- New service mark icon, a visually hidden hint for links that open in a new
  tab, and focus outlines on the cards and the switch
- The unselected switch labels got their own color: the muted text on the
  switch background was below the AA contrast ratio
- Replace the theme switch labels with monitor/sun/moon icons, keeping
  visually hidden accessible names and visible focus states
- Lower the visual contrast of both palettes on the home page and the
  health check dashboard while keeping every text/background pair at
  WCAG AA (4.5:1)
- Fix the dashboard title being invisible in the dark palette
- Fix the table row hover overrides targeting a class the dashboard
  never renders; both palettes now use a quiet tinted hover
- Soften the sidebar active/hover and button hover states
- Keep the theme-color meta in sync with the active theme
- Fix the quoted -apple-system font stack entry, add
  prefers-reduced-motion and -webkit-backdrop-filter handling
- Invert the single color dark link icons in the dark theme
Both are internal facing surfaces, so production now serves only the
API itself. The sample links are dropped from the config for the same
reason.
The sample production configuration no longer ships custom links, so
the test now asserts that no external links are rendered instead of
expecting the removed Runbook and Mailbox entries.
@Digiman
Digiman merged commit cfe48c8 into main Sep 29, 2026
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants