fix restore node size, and add feeback

This commit is contained in:
2026-04-04 00:57:42 -07:00
parent 7068da7ffa
commit b2ddd81286
4 changed files with 17 additions and 3 deletions

View File

@@ -999,6 +999,12 @@ function CustomNode({ id, data }: { id: string; data: NodeData }) {
const def = data.definition;
const scalarDisplay = formatScalarDisplay(data.scalarValue);
const processingTimeText = formatProcessingTime(data.processingTimeMs);
const nodeWidth = useStore(
useCallback((s: any) => {
const node = s.nodeLookup.get(id);
return node?.width ?? undefined;
}, [id]),
);
const connectedPathInfo = useStore(
useCallback((s: any) => getConnectedOutputInfo(s, id, 'path'), [id]),
);
@@ -1206,7 +1212,7 @@ function CustomNode({ id, data }: { id: string; data: NodeData }) {
return (
<>
{ctx?.executingNodeId === id && <div className="node-executing-glow" aria-hidden="true" />}
<div className={`custom-node${data.error ? ' node-error' : ''}`}>
<div className={`custom-node${data.error ? ' node-error' : ''}`} style={nodeWidth ? { width: nodeWidth } : undefined}>
{/* Title */}
<div className="node-title drag-handle" style={{ background: catColor }}>
<div className="node-title-left">