feat(stacks): state-aware sidebar context menu and Open App action (#368)

* feat(stacks): state-aware sidebar context menu and Open App action

- Context menu now adapts to stack state: running stacks show
  Stop/Restart/Update, stopped stacks show Deploy only
- Added "Open App" shortcut to open a stack's web UI directly
  from the sidebar (visible when running with a published port)
- Backend bulk status endpoint enriched with mainPort detection
- Reduced manual image update check cooldown from 10 to 2 minutes
- Rate limit error message now derives from the configured constant

* fix(stacks): use const for bulkPorts (prefer-const lint)
This commit is contained in:
Anso
2026-04-03 21:41:01 -04:00
committed by GitHub
parent f0d67a83a0
commit 55d3b8ca1d
9 changed files with 217 additions and 57 deletions
+23 -9
View File
@@ -61,19 +61,33 @@ The stack header exposes four actions:
## Stack context menu
Right-click or use the **⋮** button on any stack in the sidebar to access:
Right-click or use the **⋮** button on any stack in the sidebar. The menu adapts to the stack's current state — only relevant actions are shown.
**Running stack:**
<Frame>
<img src="/images/stack-management/stack-context-menu.png" alt="Stack context menu" />
<img src="/images/stack-management/context-menu-running.png" alt="Context menu for a running stack" />
</Frame>
- **Alerts** - configure metric-based alerting rules for this stack
- **Check for updates** - manually trigger an image update check
- **Deploy** - run `docker compose up -d`
- **Stop** - stop all containers in the stack
- **Restart** - restart all containers in the stack
- **Update** - pull latest images and recreate containers
- **Delete** - stop and remove the stack (admin only)
**Stopped stack:**
<Frame>
<img src="/images/stack-management/context-menu-stopped.png" alt="Context menu for a stopped stack" />
</Frame>
### Available actions
- **Alerts** — configure metric-based alerting rules for this stack
- **Labels** — assign organizational labels (Pro)
- **Check for updates** — manually trigger an image update check
- **Open App** — open the stack's web interface in a new tab (only shown when the stack is running and exposes a web port)
- **Deploy** — start the stack (shown when stopped or not yet deployed)
- **Stop** — stop all containers (shown when running)
- **Restart** — restart all containers (shown when running)
- **Update** — pull latest images and recreate containers (shown when running)
- **Delete** — stop and remove the stack (admin only)
All actions are disabled while another operation is in progress on that stack.
## Scanning for stacks