Skip to content

feat: rename query tabs on macOS, Linux and Windows - #4343

Merged
datlechin merged 9 commits into
mainfrom
feat/custom-query-tab-names
Nov 19, 2026
Merged

datlechin merged 9 commits into
mainfrom
feat/custom-query-tab-names

Conversation

@datlechin

@datlechin datlechin commented Nov 19, 2026 •

Copy link
Copy Markdown
Member

Summary

  • A query tab with no file can be named on macOS, Linux and Windows: double-click it or choose Rename Tab from its menu. macOS also has Window > Rename Tab, Linux and Windows also take F2.
  • Return or clicking away keeps the name, Escape cancels, an empty name goes back to the automatic one. Names are one line, trimmed, at most 100 characters.
  • macOS and Windows edit the name inside the tab. Linux opens a popover pointing at the tab, since AdwTabBar cannot host an editor.
  • macOS and Linux offer the command with two or more tabs, when the tab bar shows. Windows always shows its strip.
  • The name is saved with the tab and survives a restart, Reopen Closed Tab, and a move to another window or connection. Saving the tab to a file hands the name over to the file name.
  • macOS fixes: a file-bound or shared Query N tab was renumbered on a connection move or restore; Query 9223372036854775807 crashed new tabs; Save As and Open titled the same file differently; table and schema renames left the strip and window title disagreeing; a reopened tab could repeat a number; system tab titles kept the old language; a database or schema rename replaced a query tab's SQL with a browse query.
  • Linux fixes: an untouched new tab came back as SELECT 1; after a restart; reopening an emptied tab filled it with the sample statement; a notification named a file tab Query N.
  • Windows fix: new and reopened tabs could repeat a number across windows of one connection.
  • Changed tests: ThePrimaryKeepsADropTargetWhenItsOnlyTabMovesOut and ClosingATabWindowOrExitingAsksBeforeRollingBack now expect Query 2, since they relied on the repeated number.
  • Windows double-click goes through WM_NCLBUTTONDBLCLK, because the tear-out strip is a caption region where DoubleTapped never fires. Measured on both runners and recorded in windows/docs/decisions/0004-app-shell.md.

Test plan

  • macOS: Unit plan 32,079 cases; the 3 new rename cases that failed first were fixed and pass. EditorTabRenameUITests and the tab UI suites pass.
  • Windows: model tests 795/795 locally. Dispatched windows.yml run 44462549226: x64 passed; on Arm64 every rename flow passed, and the one failure was ATableIsEmptiedAndDroppedAfterAQuestionShowingItsStatement (Light), a tree click this PR does not touch.
  • Linux: dispatched build-linux.yml run 44462545063 passed fmt, clippy and 3,637 of 3,638 tests. The real-key double-click test then showed the rename waited for a release that never comes: AdwToolbarView's GtkWindowHandle claims the second press to maximize. It now starts on the second press and claims it.
  • Linux on Fedora 44 (GNOME Shell 50.6, GTK 4.22.5, libadwaita 1.9.4, Wayland): the tab menu, a double-click (the window stays unmaximized), F2, Return and Escape.
  • Not verified: a touch double-tap on Windows, VoiceOver and Orca on the new field.

Screenshots

macOS, before and after (tab menu):

Before
After

macOS, editing (light, dark) and named (dark):

Editing light
Editing dark
Named dark

Windows, editing (light) and named (dark):

Windows editing
Windows named

Linux, tab menu and editing (light), named and editing (dark):

Linux menu
Linux editing light
Linux named dark
Linux editing dark

Fixes #4337

…-names

# Conflicts:
#	windows/src/TablePro.App.Model/QueryTab.cs
#	windows/src/TablePro.App/MainWindow.xaml.cs
@datlechin
datlechin merged commit fb04fba into main Nov 19, 2026
2 checks passed
@datlechin
datlechin deleted the feat/custom-query-tab-names branch November 19, 2026 10:37
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.

Custom tab name

1 participant