From 2e2eebc9fd84c89a031cdb0891a77b86626aadd1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andr=C3=A9=20Padez?= Date: Wed, 5 Aug 2026 17:03:40 +0000 Subject: [PATCH] headscale: compare node tags as a set, not a sequence --- src/workspaces/officerdev/src/apps/Headscale/NodesView.tsx | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/workspaces/officerdev/src/apps/Headscale/NodesView.tsx b/src/workspaces/officerdev/src/apps/Headscale/NodesView.tsx index b6586ea4..3cfec738 100644 --- a/src/workspaces/officerdev/src/apps/Headscale/NodesView.tsx +++ b/src/workspaces/officerdev/src/apps/Headscale/NodesView.tsx @@ -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 };