[cyclops] Absorb DescribeResultCache into GraphController#7970
Merged
Conversation
## What Replaces the standalone `DescribeResultCache` with signal-backed describe entries owned directly by `GraphController`, injecting the describe capability as a `NodeDescriber` function at the SCA Service→Controller boundary. ## Why `DescribeResultCache` was the last piece of derived state not owned by `GraphController`. Absorbing it gives the controller full control over all reactive state (nodes, graphs, tools, components, describe), clearing the way for eliminating the event bridge in the next stage. ## Changes ### `@breadboard-ai/types` - Remove `InspectableDescriberResultCache` and `InspectableDescriberResultCacheEntry` types - Add `NodeDescribeSnapshot` type - Replace `MutableGraph.describe` field with `describeNode()` method ### `visual-editor` — New files - `node-describer.ts` — `NodeDescriber` function type (SCA Service→Controller boundary) - `node-describe-entry.ts` — Signal-backed `NodeDescribeEntry` class ### `visual-editor` — Modified - `graph-controller.ts` — Owns `#describeEntries` map, adds `describeNode()` and `#refreshDescribers()`, accepts `NodeDescriber` in `initialize()` - `initialize-editor.ts` — Builds `NodeDescriber` closure from `getHandler` + `sandbox` - `node.ts` — Uses `describeNode()` instead of `describe.get()` - `graph.ts` — Import cleanup ### `visual-editor` — Deleted - `describe-cache.ts` — Functionality absorbed into `GraphController` ### Tests & helpers - `_mutable-graph.ts` — Updated mock with `describeNode()` - `graph-controller.test.ts` — Added `noopDescriber` arg, replaced `.describe` assertions - `node-actions.test.ts` — Added `noopDescriber` arg ## Testing - `npm run build:tsc -w packages/visual-editor` — compiles clean - `npm run test -w packages/visual-editor` — all tests pass
📊 Coverage Report
🔴 2 files with reduced line coverage
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
Replaces the standalone
DescribeResultCachewith signal-backed describeentries owned directly by
GraphController, injecting the describe capabilityas a
NodeDescriberfunction at the SCA Service→Controller boundary.Why
DescribeResultCachewas the last piece of derived state not owned byGraphController. Absorbing it gives the controller full control over allreactive state (nodes, graphs, tools, components, describe), clearing the way
for eliminating the event bridge in the next stage.
Changes
@breadboard-ai/typesInspectableDescriberResultCacheandInspectableDescriberResultCacheEntrytypesNodeDescribeSnapshottypeMutableGraph.describefield withdescribeNode()methodvisual-editor— New filesnode-describer.ts—NodeDescriberfunction type (SCA Service→Controllerboundary)
node-describe-entry.ts— Signal-backedNodeDescribeEntryclassvisual-editor— Modifiedgraph-controller.ts— Owns#describeEntriesmap, addsdescribeNode()and#refreshDescribers(), acceptsNodeDescriberininitialize()initialize-editor.ts— BuildsNodeDescriberclosure fromgetHandler+sandboxnode.ts— UsesdescribeNode()instead ofdescribe.get()graph.ts— Import cleanupvisual-editor— Deleteddescribe-cache.ts— Functionality absorbed intoGraphControllerTests & helpers
_mutable-graph.ts— Updated mock withdescribeNode()graph-controller.test.ts— AddednoopDescriberarg, replaced.describeassertions
node-actions.test.ts— AddednoopDescriberargTesting
npm run build:tsc -w packages/visual-editor— compiles cleannpm run test -w packages/visual-editor— all tests pass