Skip to content

feat(rail): sidebar sessions behave like tabs (click selects, close tears down) - #104

Merged
oesukam merged 3 commits into
mainfrom
feat/rail-connection-tab-model
Aug 6, 2026
Merged

feat(rail): sidebar sessions behave like tabs (click selects, close tears down)#104
oesukam merged 3 commits into
mainfrom
feat/rail-connection-tab-model

Conversation

@oesukam

@oesukam oesukam commented Aug 6, 2026

Copy link
Copy Markdown
Collaborator

Answers "why does clicking a connection not connect — I have to double-click?" by adopting the model you described: the rail only ever holds connected (or reconnecting) sessions, so its interaction is tab-like.

Behavior

  • Single click = select / switch view. No more connect-on-double-click or connect/disconnect toggle. Clicking a database you're already in won't drop it; connecting a new one is done via + / Connection Manager.
  • Right-click menu (tab-style): Refresh schema · Open another session · Edit connection… · Close connection · Close other connections.
  • "Close connection" now disconnects the backend pool before removing the session from the rail — closeSession alone leaked the pool. "Close other connections" tears down every session but the clicked one.
  • Removed the full-tile connect/disconnect button, so closing is a deliberate right-click action rather than a one-pixel-off accident.

Dropped sessions still auto-reconnect on app restart (existing reconnectAll), keeping the rail "only connected."

tsc + lint (0 errors) + 276 unit tests green.

oesukam added 3 commits August 6, 2026 14:09
…ears down

The connection rail holds only connected (or reconnecting) sessions, so its
interaction is now tab-like:

- A single click just SELECTS / switches to that connection's view. It no
  longer connects on double-click or toggles the connection — clicking a
  database you're already in shouldn't drop it, and connecting a new one is
  done via + / Connection Manager.
- Right-click menu is tab-style: Refresh schema · Open another session ·
  Edit connection… · Close connection · Close other connections.
- "Close connection" now DISCONNECTS the backend pool before dropping the
  session from the rail (closeSession alone leaked the pool). "Close other
  connections" tears down every session but the clicked one.
- Removed the full-tile connect/disconnect button (clicking the tile selects;
  closing is a deliberate right-click action, not a one-pixel-off accident).

Dropped sessions still auto-reconnect in the background on app restart
(existing reconnectAll), so the rail stays "only connected".
- Dim non-active rail entries so the selected connection clearly stands out.
- Clicking a rail row now reconnects it if the session has dropped, instead of
  leaving it 'not connected' — the rail is meant to be always-connected, so
  switching back to a stale session recovers it.
The rail rewrite removed the separate connect button, so the E2E setup
helper's `[data-testid='connect-btn']` lookup found nothing and every
seeded-connection test timed out. The rail row now clicks-to-connect, so
carry `data-testid="connect-btn"` + `data-state` on the row itself and
click it to drive the connect flow. Full suite green in CI mode (56 passed).
@oesukam
oesukam merged commit 8c82a66 into main Aug 6, 2026
6 checks passed
@oesukam
oesukam deleted the feat/rail-connection-tab-model branch August 6, 2026 13:45
@oesukam oesukam mentioned this pull request Aug 6, 2026
oesukam added a commit that referenced this pull request Aug 6, 2026
Version bump for the **v0.4.0** release: `0.3.0 → 0.4.0` in
`tauri.conf.json`, `Cargo.toml`, and `Cargo.lock`.

## What's in v0.4.0 (since v0.3.0)

**Features**
- MongoDB support: JS scripting, table-data browse/edit/insert/delete,
connection URL, TLS handling (#101, #103, #105)
- Engine registry — per-engine metadata drives the connection form,
queries, display (#103)
- Rail sessions behave like tabs: click selects, right-click to close,
dim inactive, reconnect on click (#104)
- Row count + query timer moved to a footer below the grid, for both
table-data and SQL tabs (#108, #109)

**Fixes**
- Grid fills the pane for few-column tables; no open blink (#106)
- Edit-connection opens the real connection; Mongo honors its pinned
database (#107)
- Startup white-flash eliminated (dark window bg + pre-render tab
hydration) (#110)
- Mongo defaults to TLS-off so a local Mongo connects (#105)
- Actionable commitlint PR-title error (#102); release gated on
lint/typecheck/tests (#100)

## Gate

lint (0 errors), typecheck (CI-style clean), 321 unit tests, frontend
build — all green locally.

After merge, the Release workflow is triggered with `publish=false` to
produce a **draft** release for review.
oesukam added a commit that referenced this pull request Aug 22, 2026
Version bump for the **v0.4.0** release: `0.3.0 → 0.4.0` in
`tauri.conf.json`, `Cargo.toml`, and `Cargo.lock`.

## What's in v0.4.0 (since v0.3.0)

**Features**
- MongoDB support: JS scripting, table-data browse/edit/insert/delete,
connection URL, TLS handling (#101, #103, #105)
- Engine registry — per-engine metadata drives the connection form,
queries, display (#103)
- Rail sessions behave like tabs: click selects, right-click to close,
dim inactive, reconnect on click (#104)
- Row count + query timer moved to a footer below the grid, for both
table-data and SQL tabs (#108, #109)

**Fixes**
- Grid fills the pane for few-column tables; no open blink (#106)
- Edit-connection opens the real connection; Mongo honors its pinned
database (#107)
- Startup white-flash eliminated (dark window bg + pre-render tab
hydration) (#110)
- Mongo defaults to TLS-off so a local Mongo connects (#105)
- Actionable commitlint PR-title error (#102); release gated on
lint/typecheck/tests (#100)

## Gate

lint (0 errors), typecheck (CI-style clean), 321 unit tests, frontend
build — all green locally.

After merge, the Release workflow is triggered with `publish=false` to
produce a **draft** release for review.
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