headscale: compare node tags as a set, not a sequence

This commit is contained in:
2026-08-05 17:03:40 +00:00
parent 75d6b65119
commit 2e2eebc9fd
@@ -68,7 +68,8 @@ const parseTags = (text: string): string[] => {
return [...new Set(parts.map((t) => (t.startsWith('tag:') ? t : `tag:${t}`)))];
};
const sameTags = (a: string[], b: string[]) => a.length === b.length && a.every((t, i) => t === b[i]);
/** Set comparison, not sequence: Headscale is free to store the tags in an order the owner didn't type. */
const sameTags = (a: string[], b: string[]) => a.length === b.length && a.every((t) => b.includes(t));
type OwnershipProps = { node: HeadscaleNode; busy: boolean; onError: (message: string) => void };