fix: prevent session reset when updating host properties #490
Reference in New Issue
Block a user
Delete Branch "fix/host-update-session-reset"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Summary
hostConfig.idinstead of entirehostConfigobject in useEffect dependency arrayRoot cause: When any host property is updated,
updateHostConfig()creates a new object reference. The Terminal component's useEffect depended on the entirehostConfigobject, so any reference change triggered reconnection logic.Fix: Only depend on
hostConfig.idsince we only need to reconnect when switching to a different host, not when properties of the same host change.Before: Edit any host → all open terminals disconnect and reconnect
After: Edit any host → terminals stay connected
Related to #401