refactor: address PR #10629 review feedback

- Rename convertDefaultKSamplerToSubgraph to loadDefaultAndConvertKSamplerToSubgraph
- Remove redundant nextFrame() after convertToSubgraph (already called internally)
- Add dispose() calls after collectConsoleWarnings assertions
- Add explicit null guards on getSlotLabel() before non-null assertions

Amp-Thread-ID: https://ampcode.com/threads/T-019d3651-bd02-760c-9542-a2fbe03e051a
Co-authored-by: Amp <amp@ampcode.com>
This commit is contained in:
Alexander Brown
2026-03-28 15:22:56 -07:00
parent a13c333cec
commit 1004547939
6 changed files with 17 additions and 11 deletions

View File

@@ -445,13 +445,11 @@ export class SubgraphHelper {
await this.comfyPage.nextFrame()
}
async convertDefaultKSamplerToSubgraph(): Promise<NodeReference> {
async loadDefaultAndConvertKSamplerToSubgraph(): Promise<NodeReference> {
await this.comfyPage.workflow.loadWorkflow('default')
const ksampler = await this.comfyPage.nodeOps.getNodeRefById('3')
await ksampler.click('title')
const subgraphNode = await ksampler.convertToSubgraph()
await this.comfyPage.nextFrame()
return subgraphNode
return ksampler.convertToSubgraph()
}
async packAllInteriorNodes(hostNodeId: string): Promise<void> {