Skip to content

Conversation

@sonalideshpandemsft
Copy link
Contributor

This PR adds a path parameter to the clear event in SharedDirectory. It addresses a limitation where listeners couldn't determine which subdirectory was cleared.

ADO#54326

Copilot AI review requested due to automatic review settings December 31, 2025 21:18
@sonalideshpandemsft sonalideshpandemsft requested review from a team as code owners December 31, 2025 21:18
Copy link
Contributor

Copilot AI left a 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 ISharedDirectoryEvents interface to add path as the first parameter to the clear event 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

Comment on lines +164 to +167
(
event: "clear",
listener: (path: string, local: boolean, target: IEventThisPlaceHolder) => void,
);
Copy link

Copilot AI Dec 31, 2025

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.

Copilot uses AI. Check for mistakes.
@github-actions
Copy link
Contributor

🔗 No broken links found! ✅

Your attention to detail is admirable.

linkcheck output


> fluid-framework-docs-site@0.0.0 ci:check-links /home/runner/work/FluidFramework/FluidFramework/docs
> start-server-and-test "npm run serve -- --no-open" 3000 check-links

1: starting server using command "npm run serve -- --no-open"
and when url "[ 'http://127.0.0.1:3000' ]" is responding with HTTP status code 200
running tests using command "npm run check-links"


> fluid-framework-docs-site@0.0.0 serve
> docusaurus serve --no-open

[SUCCESS] Serving "build" directory at: http://localhost:3000/

> fluid-framework-docs-site@0.0.0 check-links
> linkcheck http://localhost:3000 --skip-file skipped-urls.txt

Crawling...

Stats:
  245432 links
    1786 destination URLs
    2025 URLs ignored
       0 warnings
       0 errors


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.

1 participant