Skip to content

feat(services): manage published and extra ports from the dashboard#688

Merged
geodro merged 1 commit into
mainfrom
feat/service-ports-ui
Jun 30, 2026
Merged

feat(services): manage published and extra ports from the dashboard#688
geodro merged 1 commit into
mainfrom
feat/service-ports-ui

Conversation

@geodro

@geodro geodro commented Jun 29, 2026

Copy link
Copy Markdown
Member

Port management was CLI-only and partly duplicated across surfaces. This centralises it in a single serviceops layer (SetPublishedPort, SetExtraPorts and friends) that the CLI, dashboard and MCP all call, and adds a cog on each service page, in the action group between the main button and the dropdown, that opens a Ports modal for the published host port and the extra published ports.

The shared layer validates both paths: range, dual-stack bindability, ports another lerd service already claims even while it is stopped, and self-collisions with the service's own main or extra ports. The modal mirrors the domains modal's row and input styling, prefills the published field with the current port, and treats saving the default as no override so the auto-shift guard stays on. The TUI surfaces the ports read-only, in line with its informative-only scope.

Bundled in, em dashes are removed from the dashboard copy across all locales and the query trace.

Closes #687

Port management used to be split: lerd service port and lerd service expose carried the published-port and extra-port logic inline in the CLI, the MCP server duplicated the expose flow, and the dashboard couldn't touch ports at all. This pulls the whole flow into a single serviceops layer (SetPublishedPort, SetExtraPorts and friends) that the CLI, MCP and Web UI all call, so the four surfaces enforce identical validation, the port-ownership guard and the host-proxy follower refresh.

Each service page now has a cog in the action group, between the main button and the dropdown, that opens a Ports modal for moving the published host port (prefilled with the current port, with a reset to default) and adding or removing extra host:container mappings. Validation got stronger on the way through: both paths reject out-of-range ports, a port another lerd service already claims even while it is stopped, and a mapping that collides with the service's own main port. The TUI shows the current ports read-only, in line with its informative scope.

Bundled in, em dashes are stripped from the dashboard strings across every locale and the query trace, swapped for commas, colons or a middle dot.

Closes #687
@geodro geodro merged commit b366f66 into main Jun 30, 2026
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Manage service published and extra ports from the UI

1 participant