Skip to content

feat: add fluid-controlled map interfaces#26788

Merged
jenn-le merged 14 commits intomicrosoft:mainfrom
jenn-le:map-implementation
Apr 2, 2026
Merged

feat: add fluid-controlled map interfaces#26788
jenn-le merged 14 commits intomicrosoft:mainfrom
jenn-le:map-implementation

Conversation

@jenn-le
Copy link
Copy Markdown
Contributor

@jenn-le jenn-le commented Mar 19, 2026

Adds fluid-controlled map interfaces, FluidMap and FluidReadonlyMap for extension by interfaces that want APIs that behave closely to TypeScript maps. These are provided to reduce the risk of changes to the built in map breaking downstream customers.

TreeIndex is changed to use FluidReadonlyMap and TreeMapNodeAlpha is added which extends FluidReadonlyMap instead of ReadonlyMap.

@jenn-le jenn-le requested review from a team as code owners March 19, 2026 22:21
Copilot AI review requested due to automatic review settings March 19, 2026 22:21
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

Introduces Fluid-controlled map-like interfaces (to decouple public APIs from TypeScript lib Map/ReadonlyMap changes) and updates existing map/indexing interfaces to extend the new types.

Changes:

  • Added FluidMapLegacy (@public), FluidReadonlyMap (@Alpha), and FluidMap (@Alpha) in @fluidframework/core-interfaces.
  • Updated IDirectory, ISharedMap, and TreeIndex to extend FluidMapLegacy / FluidReadonlyMap instead of built-in Map / ReadonlyMap.
  • Re-exported the new types across relevant packages and updated API reports + changeset.

Reviewed changes

Copilot reviewed 23 out of 23 changed files in this pull request and generated 5 comments.

Show a summary per file
File Description
packages/framework/fluid-framework/src/index.ts Re-exports FluidMapLegacy from the framework entrypoint.
packages/framework/fluid-framework/api-report/fluid-framework.public.api.md API report updated to include FluidMapLegacy.
packages/framework/fluid-framework/api-report/fluid-framework.legacy.public.api.md API report updated; IDirectory now extends FluidMapLegacy.
packages/framework/fluid-framework/api-report/fluid-framework.legacy.beta.api.md API report updated; IDirectory/ISharedMap now extend FluidMapLegacy.
packages/framework/fluid-framework/api-report/fluid-framework.beta.api.md API report updated to include FluidMapLegacy.
packages/framework/fluid-framework/api-report/fluid-framework.alpha.api.md API report updated; adds FluidReadonlyMap and updates TreeIndex to extend it.
packages/dds/tree/src/index.ts Re-exports FluidReadonlyMap for tree consumers.
packages/dds/tree/src/feature-libraries/indexing/types.ts Updates TreeIndex to extend FluidReadonlyMap.
packages/dds/tree/api-report/tree.alpha.api.md API report updated; TreeIndex now extends FluidReadonlyMap.
packages/dds/map/src/interfaces.ts Updates IDirectory/ISharedMap to extend FluidMapLegacy.
packages/dds/map/src/index.ts Re-exports FluidMapLegacy from @fluidframework/map.
packages/dds/map/api-report/map.public.api.md API report updated to include FluidMapLegacy.
packages/dds/map/api-report/map.legacy.public.api.md API report updated; IDirectory now extends FluidMapLegacy.
packages/dds/map/api-report/map.legacy.beta.api.md API report updated; IDirectory/ISharedMap now extend FluidMapLegacy.
packages/dds/map/api-report/map.beta.api.md API report updated to include FluidMapLegacy.
packages/common/core-interfaces/src/index.ts Exports FluidMap, FluidMapLegacy, and FluidReadonlyMap.
packages/common/core-interfaces/src/fluidMap.ts Adds the new Fluid-controlled map interface definitions.
packages/common/core-interfaces/api-report/core-interfaces.public.api.md API report updated to include FluidMapLegacy.
packages/common/core-interfaces/api-report/core-interfaces.legacy.public.api.md API report updated to include FluidMapLegacy.
packages/common/core-interfaces/api-report/core-interfaces.legacy.beta.api.md API report updated to include FluidMapLegacy.
packages/common/core-interfaces/api-report/core-interfaces.legacy.alpha.api.md API report updated to include FluidMap/FluidReadonlyMap/FluidMapLegacy.
packages/common/core-interfaces/api-report/core-interfaces.beta.api.md API report updated to include FluidMapLegacy.
.changeset/bright-bananas-yell.md Adds release notes for the new interfaces and interface inheritance changes.

Comment thread packages/common/core-interfaces/src/fluidMap.ts Outdated
Comment thread packages/dds/tree/src/index.ts Outdated
Comment thread packages/dds/tree/src/feature-libraries/indexing/types.ts
Comment thread packages/common/core-interfaces/src/fluidMap.ts Outdated
Comment thread .changeset/bright-bananas-yell.md Outdated
Copy link
Copy Markdown
Contributor

@ChumpChief ChumpChief left a comment

Choose a reason for hiding this comment

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

Thanks for picking this up, it will be nice to stabilize this type :)

Comment thread packages/common/core-interfaces/src/fluidMap.ts Outdated
Comment thread packages/common/core-interfaces/src/fluidMap.ts Outdated
Comment thread packages/common/core-interfaces/src/fluidMap.ts Outdated
Comment thread packages/common/core-interfaces/src/fluidMap.ts Outdated
Comment thread packages/dds/map/src/index.ts Outdated
Comment thread packages/common/core-interfaces/src/fluidMap.ts
Comment thread packages/common/core-interfaces/src/fluidMap.ts
Comment thread packages/common/core-interfaces/src/fluidMap.ts Outdated
Comment thread .changeset/bright-bananas-yell.md Outdated
Comment thread .changeset/bright-bananas-yell.md Outdated
Comment thread .changeset/bright-bananas-yell.md Outdated
Comment thread .changeset/bright-bananas-yell.md Outdated
Comment thread .changeset/bright-bananas-yell.md
Comment thread .changeset/bright-bananas-yell.md
Comment thread packages/dds/tree/src/simple-tree/node-kinds/map/mapNode.ts
Comment thread packages/dds/tree/src/simple-tree/node-kinds/map/mapNode.ts Outdated
Comment thread packages/dds/tree/src/entrypoints/beta.ts
Comment thread packages/dds/tree/src/entrypoints/legacy.ts Outdated
@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented Apr 2, 2026

🔗 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:
  278943 links
    1879 destination URLs
    2124 URLs ignored
       0 warnings
       0 errors


Copy link
Copy Markdown
Contributor

@CraigMacomber CraigMacomber left a comment

Choose a reason for hiding this comment

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

Looks good to me.

@jenn-le jenn-le merged commit 78e06f7 into microsoft:main Apr 2, 2026
35 checks passed
@jenn-le jenn-le deleted the map-implementation branch April 2, 2026 22:49
alexvy86 added a commit that referenced this pull request Apr 3, 2026
alexvy86 added a commit that referenced this pull request Apr 6, 2026
Reverts #26788 because I suspect it broke the
Loop integration pipeline.
agarwal-navin pushed a commit to agarwal-navin/FluidFramework that referenced this pull request Apr 13, 2026
Adds fluid-controlled map interfaces, `FluidMap` and `FluidReadonlyMap`
for extension by interfaces that want APIs that behave closely to
TypeScript maps. These are provided to reduce the risk of changes to the
built in map breaking downstream customers.

`TreeIndex` is changed to use `FluidReadonlyMap` and `TreeMapNodeAlpha`
is added which extends `FluidReadonlyMap` instead of `ReadonlyMap`.
agarwal-navin pushed a commit to agarwal-navin/FluidFramework that referenced this pull request Apr 13, 2026
Reverts microsoft#26788 because I suspect it broke the
Loop integration pipeline.
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.

6 participants