[Dashboard] Ignore live connection events while viewing historical runs
- Dominant language
- C#
- Stars
- 6.3k
- Forks
- 991
- Avg merge
- 2d 15h
- Merged PRs (30d)
- 196
Description
### Is there an existing issue for this?
- [x] I have searched the existing issues
### Describe the bug
`SelectedDashboardClient.ConnectionStateChanged` decides whether to attach to the live Dashboard client only when a handler is registered. Long-lived layout handlers registered while viewing the live run stay attached after selecting a historical run.
A later AppHost disconnect can therefore display live reconnection UI over read-only historical data.
### Expected Behavior
Historical run views should remain independent of live AppHost connection-state changes.
### Steps To Reproduce
1. Open the Dashboard on the live run so layout connection handlers are registered.
2. Select a historical run.
3. Disconnect the live AppHost resource service.
4. Live reconnection state can be presented over the historical view.
### Exceptions (if any)
N/A
### Aspire doctor output
```plain
Aspire CLI 13.6.0-pr.18924.g5ee63941
Windows 10.0.26200
```
### Anything else?
Related to #18924. Source: `src/Aspire.Dashboard/ServiceClient/SelectedDashboardClient.cs:18-30`. Previously raised during PR review and still present on current `main`.
Contributor guide
Research direction
Start in src/Aspire.Dashboard/ServiceClient/SelectedDashboardClient.cs:18-30 and review the related discussion in #18924. Reproduce the sequence of opening the live run, selecting a historical run, and disconnecting the live AppHost resource service. Done means live connection-state changes no longer affect the historical view.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- csharp
- Domain
- frontend
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Active
- Clarity
- Mostly clear
- Newbie friendliness
- 72/100