Skip to content

Support service client containers in Devtools - #28260

Open
Craig Macomber (Microsoft) (CraigMacomber) wants to merge 2 commits into
microsoft:mainfrom
CraigMacomber:text-follow
Open

Craig Macomber (Microsoft) (CraigMacomber) wants to merge 2 commits into
microsoft:mainfrom
CraigMacomber:text-follow

Conversation

@CraigMacomber

Copy link
Copy Markdown
Contributor

Description

Follow up on #28259 by letting the text-editor example use supported alpha APIs instead of accessing internal container implementations.

  • Add initializeDevtoolsAlpha, FluidDevtoolsAlpha, and FluidContainerDevtoolsProps to register service client containers directly with Devtools, preserving the existing beta registration signature.
  • Return SharedObjectKindAlpha<ITree> from fluid-framework's configuredSharedTree so configured trees work with service client registries without internal imports.
  • Update the text-editor example, add registration regression tests, and document the changes in changesets.

Validation

  • Compilation passed for devtools, fluid-framework, and text-editor.
  • All 9 FluidDevtools unit tests and 2 text-editor app tests passed.
  • Changed-file formatting and ESLint passed.
  • Changeset check passed; working tree is clean.
  • The quick readiness script scheduled zero check tasks, so policy and syncpack validation remain unverified.
  • Full CI, CommonJS validation, and browser integration tests were not run.

Reviewer Guidance

The review process is outlined in the pull request guidelines.

API Council review is needed for removing @sealed from the beta ContainerDevtoolsProps input interface. The new APIs are alpha, and no consumer migration is required.

@github-actions github-actions Bot added area: examples Changes that focus on our examples area: framework Framework is a tag for issues involving the developer framework. Eg Aqueduct area: tools area: repo Repo related work dependencies Pull requests that update a dependency file area: website public api change Changes to a public API changeset-present base: main PRs targeted against main branch labels Sep 19, 2026
@github-actions

github-actions Bot commented Sep 19, 2026

Copy link
Copy Markdown
Contributor

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

Based on the diff (369 lines, 16 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.

Copilot review overview

🟡 Changes recommended

Restore URL-hash validation before loading containers to preserve the documented error behavior and passing test.

Get a fresh assessment by requesting another Copilot review.

Review effort: Lite
Findings: 1 Medium severity

Open (1)
What changed in this PR

Adds alpha Devtools support for service-client containers and migrates the text-editor example to supported public APIs.

Changes:

  • Adds service-container registration APIs and regression tests.
  • Updates configured SharedTree typing and API reports.
  • Migrates the text-editor example and documents changes.
File Description
pnpm-lock.yaml Updates workspace dependencies.
packages/​tools/​devtools/​devtools-core/​src/​test/​FluidDevtools.spec.ts Adds registration regression tests.
packages/​tools/​devtools/​devtools-core/​src/​index.ts Exports new APIs.
packages/​tools/​devtools/​devtools-core/​src/​IFluidDevtools.ts Defines alpha Devtools interfaces.
packages/​tools/​devtools/​devtools-core/​src/​FluidDevtools.ts Supports service-container registration.
packages/​tools/​devtools/​devtools-core/​src/​ContainerDevtools.ts Adds service-container properties.
packages/​tools/​devtools/​devtools-core/​package.json Updates dependencies.
packages/​tools/​devtools/​devtools-core/​api-report/​devtools-core.beta.api.md Updates beta API report.
packages/​tools/​devtools/​devtools-core/​api-report/​devtools-core.alpha.api.md Updates alpha API report.
packages/​framework/​fluid-framework/​src/​index.ts Updates configured SharedTree typing.
packages/​framework/​fluid-framework/​api-report/​fluid-framework.alpha.api.md Updates alpha API report.
examples/​data-objects/​text-editor/​src/​app.tsx Migrates Devtools and tree registration.
examples/​data-objects/​text-editor/​package.json Removes an obsolete dependency.
.changeset/​twenty-buttons-start.md Updates ServiceOptions documentation.
.changeset/​devtools-service-containers.md Documents Devtools API changes.
.changeset/​configured-tree-registry-type.md Documents configured tree typing.
Files not reviewed (1)
  • pnpm-lock.yaml: Generated file

💡 Configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

"Invalid container ID in URL hash. Expected 3-64 alphanumeric or '-' characters.",
);
}
const container = await createOrLoadExampleContainer(client, TextEditorDataStore);
@github-actions

Copy link
Copy Markdown
Contributor

Bundle size comparison

Base commit: unresolved
Head commit: 523e2b690e7f78e59bad760022599f635e1d6d20

⚠️ Comparison unavailable.

The PR's CI build failed — fix the build and the comment will update once the next run succeeds.

@github-actions

Copy link
Copy Markdown
Contributor

🔗 No broken links found! ✅

Your attention to detail is admirable.

linkcheck output

$ start-server-and-test "npm run serve -- --host 127.0.0.1 --no-open" http://127.0.0.1:3000 check-links
1: starting server using command "npm run serve -- --host 127.0.0.1 --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 --host 127.0.0.1 --no-open

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

> fluid-framework-website@0.0.0 check-links
> linkcheck http://127.0.0.1:3000 --skip-file skipped-urls.txt

Crawling...

Stats:
  658102 links
    3579 destination URLs
    3898 URLs ignored
       0 warnings
       0 errors


// eslint-disable-next-line import-x/no-internal-modules
import { ServiceContainerBase } from "@fluidframework/runtime-utils/internal";
import { TreeViewConfiguration, type ITree } from "@fluidframework/tree";
// eslint-disable-next-line import-x/no-internal-modules -- FormattedTextDefault has no public export.

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.

We should restore some sort of TODO here. Our examples shouldn't be using internal APIs.

* after initialization.
* @alpha
*/
export function initializeDevtoolsAlpha(props?: FluidDevtoolsProps): FluidDevtoolsAlpha {

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.

Any reason this function couldn't preserve support for the non-service-client-based props?

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

Labels

area: examples Changes that focus on our examples 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 dependencies Pull requests that update a dependency file public api change Changes to a public API

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants