-
Notifications
You must be signed in to change notification settings - Fork 561
fix(directory): Add path to clear event #26105
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
fix(directory): Add path to clear event #26105
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull request overview
This PR intends to add a path parameter to the clear event in SharedDirectory to help listeners identify which subdirectory was cleared. However, the implementation is incomplete - only the interface signatures and API reports have been updated, while the actual event emission code has not been modified to include the new parameter.
Key Changes:
- Updated
ISharedDirectoryEventsinterface to addpathas the first parameter to theclearevent listener - Updated API report files to reflect the new signature
- Added changeset documenting the breaking change
Reviewed changes
Copilot reviewed 4 out of 4 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
| packages/dds/map/src/interfaces.ts | Updated clear event signature to include path parameter with documentation |
| packages/dds/map/api-report/map.legacy.beta.api.md | API report reflecting the interface change |
| packages/framework/fluid-framework/api-report/fluid-framework.legacy.beta.api.md | API report reflecting the interface change |
| .changeset/wacky-results-prove.md | Changeset documenting the breaking change with before/after examples |
| ( | ||
| event: "clear", | ||
| listener: (path: string, local: boolean, target: IEventThisPlaceHolder) => void, | ||
| ); |
Copilot
AI
Dec 31, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The interface signature has been updated to include a path parameter as the first argument, but the actual implementation in directory.ts does not emit this parameter. The emit calls at lines 1572, 1584, and 1911 in directory.ts still use the old signature emit("clear", local, this.directory) instead of the new signature emit("clear", this.absolutePath, local, this.directory). This means the interface change is not implemented in the actual code, causing a runtime mismatch between what listeners expect and what is actually emitted.
|
🔗 No broken links found! ✅ Your attention to detail is admirable. linkcheck output |
This PR adds a
pathparameter to theclearevent in SharedDirectory. It addresses a limitation where listeners couldn't determine which subdirectory was cleared.ADO#54326