mirror of
https://github.com/Studio-Saelix/sencho.git
synced 2026-07-26 11:49:16 +00:00
28e7be652c
* 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
97 lines
3.7 KiB
Plaintext
97 lines
3.7 KiB
Plaintext
---
|
|
title: Stack Labels
|
|
description: Organize your stacks with colored labels for quick filtering, grouping, and bulk actions.
|
|
---
|
|
|
|
<Note>
|
|
Stack Labels require a Sencho **Skipper** or **Admiral** license.
|
|
</Note>
|
|
|
|
Stack Labels let you tag your Docker Compose stacks with custom colored labels like `production`, `staging`, or `media-server`. Once labeled, you can filter your stack list, identify stacks at a glance, and run bulk actions on entire groups.
|
|
|
|
<Frame>
|
|
<img src="/images/stack-labels/sidebar-with-label-dots.png" alt="Sidebar showing stacks with colored label dots" />
|
|
</Frame>
|
|
|
|
## Creating labels
|
|
|
|
### From Settings
|
|
|
|
1. Open **Settings → Labels**
|
|
2. Click **New Label**
|
|
3. Enter a name and pick a color
|
|
4. Click **Create**
|
|
|
|
<Frame>
|
|
<img src="/images/stack-labels/settings-labels-fixed.png" alt="Settings Labels section with label management" />
|
|
</Frame>
|
|
|
|
### From the stack context menu
|
|
|
|
1. Right-click any stack in the sidebar (or click the three-dot menu)
|
|
2. Hover over **Labels**
|
|
3. Click **Manage labels...** at the bottom of the sub-menu
|
|
4. Create your label from the Settings panel that opens
|
|
|
|
## Assigning labels to stacks
|
|
|
|
1. Right-click a stack in the sidebar (or click the three-dot menu)
|
|
2. Hover over **Labels** to open the sub-menu
|
|
3. Click a label to toggle it on or off
|
|
|
|
<Frame>
|
|
<img src="/images/stack-labels/context-menu-label-submenu-open.png" alt="Right-click context menu with Labels sub-menu" />
|
|
</Frame>
|
|
|
|
A stack can have multiple labels. Changes save immediately.
|
|
|
|
## Filtering by label
|
|
|
|
### Sidebar
|
|
|
|
When you have labels, a pill bar appears between the search box and the stack list. Click a label pill to filter — only stacks with that label are shown. Click multiple pills to see stacks matching **any** of the selected labels. Click an active pill again to deselect it.
|
|
|
|
<Frame>
|
|
<img src="/images/stack-labels/sidebar-filtered-by-label.png" alt="Sidebar filtered by label showing only matching stacks" />
|
|
</Frame>
|
|
|
|
### Fleet View
|
|
|
|
Label filter pills appear in the Fleet View toolbar alongside the existing Status and Type filters. Selecting a label filters to nodes that contain stacks with that label.
|
|
|
|
## Bulk actions
|
|
|
|
Right-click a label pill in the sidebar to access bulk actions:
|
|
|
|
| Action | Effect |
|
|
|--------|--------|
|
|
| **Deploy all** | Runs deploy on every stack with that label |
|
|
| **Stop all** | Stops every stack with that label |
|
|
| **Restart all** | Restarts every stack with that label |
|
|
|
|
A confirmation dialog shows which stacks will be affected before executing.
|
|
|
|
## Managing labels
|
|
|
|
Open **Settings → Labels** to view, edit, and delete your labels.
|
|
|
|
- **Edit**: Change a label's name or color
|
|
- **Delete**: Removes the label and unassigns it from all stacks
|
|
|
|
## Troubleshooting
|
|
|
|
<AccordionGroup>
|
|
<Accordion title="Labels aren't visible in the sidebar">
|
|
Labels require a **Skipper** or **Admiral** license. Verify your license tier in **Settings → License**. Labels also only appear when at least one label has been created.
|
|
</Accordion>
|
|
<Accordion title="Labels disappeared after a downgrade">
|
|
If you downgrade from Skipper/Admiral to Community, the label UI is hidden but your data is preserved. Upgrading again will restore all labels and assignments.
|
|
</Accordion>
|
|
<Accordion title="Bulk action failed for some stacks">
|
|
If a stack was deleted from disk but still had a label assignment, it will be skipped during bulk actions. The results toast will indicate how many stacks failed. Remove orphaned assignments by re-opening **Settings → Labels**.
|
|
</Accordion>
|
|
<Accordion title="Duplicate label name error">
|
|
Label names must be unique per node. If you see a “label with that name already exists” error, choose a different name or edit the existing label.
|
|
</Accordion>
|
|
</AccordionGroup>
|