Repository navigation
Description
Problem
A tab cannot be pinned. features/tabs.mdx says so in a note: "Tabs cannot be pinned. Pinning exists for results inside a query tab (Cmd+Option+P)."
A tab kept open all day, such as a scratch query or a table watched during a deploy, is closed by Close Other Tabs and Close All Tabs like any other, and drifts along the strip as tabs open and close around it. The tab's contextual menu (apple/TablePro/Views/Main/EditorTabContextMenuBuilder.swift:15) offers Keep Open, the three close commands, Move Tab Left and Right, and the two move commands, but nothing that protects a tab. PersistedTab (apple/TablePro/Models/Query/QueryTabState.swift:30) has no field to carry a pin across a relaunch.
Proposed solution
- Pin Tab and Unpin Tab on the tab's contextual menu, on the SwiftUI menu that VoiceOver uses, and as a Navigation row in Settings > Keyboard, unbound by default.
- Pinned tabs sit at the leading end of the strip, before every unpinned tab, with a pin mark beside the title. A drag keeps a pinned tab among the pinned ones.
- Close Other Tabs, Close All Tabs and Close Tabs for Other Databases leave pinned tabs open. Closing a pinned tab directly (
Cmd+W, its close button, a middle-click) still works. - Pinning a preview tab keeps it open first, so a sidebar click never replaces a pinned tab.
- The pin is saved with the tab set, comes back after relaunch, and moves with the tab to a new window or to another connection.
- Update the note in
features/tabs.mdx.
Done means a pinned tab survives every bulk close and a relaunch, and stays at the front of the strip.
Alternatives considered
Move Tab Left until the tab is first, and File > Reopen Closed Tab (Cmd+Shift+T) after a bulk close took it.
Platform
macOS
Related database type
N/A / General
Activity