Skip to content

Modernize the dashboard experience - #21412

Merged
Sébastien Ros (sebastienros) merged 92 commits into
mainfrom
sebros/dashboard-modern-experience
Oct 30, 2026
Merged

Sébastien Ros (sebastienros) merged 92 commits into
mainfrom
sebros/dashboard-modern-experience

Conversation

@sebastienros

@sebastienros Sébastien Ros (sebastienros) commented Oct 29, 2026 •

Copy link
Copy Markdown
Contributor

This PR introduces a redesigned dashboard experience. It's an early experiment: we want to learn what works and what doesn't before going further. Users can switch back to the previous dashboard at any time from Settings, and the dashboard asks for feedback along the way.

testshop-home

What's new

  • Home view: the run's status, live activity, slowest endpoints, busiest resources and recent errors on one page.
  • Resource pane: every page keeps the resource list on the left, with search, filters, kind toggles, multi-selection and Select all. Logs, traces and metrics follow the selected resources.
  • Grouping by tags: resources and their parameters can be grouped by tags, type or state. Tags can come from the AppHost or be added in the dashboard.
  • Resource overview: choose between a summary, cards, a list or a graph, with quick actions on each resource.
  • Parameters: set or delete a parameter's value directly from its overview.
  • Metrics: instruments are shown as cards with live sparklines. You can pin the ones you care about, filter across meters, and group or sort instruments across resources.
  • Recordings: switch between the live run and recorded runs from the header.

Try it

⚠️ WARNING: Do not do this without first carefully reviewing the code of this PR to satisfy yourself it is safe.

Install the Aspire CLI built from this PR with:

curl -fsSL https://raw.githubusercontent.com/microsoft/aspire/main/eng/scripts/get-aspire-cli-pr.sh | bash -s -- 21412

Or run remotely in PowerShell:

iex "& { $(irm https://raw.githubusercontent.com/microsoft/aspire/main/eng/scripts/get-aspire-cli-pr.ps1) } 21412"

- Add top-level Home, Resources, Parameters, and Graph navigation.
- Add a resources layout with a resizable, collapsible, multi-select resource
  pane and per-resource tabs for overview, console, structured logs, traces,
  and metrics.
- Add a card-based resource overview with status, endpoints, relationship
  graph, console preview, telemetry summaries, properties, environment
  variables, volumes, and health checks.
- Add a Home page with overall health, telemetry totals, resource tiles, and
  recent errors and failed traces.
- Redirect legacy resource URLs to the new views.

Co-authored-by: Copilot App <[email protected]>
- Replace header navigation with a vertical icon rail (Resources, Tags,
  Parameters, Graph, Terminals and Extensions placeholders).
- Resource list becomes the second navigation pane; Parameters and Graph
  render without it.
- Add a tag editor to the resource overview, persisted per application in
  a SQLite settings database, and a Tags pane grouping resources by tag.

Co-authored-by: Copilot App <[email protected]>
Selecting it clears the resource selection and the overview shows a card per resource.

Co-authored-by: Copilot App <[email protected]>
Matches the tab look and feel of the main resources page.

Co-authored-by: Copilot App <[email protected]>
Move the tag group chevron to the right and make the tag name select all resources in the group.

Co-authored-by: Copilot App <[email protected]>
Replace the filter popover with an AspireMenuButton menu matching the
resource commands popup. Menu items support group headers and checkbox
toggles that keep the menu open.

Co-authored-by: Copilot App <[email protected]>
Replace the misleading 'Live run' selector with a history icon and a menu
listing the live view and previous recordings with their date and duration.

Co-authored-by: Copilot App <[email protected]>
The header button reads 'Recordings' while the live view is shown and the
selected recording's date otherwise. 'Live view' gets a green play icon.

Co-authored-by: Copilot App <[email protected]>
… padding, hide unlocked action

Co-authored-by: Copilot App <[email protected]>
- Home: live app-state insights replacing underwhelming log/trace/metric totals
- Nav: disabled-state cursor affordance, responsive popup menu for narrow/toolbar-constrained tab rows
- Console logs toolbar: consistent row/padding, right-aligned filters, removed noisy status text
- Consistent top-nav/content padding and gaps across pages
- Metrics page: sensible default selections, reworked back-to-traces button UX
- Resource relationship graph: toned-down focus color, larger centered graphic, icon-button for open console
- Panel icon alignment and icon-button affordances
- Overview: conditional panel display, loading skeletons, endpoints card dedupe/grouping
- Container image values now link out to their registry page in a new tab
- Volumes: reveal bind-mount source path in OS file explorer (Windows/macOS/Linux)
Integrate the dedicated Terminals page and conditional navigation with the modern dashboard shell, preserve recordings and resource tabs, and reconcile localized resource classes.

Co-authored-by: Copilot App <[email protected]>
Co-authored-by: Copilot App <[email protected]>
Copilot-Session: 2b0b6dd9-44ee-4ba7-82c5-a5ba3b43c5f8
Co-authored-by: Copilot App <[email protected]>
Copilot-Session: 6cc982e7-b012-4f63-ab6f-51ef1f51d849
Preserve upstream dashboard histogram, graph lifecycle, trace overflow, command toast, and telemetry fixes. Adapt hidden-resource indicators and migrated browser coverage to the modern navigation.

Co-authored-by: Copilot App <[email protected]>
Copilot-Session: 6cc982e7-b012-4f63-ab6f-51ef1f51d849
Co-authored-by: Copilot App <[email protected]>
Copilot-Session: 6cc982e7-b012-4f63-ab6f-51ef1f51d849
Replace per-row trace overflow and span-log FluentTooltip components with shared on-demand tooltips. Preserve log metadata and bounded rich tooltips, and cover large span-log collections.

Co-authored-by: Copilot App <[email protected]>
Copilot-Session: 6cc982e7-b012-4f63-ab6f-51ef1f51d849
Add resource grouping, accessible drag and keyboard ordering, and AppHost-scoped persistence. Improve resource metadata accessibility and text visualizer wrap and copy controls.

Co-authored-by: Copilot App <[email protected]>
Copilot-Session: 6cc982e7-b012-4f63-ab6f-51ef1f51d849
Add an all-resource console shortcut, refresh shortcut discovery and bindings, and separate keyboard shortcuts from dashboard documentation.

Co-authored-by: Copilot App <[email protected]>
Copilot-Session: 21d03854-668d-4570-b7fd-179f09f5587d
Support multi-value traits, span-based WithTags, dashboard position defaults, and persisted user overrides. Mark AppHost-defined tags with accessible lock indicators.

Co-authored-by: Copilot App <[email protected]>
Copilot-Session: 21d03854-668d-4570-b7fd-179f09f5587d
Traits declared with WithTrait, WithTags and WithDashboardPosition are now
always listed in the resource overview Properties card and the resource
details panel, after the resource's own properties, instead of only under
"Show all". List values display as comma-separated text, and the reserved
dashboard traits use readable names ("Dashboard tags", "Dashboard position").

Co-Authored-By: Claude Opus 5.5 <[email protected]>
…rols

- The live view and recordings button sits before notifications and opens a
  side panel, like notifications and settings, instead of a dropdown menu. The
  panel lists the live view and past recordings with their durations, protect
  toggles, and a link to the documentation.
- Render F6 as a keyboard key in the keyboard shortcuts dialog hint.
- Draw the resource pane grouping icon at 16px to match the filter and
  collapse buttons.
- Fix switching runs re-creating the page: the outgoing resources layout no
  longer navigates to another tab while it's torn down, and a layout disposed
  during initialization no longer crashes the circuit.
Smooth spline lines, a theme-aware categorical palette with translucent
fills, recessive dotted gridlines, themed hover labels with a crosshair,
smaller ringed exemplar markers, and a compact legend above the plot.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
The metrics tree gets a filter box matching meter names, instrument names and
descriptions. Instruments show an icon for their type (counter, gauge,
histogram), and the tooltip includes the type and unit.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Selecting a meter now shows a card per instrument with its type, description,
latest value (P50 for histograms) and a smooth sparkline over the selected
duration, replacing the plain name/description grid. Sparklines are rendered
server-side as SVG using monotone cubic interpolation so they never overshoot.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
The tree item click handler toggles expansion before selecting, so clicking an
expanded meter to open its overview collapsed it. Selecting a meter now always
leaves it expanded. Constant sparklines are drawn on the baseline instead of
mid-height so a value that stays at zero doesn't read as a steady non-zero.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Sparklines now start at zero like the full chart, so a flat 100 no longer draws
at the same height as a flat 0. Counters show bars of the increase per interval
(carried across empty intervals and handling resets), histograms show P50 bars
per interval with data, and gauges and up-down counters keep a line. Bar charts
draw a faint baseline so an interval range without increases reads as zero.

OtlpInstrumentSummary now exposes IsMonotonic, which was stored but not loaded.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
David Fowler (davidfowl) added a commit that referenced this pull request Nov 2, 2026
…21656)

## Description


