Skip to content

fix: KEEP-291 config panel retains previous node's field inputs#904

Merged
suisuss merged 2 commits intostagingfrom
fix/KEEP-291-refresh-config-panel-on-node-select
Apr 21, 2026
Merged

fix: KEEP-291 config panel retains previous node's field inputs#904
suisuss merged 2 commits intostagingfrom
fix/KEEP-291-refresh-config-panel-on-node-select

Conversation

@suisuss
Copy link
Copy Markdown

@suisuss suisuss commented Apr 21, 2026

Summary

  • Adds key={selectedNode.id} on the per-node config wrapper in components/workflow/node-config-panel.tsx so the subtree fully unmounts and remounts when a different node is selected.
  • Root cause: React preserved leaf-component state across prop changes (e.g. AbiFunctionArgsField.localArgValues, FieldGroup.isExpanded) because the components stayed at the same tree position. Result was old node's field inputs persisting after clicking a new node.
  • This replaces the per-field workaround pattern (the existing category resync effect in action-config.tsx) with a structural fix that holds for any future field component that uses local state.

Test plan

  • Open a workflow with two or more configured action nodes
  • Click node A, confirm its field inputs render
  • Click node B, confirm its field inputs replace A's (no stale values)
  • Repeat with trigger + action pair
  • Repeat with two nodes calling the same ABI function name (e.g. both transfer) - the arg values in AbiFunctionArgsField should reflect the newly-selected node
  • Verify expand/collapse state of FieldGroup doesn't leak across nodes
  • Spot-check that editing a field on one node still updates correctly (no regression in the within-node edit path)

Add key={selectedNode.id} on the per-node config wrapper so the entire
subtree unmounts and remounts when the user selects a different node.
Without this, leaf components (AbiFunctionArgsField.localArgValues,
FieldGroup.isExpanded, etc.) retained useState from the previous node
because React preserves state for components at the same tree position
across prop changes. Result: field inputs from the old node persisted
in the panel after clicking a new node.
@github-actions
Copy link
Copy Markdown

PR Environment Deployed

Your PR environment has been deployed!

Environment Details:

Components:

  • Keeperhub Application
  • PostgreSQL Database (isolated instance)
  • LocalStack (SQS emulation)
  • Redis (isolated instance)
  • Schedule Dispatcher (staging image)
  • Block Dispatcher (staging image)
  • Event Tracker (staging image)

The environment will be automatically cleaned up when this PR is closed or merged.

@suisuss suisuss merged commit d61add4 into staging Apr 21, 2026
52 checks passed
@suisuss suisuss deleted the fix/KEEP-291-refresh-config-panel-on-node-select branch April 21, 2026 04:07
@github-actions
Copy link
Copy Markdown

🧹 PR Environment Cleaned Up

The PR environment has been successfully deleted.

Deleted Resources:

  • Namespace: pr-904
  • All Helm releases (Keeperhub, Scheduler, Event services)
  • PostgreSQL Database (including data)
  • LocalStack, Redis
  • All associated secrets and configs

All resources have been cleaned up and will no longer incur costs.

@eskp eskp mentioned this pull request Apr 21, 2026
4 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant