Skip to content

[release/17.0] Dismiss VS Code E2E notifications without depending on hover - #22009

Closed
Mitch Denny (mitchdenny) wants to merge 1 commit into
mitchdenny-backport-17-0-11-pr21861from
mitchdenny-backport-17-0-12-pr21565
Closed

Mitch Denny (mitchdenny) wants to merge 1 commit into
mitchdenny-backport-17-0-11-pr21861from
mitchdenny-backport-17-0-12-pr21565

Conversation

@mitchdenny

Copy link
Copy Markdown
Member

Description

Backport of #21565 to release/17.0 (cherry-picked from af45278 with no modifications). Layer 12 of 55 in the release/17.0 backport stack; stacked on #22008.

Backport recommendation: No — Extension test flake.

Backport of #21565

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?
        • Yes
        • No
    • No

## Description

Fixes an intermittent failure in the VS Code extension tests, not a bug
in Aspire itself.

The tests close notifications to clear the screen. Previously, they
moved the mouse over a notification and clicked its close button. If
another notification appeared or expired, the notification could move
away from the mouse and hide the button before the click. The test would
then fail with `ElementNotInteractableError`, even though the feature
being tested had worked.

The tests now ask VS Code to clear all notifications through the E2E
bridge, which runs VS Code's `notifications.clearAll` command, instead
of clicking a notification. Cleanup keeps its bounded retry until no
notifications remain. The Python debugger setup test checks its message
and then uses the same cleanup. No feature assertions are weakened, and
no new dependencies are required.

Adds unit tests: one checks that cleanup goes through the bridge's
clear-all action when a notification can't be clicked, and one checks
that the bridge action runs `notifications.clearAll`. They don't
recreate the browser timing race.

Fixes #21742

Validation: CI for the current head is pending. The notification cleanup
unit tests passed locally and fail against the old hover-based cleanup.
The bridge dispatch test needs the VS Code test host, which couldn't be
downloaded locally, so it relies on CI.

## 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: davidfowl <95136+davidfowl@users.noreply.github.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
(cherry picked from commit af45278)
@github-actions

This comment has been minimized.

@mitchdenny
Mitch Denny (mitchdenny) force-pushed the mitchdenny-backport-17-0-12-pr21565 branch from f26db2a to b45afa1 Compare November 10, 2026 04:22
@github-actions

Copy link
Copy Markdown
Contributor

🚀 Dogfood this PR with:

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

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

Or

  • Run remotely in PowerShell:
iex "& { $(irm https://raw.githubusercontent.com/microsoft/aspire/main/eng/scripts/get-aspire-cli-pr.ps1) } 22009"

@mitchdenny

Copy link
Copy Markdown
Member Author

Approved for inclusion in release/17.0. Do not merge yet.

@github-actions

Copy link
Copy Markdown
Contributor

Retrying the failed CI jobs for this pull request from the CI run attempt. The rerun is being tracked in the rerun attempt.

@github-actions

This comment has been minimized.

@github-actions

Copy link
Copy Markdown
Contributor

Retrying the failed CI jobs for this pull request from the CI run attempt. The rerun is being tracked in the rerun attempt.

Jose Perez Rodriguez (joperezr) pushed a commit that referenced this pull request Nov 16, 2026
## Description

Backport of #21565 to `release/17.0` (source commit
`af4527806f2e09424b40e72ab80895fffe82b02f`).

The release branch's Windows diagnostic-log E2E scenario fails while
clearing a notification: the toast's clear-button click at `(11,11)` is
intercepted by the VS Code titlebar. This prevents the scenario from
reliably exercising the current CLI and AppHost log actions.

This exact six-file backport uses the existing E2E control bridge to
invoke VS Code's `notifications.clearAll`, rather than clicking the
toast. Cleanup remains bounded; the feature assertions remain intact.
Behavioral tests cover an unclickable toast and bridge command dispatch.
No skips, quarantine, added retries, timeout increases, dependency
changes, or workflow changes.

Related: #22241; original source issue #21742.

