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
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@
"dependencies": {
"@alloc/quick-lru": "catalog:",
"@atlaskit/pragmatic-drag-and-drop": "^1.3.1",
"@comfyorg/comfy-multi-player": "0.3.3",
"@comfyorg/comfy-multi-player": "0.3.4",
"@comfyorg/comfyui-desktop-bridge-types": "catalog:",
"@comfyorg/comfyui-electron-types": "catalog:",
"@comfyorg/design-system": "workspace:*",
Expand Down
10 changes: 5 additions & 5 deletions pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 1 addition & 2 deletions pnpm-workspace.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -163,7 +163,6 @@ catalog:
cleanupUnusedCatalogs: true

allowBuilds:
'@comfyorg/comfy-multi-player@https://codeload.github.com/Comfy-Org/comfy-multi-player/tar.gz/58e2333ce3bb6375fd2efbc1e9d7df17327f37e0': true
'@firebase/util': false
'@sentry/cli': true
'@tailwindcss/oxide': true
Expand Down Expand Up @@ -199,4 +198,4 @@ overrides:
# Transitional - drop once 0.2.0 is older than the release-age gate.
minimumReleaseAgeExclude:
- '@comfyorg/comfyui-desktop-bridge-types@0.2.0'
- '@comfyorg/comfy-multi-player@0.2.0 || 0.2.1 || 0.3.0 || 0.3.2 || 0.3.3'
- '@comfyorg/comfy-multi-player@0.2.0 || 0.2.1 || 0.3.0 || 0.3.2 || 0.3.3 || 0.3.4'
Original file line number Diff line number Diff line change
Expand Up @@ -1150,6 +1150,103 @@ describe('EcsFollowerAdapter integration', () => {
followerB.destroy()
})

it('projects links inserted with a workflow batch', () => {
const host = mint({ nodes: [], links: [] }, catalog)
const follower = new FollowerDoc()
const adapter = new EcsFollowerAdapter(
createGraphMutations({
placement: inertPlacementPort,
getScope: () => scope,
layout: { createNode: vi.fn(), deleteNodes: vi.fn() }
})
)
adapter.bind('wf', follower)

try {
const insertWorkflow = op('insert-workflow', 1, {
op: 'insert_workflow',
workflow: {
nodes: [
{
id: 101,
type: 'Source',
outputs: [{ name: 'image', type: 'IMAGE', links: [201] }]
},
{
id: 102,
type: 'Source',
inputs: [{ name: 'image', type: 'IMAGE', link: 201 }],
outputs: [{ name: 'image', type: 'IMAGE', links: [202] }]
},
{
id: 103,
type: 'Sink',
inputs: [{ name: 'image', type: 'IMAGE', link: 202 }]
}
],
links: [
[201, 101, 0, 102, 0, 'IMAGE'],
[202, 102, 0, 103, 0, 'IMAGE']
]
}
})
const result = applyOps(
host,
[insertWorkflow] as Parameters<typeof applyOps>[1],
catalog
)
expect(result.outcomes).toEqual([
{ op_id: 'insert-workflow', outcome: 'applied' }
])

const insertedLinks = [...linksMap(host).entries()].map(
([key, value]) => {
const id =
value instanceof Y.Array
? value.get(0)
: Array.isArray(value)
? value[0]
: null
return [key, id] as const
}
)
expect(insertedLinks).toHaveLength(2)
expect(
insertedLinks.every(
([key, id]) =>
typeof id === 'number' &&
Number.isSafeInteger(id) &&
id >= 0 &&
String(id) === key
)
).toBe(true)

const update = Y.encodeStateAsUpdate(host)
follower.applyRemoteUpdate(update)
expect(
adapter.applyFrame({
workflowId: 'wf',
seq: 1,
update,
actor: 'agent:test',
opIds: [insertWorkflow.op_id]
})
).toBe(true)

for (const [, id] of insertedLinks) {
expect(typeof id).toBe('number')
if (typeof id !== 'number') continue
expect(
useLinkStore().getTopology(scope.rootGraphId, toLinkId(id))
).toBeDefined()
}
} finally {
adapter.destroy()
follower.destroy()
host.destroy()
}
})

it('populates node slot arrays identically whether add+connect ops arrive in one combined frame or separate singleton frames (R-96)', () => {
const buildOps = (prefix: string) => [
op(`${prefix}-1`, 1, {
Expand Down
Loading