Skip to content
Merged
Changes from 1 commit
Commits
Show all changes
45 commits
Select commit Hold shift + click to select a range
23fdbe4
add control_after_generate ui
christian-byrne Oct 4, 2025
f853cb9
don't use forEach
christian-byrne Oct 5, 2025
57025df
seed widget
christian-byrne Oct 8, 2025
cfaeed1
seed widget2
christian-byrne Oct 12, 2025
04bd165
handle legacy step value
christian-byrne Oct 21, 2025
6acc7b0
feat: update NumberControlPopover with semantic design tokens
christian-byrne Nov 13, 2025
29af785
fix test
christian-byrne Nov 14, 2025
c18df9c
Fix display of controled widget values
AustinMroz Nov 25, 2025
abe600b
Revert useGraphNodeManager changes
AustinMroz Nov 25, 2025
fcf9a32
Merge origin/main
AustinMroz Nov 25, 2025
895a458
Swap NumberInputs to rekka ui to embed control
AustinMroz Nov 27, 2025
613fe12
Persist control widget value
AustinMroz Nov 27, 2025
94ade0a
[automated] Update test expectations
invalid-email-address Nov 27, 2025
0fb7466
Test fixes and nits
AustinMroz Nov 27, 2025
95b95ed
Merge branch 'main' into austin/vue-control-after-generate
christian-byrne Nov 30, 2025
69715b2
[automated] Update test expectations
invalid-email-address Nov 30, 2025
7dd2f52
Add max and mins from litegraph implementation
AustinMroz Dec 1, 2025
307771b
Merge 8e006bb8a306^
AustinMroz Dec 3, 2025
bbcb3b4
Merge main
AustinMroz Dec 3, 2025
ec07416
[automated] Update test expectations
invalid-email-address Dec 3, 2025
b5419f7
Empty commit to force tests to rerun
AustinMroz Dec 3, 2025
6d2f976
Fix number precision
AustinMroz Dec 3, 2025
9348995
[automated] Update test expectations
invalid-email-address Dec 3, 2025
9723e2b
Merge main
AustinMroz Dec 3, 2025
bb5c884
[automated] Update test expectations
invalid-email-address Dec 3, 2025
ff08660
Merge main
AustinMroz Dec 3, 2025
52daf4e
Revert to primevue, fix test
AustinMroz Dec 3, 2025
ad70768
Revert vitest changes, clear browser snapshots
AustinMroz Dec 3, 2025
4b4b90d
[automated] Update test expectations
invalid-email-address Dec 3, 2025
a84fd7a
Empty commit to trigger tests
AustinMroz Dec 4, 2025
0b5ded8
Merge main
AustinMroz Dec 5, 2025
a2391e6
[automated] Update test expectations
invalid-email-address Dec 5, 2025
5b6d835
Empty commit to force tests
AustinMroz Dec 5, 2025
939090f
nits
AustinMroz Dec 5, 2025
26e6aec
Further nits
AustinMroz Dec 6, 2025
1fa618c
Merge main
AustinMroz Dec 6, 2025
1ddf364
[automated] Update test expectations
invalid-email-address Dec 6, 2025
cfb579b
Remove global seed tests
AustinMroz Dec 6, 2025
d25cd39
Merge remote-tracking branch 'origin/main' into austin/vue-control-af…
AustinMroz Dec 9, 2025
679a1da
[automated] Update test expectations
invalid-email-address Dec 10, 2025
70f6d5b
merge: main into austin/vue-control-after-generate
christian-byrne Dec 11, 2025
ed25f72
Merge branch 'main' into austin/vue-control-after-generate
AustinMroz Dec 13, 2025
488922a
fix: restore executeNumberControls calls removed in merge
christian-byrne Dec 13, 2025
9553233
fix: remove space-y-1 causing extra margin on number inputs
christian-byrne Dec 13, 2025
437880c
[automated] Update test expectations
invalid-email-address Dec 13, 2025
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
Prev Previous commit
Next Next commit
handle legacy step value
  • Loading branch information