Failure evidence: [release/17.0 push CI, attempt 1, Windows
diagnostic-logs
job](https://github.com/microsoft/aspire/actions/runs/43537211054/job/132276516754),
commit `a509f094e0ee87d17dc0e1cc9bca84f7ca2623da`. That source failure
branch determines the PR base. The earlier backport #22009 is closed and
unmerged; this PR does not modify or reopen it.

### Customer Impact

Release-branch CI can fail during notification cleanup rather than
testing diagnostic-log behavior. This is an E2E reliability fix, not a
change to the shipped log actions or notification UI. Screenshots are
not applicable to this test-control change.

### Testing

The following results were obtained in a prior isolated Linux validation
on the exact target commit above with this exact source patch; they are
reused here, not presented as new executions:

| Command (from `extension/` unless noted) | Result |
| --- | --- |
| `corepack yarn run compile-tests` | Passed, including recompilation
after restoring the fix. |
| `corepack yarn exec mocha -- --ui tdd
out/test/notificationWaitForMessage.test.js --grep 'dismisses
notifications through VS Code clear-all'` | Expected failure with the
original `notifications[0].dismiss()` restored and the new test
retained: 0 passed, 1 failed with `ElementNotInteractableError`. This is
a behavioral regression proof, not an actual Windows reproduction. |
| `corepack yarn run compile-e2e` | Passed. |
| `corepack yarn run compile-tests` followed by `corepack yarn exec
mocha -- --ui tdd out/test/notificationWaitForMessage.test.js` | Passed:
9 tests with the fix restored. Recompilation is needed because the E2E
compiler replaces shared output. |
| `corepack yarn exec eslint -- src/test-e2e/helpers/vscode.ts
src/test-e2e/edgeCases.e2e.test.ts src/test/e2eStateFileBridge.test.ts
src/test/notificationWaitForMessage.test.ts
src/testing/e2eStateFileBridge.ts src/types/extensionApi.ts` | Passed. |
| `git diff --exit-code && git diff --cached --check` (repository root)
| Passed; only the exact source patch was staged. |

For this PR preparation, `git cherry-pick --no-commit
af45278` and `git diff --cached
--check` passed again on the same target.

**Current-head validation:** [CI run
43689787525](https://github.com/microsoft/aspire/actions/runs/43689787525)
completed successfully at `58e2a9ea9fe792491c87dce7a723b389f3b816b7`.
Windows diagnostic-logs passed 2/2, edge-cases 6/6, tree-actions 7/7,
and VS Code-hosted unit tests passed 4,153 with 9 pre-existing pending
tests. The required `Final Results` check passes. Independent review of
this exact head passed; there are no unresolved review threads.

Attempt 1 required workflow approval and ran no tests. Attempt 2 exposed
existing release-branch tree URL readiness, global fake-timer, and ARM64
packaging failures; attempt 3 completed successfully. The earlier
failures remain part of the CI record, not evidence of first-attempt
reliability or branch recovery. Notification cleanup does not change
resource URL snapshots; the timer tests use the pre-existing global fake
clock. Separate fixes already on main address those tree/timer races and
are not folded into this backport.

The existing test-selection map routes `extension/**` to extension unit
and E2E jobs; no routing change is needed. The current release tip
`6a7a7c49dc62640bc28cb6f9e613422540380206` has no `extension/` changes
relative to the tested base. Human review and shiproom approval remain
required. A later eligible scheduled/push CI run exercising the merged
fix is required before declaring branch recovery.

### Risk

Low: the change is confined to E2E notification cleanup and its existing
test-control bridge. It preserves bounded cleanup and the diagnostic-log
assertions. Windows and hosted validation passed at the PR head.

### Regression?

Unknown: the failure and matching main-branch fix are established, but
the introducing version or commit is not.

## 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

<!-- ci-health:work:release17-diagnostic-logs-windows -->
<!-- ci-health:worker:v1 -->
🤖 AspireAssistant

Co-authored-by: radical <1472+radical@users.noreply.github.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants