feat(connections): edit a connection from its own right-click menu - #171
Merged
Merged
Conversation
A saved connection's settings had exactly one route: File → Manage connections, then find the row again in a list that is routinely fifty long — started from a tree node that already knew precisely which connection was meant. The gesture existed for the connection's *contents* (refresh, create database, export, security) and for its placement (new window, disconnect), but not for the connection itself. `useConnectionDialog.openManage` has taken a profile id since the command palette needed one, so this is a second caller for an existing capability rather than a new surface. `FileMenu` remains the dialog's single mount point and resolves the id against the live profile list at render time, which is also what makes a profile deleted between the click and the render fall back to a new draft instead of dangling. Placed in the tail group beside "Open in new window", because it edits the connection itself rather than anything inside it, and offered in the disconnected branch too — that branch is where it is needed most, since a connection that will not open is exactly the one whose host, port or username wants correcting. Suggested by David. Authored by Alex López (Alexfp28) <alexlopezdelafuente@gmail.com> Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
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.
Authored by Alex López (Alexfp28)
<alexlopezdelafuente@gmail.com>. Suggested by David.What
A saved connection's settings had exactly one route: File → Manage connections, then find the row again in a list that is routinely fifty long — starting from a tree node that already knew precisely which connection was meant. The right-click menu covered the connection's contents (refresh, create database, export, security) and its placement (new window, disconnect), but not the connection itself.
ConnectionActionsMenunow offers Edit connection…, which opens the manager focused on that profile.How
useConnectionDialog.openManagehas taken a profile id since the command palette needed one, so this is a second caller for an existing capability rather than a new surface.FileMenustays the dialog's single mount point and resolves the id against the live profile list at render time — which is also what makes a profile deleted between the click and the render fall back to a new draft instead of dangling.Two placement decisions:
Tests
pnpm test(1336) andtsc --noEmitclean. The newconnectionsTree.editConnectionkey is present in both locales, whichsrc/lib/i18n/keys.test.tsenforces.