Skip to content

Move revertible API#26215

Merged
noencke merged 5 commits intomicrosoft:mainfrom
noencke:move-revertible
Jan 15, 2026
Merged

Move revertible API#26215
noencke merged 5 commits intomicrosoft:mainfrom
noencke:move-revertible

Conversation

@noencke
Copy link
Copy Markdown
Contributor

@noencke noencke commented Jan 14, 2026

This tweaks the getRevertible API to be more consistent with other emerging alpha APIs. It also improves the documentation.

Alpha API changes only (and none are breaking). See changeset for details.

Copilot AI review requested due to automatic review settings January 14, 2026 22:06
@noencke noencke requested review from a team as code owners January 14, 2026 22:06
Copy link
Copy Markdown
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 moves the getRevertible API from being a second parameter of the changed event callback to being a property on the ChangeMetadata object itself. This change deprecates the old API pattern while maintaining backward compatibility by keeping the second parameter (now deprecated).

Changes:

  • Added getRevertible method to ChangeMetadata type for local changes
  • Updated all test code to use the new getRevertible?.() pattern from ChangeMetadata
  • Updated API reports to reflect the new public API surface

Reviewed changes

Copilot reviewed 9 out of 9 changed files in this pull request and generated 2 comments.

Show a summary per file
File Description
packages/framework/fluid-framework/api-report/fluid-framework.alpha.api.md Added getRevertible method to local ChangeMetadata type
packages/dds/tree/api-report/tree.alpha.api.md Added getRevertible method to local ChangeMetadata type
packages/dds/tree/src/core/rebase/types.ts Added comprehensive documentation and implementation for getRevertible method on ChangeMetadata
packages/dds/tree/src/shared-tree/treeCheckout.ts Implemented getRevertible on metadata object; removed outdated parameter documentation
packages/dds/tree/src/test/shared-tree/undo.spec.ts Updated tests to destructure getRevertible from metadata
packages/dds/tree/src/test/shared-tree/treeCheckout.spec.ts Updated tests to use new API pattern with optional chaining; removed unused import
packages/dds/tree/src/test/shared-tree/sharedTree.spec.ts Updated test to restructure conditional logic for new API
packages/dds/tree/src/test/shared-tree/fuzz/undoRedo.fuzz.spec.ts Updated fuzz tests to destructure and use new API pattern
.changeset/heavy-canyons-change.md Documented the API change with migration guide

Copy link
Copy Markdown
Contributor

@Josmithr Josmithr left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Love the change. Love the docs. Ship it! Ship it now!

Copy link
Copy Markdown
Contributor

@Josmithr Josmithr left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Even better!

@github-actions
Copy link
Copy Markdown
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:
  248787 links
    1796 destination URLs
    2036 URLs ignored
       0 warnings
       0 errors


@noencke noencke merged commit 922f579 into microsoft:main Jan 15, 2026
33 checks passed
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.

4 participants