From 1345b7ca13e8c5f1bc834fd1b47c5746446d8c6d Mon Sep 17 00:00:00 2001 From: Aarnav Tale Date: Sat, 4 Jul 2026 00:50:57 -0400 Subject: [PATCH] fix(ui): fix assigning ACL tags to non-user nodes --- CHANGELOG.md | 1 + app/routes/machines/dialogs/tags.tsx | 2 ++ 2 files changed, 3 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 978ad14..1181d45 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -13,6 +13,7 @@ - Fixed the DNS page crashing when Headscale has no Split DNS nameservers configured (closes [#570](https://github.com/tale/headplane/issues/570)). - User lists now show Headscale display names while preserving usernames as secondary text (closes [#571](https://github.com/tale/headplane/issues/571)). - Fixed the Register Machine Key dialog so it accepts registration URLs and full `hskey-authreq-...` registration keys (closes [#579](https://github.com/tale/headplane/issues/579)). +- Fixed assigning ACL tags to tag-only (no-user) nodes from the UI. The "Add" and "Remove" tag buttons in the tag dialog lacked `type="button"`, so clicking them submitted the form before the local state update was applied and Headscale received the unchanged tag list. Tag modifications now reach Headscale as intended (closes [#574](https://github.com/tale/headplane/issues/574)). --- diff --git a/app/routes/machines/dialogs/tags.tsx b/app/routes/machines/dialogs/tags.tsx index 396cd42..012afbe 100644 --- a/app/routes/machines/dialogs/tags.tsx +++ b/app/routes/machines/dialogs/tags.tsx @@ -102,6 +102,7 @@ export default function Tags({ machine, isOpen, setIsOpen, existingTags }: TagsP onClick={() => { setTags(tags.filter((tag) => tag !== item)); }} + type="button" > @@ -128,6 +129,7 @@ export default function Tags({ machine, isOpen, setIsOpen, existingTags }: TagsP setTags([...tags, tag]); setTag("tag:"); }} + type="button" >