Skip to content

feat: add data tab context menu and pinning - #38

Open
rrbe wants to merge 3 commits into
masterfrom
feat/data-tab-context-menu
Open

rrbe wants to merge 3 commits into
masterfrom
feat/data-tab-context-menu

Conversation

@rrbe

@rrbe rrbe commented Nov 3, 2026 •

Copy link
Copy Markdown
Owner

Summary

Data tabs now have a context menu and can be pinned for comparison across query runs.

Right-click a Data tab
├─ Pin / Unpin tab
├─ Close tab
├─ Close tabs to the right
└─ Close all tabs

The menu targets the clicked result and uses the shared menu component and localized labels. A pinned result displays a pin icon, hides its close button, and is preserved by middle-click, menu close actions, and automatic eviction. Unpin through the menu or by clicking the pin icon. Close actions are disabled when their target range contains only pinned results.

Each query retains its pinned results plus the latest eight unpinned results. Unpinning makes a result eligible for closing and eviction on the next run. Closing the owning Query tab still releases all its results. The Data tab strip also appears for a single result so it can be pinned immediately.

Evidence

  • Before: Result tabs supported close buttons and middle-click, but had no context menu or pin state; older results were automatically evicted.
  • After: The menu supports pinning and closing, with pinned results preserved through repeated queries and bulk close actions.
  • pnpm typecheck passed.
  • pnpm exec vitest run test/unit/renderer/tabs.test.ts test/unit/renderer/appStoreTabs.test.ts passed: 2 files, 74 tests. Added coverage for pinned retention, eviction after reordering/unpinning, close protection, and result-resource release when the owning query closes.
  • Electron development Renderer/CDP checks with synthetic results passed: single-result strip, pin icon, middle-click protection, repeated-result eviction, reordering, bulk close, query switching, and unpinning through both the menu and icon. Light/dark screenshots inspected.
  • git diff --check passed.

Merge Danger

Door: Two-way; renderer state and UI changes can be reverted.

Blast Radius: Data-tabs. Pinned results retain their resources for the owning query's lifetime and are excluded from the eight-result automatic retention limit. Query tabs retain their existing close behavior.

@rrbe rrbe changed the title feat: add data tab context menu feat: add data tab context menu and pinning Nov 3, 2026
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