-
Notifications
You must be signed in to change notification settings - Fork 553
feat(devtools-core): Visualize TreeDataObject in Devtools #24885
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
packages/tools/devtools/devtools-core/src/DecomposedContainer.ts
Outdated
Show resolved
Hide resolved
packages/tools/devtools/devtools-core/src/DecomposedContainer.ts
Outdated
Show resolved
Hide resolved
packages/tools/devtools/devtools-core/src/DecomposedContainer.ts
Outdated
Show resolved
Hide resolved
packages/tools/devtools/devtools-core/src/DecomposedContainer.ts
Outdated
Show resolved
Hide resolved
packages/tools/devtools/devtools-core/api-report/devtools-core.alpha.api.md
Outdated
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I would recommend making this PR a draft. There is still a fair amount of work that needs to be done to this package and devtools-view
to make this new infrastructure robust. I've left a handful of comments to this effect. Great proof of concept, but there is still a fair amount of work to be done to productionize it.
packages/tools/devtools/devtools-core/src/messaging/devtools-messages/ContainerList.ts
Show resolved
Hide resolved
packages/tools/devtools/devtools-view/src/components/ContainerSummaryView.tsx
Outdated
Show resolved
Hide resolved
…luidFramework into devtools/IContainer
There was a problem hiding this 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 introduces support for visualizing TreeDataObject in the Fluid Devtools by extending the devtools architecture to handle Data Objects alongside Containers. The implementation creates a lightweight abstraction of containers to enable Data Object visualization without requiring full container adapter implementation.
- Introduces a
DecomposedContainer
interface and implementation to abstract common container properties for devtools use - Adds
DataObjectDevtools
andBaseDevtools
classes to share functionality between container and data object devtools - Updates the UI to display both Containers and Data Objects sections with appropriate visual distinctions
Reviewed Changes
Copilot reviewed 28 out of 29 changed files in this pull request and generated 5 comments.
Show a summary per file
File | Description |
---|---|
packages/tools/devtools/devtools-core/src/IFluidDevtools.ts | Adds registerDataObject method to support data object registration |
packages/tools/devtools/devtools-core/src/FluidDevtools.ts | Implements data object registration and management alongside containers |
packages/tools/devtools/devtools-core/src/DecomposedContainer.ts | Creates abstraction layer for containers to support both real containers and data objects |
packages/tools/devtools/devtools-core/src/BaseDevtools.ts | Extracts shared devtools functionality into base class |
packages/tools/devtools/devtools-core/src/DataObjectDevtools.ts | Provides devtools implementation specifically for data objects |
packages/tools/devtools/devtools-view/src/components/Menu.tsx | Updates UI to display both container and data object sections with state management |
packages/tools/devtools/devtools-view/src/components/ContainerSummaryView.tsx | Conditionally displays action controls based on devtools type |
packages/tools/devtools/devtools-test-app/src/App.tsx | Demonstrates data object registration in test application |
Files not reviewed (1)
- pnpm-lock.yaml: Language not supported
Comments suppressed due to low confidence (3)
packages/tools/devtools/devtools-core/src/FluidDevtools.ts:32
- The error message 'TODO' is not helpful. Replace with a descriptive error message that explains what went wrong.
import { pkgVersion as devtoolsVersion } from "./packageVersion.js";
packages/tools/devtools/devtools-core/src/BaseDevtools.ts:76
- [nitpick] The underscore prefix in '_audienceChangeLog' is inconsistent with the naming convention used for '_connectionStateLog' in the same context. Consider using consistent naming patterns.
protected readonly _audienceChangeLog: AudienceChangeLogEntry[];
packages/tools/devtools/devtools-view/src/components/Menu.tsx:160
- The telemetry event name 'RefreshContainerListButtonClicked' should be updated to be more generic since this button now refreshes both containers and data objects. Consider 'RefreshListButtonClicked' or include the label parameter.
usageLogger?.sendTelemetryEvent({ eventName: "RefreshContainerListButtonClicked" });
packages/tools/devtools/devtools-core/src/data-visualization/DataVisualization.ts
Show resolved
Hide resolved
🔗 No broken links found! ✅ Your attention to detail is admirable. linkcheck output
|
#### Description Part 1 of [24885](#24885) Adds`canModifyConnectionState` feature flag: - `true`: Supports modifying the container's connection and lifecycle state (supported for `IContainer`) - `false`: Disable modifying the container's connection and lifecycle state (for `IContainerRuntime` as it does not have the `closed` event, and `DataObject` in the future). Part 2: [25137](#25137) --------- Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> Co-authored-by: Joshua Smithrud <54606601+Josmithr@users.noreply.github.com>
#### Description Part 2 of [24885](#24885) This PR primarily adds `ContainerRuntimeDevtools`, `DecomposedContainer`& `registerContainerRuntime()` to enable registeration and visualization of `DataObject` in `devtools-core`. **TODO: Discuss about one unifying API for registering either `IContainer` or `IContainerRuntime`. #### Follow-Up - Add UI-support for `IContainerRuntime` in `devtools-view` (e.g., separately render `Containers` & `ContainerRuntime` in the devtools pane): #25112 - Add interactive UI-support (e.g., dispose icon if disposed, notification icon for the last-written devtools instance). --------- Co-authored-by: Joshua Smithrud <54606601+Josmithr@users.noreply.github.com> Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
NOTE
This PR prototypes a
devtools-core
API integration and explores its potential use cases.Background
This work originates from ADO 36175, which proposed creating an adapter in the
office-bohemia
repo to support per-Loop-Component (DataObject
) visualization. However, implementing a fullIContainer
adapter was not feasible, as the required properties for thedevtools-core
visualizer couldn't be fulfilled.Description
Rather than wrapping everything into an adapter, this PR takes the inverse approach. It introduces a new
DecomposedIContainer
interface and aDecomposedContainer
class that implements it. This class is a lightweight, strict subset of theIContainer
interface, exposing only the properties necessary for visualization.Thanks to the property and event overlap (
clientId
,audience
,connected
,attached
, etc.) withPureDataObject.runtime
, we can effectively translate aPureDataObject
into a decomposedIContainer
type, enabling visualizer compatibility.Change in the
devtools-view
package