Skip to content

feat(connections): edit a connection from its own right-click menu - #171

Merged
Alexfp28 merged 2 commits into
developfrom
feat/edit-connection-from-tree
Sep 18, 2026
Merged

Alexfp28 merged 2 commits into
developfrom
feat/edit-connection-from-tree

Conversation

@Alexfp28

@Alexfp28 Alexfp28 commented Sep 18, 2026

Copy link
Copy Markdown
Owner

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.

ConnectionActionsMenu now offers Edit connection…, which opens the manager focused on that profile.

How

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 stays 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:

  • In the tail group beside "Open in new window", not with the content actions above it, because it edits the connection itself rather than anything inside it.
  • Offered in the disconnected branch too, and that branch is where it matters most: a connection that will not open is exactly the one whose host, port or username wants correcting.

Tests

pnpm test (1336) and tsc --noEmit clean. The new connectionsTree.editConnection key is present in both locales, which src/lib/i18n/keys.test.ts enforces.

Alexfp28 and others added 2 commits September 18, 2026 08:39
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>
@Alexfp28 Alexfp28 self-assigned this Sep 18, 2026
@Alexfp28
Alexfp28 merged commit f09da06 into develop Sep 18, 2026
4 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.

1 participant