You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Add Aspire Outage game to the dashboard resource graph - #21693
Adds Aspire Outage, an arcade game played on the dashboard's resource graph, where the app's resources are the enemies.
Starting it: select the Play Aspire Outage button at the bottom left of the graph, or press O while the graph has focus (listed in the keyboard shortcuts help). Esc returns to the graph.
Game: it runs on a canvas overlay in plain JS (app-resourcegraph-game.js), with keyboard and mouse controls and Web Audio sound. Best score and mute are kept in localStorage.
Hard core mode: picked on the start screen, off each time the game opens. Destroying an enemy really stops its resource, and clearing the wave starts the stopped resources again. They stay stopped if the player loses or exits, which the warning and the game over screen say.
Help dialog: a new half-width card in "Community and support" describes how to start the game and opens the graph view on all resources. It's hidden when the resource graph isn't available.
No new package dependencies or assets: sprites are defined in code.
Points for review
Text drawn on the canvas (title, score, labels) isn't localized, because its bitmap font only covers ASCII. The help card and the game's buttons and accessible instructions go through resx.
The Legacy help page has no card.
Hard core mode goes through the usual DashboardCommandExecutor, so each stop and start shows its toast during play. The browser can only ask for stop and start, and a command that asks for confirmation is treated as unavailable rather than bypassed.
Testing
Components tests pass (1170), including new HelpDialogTests cases, as do the new DashboardCommandExecutorTests cases. The ResourceGraphGame.test.mjs JavaScript tests run from Infrastructure.Tests. An outerloop Playwright test covers the Play button, keyboard launch, the mode buttons, the game's buttons, and exit and navigation.
Checked in the Stress playground in the built-in browser: the button, the O key and the help entries work, and hard core stopped real resources and started them again as Running. A finished resource was left alone, and the game over screen reported the ones left stopped. A full hard core wave was then played against it with no change to the game: a page script read the canvas and sent the keyboard events for moving and firing, so no person played it. A lost game left 5 resources stopped; the next game stopped the other 2, clearing the wave started all 7 within 10 seconds, and the 9 resources that were already down stayed down. A short normal game changed no resources.
Not tested: audible sound, the Legacy page. Reduced motion was only checked with a stub, for opening and closing.
The video below was recorded before this change, and still shows the circle gesture that has since been removed. It also predates the canvas glow fix, so colors differ slightly.
Checklist
Is this feature complete?
Yes. Ready to ship.
No. Follow-up changes expected.
Are you including unit tests for the changes and scenario tests if relevant?
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
No
Does the change make any security assumptions or guarantees?
Yes
If yes, have you done a threat model and had a security review?
Drawing two circles with the mouse over empty space in the resource graph
starts Aspire Outage, an arcade game drawn on a canvas overlay where the
app's resources are the enemies. Esc returns to the graph. The best score
and mute setting are kept in localStorage.
The help dialog gets a card in "Community and support" that describes the
gesture and opens the graph view on all resources. It is hidden when the
resource graph isn't available.
The reason will be displayed to describe this comment to others. Learn more.
🟡 Changes recommended
Unresolved playfield sizing bugs, inaccessible keyboard controls, lost best scores on navigation, and game tests excluded from normal CI leave functional, accessibility, and verification gaps.
Size the playfield so the largest formation always fits, with room to march
and descend, in small or very wide and short graphs.
Add an O key on the focused graph as a keyboard alternative to the gesture,
and let Enter and Space activate the focused Sound and Exit buttons.
Save the best score when navigating away or switching layout closes the game.
Run ResourceGraphGame.test.mjs in Infrastructure.Tests and route the game
script to those tests in the test trigger map.
The reason will be displayed to describe this comment to others. Learn more.
🟡 Changes recommended
Invisible resource controls remain keyboard-accessible during gameplay, and transitional states can resume after focus loss, alongside unresolved localization, reduced-motion, and automated regression-coverage gaps.
The game's ARIA instructions, Exit label, and Sound controls remain English when the dashboard language changes; these DOM elements are not subject to the canvas-font limitation. .github/instructions/dashboard.instructions.md:24 requires resource-backed localization for user-visible dashboard text. Pass localized instructions and control labels through graph interop and use them here and at lines 944–945 and 992.
Make the hidden graph subtree inaccessible while the game is active
Setting only opacity: 0 leaves the graph's resource-action cogs (tabindex="0" in app-resourcegraph.js) focusable and exposed to assistive technology. Immediately after launching, Shift+Tab can focus an invisible cog; the game then relinquishes keyboard ownership, and Enter opens the real resource's context menu behind the overlay. Disable keyboard/accessibility access to the SVG subtree while the game is active, and restore its previous state on every teardown path.
Preserve pause state when focus is lost during transitions
Losing focus during cleared or dying makes the blur/focusout handlers call pause(), but this condition ignores both states. The update loop subsequently enters ready/playing without another focus event, so the game resumes and can consume lives while the user is working elsewhere in the dashboard. Include these transitional gameplay states in the saved pause/resume state as well.
Skip formation slide animations when reduced motion is enabled
The reduced-motion preference is ignored for this entrance animation: starting a game or advancing a wave still slides the entire formation by 60 world units over 900 ms. This is decorative motion, unlike the enemies' gameplay movement. Skip the slide when this.reducedMotion is true, as the opening and closing transitions already do.
Localize the game's DOM controls and accessible instructions through the
graph interop. Text drawn on the canvas stays in English because its bitmap
font only covers ASCII.
Hide the graph from keyboard and assistive technology while the game is
active, so its resource menu cogs can't be reached behind the overlay.
Pause when focus is lost between lives or waves, so the game no longer
resumes on its own, and skip the formation slide under reduced motion.
Add a Playwright test for keyboard launch, the game's buttons, and releasing
the graph on exit and navigation.
Clicking non-focusable dashboard space outside the game moves focus to document.body, but this condition still claims the keyboard. The window capture handler then cancels arrows, Space and plain character keys even though the game no longer has focus. Restrict ownership to focus inside the overlay; the constructor and pointer handler already explicitly focus it when gameplay is intended.
Installed the PR's dogfood artifact in an isolated path using -InstallPath, -SkipExtension, and -SkipPath. The normal CLI installation, shell profiles, and original worktree were not changed.
Created both apps from the downloaded PR package hive with an explicit matching template version.
Changes Analyzed
Dashboard game module and graph attachment; help-dialog navigation; localized DOM controls and accessible instructions; graph DTO mapping in the application summary, current resources page, and legacy resources page; JavaScript, component, and Playwright coverage; infrastructure runner and test-selection routing.
No CLI, hosting, template, client integration, extension, or Azure pipeline implementation changes are part of this PR.
Primary UX Feedback
The graph has no visible game-launch control. Users must already know the circle gesture or O shortcut, or discover those instructions in Help.
Requested feedback from the reviewer:
Please provide a visible, intentional way to discover and launch Aspire Outage. An Aspiry bot glyph/button in the bottom-left corner of the graph would be a good entry point, with a "Play Aspire Outage" tooltip/accessible name and normal mouse and keyboard activation. The circle gesture and O shortcut can remain secondary shortcuts.
This is the reviewer's requested product/UX change, not a newly discovered correctness defect. No implementation changes were made.
Code Review Findings
No new high-confidence correctness findings.
Read the current game implementation, integration points, test changes, and previous inline review discussions. Earlier findings about playfield sizing, native button activation, score persistence on teardown, keyboard launch, CI runner registration, and browser coverage have corresponding changes in the current head; they were not repeated as new findings.
Impact analysis focused on keyboard ownership and focus restoration, overlay/style/listener cleanup, navigation and layout changes, storage failures and persistence, graph dimensions and empty data, localization/DTO call-site consistency, and actual execution of the JavaScript tests.
Test Scenarios Executed
Scenario
Type
Result
Evidence
Graph and game JavaScript suites
Unit/regression
Passed: 22 tests
Exact command below
Help card opens graph of all resources
Happy path
Passed
help-entry.png, graph-entry-points.png
O launch, Enter start, native keyboard Sound activation
Happy path/accessibility
Passed
game-title.png, browser-results.json
Gameplay, native Space activation of Exit, score persistence and graph focus restoration
Happy path
Passed; stored score 40
game-playing.png, browser-results.json
Navigate away, remove game/style, return and relaunch
Lifecycle boundary
Passed
browser-results.json
Circle gesture through Playwright mouse movement
Alternate entry
Passed; no synthetic DOM pointer dispatch
browser-results.json
Small graph with reduced-motion preference, pause/resume and exit
Both browser runs recorded zero page JavaScript errors.
The small-graph test is a reduced-motion smoke test, not a comprehensive animation/accessibility audit. Stored mute state survived relaunch. Positive score persistence was verified on explicit Exit; navigation cleanup was exercised separately.
Exact local commands and outcomes
The following paths refer to the temporary PR checkout. No source modifications were made there.
$cli was the isolated PR binary, $prHive its downloaded package hive, and $starterApphost the exact generated starter project. Browser scripts obtained the authenticated URL in memory from aspire ps, selected the exact AppHost path, and did not print or persist login tokens.
Setup and harness adjustments
Initial non-interactive creation requested an explicit decision about the machine-configured configuration source. Retried with --use-config-source false.
Creating from the source checkout inherited its .NET 11 SDK pin, which is not installed there. Created the test apps outside the checkout instead, using the installed SDK and the PR templates successfully. No SDK pin or NuGet configuration was edited.
The empty-graph browser harness initially pressed O before graph initialization completed. It now waits for the real graph's SVG definitions before interacting.
A selected-resource locator initially matched both the resource-list link and a card. Narrowed it to the actual resource-list link. The final boundary checks passed.
These setup/harness failures were resolved; none established a game defect.
Component tests: Current-head Windows job log confirms 1,168 tests, zero failures. Linux component job also succeeded.
Infrastructure tests: Current-head Linux job log confirms 2,051 tests, zero failures.
Reused successful current-head .NET CI evidence rather than repeating these complete suites locally.
Downloaded and inspected select-tests-selection-Linux/select-tests-selection.json, emitted by the production selector with Layer 1 enabled. It identifies the game script as a path-rule cause for Infrastructure.Tests, selects dashboard test projects, and reports no excluded/unattributed files or run-all escalation.
Traced the consumer: DashboardResourceGraphScriptTests.ResourceGraphGameLogicBehavesAsExpected executes the checked-in .mjs suite, which imports the real game module. The new loose script and suite both route to that infrastructure runner.
The PR changes test-selection data, not workflow triggers, jobs, action pins, or artifact producers. No manual dispatch or allow-list change was needed.
The new Playwright regression is outerloop coverage; ordinary PR CI does not prove that test ran. Equivalent user-visible interactions were exercised locally against the PR artifact using real Chromium.
No Azure DevOps pipeline validation applies to this diff.
Limitations
Windows/Chromium only; no Firefox, Safari, Linux, or macOS runtime testing.
No human listening test for audible sound, physical-mouse usability study, legacy-page runtime test, exhaustive long-session gameplay, or complete screen-reader/reduced-motion audit.
Canvas text remains English, as explicitly disclosed by the PR.
No approval, review comments, or report were posted without confirmation.
Artifacts
Screenshots, browser scripts, and result JSON files are retained beside this report in pr21693-browser. Authoritative CI selection evidence is retained in pr21693-ci-selection.
Overall Result
Executed tests passed. No new high-confidence correctness findings. Primary requested change: a discoverable, explicit Aspiry launch button in the graph.
Replace the double-circle gesture with a visible Play button at the bottom
left of the graph. The O key stays, and is now listed in the keyboard
shortcuts help.
Add a hard core mode, picked on the start screen, in which destroying an
enemy really stops its resource. Clearing the wave starts the stopped
resources again; they stay stopped if the player loses or exits. Only stop
and start can be run this way, and commands that ask for confirmation are
skipped.
Stop taking keys when focus leaves the game, and pause it in that case.
The reason will be displayed to describe this comment to others. Learn more.
🟡 Changes recommended
Failed or cancelled stops can trigger duplicate stop commands within the same wave, and the game-over recovery count can remain stale after pending commands complete.
A failed or cancelled stop let the next enemy of that resource run another
stop in the same wave. Allow one attempt per resource per wave, while still
leaving failed stops out of the count.
The count on the game over screen was only worked out when the screen
appeared, so it went stale when a command finished later. Report changes when
each command finishes, and keep counting a resource until its stop has failed
or its start has succeeded.
The reason will be displayed to describe this comment to others. Learn more.
🟡 Changes recommended
Restarting after game over retains stale outage attempts, preventing resource-stop retries in the next game; reset the attempt set while preserving outstanding queues and stopped-resource tracking.
- Leave O with a focused toolbar button instead of launching the game.
- Take keys on the game overlay rather than the window, and only offer P to
resume while the game has focus, since P is otherwise a dashboard shortcut.
- Cancel waiting stops when the game exits or closes, while restarts carry on.
- In hard core, announce and count a resource as stopped only once its stop
has succeeded, and log a restart that could never run.
- Fit the start and game over panels above the mode controls on short graphs,
and let clicks through the empty part of that strip.
- Return focus to the Play button when the game was launched from it.
Starting another game from the game over screen kept the last game's attempts,
so a stop that had failed couldn't be tried again until a wave was cleared.
Clear them on a new game. Resources the last game left down stay tracked, so
clearing a wave still restarts them.
The reason will be displayed to describe this comment to others. Learn more.
🟡 Changes recommended
Read-only gameplay commands can leave unresolved progress notifications, and automated tests do not verify that enemy destruction and wave completion trigger Stop and Start commands while Normal mode triggers neither.
A hard core game on a historical run reached commands that are listed as
enabled but can't run, which left a Stop progress notification without a
result. Treat them as unavailable, as the resource menu does.
The reason will be displayed to describe this comment to others. Learn more.
🔵 Needs a closer look
The missing gameplay-module diff prevents verification of the full change surface, while destructive resource lifecycles and recovery require human review beyond forced manual validation.
The canvas used an invalid bomb-shadow() filter, so the browser dropped the
whole declaration, including the saturation. Use drop-shadow().
Hard core kills said STOPPING... for resources with no stop command, which
then stayed running. The game only learns the outcome when the command
finishes, so kills now say HIT and STOPPED still waits for a successful stop.
Documented the Aspire Outage game on the dashboard resource graph (start button, O shortcut, hard core mode caveats) in dashboard/explore.mdx. Triggered signal: dashboard_user_facing_page_changed (evidence: Resources.razor, Resources.razor.cs).
Note
This draft PR needs human review before merging.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
Adds Aspire Outage, an arcade game played on the dashboard's resource graph, where the app's resources are the enemies.
app-resourcegraph-game.js), with keyboard and mouse controls and Web Audio sound. Best score and mute are kept inlocalStorage.No new package dependencies or assets: sprites are defined in code.
Points for review
DashboardCommandExecutor, so each stop and start shows its toast during play. The browser can only ask for stop and start, and a command that asks for confirmation is treated as unavailable rather than bypassed.Testing
HelpDialogTestscases, as do the newDashboardCommandExecutorTestscases. TheResourceGraphGame.test.mjsJavaScript tests run fromInfrastructure.Tests. An outerloop Playwright test covers the Play button, keyboard launch, the mode buttons, the game's buttons, and exit and navigation.Checklist
<remarks />and<code />elements on your triple slash comments?aspire-outage-demo.mp4