feat(labels): add stack labels for organizing, filtering, and bulk actions (#341)

* feat(labels): add stack_labels schema and DatabaseService CRUD methods

* feat(labels): add label CRUD, assignment, and bulk action API routes

* feat(labels): add oklch label color palette for light and dark themes

* feat(labels): add LabelPill and LabelDot reusable components

* feat(labels): add LabelAssignPopover component for inline label management

* feat(labels): add label pill bar, label dots, and label assignment to sidebar

* feat(labels): add label filtering and label dots to fleet view

* feat(labels): add label-scoped bulk actions (deploy/stop/restart all)

* docs: add Stack Labels feature documentation

* fix(labels): use context menu sub-menu for label assignment and add settings integration

Replace broken Popover-inside-ContextMenu pattern with native Radix
ContextMenuSub for reliable label toggling on right-click. Wrap
ContextMenuSubContent in a Portal to prevent overflow clipping. Add
"Manage labels..." item that opens Settings directly to Labels section.
Fix close button overlap in LabelsSection header. Add LabelsSection
settings component with full CRUD, assignment counts, and ProGate.
Add initialSection prop to SettingsModal for deep-linking. Include
screenshots for documentation.

* docs: update stack labels documentation with screenshots and corrected instructions

* fix(labels): address security and quality issues from code review

- Add NaN validation on parseInt(req.params.id) in label routes
- Scope updateLabel/deleteLabel by nodeId to prevent cross-node IDOR
- Validate labelIds belong to correct node in setStackLabels
- Add requireAdmin check on bulk action endpoint
- Replace error: any with error: unknown and proper narrowing
- Remove unused Label import from index.ts
- Remove unused isPro prop from LabelsSection
- Add strokeWidth={1.5} to Check icons per design system

* chore: update CHANGELOG with stack labels feature
This commit is contained in:
Anso
2026-04-02 19:25:43 -04:00
committed by GitHub
parent e1cd1cf7d4
commit 28e7be652c
23 changed files with 1173 additions and 20 deletions
+8
View File
@@ -22,6 +22,14 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
### Added
* **labels:** Stack Labels — organize stacks with custom colored labels for filtering and bulk actions (Pro)
* Create, edit, and delete labels from Settings → Labels
* Assign labels to stacks via right-click context menu or dropdown menu
* Filter sidebar stack list by label (OR logic with clickable pill bar)
* Filter Fleet View by label
* Bulk actions on labeled stacks: deploy all, stop all, restart all
* 10 curated oklch label colors with light/dark theme support
* Label data persists across tier downgrades — upgrading restores all labels
* **resources:** Docker network management — create, inspect, and delete networks from the UI
* **resources:** Network inspect panel showing IPAM config, connected containers with IPs/MACs, and labels
* **resources:** Network creation dialog with driver, subnet, gateway, internal, and attachable options