Repository navigation
feat: "Replace a Matter node…" keeps a re-paired device's Indigo devices (#364) - #365
Merged
Merged
Conversation
Plan in docs/plans/issue-364-replace-node.md; tests pin S1-S4 and fail on the missing implementation until it lands. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_018LWBygcTdnKUprkHZd1kqL
Pairs old and new devices by (endpoint, type), orders the refusals, builds the preview rows and the rebound props. No indigo import. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_018LWBygcTdnKUprkHZd1kqL
Extract _delete_devices from delete_node and prune the index per delete; add node_device_refs, creation_suspended and node_unreachable. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_018LWBygcTdnKUprkHZd1kqL
… S3) Duplicates are deleted first from ids captured up front, with device creation for the new node suspended; the old devices are rebound last. Carries a tombstone from the old node (D8). _delete_devices now ignores a node_dev_id it was not asked to delete: "replace anyway" keeps an unmatched new node device, and marking it self-deleted would have swallowed the user's later deletion of it. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_018LWBygcTdnKUprkHZd1kqL
Menu, pickers and preview list using Indigo's Z-Wave replace wording
("Indigo devices to keep:", "Sync using node:"), wired into Plugin,
with MATTER.md, CHANGELOG and ARCHITECTURE entries. PluginVersion
2026.33.0.
getDependencies lists a grouped device's own siblings under
"devices" (checked live on node 67), so same-node siblings are not
treated as references; any other dependent still refuses.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_018LWBygcTdnKUprkHZd1kqL
|
Important
This repository does not receive automatic reviews because it has fewer than 10 stars. ⚙️ Run configuration
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
…ld a duplicate set (#364) Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_018LWBygcTdnKUprkHZd1kqL
…nd previewed (#364) Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_018LWBygcTdnKUprkHZd1kqL
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_018LWBygcTdnKUprkHZd1kqL
…364) Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_018LWBygcTdnKUprkHZd1kqL
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_018LWBygcTdnKUprkHZd1kqL
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_018LWBygcTdnKUprkHZd1kqL
No node_removed fires when matter-server no longer has the node, so delete_node(forget=True) clears the retirement itself. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_018LWBygcTdnKUprkHZd1kqL
…ng moved (#364) Round-2 review: a retirement that outlived its node unheard would give a later commission on that id no devices at all. create_from_raw (the commission path) now clears it. replace_node retires the old node only when at least one device was rebound, and delete_node un-retires outside the lock since forgetting persists to pluginPrefs. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_018LWBygcTdnKUprkHZd1kqL
…lace anyway" unless shapes differ (#364) Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_018LWBygcTdnKUprkHZd1kqL
… wording (#364) The preview list takes the exportList layout (heading label + empty list Label) so it is not squeezed into the control column; rows read "Switch → 0x44". The old-node checkbox no longer claims removal usually fails: it worked for node 0x34. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_018LWBygcTdnKUprkHZd1kqL
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_018LWBygcTdnKUprkHZd1kqL
…#364) The empty-Label layout did not widen the list in Indigo 2025.2; the list sits in the control column whatever the markup. Rows are kept short enough to fit instead. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_018LWBygcTdnKUprkHZd1kqL
Indigo sizes the label column to the longest Label; the sentence-long checkbox labels were squeezing every control, the preview list included, into a narrow strip on the right. Short labels, the explanation in <Description>, and numbered grey step headings. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_018LWBygcTdnKUprkHZd1kqL
The code and tests cite D1-D13, so the decision table now lives in repo-local ADR-0018 (with D8 and the retired-node rule D13 updated to what shipped), and the working plan is deleted as planned. Also fixes the refusal text still naming the old "replace anyway" checkbox. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_018LWBygcTdnKUprkHZd1kqL
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #364.
What
A new plugin menu item, "Replace a Matter node…". It points the Indigo devices of a dead node at the node a factory-reset device came back as, then deletes the new node's duplicate devices. The Indigo ids don't change, so schedules, triggers, zones, exports and history keep working. The wording follows Indigo's own Z-Wave "Replacing a Z-Wave Device" flow: "Indigo devices to keep:", "Sync using node:".
How
The plan is in
docs/plans/issue-364-replace-node.md; delete it once #364 is resolved. Two ordering traps shape it:node_updatedarriving mid-operation can't rebuild the duplicates.Commits by section:
node_replace.py).DeviceSyncprimitives._delete_devicesis extracted fromdelete_node, with per-delete index pruning, pluscreation_suspended.DeviceSync.replace_node.MenuItems.xml, docs, version 2026.33.0.Found during verification:
_delete_devicescould mark a node device it never deleted as self-deleted. That would have swallowed a later user deletion, so no tombstone. Fixed at the source, with a test.getDependencies: checked live on node 67,getDependencieslists a grouped device's own group siblings underdevices. Unhandled, every replacement would have been refused. Same-node siblings are now ignored, and any other dependent still refuses. Both cases are tested.Testing
pytest: 4331 passed (77 new tests).valuesDictwithout the user touching it. If not, Execute asks for a selection, which is harmless.🤖 Generated with Claude Code
https://claude.ai/code/session_018LWBygcTdnKUprkHZd1kqL