feat(odsp-driver): support point-in-time loading in factory core - #28007
feat(odsp-driver): support point-in-time loading in factory core#28007Sonali Deshpande (sonalideshpandemsft) wants to merge 6 commits into
Conversation
There was a problem hiding this comment.
Pull request overview
Adds optional point-in-time (sequence-number-based) loading support directly to OdspDocumentServiceFactoryCore, so the standard OdspDocumentServiceFactory can be used for both normal and point-in-time loads without a separate point-in-time factory class.
Changes:
- Moves the point-in-time factory capability into
OdspDocumentServiceFactoryCorevia an optionalcreatePointInTimeDocumentServicefunction property. - Updates exports so
getOdspPointInTimeDocumentServiceFactoryandIPointInTimeDocumentServiceFactoryremain available from the public package surface, while removing the dedicated point-in-time factory implementation file. - Adds coverage to ensure the local ODSP factory explicitly does not expose point-in-time loading.
Reviewed changes
Copilot reviewed 9 out of 9 changed files in this pull request and generated no comments.
Show a summary per file
| File | Description |
|---|---|
| packages/drivers/odsp-driver/src/test/odspPointInTimeDocumentServiceFactory.spec.ts | Updates imports and adds a test asserting the local factory does not expose PIT loading. |
| packages/drivers/odsp-driver/src/pointInTimeDriver/odspPointInTimeDocumentServiceFactory.ts | Removes the dedicated PIT factory implementation (logic now lives in the core factory). |
| packages/drivers/odsp-driver/src/odspDocumentServiceFactoryCore.ts | Introduces IPointInTimeDocumentServiceFactory and implements optional PIT creation on the core factory. |
| packages/drivers/odsp-driver/src/odspDocumentServiceFactory.ts | Re-exports the PIT interface and preserves getOdspPointInTimeDocumentServiceFactory on the main factory module. |
| packages/drivers/odsp-driver/src/localOdspDriver/localOdspDocumentServiceFactory.ts | Explicitly overrides createPointInTimeDocumentService to undefined for the local factory. |
| packages/drivers/odsp-driver/src/index.ts | Updates public exports to surface PIT factory function/type from odspDocumentServiceFactory. |
| packages/drivers/odsp-driver/api-report/odsp-driver.legacy.beta.api.md | Updates API report to include the new optional PIT capability on the core factory. |
| packages/drivers/odsp-driver/api-report/odsp-driver.legacy.alpha.api.md | Updates API report to include the new optional PIT capability on the core factory. |
| .changeset/ready-peaches-juggle.md | Adds a changeset documenting the new PIT capability on the standard ODSP factory. |
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
|
Hi! Thank you for opening this PR. Want me to review it? Based on the diff (532 lines, 9 files), I've queued these reviewers:
How this works
|
| --- | ||
| Enable point-in-time loading on the standard ODSP document service factory | ||
|
|
||
| `OdspDocumentServiceFactoryCore` now exposes the optional |
There was a problem hiding this comment.
Nit: can we link to the API documentation for these? E.g.
| `OdspDocumentServiceFactoryCore` now exposes the optional | |
| [`OdspDocumentServiceFactoryCore`](https://fluidframework.com/docs/api/odsp-driver/odspdocumentservicefactorycore-class) now exposes the optional |
There was a problem hiding this comment.
(Ideally we can link the others as well)
| OdspDocumentServiceFactoryCore, | ||
| } from "./odspDocumentServiceFactoryCore.js"; | ||
|
|
||
| export type { IPointInTimeDocumentServiceFactory } from "./odspDocumentServiceFactoryCore.js"; |
There was a problem hiding this comment.
Do we need to re-export this type from this module? Can't users just import from the other one?
Joshua Smithrud (Josmithr)
left a comment
There was a problem hiding this comment.
Re-opened one existing comment, and left 1 new question. Otherwise, API and docs changes look good to me. Someone who knows this space better than I do should probably approve too before merging though 😋
|
🔗 Found some broken links! 💔 Run a link check locally to find them. See Checking for Broken Links for more information. linkcheck output |
Bundle size comparisonBase commit: Pending — |
Adds optional point-in-time loading support to
OdspDocumentServiceFactoryCore. The standardOdspDocumentServiceFactoryinherits this capability, whileLocalOdspDocumentServiceFactoryleaves it undefined.This removes the separate point-in-time factory implementation while preserving the existing factory function, interface, and package exports.
This change would make it easier for bohemia to consume point-in-time load since
OdspDocumentServiceFactorywill support point-in-time loading directly.