Repository navigation
fix(fast-element): update injected dependencies on reconnection - #7780
Open
vansh (vansh-nagar) wants to merge 1 commit into
Open
vansh (vansh-nagar) wants to merge 1 commit into
vansh (vansh-nagar) wants to merge 1 commit into
Conversation
vansh (vansh-nagar)
requested review from
Chris Holt (chrisdholt),
Jane Chu (janechu) and
John Kreitlow (radium-v)
as code owners
October 25, 2026 03:00
|
Azure Pipelines: There may be pipelines that require an authorized user to comment /azp run to run. |
|
vansh (@vansh-nagar) please read the following Contributor License Agreement(CLA). If you agree with the CLA, please reply with the following information.
Contributor License AgreementContribution License AgreementThis Contribution License Agreement (“Agreement”) is agreed to by the party signing below (“You”),
|
This branch has not been deployed
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Pull Request
📖 Description
A FAST element with a connection-aware injected property keeps its initial dependency after moving to a DOM container that provides a different instance. The reconnection callback resolves the new instance but writes the old captured value back into the cache.
Cache the newly resolved value before notifying subscribers. The regression moves a real custom element through different containers and back, checks what subscribers read during notification, checks that a move between containers providing the same instance emits no notification, and preserves the
respectConnection: falsebehavior.🎫 Issues
Fixes #7743
👩💻 Reviewer Notes
Implementation and tests were developed with Codex. The production fix is a single assignment; the test runs against actual DOM lifecycle callbacks.
📑 Test Plan
respectConnection=truefails because the property and notifications still contain the initial value; thefalsecontrol passes.npm exec -w @microsoft/fast-element -- playwright test src/di/ --retries=0 --workers=4: all 825 dependency-injection cases pass across the three browsers.npm run build: eight successful monorepo builds and one cached/skipped task, no failures (macOS arm64, Node 26.0.0).npm test: 12 successful monorepo tasks, two cached/skipped tasks, no failures. The source suite has 4,604 passes and seven skips; all 618 declarative cases and 138 harness browser cases pass across Chromium, Firefox, and WebKit.npm run format:check,npm run checkchange, andnpm run test:validationpass.✅ Checklist
General
$ npm run changeAgents