christian-byrne committed Nov 11, 2025
commit 04bd165acb8f98a582e4fb6890e092eea7b21aa2
85 changes: 84 additions & 1 deletion src/composables/graph/useGraphNodeManager.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ import { isDOMWidget } from '@/scripts/domWidget'
import { useNodeDefStore } from '@/stores/nodeDefStore'
import type { WidgetValue } from '@/types/simplifiedWidget'

<<<<<<< HEAD
import type {
LGraph,
LGraphBadge,
Expand All @@ -32,6 +33,10 @@ export interface WidgetSlotMetadata {
index: number
linked: boolean
}
=======
import type { LGraph, LGraphNode } from '../../lib/litegraph/src/litegraph'
import type { IBaseWidget } from '../../lib/litegraph/src/types/widgets'
>>>>>>> 06c19dad7 (handle legacy step value)

export interface SafeWidgetData {
name: string
Expand All @@ -45,6 +50,11 @@ export interface SafeWidgetData {
isDOMWidget?: boolean
}

type NumericWidgetOptions = Record<string, unknown> & {
step?: number
step2?: number
}

export interface VueNodeData {
id: string
title: string
Expand Down Expand Up @@ -121,24 +131,97 @@ export function useGraphNodeManager(graph: LGraph): GraphNodeManager {

// Extract safe data from LiteGraph node for Vue consumption
function extractVueNodeData(node: LGraphNode): VueNodeData {
type NumericWidgetOptions = Record<string, unknown> & {
step?: number
step2?: number
}

// Determine subgraph ID - null for root graph, string for subgraphs
const subgraphId =
node.graph && 'id' in node.graph && node.graph !== node.graph.rootGraph
? String(node.graph.id)
: null
const cloneWidgetOptions = (widget: IBaseWidget) => {
const options = widget.options
? ({ ...widget.options } as NumericWidgetOptions)
: undefined
if (
options &&
(widget.type === 'number' || widget.type === 'slider') &&
options.step2 === undefined &&
typeof options.step === 'number'
) {
const baseStep = Number.isFinite(options.step)
? (options.step as number)
: 10
const legacyStep = baseStep === 0 ? 10 : baseStep
options.step2 = legacyStep * 0.1
}
return options
}

// Extract safe widget data
const slotMetadata = new Map<string, WidgetSlotMetadata>()

<<<<<<< HEAD
const reactiveWidgets = shallowReactive<IBaseWidget[]>(node.widgets ?? [])
Object.defineProperty(node, 'widgets', {
get() {
return reactiveWidgets
},
set(v) {
reactiveWidgets.splice(0, reactiveWidgets.length, ...v)
=======
// For combo widgets, if value is undefined, use the first option as default
if (
value === undefined &&
widget.type === 'combo' &&
widget.options?.values &&
Array.isArray(widget.options.values) &&
widget.options.values.length > 0
) {
value = widget.options.values[0]
}
const spec = nodeDefStore.getInputSpecForWidget(node, widget.name)

return {
name: widget.name,
type: widget.type,
value,
label: widget.label,
options: cloneWidgetOptions(widget),
callback: widget.callback,
spec
}
} catch (error) {
return {
name: widget.name || 'unknown',
type: widget.type || 'text',
value: undefined
}
>>>>>>> 06c19dad7 (handle legacy step value)
}
})

const cloneWidgetOptions = (widget: IBaseWidget) => {
const options = widget.options
? ({ ...widget.options } as NumericWidgetOptions)
: undefined
if (
options &&
(widget.type === 'number' || widget.type === 'slider') &&
options.step2 === undefined &&
typeof options.step === 'number'
) {
const baseStep = Number.isFinite(options.step)
? (options.step as number)
: 10
const legacyStep = baseStep === 0 ? 10 : baseStep
options.step2 = legacyStep * 0.1
}
return options
}

const safeWidgets = reactiveComputed<SafeWidgetData[]>(() => {
node.inputs?.forEach((input, index) => {
if (!input?.widget?.name) return
Expand Down Expand Up @@ -171,7 +254,7 @@ export function useGraphNodeManager(graph: LGraph): GraphNodeManager {
type: widget.type,
value: value,
label: widget.label,
options: widget.options ? { ...widget.options } : undefined,
options: cloneWidgetOptions(widget),
callback: widget.callback,
spec,
slotMetadata: slotInfo,
Expand Down