Skip to content

feat(client): encapsulated support for Presence#25790

Merged
jason-ha merged 5 commits intomainfrom
test/presence/encapsulated-support
Nov 3, 2025
Merged

feat(client): encapsulated support for Presence#25790
jason-ha merged 5 commits intomainfrom
test/presence/encapsulated-support

Conversation

@jason-ha
Copy link
Contributor

@jason-ha jason-ha commented Nov 1, 2025

Expose getPresenceFromDataStoreContext API to allow
Presence use in the encapsulated API model.

In this minimal implementation, Presence can be
injected on demand, but all injection requests
are expected to be from the same module.

Future changes:

  • Add loader era initialization - new API
  • Expand compat boundaries and checks where it is
    possible that runtime package might be mismatched.

Add example use to @fluid-example/app-integration-external-views that shows cursors.

AB#51457

Expose getPresenceFromDataStoreContext API to allow
Presence use in the encapsulated API model.

In this minimal implementation, Presence can be
injected on demand, but all injection requests
are expected to be from the same module.

Future changes:
- Add loader era initialization - new API
- Expand compat boundaries and checks where it is
possible that runtime package might be mismatched.
Copilot AI review requested due to automatic review settings November 1, 2025 10:57
@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: runtime Runtime related issues dependencies Pull requests that update a dependency file public api change Changes to a public API base: main PRs targeted against main branch labels Nov 1, 2025
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 refactors the Container Extension system to support runtime compatibility checking and versioning. It introduces a factory-based instantiation pattern, moves extension-related types to runtime-definitions, and adds support for accessing extensions via data store contexts.

Key changes:

  • Introduced ContainerExtensionProvider interface and compatibility checking infrastructure
  • Refactored ContainerExtensionFactory from a constructor type to an interface with explicit instantiation methods
  • Added getPresenceFromDataStoreContext API for legacy/alpha access pattern
  • Updated examples to demonstrate cursor presence using the new API

Reviewed Changes

Copilot reviewed 28 out of 29 changed files in this pull request and generated 4 comments.

Show a summary per file
File Description
pnpm-lock.yaml Updated TypeScript version dependencies and added tinylicious dev dependency
packages/runtime/runtime-definitions/src/containerExtensionProvider.ts New file defining extension provider interfaces and compatibility details
packages/runtime/runtime-definitions/src/dataStoreContext.ts Added FluidDataStoreContextInternal interface extending ContainerExtensionProvider
packages/runtime/runtime-definitions/src/index.ts Exported new extension-related types
packages/runtime/container-runtime/src/containerRuntime.ts Implemented compatibility checking and factory-based extension instantiation
packages/runtime/container-runtime/src/dataStoreContext.ts Added getExtension method to FluidDataStoreContext
packages/runtime/container-runtime-definitions/src/containerExtension.ts Refactored ContainerExtensionFactory and added ExtensionInstantiationResult
packages/framework/presence/src/getPresence.ts Implemented new factory pattern and added getPresenceFromDataStoreContext
examples/view-integration/external-views/ Updated to use presence via data store context with cursor tracking example
Files not reviewed (1)
  • pnpm-lock.yaml: Language not supported

@github-actions
Copy link
Contributor

github-actions bot commented Nov 2, 2025

🔗 Found some broken links! 💔

Run a link check locally to find them. See
https://github.com/microsoft/FluidFramework/wiki/Checking-for-broken-links-in-the-documentation for more information.

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

 ELIFECYCLE  Command failed with exit code 1.

@tylerbutler tylerbutler added the release-blocking Must be addressed before we cut and publish the next release label Nov 3, 2025
Copy link
Contributor

@WillieHabi WillieHabi 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!

@jason-ha jason-ha merged commit 15d422e into main Nov 3, 2025
49 checks passed
@jason-ha jason-ha deleted the test/presence/encapsulated-support branch November 3, 2025 19:01
anthony-murphy-agent pushed a commit to anthony-murphy-agent/FluidFramework that referenced this pull request Jan 14, 2026
Expose getPresenceFromDataStoreContext API to allow
Presence use in the encapsulated API model.

In this minimal implementation, Presence can be
injected on demand, but all injection requests
are expected to be from the same module.

Future changes:
- Add loader era initialization - new API
- Expand compat boundaries and checks where it is
possible that runtime package might be mismatched.

Add example use to @fluid-example/app-integration-external-views that
shows cursors.


[AB#51457](https://dev.azure.com/fluidframework/235294da-091d-4c29-84fc-cdfc3d90890b/_workitems/edit/51457)
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: runtime Runtime related issues base: main PRs targeted against main branch dependencies Pull requests that update a dependency file public api change Changes to a public API release-blocking Must be addressed before we cut and publish the next release

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants