Skip to content

feat(tree): Promote alpha change event APIs to beta - #27942

Open
Joshua Smithrud (Josmithr) wants to merge 13 commits into
microsoft:mainfrom
Josmithr:tree/promote-alpha-event-apis
Open

feat(tree): Promote alpha change event APIs to beta#27942
Joshua Smithrud (Josmithr) wants to merge 13 commits into
microsoft:mainfrom
Josmithr:tree/promote-alpha-event-apis

Conversation

@Josmithr

Copy link
Copy Markdown
Contributor

See changeset for details

@github-actions github-actions Bot added area: framework Framework is a tag for issues involving the developer framework. Eg Aqueduct area: tools area: dds Issues related to distributed data structures area: repo Repo related work area: website public api change Changes to a public API area: dds: tree changeset-present base: main PRs targeted against main branch labels Aug 12, 2026
@github-actions

github-actions Bot commented Aug 12, 2026

Copy link
Copy Markdown
Contributor

Hi! Thank you for opening this PR. Want me to review it?

Based on the diff (1117 lines, 22 files), I've queued these reviewers:

  • Correctness — logic errors, race conditions, lifecycle issues
  • Security — vulnerabilities, secret exposure, injection
  • API Compatibility — breaking changes, release tags, type design
  • Performance — algorithmic regressions, memory leaks
  • Testing — coverage gaps, hollow tests

How this works

  • Adjust the reviewer set by ticking/unticking boxes above. Reviewer toggles alone don't trigger anything.

  • Tick Start review below to dispatch the review fleet.

  • After review finishes, tick Start review again to request another run — it auto-resets after each dispatch.

  • This comment updates as new commits land; your reviewer selections are preserved.

  • Start review

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

Promotes the detailed SharedTree change-event payload surface (previously only available via TreeAlpha.on for array nodes) to the beta API, and updates entrypoints, type tests, and generated API reports accordingly.

Changes:

  • Adds/exports array delta operation types and delta-carrying event payload types as beta APIs, including TreeChangeEventsBeta.treeChanged for array nodes.
  • Refactors the alpha change-event typings (TreeChangeEventsAlpha, NodeChangedDataAlpha) into compatibility aliases of the beta event variants.
  • Updates type-level tests, entrypoints, changeset notes, and API report outputs to reflect the promotion.

Reviewed changes

Copilot reviewed 16 out of 16 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.legacy.beta.api.md Generated API report updates reflecting newly beta-exported change-event payload types.
packages/framework/fluid-framework/api-report/fluid-framework.beta.api.md Generated API report updates reflecting newly beta-exported change-event payload types.
packages/framework/fluid-framework/api-report/fluid-framework.alpha.api.md Generated API report updates reflecting promotion of previously-alpha change-event payload types to beta.
packages/dds/tree/src/test/simple-tree/api/treeNodeApi.spec.ts Updates compile-time typing tests and runtime event tests to validate beta event payload availability.
packages/dds/tree/src/simple-tree/api/treeNodeApi.ts Promotes array delta op types to beta and updates docs to reference beta event APIs.
packages/dds/tree/src/simple-tree/api/treeBeta.ts Adds beta event payload typings (including treeChanged payloads for array nodes) and exports related event data types.
packages/dds/tree/src/simple-tree/api/treeAlpha.ts Converts alpha event types into compatibility aliases of the beta event types.
packages/dds/tree/src/simple-tree/api/index.ts Re-exports newly beta-promoted event payload types from the beta API surface.
packages/dds/tree/src/shared-tree/treeAlpha.ts Updates alpha API docs to reflect that the richer event API is now available via TreeBeta.
packages/dds/tree/src/entrypoints/legacy.ts Exports the newly beta-promoted payload and delta-op types from the legacy entrypoint.
packages/dds/tree/src/entrypoints/beta.ts Exports the newly beta-promoted payload and delta-op types from the beta entrypoint.
packages/dds/tree/src/entrypoints/alpha.ts Adjusts alpha entrypoint exports to avoid duplicating types now exported from beta.
packages/dds/tree/api-report/tree.legacy.beta.api.md Generated API report updates reflecting newly beta-exported change-event payload types.
packages/dds/tree/api-report/tree.beta.api.md Generated API report updates reflecting newly beta-exported change-event payload types.
packages/dds/tree/api-report/tree.alpha.api.md Generated API report updates reflecting promotion of previously-alpha change-event payload types to beta.
.changeset/promote-tree-change-event-payloads.md Changeset documenting the beta promotion and providing usage examples.
Suppressed comments (3)

packages/dds/tree/src/simple-tree/api/treeNodeApi.ts:50

  • These array delta op types are now promoted to Beta Kuang (@beta), but their members are still undocumented (API reports show them as "(undocumented)"). Adding brief JSDoc to the exported members will improve the generated reference docs for the newly-beta surface area.

This issue also appears in the following locations of the same file:

  • line 87
  • line 97
 * @sealed @beta
 */
export interface ArrayNodeRetainOp {
	readonly type: "retain";
	readonly count: number;

packages/dds/tree/src/simple-tree/api/treeNodeApi.ts:91

  • These array delta op types are now promoted to Beta Kuang (@beta), but their members are still undocumented (API reports show them as "(undocumented)"). Adding brief JSDoc to the exported members will improve the generated reference docs for the newly-beta surface area.
 * @sealed @beta
 */
export interface ArrayNodeInsertOp {
	readonly type: "insert";
	readonly count: number;

packages/dds/tree/src/simple-tree/api/treeNodeApi.ts:101

  • These array delta op types are now promoted to Beta Kuang (@beta), but their members are still undocumented (API reports show them as "(undocumented)"). Adding brief JSDoc to the exported members will improve the generated reference docs for the newly-beta surface area.
 * @sealed @beta
 */
export interface ArrayNodeRemoveOp {
	readonly type: "remove";
	readonly count: number;

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Comment thread packages/dds/tree/src/simple-tree/api/treeBeta.ts Outdated
Comment thread packages/dds/tree/src/simple-tree/api/treeBeta.ts Outdated
@Josmithr
Joshua Smithrud (Josmithr) marked this pull request as draft August 12, 2026 20:56
// Tests for this file are grouped with those for treeNodeApi.ts as that is where this functionality will eventually land,
// and where most of the actual implementation is for much of it.

/**

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Note for reviewers: to avoid circular module dependencies elsewhere, beta event types were moved to a new module: treeChangeEventsBeta.ts.

* Data included for {@link TreeChangeEventsAlpha.nodeChanged} when the node is an object, map, or record node.
* @sealed @alpha
*/
export interface NodeChangedDataProperties<TNode extends TreeNode = TreeNode> {

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Note for reviewers: these types were moved to treeChangeEventsBeta.ts

* Represents elements that were neither inserted into nor removed from the array.
* @sealed @alpha
*/
export interface ArrayNodeRetainOp {

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Note for reviewers: these types were moved to treeChangeEventsBeta.ts

* Copyright (c) Microsoft Corporation and contributors. All rights reserved.
* Licensed under the MIT License.
*/

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Note for reviewers: all of the below types are existing and were migrated here to prevent circular module dependencies. They are unchanged aside from the promotion of array delta types from alpha to beta.

@Josmithr

Copy link
Copy Markdown
Contributor Author

Copilot resolve the merge conflicts in this pull request

Comment thread packages/dds/tree/src/test/simple-tree/core/treeNodeKernel.spec.ts
@github-actions

Copy link
Copy Markdown
Contributor

🔗 Found some broken links! 💔

Run a link check locally to find them. See Checking for Broken Links for more information.

linkcheck output

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-website@0.0.0 serve
> docusaurus serve --no-open

[SUCCESS] Serving "build" directory at: http://localhost:3000/
[ELIFECYCLE] Command failed with exit code 1.

@github-actions

Copy link
Copy Markdown
Contributor

Bundle size comparison

Base commit: cc08e183b8d5c6c722d6983e90b8f0373067e5d0
Head commit: 128c805b0bebf42617717aef9188aeda61a851cc

Notable changes

No bundles changed by ≥ 500 bytes parsed.

Per-bundle deltas

@fluid-example/bundle-size-tests

  • fluidFrameworkAllAlpha.js: parsed 784509 → 784551 (+42), gzip 215049 → 215079 (+30)
  • azureClient.js: parsed 624847 → 624903 (+56), gzip 166640 → 166685 (+45)
  • odspClient.js: parsed 597135 → 597191 (+56), gzip 159785 → 159826 (+41)
  • aqueduct.js: parsed 531223 → 531258 (+35), gzip 142114 → 142143 (+29)
  • fluidFramework.js: parsed 403809 → 403830 (+21), gzip 114489 → 114507 (+18)
  • sharedTree.js: parsed 393213 → 393227 (+14), gzip 111931 → 111940 (+9)
  • containerRuntime.js: parsed 309144 → 309158 (+14), gzip 84569 → 84576 (+7)
  • sharedString.js: parsed 176510 → 176517 (+7), gzip 49798 → 49805 (+7)
  • experimentalSharedTree.js: parsed 160665 → 160665 (0), gzip 46265 → 46265 (0)
  • matrix.js: parsed 160341 → 160348 (+7), gzip 45798 → 45805 (+7)
  • loader.js: parsed 145704 → 145718 (+14), gzip 39286 → 39301 (+15)
  • odspDriver.js: parsed 103906 → 103927 (+21), gzip 32404 → 32411 (+7)
  • directory.js: parsed 67110 → 67117 (+7), gzip 18859 → 18866 (+7)
  • 578.js: parsed 58686 → 58686 (0), gzip 17657 → 17657 (0)
  • map.js: parsed 47205 → 47212 (+7), gzip 14455 → 14462 (+7)
  • odspPrefetchSnapshot.js: parsed 45635 → 45649 (+14), gzip 15242 → 15249 (+7)
  • 252.js: parsed 44362 → 44362 (0), gzip 13735 → 13735 (0)
  • summarizerDelayLoadedModule.js: parsed 30717 → 30717 (0), gzip 7716 → 7716 (0)
  • socketModule.js: parsed 26469 → 26476 (+7), gzip 7896 → 7904 (+8)
  • createNewModule.js: parsed 12454 → 12454 (0), gzip 4797 → 4797 (0)
  • summaryModule.js: parsed 3789 → 3789 (0), gzip 1857 → 1857 (0)
  • connectionState.js: parsed 909 → 909 (0), gzip 500 → 500 (0)
  • sharedTreeAttributes.js: parsed 847 → 854 (+7), gzip 499 → 508 (+9)
  • debugAssert.js: parsed 429 → 429 (0), gzip 299 → 299 (0)
  • FluidFramework-HashFallback.js: parsed 419 → 419 (0), gzip 313 → 313 (0)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area: dds: tree area: dds Issues related to distributed data structures area: framework Framework is a tag for issues involving the developer framework. Eg Aqueduct area: repo Repo related work area: tools area: website base: main PRs targeted against main branch changeset-present public api change Changes to a public API

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants