feat(services): manage published and extra ports from the dashboard#688
Merged
Conversation
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
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Port management was CLI-only and partly duplicated across surfaces. This centralises it in a single serviceops layer (
SetPublishedPort,SetExtraPortsand 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