Skip to content

feat: add connection picker and multi-connection tab UX#29

Merged
ahmadnazir merged 3 commits into
beamlynx:mainfrom
Koziar:feat/connection-picker-multi-db-tabs
May 21, 2026
Merged

feat: add connection picker and multi-connection tab UX#29
ahmadnazir merged 3 commits into
beamlynx:mainfrom
Koziar:feat/connection-picker-multi-db-tabs

Conversation

@Koziar

@Koziar Koziar commented May 20, 2026

Copy link
Copy Markdown
Contributor

Related PR

beamlynx/pine-lang#39

Summary

Adds a connection picker dropdown in the header, integrates the new Pine GET /api/v1/connections endpoint, and improves multi-connection tab behavior so each tab can keep its own database while sharing a single Pine server session.

Requires: Pine server with the structured GET /api/v1/connections response (companion PR in pine-lang).

Changes

image

Connection picker (ActiveConnection)

  • Clicking the connection caption opens a dropdown menu instead of the database settings modal.
  • Menu lists live connections from Pine with label (e.g. localhost:5432 · myapp_dev) and color dots.
  • Add new connection… opens the existing settings modal.

Connection list sync (GlobalStore, HttpClient)

  • listConnections() — calls GET /api/v1/connections.
  • refreshConnections() — updates global.connections, assigns colors for new ids, and prunes stale entries from connectionColors in localStorage when ids are no longer on the server.
  • Refreshed on page load, after connect, and after switch (not on every menu open).

Tab and connection assignment rules

Action Behavior
Add connection (settings) If active tab has a pine/SQL expressionnew tab. Otherwise assign to active tab.
Pick connection (dropdown) If active tab has a pine/SQL expressionnew tab. If empty → reuse active tab and change its connection via selectConnection.
+ new tab New empty tab inherits the active tab’s connectionId (not Pine’s global default).

UI polish

  • Pine version moved to the top-right next to [Development] / user box.
  • Active tab underline uses the tab’s connection color instead of --primary-color.

@vercel

vercel Bot commented May 20, 2026

Copy link
Copy Markdown

@Koziar is attempting to deploy a commit to the pine-lang Team on Vercel.

A member of the Team first needs to authorize it.

Koziar and others added 2 commits May 21, 2026 00:22
GitHub conflict resolution kept a reference to `status` after main
removed the zap/plug emoji. Caption now shows the connection label only;
version remains top-right in AppView.

Co-authored-by: Cursor <cursoragent@cursor.com>
@Koziar

Koziar commented May 21, 2026

Copy link
Copy Markdown
Contributor Author

PR has some noise due to my prettier, which updates the white spaces in files I touched.

@ahmadnazir
ahmadnazir merged commit 1104bb5 into beamlynx:main May 21, 2026
1 check failed
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.

2 participants