Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "@tangle-network/sandbox-ui",
"version": "0.81.0",
"description": "Unified UI component library for Tangle Sandbox primitives, chat, dashboard, terminal, editor, and workspace components",
"version": "0.82.0",
"description": "Unified UI component library for Tangle Sandbox \u2014 primitives, chat, dashboard, terminal, editor, and workspace components",
"repository": {
"type": "git",
"url": "https://github.com/tangle-network/sandbox-ui"
Expand Down
25 changes: 25 additions & 0 deletions src/workflows/entry.test.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
import { describe, expect, it } from "vitest"
import * as workflows from "./index"

/**
* The workflows entry is the one a host renders a graph from, and the node cards it
* renders resolve a model's brand mark themselves (node-ui.tsx). A host labelling a
* node OUTSIDE the canvas — a side panel, a run row — needs the same two symbols, and
* the only other entry that publishes them is `dashboard`, which carries the whole
* model-picker/widget surface behind it: reaching for them there costs a consumer
* kilobytes of gzipped JS for a glyph. Keeping them on this entry is therefore a
* contract, not a convenience, and this asserts it stays one.
*/
describe("@tangle-network/sandbox-ui/workflows entry", () => {
it("publishes the model brand mark the graph's own node cards use", () => {
expect(typeof workflows.modelBrandFor).toBe("function")
expect(typeof workflows.ModelBrandStack).toBe("function")
})

it("resolves a brand from a bare model id, as a node card does", () => {
expect(workflows.modelBrandFor("anthropic/claude-sonnet-4-5")?.lab.key).toBe(
"anthropic",
)
expect(workflows.modelBrandFor("some-internal/model-x")).toBeNull()
})
})
11 changes: 11 additions & 0 deletions src/workflows/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -27,3 +27,14 @@ export {
// WorkflowGraph component is reached only through the lazy wrapper's import().
export type { WorkflowGraphProps } from "./WorkflowGraph";
export { WorkflowGraph as WorkflowGraphLazy } from "./WorkflowGraphLazy";

// The brand mark of the model a node ran on. The graph's own node cards resolve and
// render these (node-ui.tsx), so a host labelling a node OUTSIDE the canvas — a side
// panel, a run row — reaches for the same two symbols. Exported here so it can have
// them without importing the dashboard entry, which drags the whole model-picker /
// widget surface in behind them.
export {
type ModelBrandIdentity,
ModelBrandStack,
modelBrandFor,
} from "../lib/model-brand";
Loading