`DashboardUrlTests.DashboardDisplaysResourceUpdatesWhileAppHostIsPausedAtBreakpoint`
has failed in every scheduled Outerloop run on `main` since #21412
("Modernize the dashboard experience") made the Cards layout the default
resources view. Before #21412 it passed 12 of 12 runs; since then it has
failed 2 of 2
([41158473015](https://github.com/microsoft/aspire/actions/runs/41158473015),
[41263841334](https://github.com/microsoft/aspire/actions/runs/41263841334)).

**Root cause:** the test waits for `tr.resource-row`, the legacy grid
row. The default view now renders each resource as `<article
class="resource-card" aria-label="{name}">`
(`ApplicationSummary.razor`), so the locator never matches. The aria
snapshot in the CI failure shows the card already displaying
`dashboard-test-resource … State Dashboard test initial`. The product is
fine; only the locator is stale.

**Fix:** locate the resource card by its exact `aria-label`. The state
is still read from `.state-column-cell`, because the card renders the
same `StateColumnDisplay` component the grid did. Both state assertions
are unchanged: the initial custom state, then the updated state
published while the AppHost is held at the breakpoint. There are no
sleeps, retries, or relaxed timeouts.

Fixes #21655

### Validation

- **Before the fix (`main` at 1bccada), locally with real DCP, the
dashboard, and headless Chromium:** fails the same way as CI, `Locator
expected to be visible … waiting for Locator("tr.resource-row")…`. The
snapshot shows the Cards region containing `dashboard-test-resource …
Dashboard test initial`.
- **After the fix:** passes in about 30s. It passed **50 of 50**
consecutive local runs (27–33s each).
- **Outerloop CI on this branch:** I dispatched [run
41310885927](https://github.com/microsoft/aspire/actions/runs/41310885927)
on 7b9e3a3.
- `outerloop_tests / Hosting.Testing (ubuntu-latest)` passed ([job
124868319332](https://github.com/microsoft/aspire/actions/runs/41310885927/job/124868319332):
total 1, succeeded 1, skipped 0). That job runs only this outerloop
test; on `main` it reports total 1, failed 1.
  - `Hosting.Testing (windows-latest)` also passed.
- I then cancelled the run. Its remaining Templates and Radius jobs fail
on every scheduled `main` run for unrelated, already-tracked reasons
(#21413/#21423, MongoDB family).
- Because of that cancellation, the run's `Final Results` check shows as
failed on this commit. It is not one of this PR's required checks.

### Out of scope

`TemplateTestsBase.CheckDashboardHasResourcesActualAsync` (`.main-grid
tr.resource-row`) reads the same legacy grid and affects the Templates
outerloop tests. That path is tracked by #21413/#21423.

## Checklist

- Is this feature complete?
  - [x] Yes. Ready to ship.
  - [ ] No. Follow-up changes expected.
- Are you including unit tests for the changes and scenario tests if
relevant?
  - [x] Yes
  - [ ] No
- Did you add public API?
  - [ ] Yes
  - [x] No
- Does the change make any security assumptions or guarantees?
  - [ ] Yes
  - [x] No

**🤖 Posted by AspireAgent (AI Agent)**

Co-authored-by: davidfowl <[email protected]>
Co-authored-by: Copilot <[email protected]>
Sébastien Ros (sebastienros) added a commit that referenced this pull request Nov 4, 2026
…y changes (#21143)

## Description

`ChartBase` decides between a full chart initialization and a data
update using the instrument key (meter and instrument names), the
dimension attributes, the theme and the display options. Switching
resources can show an instrument with the same key and dimensions but a
different unit, type or monotonicity. The chart then called
`updateChart`, which keeps the previous instrument's trace names and
layout, so the legend labels could be wrong.

Trace names come from the unit, and from whether the instrument is a
monotonic counter ("per interval"). The type decides which traces are
drawn. This PR adds all three to the re-initialization check.

Comparing dimension attributes by value, which stops charts
re-initializing on every refresh, reached main through #21412. That
removed the re-initialization that previously covered this case. This PR
originally carried that value comparison too; only this follow-up
remains after rebasing onto main.

## Testing

- New test
`PlotlyChartTests.UpdateDataAsync_SameInstrumentKeyWithDifferentUnitTypeOrMonotonicity_ReinitializesChart`
covers a unit change, a type change and a monotonicity change. All three
cases fail without the `ChartBase` change.
- All non-quarantined, non-outerloop tests in
`Aspire.Dashboard.Components.Tests` pass.

Co-authored-by: Sébastien Ros <[email protected]>
Eric Erhardt (eerhardt) pushed a commit that referenced this pull request Nov 5, 2026
…sourcePane tests (#21480)

## Description

Fixes a flaky race in two Dashboard Playwright outerloop tests added or
changed by #21412:

-
`DesktopNavMenuTests.MainNavigation_NavigatesBetweenSectionsAndMarksActiveItem`
-
`ResourcePaneInteractionTests.AllResourcesRow_ClearsSelectionAndListsResourcesInOverview`

### Root cause

A resource tab click changes the URL in the browser right away, before
the server renders the destination. Until that render batch reaches the
browser, the tab strip on the page is still the one rendered for the
previous location. The `FluentTabs` in `ResourcesLayout` is `@key`ed by
`renderedLocation`, and `OnTabChanged` deliberately ignores change
events from a strip rendered for an earlier location. The comment in
`ResourcesLayout.razor` explains that this guard stops queued native
change events from a torn-down strip from looking like new user
navigations.

Both tests click a second tab as soon as the URL or `aria-selected`
changes. Both of those update on the client, so neither proves the
server has rendered the new strip. When the second click lands in that
window, it is dropped by design and the test times out waiting for a
navigation that never happens.

Server-side tracing (temporary logging, not in this PR) confirmed the
sequence locally:
1. Click Console logs; `OnParametersSetAsync` runs for `/consolelogs`
(t=.956).
2. The test clicks Structured logs at about .96–.99 on the strip still
keyed to `/resources`.
3. The new strip is rendered at 45.019. The queued event then arrives
with `renderedLocation=/resources` while `_lastLocation=/consolelogs`,
and is ignored.

### Fix (test-only)

Add `PlaywrightTestsBase.ClickResourceTabAndWaitForRenderAsync`. It
takes a handle to the current `.resources-tab-header` element, clicks,
and waits until that element is detached. Because the strip is keyed by
location, detachment means the server's render for the new location has
been applied. The tests then make the same assertions as before. No
sleeps or retries are added and no assertion is weakened.
`AssertActiveItemAsync` now checks the server-rendered active tab rather
than only the client's optimistic selection.

The product guard is intentional, so it is unchanged.

### Evidence

**CI (outerloop, `outerloop_tests / Dashboard.Playwright`; these tests
only run in `tests-outerloop.yml`):**
- Run
[41050874298](https://github.com/microsoft/aspire/actions/runs/41050874298)
is the only outerloop run with Playwright jobs that includes #21412. On
Ubuntu, both tests failed:
- `MainNavigation`: `Assert.NotNull() Failure` for the next tab's
bounding box.
- `AllResourcesRow`: `Page URL expected to match regex '/resources$' But
was: '.../consolelogs'`.
- On Windows, both passed in the same run.
- Denominator so far: Ubuntu 1/1, Windows 0/1 runs that executed the
tests. `DesktopNavMenuTests` failed 0/28 jobs in the 14 scheduled main
runs from Oct 16–30, before #21412. `ResourcePaneInteractionTests`
didn't exist yet.

**Local (Linux, 2 cores):**

| Scenario | Before | After |
|---|---|---|
| `MainNavigation`, idle | 8/8 failed | 10/10 passed |
| `MainNavigation`, CPU stress (2× `yes`) | 10/10 failed | 10/10 passed
|
| `AllResourcesRow`, idle and stress | 18/18 passed (window too narrow
locally) | 20/20 passed |
| `AllResourcesRow` with deterministic repro harness ¹ | 5/5 failed with
the exact CI message (`But was: .../consolelogs`) | 5/5 passed |
| Full `Aspire.Dashboard.Playwright.Tests` | n/a | 126/127 ² |

¹ Repro harness (not committed): an init script delays every
server-to-browser Blazor WebSocket message by 300 ms, in order, after
the Console logs click. This widens the window between the client URL
change and the server render:

```csharp
await page.AddInitScriptAsync("""
    (() => {
        const desc = Object.getOwnPropertyDescriptor(WebSocket.prototype, 'onmessage');
        Object.defineProperty(WebSocket.prototype, 'onmessage', {
            configurable: true,
            get() { return desc.get.call(this); },
            set(handler) {
                let chain = Promise.resolve();
                desc.set.call(this, handler && (e => {
                    const due = Date.now() + (window.__delayBlazor ? 300 : 0);
                    chain = chain.then(() => new Promise(r => setTimeout(r, Math.max(0, due - Date.now())))).then(() => handler.call(this, e));
                }));
            }
        });
    })();
    """);
// ... then before the Console logs click:
await page.EvaluateAsync("() => window.__delayBlazor = true");
```

² The only failure is
`TerminalTests.HeaderMetadata_LiveUpdatesAndFallbackPreserveFocusAndCopyCurrentValues`.
It's a local culture artifact (`'42 %'` vs `'42%'`) in a test that
doesn't use the new helper and isn't touched by this PR.

## Checklist

- Is this feature complete?
  - [x] Yes. Ready to ship.
  - [ ] No. Follow-up changes expected.
- Are you including unit tests for the changes and scenario tests if
relevant?
  - [x] Yes
  - [ ] No
- Did you add public API?
  - [ ] Yes
  - [x] No
- Does the change make any security assumptions or guarantees?
  - [ ] Yes
  - [x] No

**🤖 Posted by AspireAgent (AI Agent)**

Co-authored-by: davidfowl <[email protected]>
Co-authored-by: Copilot <[email protected]>
Sébastien Ros (sebastienros) added a commit that referenced this pull request Nov 6, 2026
… storage (#21840)

## Description

Moves the dashboard's application-level settings (resource tags,
resource and group order, and pinned metrics) out of the SQLite settings
database (`dashboard-settings.db`) and into browser `localStorage`, like
the dashboard's other preferences. These settings no longer live in the
data directory on disk, and aren't shared between browsers or users.

### What changed

- `DashboardSettingsDatabase` is removed, along with the now-unused
`DashboardRunStore.GetApplicationSettingsDirectory`.
- `ResourceTagStore`, `ResourceOrderStore` and `MetricPinStore` are now
scoped per circuit and keep their synchronous read API. Each loads once
from `localStorage` (`EnsureLoadedAsync`) under a key scoped to the
application name, built with the same `DashboardApplicationNameKey` as
the existing collapsed-resources key: `Aspire_Resources_Tags_<app>`,
`Aspire_Resources_Order_<app>` and `Aspire_Metrics_Pins_<app>`.
- A new `LocalStorageSetting<T>` owns each setting's in-memory value and
its saves:
- **Tabs don't overwrite each other.** Every tab has its own circuit but
shares `localStorage`. Changes are idempotent functions applied in
memory immediately and queued; each save re-reads the stored value,
replays the queued changes onto it, and adopts the result, so a tab also
picks up what other tabs saved.
- **Unreadable values are never silently replaced.** `StorageResult` now
tells transient read failures (`ReadFailed`: disconnected circuit, JS
errors, timeouts) apart from values that will never read
(`InvalidValue`: bad JSON, data protection mismatch, or a bug such as an
unregistered type). Transient failures block writes, and the save is
retried with backoff through `TimeProvider`. An invalid value is copied
once to `<key>_Unreadable` and then replaced, so saving keeps working.
- A load that read storage before a save completed doesn't replace the
newer saved value.
- Values are stored unprotected. Protected values are encrypted with the
dashboard's data protection key, which changes across Aspire versions
and on every run of the standalone dashboard, so they would be lost
regularly. These are names chosen by the user or reported by the app,
not secrets.
- Moves can no longer fail to save synchronously, so the "Unable to save
the resource/group order" messages and their resource strings are
removed (`.xlf` regenerated). `TryMove` and `TryMoveGroup` return
`false` when an item has no position, and the existing
reorder-unavailable toast is shown.
- `ResourcesLayout` starts loading tags and order early and waits for
them only before showing resources. `ResourceOverview` no longer waits
for pins.

### Reviewer notes

- **No migration.** Data in an existing `dashboard-settings.db` isn't
carried over. That file was added in #21412 and hasn't shipped in a
release.
- **Settings are tied to the browser origin, port included.** If an
app's dashboard is served on a different port, its tags, order and pins
don't carry over. The other browser-stored preferences already work this
way.
- Tabs pick up each other's changes when they save or load, not live.

### Tests

- Unit tests run the stores against the real `LocalBrowserStorage` over
an in-memory `localStorage`, so they cover the stored JSON and
source-generated serialization. They cover cross-tab merging, unreadable
and invalid values, retries with `FakeTimeProvider`, and the stale-load
race. The race test fails if the guard is removed.
- The shared `TestJSRuntime` gains an optional callback (replacing a
private copy). `TestLocalStorage` returns saved values like a browser,
and can simulate failed reads.
- Playwright tag tests seed `localStorage` with an init script instead
of using the server-side store.
- Ran: `Aspire.Dashboard.Tests` (2,618 passed),
`Aspire.Dashboard.Components.Tests` (1,269 passed), and the two affected
outerloop Playwright tests
(`TagHeader_SelectsTaggedResourcesAndChevronTogglesGroup`,
`ContextMenu_RepeatedTagRowsRestoreExactTriggerAndRespectLightDismissal`).

## Checklist

- Is this feature complete?
  - [x] Yes. Ready to ship.
  - [ ] No. Follow-up changes expected.
- Are you including unit tests for the changes and scenario tests if
relevant?
  - [x] Yes
  - [ ] No
- Did you add public API?
  - [ ] Yes
    - If yes, did you have an API Review for it?
      - [ ] Yes
      - [ ] No
- Did you add `<remarks />` and `<code />` elements on your triple slash
comments?
      - [ ] Yes
      - [ ] No
  - [x] No
- Does the change make any security assumptions or guarantees?
  - [ ] Yes
    - If yes, have you done a threat model and had a security review?
      - [ ] Yes
      - [ ] No
  - [x] No

---------

Co-authored-by: Sébastien Ros <[email protected]>
Co-authored-by: Copilot Autofix powered by AI <[email protected]>
Sébastien Ros (sebastienros) added a commit that referenced this pull request Nov 6, 2026
…1881)

## Description

Renames the reserved trait used by `WithTags` from
`Aspire_Dashboard_Tag` to `Aspire_Tag`.

AppHost tags aren't dashboard-only. The CLI backchannel adds traits to
resource snapshots the same way the dashboard does, so `aspire describe
--format json` already includes them:

```json
"properties": {
  "resource.trait.Aspire_Tag": ["frontend", "critical"]
}
```

With the old name, tools reading that output had to know a
dashboard-scoped name for something that isn't dashboard-specific, and
the method name (`WithTags`) and the trait name didn't match in scope.

### What changed

- `KnownResourceTraits.DashboardTag = "Aspire_Dashboard_Tag"` →
`KnownResourceTraits.Tag = "Aspire_Tag"`, with a comment explaining the
naming.
- The `Aspire_` prefix stays so the reserved name can't collide with
user traits added through `WithTrait` (a bare `tag` would pick up tag
validation and dashboard tag behavior).
- `Aspire_Dashboard_Position` / `WithDashboardPosition` are unchanged:
only the dashboard uses a position, so the name matches the scope.
- The `TraitAnnotation` validation message now says "Tags must…" instead
of "Dashboard tags must…".
- `docs/specs/dashboard-persistence.md` uses the new name, says that the
tags appear in `aspire describe`, and no longer says that user-added
tags live in the settings database (they're in browser local storage
since #21840).
- The resource string key `ResourceTraitDashboardTags` keeps its name.
Renaming it would mean editing the resx and Designer files and
regenerating the `.xlf` files, and users never see the key.

### Reviewer notes

- **No compatibility shim.** The trait was added in #21412 and isn't in
any release tag yet, so nothing shipped reads the old name.

### Validation

- `Aspire.Hosting.Tests` (`ResourceTraitBuilderTests`,
`DashboardServiceDataTerminalTests`): 16 passed.
- `Aspire.Dashboard.Tests` (`ResourceTagStoreTests`): 20 passed.
- `Aspire.Dashboard.Components.Tests` (`ResourcesLayoutTests`,
`ResourceDetailsTests`): 168 passed.
- `Aspire.Dashboard.Playwright.Tests` builds. Its tests weren't run
locally.

## Checklist

- Is this feature complete?
  - [x] Yes. Ready to ship.
  - [ ] No. Follow-up changes expected.
- Are you including unit tests for the changes and scenario tests if
relevant?
  - [x] Yes
  - [ ] No
- Did you add public API?
  - [ ] Yes
  - [x] No
- Does the change make any security assumptions or guarantees?
  - [ ] Yes
  - [x] No

Co-authored-by: Sébastien Ros <[email protected]>
Mitch Denny (mitchdenny) pushed a commit that referenced this pull request Nov 10, 2026
… storage (#21840)

## Description

Moves the dashboard's application-level settings (resource tags,
resource and group order, and pinned metrics) out of the SQLite settings
database (`dashboard-settings.db`) and into browser `localStorage`, like
the dashboard's other preferences. These settings no longer live in the
data directory on disk, and aren't shared between browsers or users.

### What changed

- `DashboardSettingsDatabase` is removed, along with the now-unused
`DashboardRunStore.GetApplicationSettingsDirectory`.
- `ResourceTagStore`, `ResourceOrderStore` and `MetricPinStore` are now
scoped per circuit and keep their synchronous read API. Each loads once
from `localStorage` (`EnsureLoadedAsync`) under a key scoped to the
application name, built with the same `DashboardApplicationNameKey` as
the existing collapsed-resources key: `Aspire_Resources_Tags_<app>`,
`Aspire_Resources_Order_<app>` and `Aspire_Metrics_Pins_<app>`.
- A new `LocalStorageSetting<T>` owns each setting's in-memory value and
its saves:
- **Tabs don't overwrite each other.** Every tab has its own circuit but
shares `localStorage`. Changes are idempotent functions applied in
memory immediately and queued; each save re-reads the stored value,
replays the queued changes onto it, and adopts the result, so a tab also
picks up what other tabs saved.
- **Unreadable values are never silently replaced.** `StorageResult` now
tells transient read failures (`ReadFailed`: disconnected circuit, JS
errors, timeouts) apart from values that will never read
(`InvalidValue`: bad JSON, data protection mismatch, or a bug such as an
unregistered type). Transient failures block writes, and the save is
retried with backoff through `TimeProvider`. An invalid value is copied
once to `<key>_Unreadable` and then replaced, so saving keeps working.
- A load that read storage before a save completed doesn't replace the
newer saved value.
- Values are stored unprotected. Protected values are encrypted with the
dashboard's data protection key, which changes across Aspire versions
and on every run of the standalone dashboard, so they would be lost
regularly. These are names chosen by the user or reported by the app,
not secrets.
- Moves can no longer fail to save synchronously, so the "Unable to save
the resource/group order" messages and their resource strings are
removed (`.xlf` regenerated). `TryMove` and `TryMoveGroup` return
`false` when an item has no position, and the existing
reorder-unavailable toast is shown.
- `ResourcesLayout` starts loading tags and order early and waits for
them only before showing resources. `ResourceOverview` no longer waits
for pins.

### Reviewer notes

- **No migration.** Data in an existing `dashboard-settings.db` isn't
carried over. That file was added in #21412 and hasn't shipped in a
release.
- **Settings are tied to the browser origin, port included.** If an
app's dashboard is served on a different port, its tags, order and pins
don't carry over. The other browser-stored preferences already work this
way.
- Tabs pick up each other's changes when they save or load, not live.

### Tests

- Unit tests run the stores against the real `LocalBrowserStorage` over
an in-memory `localStorage`, so they cover the stored JSON and
source-generated serialization. They cover cross-tab merging, unreadable
and invalid values, retries with `FakeTimeProvider`, and the stale-load
race. The race test fails if the guard is removed.
- The shared `TestJSRuntime` gains an optional callback (replacing a
private copy). `TestLocalStorage` returns saved values like a browser,
and can simulate failed reads.
- Playwright tag tests seed `localStorage` with an init script instead
of using the server-side store.
- Ran: `Aspire.Dashboard.Tests` (2,618 passed),
`Aspire.Dashboard.Components.Tests` (1,269 passed), and the two affected
outerloop Playwright tests
(`TagHeader_SelectsTaggedResourcesAndChevronTogglesGroup`,
`ContextMenu_RepeatedTagRowsRestoreExactTriggerAndRespectLightDismissal`).

## Checklist

- Is this feature complete?
  - [x] Yes. Ready to ship.
  - [ ] No. Follow-up changes expected.
- Are you including unit tests for the changes and scenario tests if
relevant?
  - [x] Yes
  - [ ] No
- Did you add public API?
  - [ ] Yes
    - If yes, did you have an API Review for it?
      - [ ] Yes
      - [ ] No
- Did you add `<remarks />` and `<code />` elements on your triple slash
comments?
      - [ ] Yes
      - [ ] No
  - [x] No
- Does the change make any security assumptions or guarantees?
  - [ ] Yes
    - If yes, have you done a threat model and had a security review?
      - [ ] Yes
      - [ ] No
  - [x] No

---------

Co-authored-by: Sébastien Ros <[email protected]>
Co-authored-by: Copilot Autofix powered by AI <[email protected]>
(cherry picked from commit f457047)
Mitch Denny (mitchdenny) pushed a commit that referenced this pull request Nov 10, 2026
…1881)

## Description

Renames the reserved trait used by `WithTags` from
`Aspire_Dashboard_Tag` to `Aspire_Tag`.

AppHost tags aren't dashboard-only. The CLI backchannel adds traits to
resource snapshots the same way the dashboard does, so `aspire describe
--format json` already includes them:

```json
"properties": {
  "resource.trait.Aspire_Tag": ["frontend", "critical"]
}
```

With the old name, tools reading that output had to know a
dashboard-scoped name for something that isn't dashboard-specific, and
the method name (`WithTags`) and the trait name didn't match in scope.

### What changed

- `KnownResourceTraits.DashboardTag = "Aspire_Dashboard_Tag"` →
`KnownResourceTraits.Tag = "Aspire_Tag"`, with a comment explaining the
naming.
- The `Aspire_` prefix stays so the reserved name can't collide with
user traits added through `WithTrait` (a bare `tag` would pick up tag
validation and dashboard tag behavior).
- `Aspire_Dashboard_Position` / `WithDashboardPosition` are unchanged:
only the dashboard uses a position, so the name matches the scope.
- The `TraitAnnotation` validation message now says "Tags must…" instead
of "Dashboard tags must…".
- `docs/specs/dashboard-persistence.md` uses the new name, says that the
tags appear in `aspire describe`, and no longer says that user-added
tags live in the settings database (they're in browser local storage
since #21840).
- The resource string key `ResourceTraitDashboardTags` keeps its name.
Renaming it would mean editing the resx and Designer files and
regenerating the `.xlf` files, and users never see the key.

### Reviewer notes

- **No compatibility shim.** The trait was added in #21412 and isn't in
any release tag yet, so nothing shipped reads the old name.

### Validation

- `Aspire.Hosting.Tests` (`ResourceTraitBuilderTests`,
`DashboardServiceDataTerminalTests`): 16 passed.
- `Aspire.Dashboard.Tests` (`ResourceTagStoreTests`): 20 passed.
- `Aspire.Dashboard.Components.Tests` (`ResourcesLayoutTests`,
`ResourceDetailsTests`): 168 passed.
- `Aspire.Dashboard.Playwright.Tests` builds. Its tests weren't run
locally.

## Checklist

- Is this feature complete?
  - [x] Yes. Ready to ship.
  - [ ] No. Follow-up changes expected.
- Are you including unit tests for the changes and scenario tests if
relevant?
  - [x] Yes
  - [ ] No
- Did you add public API?
  - [ ] Yes
  - [x] No
- Does the change make any security assumptions or guarantees?
  - [ ] Yes
  - [x] No

Co-authored-by: Sébastien Ros <[email protected]>
(cherry picked from commit 09f1aba)
Mitch Denny (mitchdenny) pushed a commit that referenced this pull request Nov 10, 2026
… storage (#21840)

## Description

Moves the dashboard's application-level settings (resource tags,
resource and group order, and pinned metrics) out of the SQLite settings
database (`dashboard-settings.db`) and into browser `localStorage`, like
the dashboard's other preferences. These settings no longer live in the
data directory on disk, and aren't shared between browsers or users.

### What changed

- `DashboardSettingsDatabase` is removed, along with the now-unused
`DashboardRunStore.GetApplicationSettingsDirectory`.
- `ResourceTagStore`, `ResourceOrderStore` and `MetricPinStore` are now
scoped per circuit and keep their synchronous read API. Each loads once
from `localStorage` (`EnsureLoadedAsync`) under a key scoped to the
application name, built with the same `DashboardApplicationNameKey` as
the existing collapsed-resources key: `Aspire_Resources_Tags_<app>`,
`Aspire_Resources_Order_<app>` and `Aspire_Metrics_Pins_<app>`.
- A new `LocalStorageSetting<T>` owns each setting's in-memory value and
its saves:
- **Tabs don't overwrite each other.** Every tab has its own circuit but
shares `localStorage`. Changes are idempotent functions applied in
memory immediately and queued; each save re-reads the stored value,
replays the queued changes onto it, and adopts the result, so a tab also
picks up what other tabs saved.
- **Unreadable values are never silently replaced.** `StorageResult` now
tells transient read failures (`ReadFailed`: disconnected circuit, JS
errors, timeouts) apart from values that will never read
(`InvalidValue`: bad JSON, data protection mismatch, or a bug such as an
unregistered type). Transient failures block writes, and the save is
retried with backoff through `TimeProvider`. An invalid value is copied
once to `<key>_Unreadable` and then replaced, so saving keeps working.
- A load that read storage before a save completed doesn't replace the
newer saved value.
- Values are stored unprotected. Protected values are encrypted with the
dashboard's data protection key, which changes across Aspire versions
and on every run of the standalone dashboard, so they would be lost
regularly. These are names chosen by the user or reported by the app,
not secrets.
- Moves can no longer fail to save synchronously, so the "Unable to save
the resource/group order" messages and their resource strings are
removed (`.xlf` regenerated). `TryMove` and `TryMoveGroup` return
`false` when an item has no position, and the existing
reorder-unavailable toast is shown.
- `ResourcesLayout` starts loading tags and order early and waits for
them only before showing resources. `ResourceOverview` no longer waits
for pins.

### Reviewer notes

- **No migration.** Data in an existing `dashboard-settings.db` isn't
carried over. That file was added in #21412 and hasn't shipped in a
release.
- **Settings are tied to the browser origin, port included.** If an
app's dashboard is served on a different port, its tags, order and pins
don't carry over. The other browser-stored preferences already work this
way.
- Tabs pick up each other's changes when they save or load, not live.

### Tests

- Unit tests run the stores against the real `LocalBrowserStorage` over
an in-memory `localStorage`, so they cover the stored JSON and
source-generated serialization. They cover cross-tab merging, unreadable
and invalid values, retries with `FakeTimeProvider`, and the stale-load
race. The race test fails if the guard is removed.
- The shared `TestJSRuntime` gains an optional callback (replacing a
private copy). `TestLocalStorage` returns saved values like a browser,
and can simulate failed reads.
- Playwright tag tests seed `localStorage` with an init script instead
of using the server-side store.
- Ran: `Aspire.Dashboard.Tests` (2,618 passed),
`Aspire.Dashboard.Components.Tests` (1,269 passed), and the two affected
outerloop Playwright tests
(`TagHeader_SelectsTaggedResourcesAndChevronTogglesGroup`,
`ContextMenu_RepeatedTagRowsRestoreExactTriggerAndRespectLightDismissal`).

## Checklist

- Is this feature complete?
  - [x] Yes. Ready to ship.
  - [ ] No. Follow-up changes expected.
- Are you including unit tests for the changes and scenario tests if
relevant?
  - [x] Yes
  - [ ] No
- Did you add public API?
  - [ ] Yes
    - If yes, did you have an API Review for it?
      - [ ] Yes
      - [ ] No
- Did you add `<remarks />` and `<code />` elements on your triple slash
comments?
      - [ ] Yes
      - [ ] No
  - [x] No
- Does the change make any security assumptions or guarantees?
  - [ ] Yes
    - If yes, have you done a threat model and had a security review?
      - [ ] Yes
      - [ ] No
  - [x] No

---------

Co-authored-by: Sébastien Ros <[email protected]>
Co-authored-by: Copilot Autofix powered by AI <[email protected]>
(cherry picked from commit f457047)
Mitch Denny (mitchdenny) pushed a commit that referenced this pull request Nov 10, 2026
…1881)

## Description

Renames the reserved trait used by `WithTags` from
`Aspire_Dashboard_Tag` to `Aspire_Tag`.

AppHost tags aren't dashboard-only. The CLI backchannel adds traits to
resource snapshots the same way the dashboard does, so `aspire describe
--format json` already includes them:

```json
"properties": {
  "resource.trait.Aspire_Tag": ["frontend", "critical"]
}
```

With the old name, tools reading that output had to know a
dashboard-scoped name for something that isn't dashboard-specific, and
the method name (`WithTags`) and the trait name didn't match in scope.

### What changed

- `KnownResourceTraits.DashboardTag = "Aspire_Dashboard_Tag"` →
`KnownResourceTraits.Tag = "Aspire_Tag"`, with a comment explaining the
naming.
- The `Aspire_` prefix stays so the reserved name can't collide with
user traits added through `WithTrait` (a bare `tag` would pick up tag
validation and dashboard tag behavior).
- `Aspire_Dashboard_Position` / `WithDashboardPosition` are unchanged:
only the dashboard uses a position, so the name matches the scope.
- The `TraitAnnotation` validation message now says "Tags must…" instead
of "Dashboard tags must…".
- `docs/specs/dashboard-persistence.md` uses the new name, says that the
tags appear in `aspire describe`, and no longer says that user-added
tags live in the settings database (they're in browser local storage
since #21840).
- The resource string key `ResourceTraitDashboardTags` keeps its name.
Renaming it would mean editing the resx and Designer files and
regenerating the `.xlf` files, and users never see the key.

### Reviewer notes

- **No compatibility shim.** The trait was added in #21412 and isn't in
any release tag yet, so nothing shipped reads the old name.

### Validation

- `Aspire.Hosting.Tests` (`ResourceTraitBuilderTests`,
`DashboardServiceDataTerminalTests`): 16 passed.
- `Aspire.Dashboard.Tests` (`ResourceTagStoreTests`): 20 passed.
- `Aspire.Dashboard.Components.Tests` (`ResourcesLayoutTests`,
`ResourceDetailsTests`): 168 passed.
- `Aspire.Dashboard.Playwright.Tests` builds. Its tests weren't run
locally.

## Checklist

- Is this feature complete?
  - [x] Yes. Ready to ship.
  - [ ] No. Follow-up changes expected.
- Are you including unit tests for the changes and scenario tests if
relevant?
  - [x] Yes
  - [ ] No
- Did you add public API?
  - [ ] Yes
  - [x] No
- Does the change make any security assumptions or guarantees?
  - [ ] Yes
  - [x] No

Co-authored-by: Sébastien Ros <[email protected]>
(cherry picked from commit 09f1aba)
Ankit Jain (radical) pushed a commit that referenced this pull request Nov 10, 2026
…ts (#21503)

## Description

Fixes an intermittent Dashboard.Components flake:
`EmptyState_HelpDisappearsAfterAnySignalAndStaysHiddenAfterClear`
(StructuredLogs/Traces), plus TraceDetails tests, fail with
`Bunit.JSRuntimeInvocationNotSetException` on slow runners (mostly
Windows).

### Root cause

In bUnit 2.x, a planned JS handler without a result leaves the
invocation pending. After `BunitContext.DefaultWaitTimeout` (10s, set in
`DashboardPageTestContext`), bUnit faults the invocation. That fault
surfaces from the component's `OnAfterRenderAsync` and is rethrown by
the next `WaitForAssertion`. So any test still running 10s after the
first render fails.

Two kinds of handlers were left without a result:

- **`focusElement`**: `StructuredLogsTests`, `TracesTests` and
`TraceDetailsTests` each call `JSInterop.SetupVoid("focusElement", _ =>
true)` without a result. They do this after `SetupFluentMenu` registered
a resolved handler. The last registration wins, so the resolved handler
is overridden. Each page awaits `focusElement(<scrollContainer>, true)`
on first render.
- **Tooltip**: `AddCommonDashboardServices` registers the Tooltip
module's `FluentTooltipInitialize` without a result.

This is the same bug class #21412 fixed for `Select.Initialize` and
`observeAttributeChange`, and #21434 fixes in `ManageDataDialogTests`.
This PR doesn't touch those files.

### Fix

Add `.SetVoidResult()` to the four handlers above. Also complete the
other shared void stubs these pages exercise: the three handlers in
`SetupFluentAnchoredRegion` (`goToNextFocusableElement`,
`initializeKeyboardNavigation`, `removeKeyboardNavigation`) and the two
in `SetupFluentOverflow` (`fluentOverflowInitialize`,
`fluentOverflowDispose`). Test-only change.

### CI evidence (attempt-1 failures, `ci.yml`, about Oct 16–31)

Survey: 1000 `ci.yml` runs (466 with Dashboard jobs).
Dashboard.Components had 10 attempt-1 failures in 181 Windows jobs and 1
in 181 Ubuntu jobs. These 3 jobs failed on pending calls this PR fixes:

| Run / job | Head | Failing tests | Pending invocation |
|---|---|---|---|
| main push
[40534267321](https://github.com/microsoft/aspire/actions/runs/40534267321/job/122317031694)
(Windows) | b1b850f | StructuredLogsTests.EmptyState… (and
MetricsTests.EmptyState… on `Select.Initialize`, fixed since by #21412)
| `focusElement("structuredLogsScrollContainer", true)` |
| PR
[40563038552](https://github.com/microsoft/aspire/actions/runs/40563038552/job/122398561156)
(Windows) and [job
122398564683](https://github.com/microsoft/aspire/actions/runs/40563038552/job/122398564683)
(Ubuntu) | f1cc41e | TraceDetailsTests.ExpandAllSpans…,
Render_TraceUpdateWithNewSpans…, ToggleCollapse… |
`focusElement("traceDetailScrollContainer", true)`,
`FluentTooltipInitialize` (plus handlers since fixed on main) |

A fourth job, PR run
[40390542875](https://github.com/microsoft/aspire/actions/runs/40390542875/job/121814090794)
(StructuredLogsTests.EmptyState… on Windows), faulted on
`observeAttributeChange`, which #21412 has since fixed. On the same head
the Ubuntu job passed. Locally, the 9 EmptyState cases passed 15/15
loops on main because they finish well under 10s. The other 6 Components
failures were the MetricsTests histogram test (tracked separately in
#21394).

### Before/after

**Slow-runner simulation (not committed).** Added `await
Task.Delay(11s)` before the final `WaitForAssertion` in the
StructuredLogs/Traces EmptyState tests:

| | EmptyState (9 cases) | Failure |
|---|---|---|
| main | **6 failed** / 9 | `JSRuntimeInvocationNotSetException`:
`focusElement("structuredLogsScrollContainer"/"tracesScrollContainer",
true)` ×5, `FluentTooltipInitialize` ×1 |
| this PR | **9 passed** / 9 | n/a |

No new tests are added. The existing render tests for these pages
already cover the first-render calls.

### Validation

- `Aspire.Dashboard.Components.Tests` full suite: 1161 passed, 0 failed.

## Checklist
- Is this feature complete?
  - [x] Yes. Ready to ship.
- Are you including unit tests for the changes and scenario tests if
relevant?
  - [x] No. Test-only fix; existing render tests cover it.
- Did you add public API?
  - [x] No
- Does the change make any security assumptions or guarantees?
  - [x] No
- Does the change require an update in our Aspire docs?
  - [x] No

**🤖 Posted by AspireAgent (AI Agent)**

---------

Co-authored-by: davidfowl <[email protected]>
Co-authored-by: Copilot <[email protected]>
Sébastien Ros (sebastienros) added a commit that referenced this pull request Nov 10, 2026
## Description

Addresses the review feedback from #21412 (Modernize the dashboard
experience) that was deferred to the tracking issue #21421. Each item
was checked against the current code first. Item 17 was already fixed,
and every other item is addressed here. The design questions are
answered in a comment below.

Fixes #21421

| Items | Change |
|---|---|
| 1, 3, 6 | Replaces `WithDashboardPosition` with `WithDisplayOrder`,
backed by its own `DisplayOrderAnnotation` and transported as
`resource.displayOrder`. Like `ResourceUrlAnnotation.DisplayOrder`, it's
a relative sort key: higher values appear first and resources without
one count as 0. The API isn't in a release yet. Polyglot snapshots and
AppHosts are updated. |
| 2 | Keeps traits as resource properties, as decided in the review, and
corrects the comment that described them. |
| 4 | Moves tag validation out of the `TraitAnnotation` constructor into
`WithTrait`, which `WithTags` goes through. An `int` parameter covers
display order validation. |
| 5 | Replaces `unresolved_parameter_names` with a generic
`related_resource_names` on the notification message, keeping field
number 5. The dashboard offers to show the related resources in place of
the primary button, and the parameter form still accepts the
notification. |
| 7 | Restores the `CircularBuffer` removal checks under `#if DEBUG`,
for buffers up to 1,024 items, so large console log buffers don't bring
back the CPU cost. |
| 8, 20 | Recordings don't mount a live terminal. The missing-parameters
form is read-only for recordings and doesn't accept the live AppHost's
prompt. |
| 9 | `ParameterOverview` and `MissingParametersPanel` edit their own
copy of the shared command inputs. |
| 10 | Keeps generated input names when a prompt has a dynamically
loaded input, because callbacks can read `AllInputs` regardless of
`DependsOnInputs`. Names that aren't unique are still renamed, because
the prompt can't be shown otherwise, and every other input keeps its
name. Each prompt input also carries the parameter it is for
(`InteractionInput.related_resource_name`), and the parameter form
matches inputs by that field rather than by name. A generated name can
then match another, already resolved parameter without the form editing
the wrong input. |
| 11, 19 | The inline form forwards `UpdateStateOnChange`. Without an
active interaction, its file button runs the set-parameter command. |
| 12 | Sums delta counter observations per bucket. Repeated delta
numbers are no longer merged at ingestion, because that lost their
times, and the SQLite rollup now sums them by observation time instead
of keeping the largest, without overflowing. Delta numbers are selected
by their end, so one that arrives out of order isn't lost. Rollups and
chart totals stay finite without depending on the order of the values,
so a sum too large for a double no longer stops the chart from
rendering, and chart intervals compare times in nanoseconds like the
rollup query. Cloning metric values keeps their count, and delta counter
cards show the latest change. |
| 13 | Preserves negative levels. The main metrics chart shares this
calculation, so it's corrected too. |
| 14, 15 | A recording's activity window ends at its last request, or
its last error log if it has no requests, and has its own labels. In the
summary layout, the live window now refreshes every 30 seconds. |
| 16 | Scopes the overview's pending refresh flag to the selection, and
queues a refresh after console filter changes cancel one. Adds an
internal `TelemetryRefreshDelayAsync` seam so a test can hold a refresh
open. |
| 18 | Ctrl-click after "select all" no longer adds a resource kind
that's switched off. |
| 21, 22 | Display orders come from the requesting run rather than the
store, and moves use the displayed tie-break. |
| 23 | Localizes the trace back button. `main` has since localized the
activity and insights strings, so this PR only adds the
recording-specific ones. |

### Validation

- `Aspire.Dashboard.Tests`: 2,655 passed
- `Aspire.Dashboard.Components.Tests`: 1,384 passed, after merging
`main`
- `Aspire.Hosting.Tests`, limited to the trait, parameter processor,
dashboard service and interaction service test classes: 257 passed
- Code generation tests for TypeScript, Python, Go, Java and Rust: 412
passed, before the last review fixes, which didn't change exported API
- `TestShop.AppHost` builds

The regression tests for items 14, 15 and 16 were checked by temporarily
undoing each fix and confirming they failed.

Not covered: the polyglot AppHosts were renamed but not run, and nothing
was checked in a browser.

## Checklist

- Is this feature complete?
  - [x] Yes. Ready to ship.
  - [ ] No. Follow-up changes expected.
- Are you including unit tests for the changes and scenario tests if
relevant?
  - [x] Yes
  - [ ] No
- Did you add public API?
  - [x] Yes
    - If yes, did you have an API Review for it?
      - [ ] Yes
- [x] No. Not needed for `WithDisplayOrder` and
`DisplayOrderAnnotation`, as decided in the review.
- Did you add `<remarks />` and `<code />` elements on your triple slash
comments?
      - [ ] Yes
      - [x] No
  - [ ] No
- Does the change make any security assumptions or guarantees?
  - [ ] Yes
    - If yes, have you done a threat model and had a security review?
      - [ ] Yes
      - [ ] No
  - [x] No

---------

Co-authored-by: Sébastien Ros <[email protected]>
Sébastien Ros (sebastienros) added a commit that referenced this pull request Nov 11, 2026
Addresses the review feedback from #21412 (Modernize the dashboard
experience) that was deferred to the tracking issue #21421. Each item
was checked against the current code first. Item 17 was already fixed,
and every other item is addressed here. The design questions are
answered in a comment below.

Fixes #21421

| Items | Change |
|---|---|
| 1, 3, 6 | Replaces `WithDashboardPosition` with `WithDisplayOrder`,
backed by its own `DisplayOrderAnnotation` and transported as
`resource.displayOrder`. Like `ResourceUrlAnnotation.DisplayOrder`, it's
a relative sort key: higher values appear first and resources without
one count as 0. The API isn't in a release yet. Polyglot snapshots and
AppHosts are updated. |
| 2 | Keeps traits as resource properties, as decided in the review, and
corrects the comment that described them. |
| 4 | Moves tag validation out of the `TraitAnnotation` constructor into
`WithTrait`, which `WithTags` goes through. An `int` parameter covers
display order validation. |
| 5 | Replaces `unresolved_parameter_names` with a generic
`related_resource_names` on the notification message, keeping field
number 5. The dashboard offers to show the related resources in place of
the primary button, and the parameter form still accepts the
notification. |
| 7 | Restores the `CircularBuffer` removal checks under `#if DEBUG`,
for buffers up to 1,024 items, so large console log buffers don't bring
back the CPU cost. |
| 8, 20 | Recordings don't mount a live terminal. The missing-parameters
form is read-only for recordings and doesn't accept the live AppHost's
prompt. |
| 9 | `ParameterOverview` and `MissingParametersPanel` edit their own
copy of the shared command inputs. |
| 10 | Keeps generated input names when a prompt has a dynamically
loaded input, because callbacks can read `AllInputs` regardless of
`DependsOnInputs`. Names that aren't unique are still renamed, because
the prompt can't be shown otherwise, and every other input keeps its
name. Each prompt input also carries the parameter it is for
(`InteractionInput.related_resource_name`), and the parameter form
matches inputs by that field rather than by name. A generated name can
then match another, already resolved parameter without the form editing
the wrong input. |
| 11, 19 | The inline form forwards `UpdateStateOnChange`. Without an
active interaction, its file button runs the set-parameter command. |
| 12 | Sums delta counter observations per bucket. Repeated delta
numbers are no longer merged at ingestion, because that lost their
times, and the SQLite rollup now sums them by observation time instead
of keeping the largest, without overflowing. Delta numbers are selected
by their end, so one that arrives out of order isn't lost. Rollups and
chart totals stay finite without depending on the order of the values,
so a sum too large for a double no longer stops the chart from
rendering, and chart intervals compare times in nanoseconds like the
rollup query. Cloning metric values keeps their count, and delta counter
cards show the latest change. |
| 13 | Preserves negative levels. The main metrics chart shares this
calculation, so it's corrected too. |
| 14, 15 | A recording's activity window ends at its last request, or
its last error log if it has no requests, and has its own labels. In the
summary layout, the live window now refreshes every 30 seconds. |
| 16 | Scopes the overview's pending refresh flag to the selection, and
queues a refresh after console filter changes cancel one. Adds an
internal `TelemetryRefreshDelayAsync` seam so a test can hold a refresh
open. |
| 18 | Ctrl-click after "select all" no longer adds a resource kind
that's switched off. |
| 21, 22 | Display orders come from the requesting run rather than the
store, and moves use the displayed tie-break. |
| 23 | Localizes the trace back button. `main` has since localized the
activity and insights strings, so this PR only adds the
recording-specific ones. |

- `Aspire.Dashboard.Tests`: 2,655 passed
- `Aspire.Dashboard.Components.Tests`: 1,384 passed, after merging
`main`
- `Aspire.Hosting.Tests`, limited to the trait, parameter processor,
dashboard service and interaction service test classes: 257 passed
- Code generation tests for TypeScript, Python, Go, Java and Rust: 412
passed, before the last review fixes, which didn't change exported API
- `TestShop.AppHost` builds

The regression tests for items 14, 15 and 16 were checked by temporarily
undoing each fix and confirming they failed.

Not covered: the polyglot AppHosts were renamed but not run, and nothing
was checked in a browser.

- Is this feature complete?
  - [x] Yes. Ready to ship.
  - [ ] No. Follow-up changes expected.
- Are you including unit tests for the changes and scenario tests if
relevant?
  - [x] Yes
  - [ ] No
- Did you add public API?
  - [x] Yes
    - If yes, did you have an API Review for it?
      - [ ] Yes
- [x] No. Not needed for `WithDisplayOrder` and
`DisplayOrderAnnotation`, as decided in the review.
- Did you add `<remarks />` and `<code />` elements on your triple slash
comments?
      - [ ] Yes
      - [x] No
  - [ ] No
- Does the change make any security assumptions or guarantees?
  - [ ] Yes
    - If yes, have you done a threat model and had a security review?
      - [ ] Yes
      - [ ] No
  - [x] No

---------

Co-authored-by: Sébastien Ros <[email protected]>
(cherry picked from commit 727eaa7)

Conflicts resolved for release/17.0:
- src/Aspire.Dashboard/Resources/Resources.Designer.cs: kept the release
  version, added the four new resource properties and removed
  ResourceTraitDashboardPosition, matching the merged Resources.resx.
- tests/Aspire.Hosting.CodeGeneration.Go.Tests/Snapshots/TwoPassScanningGeneratedAspire.verified.go:
  regenerated with the Go code generation tests on this branch.
Sébastien Ros (sebastienros) added a commit that referenced this pull request Nov 11, 2026
Addresses the review feedback from #21412 (Modernize the dashboard
experience) that was deferred to the tracking issue #21421. Each item
was checked against the current code first. Item 17 was already fixed,
and every other item is addressed here. The design questions are
answered in a comment below.

Fixes #21421

| Items | Change |
|---|---|
| 1, 3, 6 | Replaces `WithDashboardPosition` with `WithDisplayOrder`,
backed by its own `DisplayOrderAnnotation` and transported as
`resource.displayOrder`. Like `ResourceUrlAnnotation.DisplayOrder`, it's
a relative sort key: higher values appear first and resources without
one count as 0. The API isn't in a release yet. Polyglot snapshots and
AppHosts are updated. |
| 2 | Keeps traits as resource properties, as decided in the review, and
corrects the comment that described them. |
| 4 | Moves tag validation out of the `TraitAnnotation` constructor into
`WithTrait`, which `WithTags` goes through. An `int` parameter covers
display order validation. |
| 5 | Replaces `unresolved_parameter_names` with a generic
`related_resource_names` on the notification message, keeping field
number 5. The dashboard offers to show the related resources in place of
the primary button, and the parameter form still accepts the
notification. |
| 7 | Restores the `CircularBuffer` removal checks under `#if DEBUG`,
for buffers up to 1,024 items, so large console log buffers don't bring
back the CPU cost. |
| 8, 20 | Recordings don't mount a live terminal. The missing-parameters
form is read-only for recordings and doesn't accept the live AppHost's
prompt. |
| 9 | `ParameterOverview` and `MissingParametersPanel` edit their own
copy of the shared command inputs. |
| 10 | Keeps generated input names when a prompt has a dynamically
loaded input, because callbacks can read `AllInputs` regardless of
`DependsOnInputs`. Names that aren't unique are still renamed, because
the prompt can't be shown otherwise, and every other input keeps its
name. Each prompt input also carries the parameter it is for
(`InteractionInput.related_resource_name`), and the parameter form
matches inputs by that field rather than by name. A generated name can
then match another, already resolved parameter without the form editing
the wrong input. |
| 11, 19 | The inline form forwards `UpdateStateOnChange`. Without an
active interaction, its file button runs the set-parameter command. |
| 12 | Sums delta counter observations per bucket. Repeated delta
numbers are no longer merged at ingestion, because that lost their
times, and the SQLite rollup now sums them by observation time instead
of keeping the largest, without overflowing. Delta numbers are selected
by their end, so one that arrives out of order isn't lost. Rollups and
chart totals stay finite without depending on the order of the values,
so a sum too large for a double no longer stops the chart from
rendering, and chart intervals compare times in nanoseconds like the
rollup query. Cloning metric values keeps their count, and delta counter
cards show the latest change. |
| 13 | Preserves negative levels. The main metrics chart shares this
calculation, so it's corrected too. |
| 14, 15 | A recording's activity window ends at its last request, or
its last error log if it has no requests, and has its own labels. In the
summary layout, the live window now refreshes every 30 seconds. |
| 16 | Scopes the overview's pending refresh flag to the selection, and
queues a refresh after console filter changes cancel one. Adds an
internal `TelemetryRefreshDelayAsync` seam so a test can hold a refresh
open. |
| 18 | Ctrl-click after "select all" no longer adds a resource kind
that's switched off. |
| 21, 22 | Display orders come from the requesting run rather than the
store, and moves use the displayed tie-break. |
| 23 | Localizes the trace back button. `main` has since localized the
activity and insights strings, so this PR only adds the
recording-specific ones. |

- `Aspire.Dashboard.Tests`: 2,655 passed
- `Aspire.Dashboard.Components.Tests`: 1,384 passed, after merging
`main`
- `Aspire.Hosting.Tests`, limited to the trait, parameter processor,
dashboard service and interaction service test classes: 257 passed
- Code generation tests for TypeScript, Python, Go, Java and Rust: 412
passed, before the last review fixes, which didn't change exported API
- `TestShop.AppHost` builds

The regression tests for items 14, 15 and 16 were checked by temporarily
undoing each fix and confirming they failed.

Not covered: the polyglot AppHosts were renamed but not run, and nothing
was checked in a browser.

- Is this feature complete?
  - [x] Yes. Ready to ship.
  - [ ] No. Follow-up changes expected.
- Are you including unit tests for the changes and scenario tests if
relevant?
  - [x] Yes
  - [ ] No
- Did you add public API?
  - [x] Yes
    - If yes, did you have an API Review for it?
      - [ ] Yes
- [x] No. Not needed for `WithDisplayOrder` and
`DisplayOrderAnnotation`, as decided in the review.
- Did you add `<remarks />` and `<code />` elements on your triple slash
comments?
      - [ ] Yes
      - [x] No
  - [ ] No
- Does the change make any security assumptions or guarantees?
  - [ ] Yes
    - If yes, have you done a threat model and had a security review?
      - [ ] Yes
      - [ ] No
  - [x] No

---------

Co-authored-by: Sébastien Ros <[email protected]>
(cherry picked from commit 727eaa7)

Adapted for release/17.0, which doesn't have the dashboard changes this
built on in main (#21840, #21861, #21880, #21881, #21943):
- Tags keep release/17.0's Aspire_Dashboard_Tag name
  (KnownResourceTraits.DashboardTag); the Aspire_Tag rename is #21881.
- ResourceOrderStore keeps its SQLite storage. The AppHost display order
  semantics, GetPositions(resources) and TryMove(..., resources) are ported
  onto it, and the store no longer keeps AppHost positions itself.
- ResourceOrderStoreTests: the four new display order tests run against the
  SQLite store, with a new store instance standing in for a restart.
- Tests for code that isn't on release/17.0 aren't brought over
  (ParameterFormReplacedAndPromptShownAgain, Standalone_RemovedTelemetrySource).
- Resources.Designer.cs and the Go TwoPassScanningGeneratedAspire snapshot
  are regenerated against release/17.0.
Sébastien Ros (sebastienros) added a commit that referenced this pull request Nov 13, 2026
#22264)

## Description

In the previous dashboard experience, the resource graph controls
(export, zoom in, zoom out, reset) were clipped by the bottom of the
viewport and couldn't be clicked.

The graph sized its SVG `viewBox` from `.resources-summary-layout`. On
the new overview that element contains only the graph, but on the
previous experience's Resources page it also contains the tab header
row. The SVG had no CSS height, so it took its height from the `viewBox`
aspect ratio (the full layout height) while being placed below the
header. The graph area ended about 50px below the viewport, and
`.resource-tabs { overflow: hidden }` clipped the bottom-anchored
controls. Before #21412 a hard-coded `clientHeight - 50` hid this; that
offset was removed when the graph moved to the overview.

Changes:

- **Previous experience CSS**: the SVG fills its container
(`width`/`height: 100%`), and the container uses `min-height: 0;
overflow: hidden` so it stays inside its `1fr` grid row.
- **`app-resourcegraph.js`**: size the `viewBox` from the graph's own
container (`.resource-graph-container`) instead of the surrounding
layout, and observe that element for resizes. Skip resizing while the
graph is hidden, and fit the initial graph the first time it has a size,
so a graph first shown from another tab isn't fitted to a zero-size box.

This PR also hides the Aspire Outage game from the previous experience's
graph. The game is a feature of the new dashboard's overview graph. The
previous experience's Resources page no longer renders the Play button
or exposes the game's interop method, and it passes no game strings
(`GraphIconsDto.Game` is now nullable), so `app-resourcegraph.js`
doesn't attach the game there and the O key stays with the dashboard's
global shortcuts.

Fixes #21858

### Screenshots

> **This PR includes UI changes.** Both graph layouts with the fix,
showing the controls fully visible at the bottom right. The previous
experience no longer shows the game's Play button at the bottom left;
the new dashboard keeps it.

| Previous experience (Resources → Graph) | New dashboard (Overview →
Graph) |
| --- | --- |
| ![Previous experience resource graph with controls visible and no game
button](https://github.com/sebastienros/aspire/raw/pr-assets/graph-controls-clipped/legacy-graph.png?v=2)
| ![New dashboard overview graph with controls
visible](https://github.com/sebastienros/aspire/raw/pr-assets/graph-controls-clipped/new-graph.png)
|

### Validation

Manually verified with `playground/TestShop` at a 768px-high viewport:

- Previous experience, Graph tab: before the fix the graph container
ended at 822px and the controls sat at 764–792px (clipped). After the
fix the container ends at 768px, the controls sit at 710–738px, and the
`viewBox` matches the SVG's rendered size.
- Zoom in and Reset change and restore the graph transform.
- Loading the previous experience on the Resources tab and then
switching to Graph fits the graph the same way as loading the Graph tab
directly.
- New dashboard overview graph, which starts hidden behind Summary,
still fits correctly when shown and its controls are visible.
- Previous experience graph has no `.graph-game` button, and pressing O
on the focused graph doesn't open the game. The new overview still has
the Play button, which opens the game; Escape closes it.
- `Aspire.Dashboard.Components.Tests` `ResourcesTests` and
`ApplicationSummaryTests`: 76 passed.

## Checklist

- Is this feature complete?
  - [x] Yes. Ready to ship.
  - [ ] No. Follow-up changes expected.
- Are you including unit tests for the changes and scenario tests if
relevant?
  - [ ] Yes
  - [x] No
- Did you add public API?
  - [ ] Yes
    - If yes, did you have an API Review for it?
      - [ ] Yes
      - [ ] No
- Did you add `<remarks />` and `<code />` elements on your triple slash
comments?
      - [ ] Yes
      - [ ] No
  - [x] No
- Does the change make any security assumptions or guarantees?
  - [ ] Yes
    - If yes, have you done a threat model and had a security review?
      - [ ] Yes
      - [ ] No
  - [x] No

---------

Co-authored-by: Sébastien Ros <[email protected]>
Sébastien Ros (sebastienros) added a commit to microsoft/aspire.dev that referenced this pull request Nov 13, 2026
Documents changes from microsoft/aspire#21412

Author: ``@sebastienros``

Targeting `release/17.0` based on the source PR milestone `17.0`.

## Why
The source PR redesigns the dashboard (Home view, resource pane, tag
grouping, resource overview modes, parameter editing, metrics cards,
recordings) with a Settings switch back to the previous dashboard.
Triggered signal: `dashboard_user_facing_page_changed`.

## Changes
- Updated `src/frontend/src/content/docs/dashboard/overview.mdx`: new
"Modernized dashboard experience" section.

> Generated by [PR Documentation
Check](https://github.com/microsoft/aspire/actions/runs/41004873065) for
#21412 · copilot · auto · 25.2 AIC · ⌖ 1.14 AIC · ⊞ 7.1K ·
[◷](https://github.com/search?q=repo%3Amicrosoft%2Faspire.dev+%22gh-aw-workflow-id%3A+pr-docs-check%22&type=pullrequests)

<!-- gh-aw-agentic-workflow: PR Documentation Check, engine: copilot,
model: auto, id: 41004873065, workflow_id: pr-docs-check, run:
https://github.com/microsoft/aspire/actions/runs/41004873065 -->

<!-- gh-aw-workflow-id: pr-docs-check -->
<!-- gh-aw-workflow-call-id: microsoft/aspire/pr-docs-check -->

---------

Co-authored-by: aspire-repo-bot[bot] <268009190+aspire-repo-bot[bot]@users.noreply.github.com>
Co-authored-by: Sébastien Ros <[email protected]>
Jose Perez Rodriguez (joperezr) pushed a commit that referenced this pull request Nov 20, 2026
Backport of #22414 to release/17.0

/cc @JamesNK

## Customer Impact

Users opening the Aspire dashboard over plain HTTP on a non-localhost
hostname or IP address can't see tooltips on affected controls or
resource graph nodes. The fix restores those tooltips without requiring
a change to the dashboard URL.

## Testing

On #22414, Chromium reproduced both failures before the fix and verified
that HTML and SVG tooltips worked afterward on non-localhost HTTP. All
three dashboard Playwright cases passed on rerun. The release backport
was not separately browser-tested. [Test
report](#22414 (comment))

## Risk

Low. The fix only changes how the dashboard generates tooltip
identifiers. It preserves existing element IDs and doesn't change
transport or authentication settings.

## Regression?

Yes. The dashboard modernization (#21412) introduced a dependency on
`crypto.randomUUID()` for tooltip anchors. Browsers don't expose that
API on ordinary non-localhost HTTP origins.

Co-authored-by: James Newton-King <[email protected]>
Co-authored-by: Copilot <[email protected]>
Sébastien Ros (sebastienros) added a commit that referenced this pull request Nov 20, 2026
…charts (#21431)

## Description

Fixes the two remaining selection-loss review findings tracked in #21419
(follow-up to #21412).

**1. Structured logs / traces lose the resource scope when telemetry
arrives later.**
If a resource's logs or traces page is opened before that resource has
sent telemetry, the route resolves to "(All)" and the view model keeps a
`null` `ResourceKey`. When telemetry later arrives,
`GetSelectionTelemetryKeys` returns `null` ("use the page's resource
key"), so the page lists every resource's data under the selected
resource. For structured logs, the read subscription with a `null` key
also marks unrelated resources' errors as viewed.

Fix: when new telemetry resources are reported, `StructuredLogs` and
`Traces` re-resolve the route's resource if the page is still on
"(All)". This sets the selected resource, resource key/keys and
subscription, then refreshes the grid. `Metrics` already does the same
in `OnResourcesUpdatedAsync`. Until the route resolves, structured logs
uses a non-read subscription and doesn't mark errors as viewed. Other
resources' errors that arrive first, or in the same batch, therefore
keep their unread counts.

**2. Metrics chart loses its resource in a multi-resource selection.**
With `api` and `worker` selected and `api`'s instrument chart open,
changing duration or graph/table view rebuilt the URL without
`/resource/api`, so the page dropped back to the aggregate instrument
list.

Fix: for multi-selection, `GetUrlFromSerializableViewModel` keeps the
resource name when an instrument chart is open **and** the resource is
part of the current selection. The aggregate list and stale names still
drop it.

**Regression tests** (all three fail on `main` and pass with this
change):
-
`StructuredLogsTests.ResourcesLayout_SelectedResourceSendsTelemetryAfterPageOpened_ShowsOnlyThatResource`:
only `api` logs are shown. `worker`'s errors stay unviewed, both the one
sent before `api`'s first telemetry and the one sent after.
-
`TracesTests.ResourcesLayout_SelectedResourceSendsTelemetryAfterPageOpened_ShowsOnlyThatResource`:
only `api` traces are shown.
-
`MetricsTests.ResourcesLayout_MultiSelectionInstrumentChart_ChangingViewKeepsActiveResource`:
the path stays `/metrics/resource/api`, with the instrument, view and
selection kept.

Before the fix, the Metrics test navigated to `/metrics` instead of
`/metrics/resource/api`. The logs and traces tests timed out waiting for
the selected resource to become `api` (it stayed "(All)"). The full
`Aspire.Dashboard.Components.Tests` suite passes locally (1164/1164).

No visual/layout change, so there are no screenshots.

Fixes #21419

## Checklist
- Is this feature complete?
  - [x] Yes. Ready to ship.
  - [ ] No. Follow-up changes expected.
- Are you including unit tests for the changes and scenario tests if
relevant?
  - [x] Yes
  - [ ] No
- Did you add public API?
  - [ ] Yes
  - [x] No
- Does the change make any security assumptions or guarantees?
  - [ ] Yes
  - [x] No

**🤖 Posted by AspireAgent (AI Agent)**

---------

Co-authored-by: davidfowl <[email protected]>
Co-authored-by: Copilot <[email protected]>
Co-authored-by: copilot-swe-agent[bot] <[email protected]>
Co-authored-by: Sébastien Ros <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants