summaryrefslogtreecommitdiffstats
path: root/packages/meshbay-hub/src
diff options
context:
space:
mode:
authorChristophe Besson <cbesson@gmail.com>2026-08-28 10:27:33 +0200
committerChristophe Besson <cbesson@gmail.com>2026-08-28 10:27:33 +0200
commit9349a957b5b14d08bb6d13e2f127621f5b0ccf12 (patch)
treeb2a5198d8c3cc33a9fbd02f691828ec20bb2e56c /packages/meshbay-hub/src
parentefb1e77d80c03b14699884c40f3b5b17814e831b (diff)
downloadmeshbay-9349a957b5b14d08bb6d13e2f127621f5b0ccf12.tar.gz
fix(hub): Node page — "Remove group" only for a group the hub dropped
The button detaches a group from this node's config. For a group that still exists on the hub that strands it with no host; deleting such a group is the group Settings tab's job (detach + hub delete together). It now shows only when the group is `stale` — present on the node, gone from the hub — which the page already computes for the "not on hub" badge. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_018gKJ85aZyvEwarXMFzFEwi
Diffstat (limited to 'packages/meshbay-hub/src')
-rw-r--r--packages/meshbay-hub/src/meshbay_hub/static/app.js17
1 files changed, 12 insertions, 5 deletions
diff --git a/packages/meshbay-hub/src/meshbay_hub/static/app.js b/packages/meshbay-hub/src/meshbay_hub/static/app.js
index 9a0787b..703bd47 100644
--- a/packages/meshbay-hub/src/meshbay_hub/static/app.js
+++ b/packages/meshbay-hub/src/meshbay_hub/static/app.js
@@ -2868,11 +2868,18 @@ function NodePage({ token, username, userId, groups }) {
`}
</div>
- <div class="node-section">
- <button class="btn btn-small btn-danger" disabled=${busy}
- onClick=${() => detachGroup(g.name)}>
- ${t('node.detach_group')}</button>
- </div>
+ ${/* Only for a group the hub no longer knows: "Remove group" here
+ just drops it from this node's config. While the group still
+ exists on the hub that would strand it with no host — deleting
+ it is the group Settings tab's job, which detaches and deletes
+ together. */''}
+ ${stale && html`
+ <div class="node-section">
+ <button class="btn btn-small btn-danger" disabled=${busy}
+ onClick=${() => detachGroup(g.name)}>
+ ${t('node.detach_group')}</button>
+ </div>
+ `}
</div>
`;
});