feat(fleet): aggregate labels across nodes and allow remote edits (#710)

Labels settings are now visible on remote nodes (scope: node, no longer
hidden on remote context). The LabelsSection already routes through the
active-node proxy, so edits land on whichever node the operator is viewing.

Fleet overview's label filter previously fetched only the control-plane
node's labels and assignments, so remote stacks could never match the
filter. Rewrote aggregation to fan out /labels and /labels/assignments
to every online node via fetchForNode + Promise.allSettled with a 5s
timeout per request. The palette dedupes by (name, color) so identical
labels on multiple nodes collapse into one entry while same-name +
different-color stay distinct. The assignment map is nested by nodeId
to avoid cross-node stack-name collisions.

Keyed the label refetch effect on a stable online-node id signature
rather than the nodes array reference, so the existing 30s overview
poll (and 5s fast-poll during updates) does not cascade into repeated
fleet-wide label fetches.
This commit is contained in:
Anso
2026-04-20 12:56:00 -04:00
committed by GitHub
parent 2b499cb2c9
commit a41af47ff3
2 changed files with 79 additions and 36 deletions
+2 -3
View File
@@ -158,11 +158,10 @@ export const SETTINGS_ITEMS: readonly SettingsItemMeta[] = [
id: 'labels',
group: 'advanced',
label: 'Labels',
description: 'Shared labels for stacks, containers, and nodes.',
description: 'Per-node labels for stacks and containers.',
keywords: ['labels', 'tags', 'palette', 'organisation'],
tier: 'skipper',
scope: 'global',
hiddenOnRemote: true,
scope: 'node',
},
{
id: 'security',