From 0a92742951ef5c1ae9ae8d3a591ad06fe891bc57 Mon Sep 17 00:00:00 2001 From: sedax90 <5001801+sedax90@users.noreply.github.com> Date: Sun, 8 Nov 2026 16:02:46 +0100 Subject: [PATCH 1/6] feat(linux): expose the application's menus as a GTK 4 menu bar --- linux/changelog.d/4139.added.md | 1 + linux/crates/app/src/ui/menu_label.rs | 8 +- .../app/src/ui/workspace/tests/shell.rs | 36 ++++++ linux/data/resources/gtk/menus.ui | 115 ++++++++++++++++++ 4 files changed, 159 insertions(+), 1 deletion(-) create mode 100644 linux/changelog.d/4139.added.md diff --git a/linux/changelog.d/4139.added.md b/linux/changelog.d/4139.added.md new file mode 100644 index 0000000000..4e457da510 --- /dev/null +++ b/linux/changelog.d/4139.added.md @@ -0,0 +1 @@ +The application now exposes a menu bar (File, View, Edit, Help) with Quit, for desktops with a global menu and for assistive technology. diff --git a/linux/crates/app/src/ui/menu_label.rs b/linux/crates/app/src/ui/menu_label.rs index e31af1da0a..6c38130b64 100644 --- a/linux/crates/app/src/ui/menu_label.rs +++ b/linux/crates/app/src/ui/menu_label.rs @@ -70,7 +70,13 @@ mod tests { } } - for id in ["primary_menu", "tab_overview_menu", "editor_menu", "options_menu"] { + for id in [ + "primary_menu", + "menubar", + "tab_overview_menu", + "editor_menu", + "options_menu", + ] { assert!(checked.iter().any(|read| read == id), "{id} was not read: {checked:?}"); } } diff --git a/linux/crates/app/src/ui/workspace/tests/shell.rs b/linux/crates/app/src/ui/workspace/tests/shell.rs index b264b074a4..e83e77c717 100644 --- a/linux/crates/app/src/ui/workspace/tests/shell.rs +++ b/linux/crates/app/src/ui/workspace/tests/shell.rs @@ -394,6 +394,25 @@ fn primary_menu_has_no_quit() { ); } +#[gtk4::test] +fn the_application_exposes_a_menu_bar_with_quit() { + let test = TestWindow::picker("MenuBar"); + + let bar = test.app.menubar().expect("the application's menu bar"); + + let mut actions = Vec::new(); + collect_actions(&bar, &mut actions); + for expected in [ + "win.new-connection", + "app.quit", + "app.preferences", + "app.shortcuts", + "app.about", + ] { + assert!(actions.iter().any(|action| action == expected), "{expected} is missing"); + } +} + #[gtk4::test] fn f9_toggles_sidebar() { let test = TestWindow::picker("F9"); @@ -563,3 +582,20 @@ fn the_main_menu_adds_a_connection_with_none_open() { choose_new_connection(&test, &test.window.content().expect("the picker")); } + +/// Every action a menu names, through its sections and submenus. +fn collect_actions(menu: &gio::MenuModel, actions: &mut Vec) { + for item in 0..menu.n_items() { + if let Some(action) = menu + .item_attribute_value(item, "action", None) + .and_then(|value| value.get::()) + { + actions.push(action); + } + for link in ["section", "submenu"] { + if let Some(inner) = menu.item_link(item, link) { + collect_actions(&inner, actions); + } + } + } +} diff --git a/linux/data/resources/gtk/menus.ui b/linux/data/resources/gtk/menus.ui index 1ee0fd0a97..30452c9510 100644 --- a/linux/data/resources/gtk/menus.ui +++ b/linux/data/resources/gtk/menus.ui @@ -81,6 +81,121 @@ + + + + _File +
+ + _New Connection… + win.new-connection + + + New _Group… + win.new-group + + + New _Window + app.new-window + +
+
+ + E_xport Database… + win.export-database + action-missing + + + Import _SQL File… + win.import-sql-file + action-missing + +
+
+ + _Import Connections… + win.import-connections + + + Import f_rom Another App… + win.import-from-app + + + _Export Connections… + win.export-connections + + + _Manage Tags… + win.manage-tags + +
+
+ + _Disconnect + win.disconnect + action-disabled + + + _Close Tab + win.close-current + + + _Quit + app.quit + +
+
+ + _View +
+ + Query _History + win.show-history + action-missing + + + Saved _Queries + win.show-saved-queries + action-missing + +
+
+ + _Reopen Closed Tab + win.reopen-closed-tab + action-missing + + + Close _All Tabs + win.close-all-tabs + action-missing + +
+
+ + _Edit +
+ + _Preferences + app.preferences + +
+
+ + _Help +
+ + _Keyboard Shortcuts + app.shortcuts + + + _About TablePro + app.about + +
+
+
From 4885ac8dd09ce1383c974fd7250367f52a94dc9a Mon Sep 17 00:00:00 2001 From: Ngo Quoc Dat Date: Sun, 8 Nov 2026 23:59:03 +0700 Subject: [PATCH 2/6] feat(linux-menus): separate app and session commands in native menus --- linux/ARCHITECTURE.md | 2 +- linux/changelog.d/4139.added.md | 2 +- linux/crates/app/src/ui/menu_label.rs | 2 +- .../app/src/ui/session_window/tests/mod.rs | 4 +- linux/crates/app/src/ui/shell/mod.rs | 2 +- .../app/src/ui/shell/primary_menu_button.rs | 2 +- .../app/src/ui/workspace/tests/shell.rs | 113 +++++++++++++-- .../app/src/ui/workspace/workspace_shell.rs | 23 +-- linux/data/resources/gtk/menus.ui | 133 ++---------------- 9 files changed, 127 insertions(+), 156 deletions(-) diff --git a/linux/ARCHITECTURE.md b/linux/ARCHITECTURE.md index df1511b24c..9ee031dedb 100644 --- a/linux/ARCHITECTURE.md +++ b/linux/ARCHITECTURE.md @@ -85,7 +85,7 @@ Each window is a `SessionWindow` (`crates/app/src/ui/session_window/`) for its c - The close prompts (`CloseGuards`) belong to the window, so a tab's close, the close button and Ctrl+W ask on every page, one prompt at a time. While the workspace has something a logout would lose, a `WindowInhibitor` holds logout back, and suspend too while a save or an export runs. - The window's actions (`disconnect`, `reconnect`, `close-current` and the rest) go on its own action map, which GTK exports as `win`. The ones the tree's rows fire, such as `disconnect-session` and `show-session`, take the session's key as a string target (`crate::ui::session_target`). - When a run, a save or an export ends in a tab the user is not looking at, the window's `WorkNotifier` sends a desktop notification through `GApplication`: one per tab, with no time threshold, as GNOME Console does. A tab counts as looked at while the window is active and the tab is in front. The notification names the tab and the connection only, since it can show on the lock screen, so an editor tab goes by its number rather than its script. Clicking it runs `app.focus-tab`, which brings the tab forward in its window. It is withdrawn once the tab is in front of an active window, when the tab closes, and when the session goes. A save that settles while a close prompt covering its tab decides is not notified: the prompt waited for it in front of the user, and then closes the tab or asks about it again. -- The window's content is the page itself, never a wrapper, and is at least 360 by 294 pixels. Each page has its own header bars and its own `AdwToastOverlay`, and the window's toasts go to the page on screen. The main menu comes from `data/resources/gtk/menus.ui`, which `GtkApplication` loads at startup. +- The window's content is the page itself, never a wrapper, and is at least 360 by 294 pixels. Each page has its own header bars and its own `AdwToastOverlay`, and the window's toasts go to the page on screen. The menus come from `data/resources/gtk/menus.ui`, which `GtkApplication` loads at startup. Main Menu above the sidebar holds app and connection-library commands. Session Menu in the content header holds commands for the session in front, including Safe Mode. The `WorkspaceShell` (`crates/app/src/ui/workspace/workspace_shell.rs`) is what a window has once: the connection tree in the sidebar, the one tab view every session's tabs share, the header bars, the assistant's column and the toasts. Its `front` property is the session of the tab in front, or with no tab the newest session or the one last shown, and the session in front speaks for the window: the header bars, the window title, its banners, its assistant pane and the window's actions read it through bindings. The `Workspace` (`crates/app/src/ui/workspace/`) is one session: its sidebar model, which the tree shows as one list per schema and a search as one flat list of what it found, its tabs, its banners and its assistant pane, and the `title`, `subtitle`, `window-title` and `icon-name` properties the shell binds. The shell's template puts the `AdwTabOverview` at the root, as libadwaita expects, around an `AdwBreakpointBin` with an `AdwOverlaySplitView`: the sidebar and the tabs each have their own header bar. Below 600sp the sidebar collapses into an overlay, and below 450sp an `AdwTabButton` takes the tab bar's place. The `show-sidebar` window action and F9 show and hide the sidebar. The shell adds the window's workspace actions once, each sent to the session in front, and removes them when it shuts down. A workspace follows its session's health and object list through `WatchForwarder`s and tells the window what it holds through its `dirty-changed`, `saves-in-flight-changed`, `work-completed` and `tabs-changed` signals. Its `WorkspaceHandle` runs the saves and tells the close prompts what closing any part of it would lose. Its `ExportLedger` writes exports off the GTK thread: the rows are encoded on the runtime and GIO writes them. An export takes the rows a grid holds, or every row of a table or an editor statement, streamed through `Connection::stream_read` on a read-only connection of its own with no deadline. `ReplaceFileWriter` removes a file the export made when it stops or fails. An existing regular file gets a temporary file beside it, renamed over it at the end, so a stopped export leaves it as it was. GLib truncates a symbolic link's target, a hard-linked file or a file in a folder that refuses the temporary file when the export opens it, and a stopped export then says that file is incomplete. [Workspace tab system](#workspace-tab-system) covers its tabs, and `../core/ARCHITECTURE.md`, Sessions and health, the `Session` itself. diff --git a/linux/changelog.d/4139.added.md b/linux/changelog.d/4139.added.md index 4e457da510..4a34897a98 100644 --- a/linux/changelog.d/4139.added.md +++ b/linux/changelog.d/4139.added.md @@ -1 +1 @@ -The application now exposes a menu bar (File, View, Edit, Help) with Quit, for desktops with a global menu and for assistive technology. +Session Menu puts database commands beside the workspace, with app commands in Main Menu. diff --git a/linux/crates/app/src/ui/menu_label.rs b/linux/crates/app/src/ui/menu_label.rs index 6c38130b64..5664ce2be9 100644 --- a/linux/crates/app/src/ui/menu_label.rs +++ b/linux/crates/app/src/ui/menu_label.rs @@ -72,7 +72,7 @@ mod tests { for id in [ "primary_menu", - "menubar", + "session_menu", "tab_overview_menu", "editor_menu", "options_menu", diff --git a/linux/crates/app/src/ui/session_window/tests/mod.rs b/linux/crates/app/src/ui/session_window/tests/mod.rs index 86d2581e36..e5a16bdbb5 100644 --- a/linux/crates/app/src/ui/session_window/tests/mod.rs +++ b/linux/crates/app/src/ui/session_window/tests/mod.rs @@ -493,7 +493,7 @@ fn ticked_level(test: &TestWindow) -> Option { } #[gtk4::test] -fn the_main_menu_moves_the_session_between_levels_that_write_and_saves_it() { +fn the_safe_mode_action_moves_the_session_between_levels_that_write_and_saves_it() { let test = TestWindow::connected("SafeModeLive"); assert_eq!(ticked_level(&test).as_deref(), Some("off")); @@ -512,7 +512,7 @@ fn the_main_menu_moves_the_session_between_levels_that_write_and_saves_it() { } #[gtk4::test] -fn read_only_from_the_main_menu_saves_it_and_connects_again_read_only() { +fn read_only_from_the_safe_mode_action_saves_it_and_connects_again_read_only() { let test = TestWindow::connected("SafeModeReadOnly"); pick_level(&test, "read-only"); diff --git a/linux/crates/app/src/ui/shell/mod.rs b/linux/crates/app/src/ui/shell/mod.rs index 9c935351ee..512a448960 100644 --- a/linux/crates/app/src/ui/shell/mod.rs +++ b/linux/crates/app/src/ui/shell/mod.rs @@ -2,4 +2,4 @@ mod primary_menu_button; -pub(crate) use primary_menu_button::{PRIMARY_MENU, TAB_OVERVIEW_MENU, app_menu, primary_menu_button}; +pub(crate) use primary_menu_button::{PRIMARY_MENU, SESSION_MENU, TAB_OVERVIEW_MENU, app_menu, primary_menu_button}; diff --git a/linux/crates/app/src/ui/shell/primary_menu_button.rs b/linux/crates/app/src/ui/shell/primary_menu_button.rs index b194354d16..034e823827 100644 --- a/linux/crates/app/src/ui/shell/primary_menu_button.rs +++ b/linux/crates/app/src/ui/shell/primary_menu_button.rs @@ -1,8 +1,8 @@ use gtk4 as gtk; use gtk4::prelude::*; -/// The ids of the menus in `gtk/menus.ui`. pub(crate) const PRIMARY_MENU: &str = "primary_menu"; +pub(crate) const SESSION_MENU: &str = "session_menu"; pub(crate) const TAB_OVERVIEW_MENU: &str = "tab_overview_menu"; /// A menu GtkApplication read from `gtk/menus.ui` at startup. A missing diff --git a/linux/crates/app/src/ui/workspace/tests/shell.rs b/linux/crates/app/src/ui/workspace/tests/shell.rs index e83e77c717..19eaa30f0b 100644 --- a/linux/crates/app/src/ui/workspace/tests/shell.rs +++ b/linux/crates/app/src/ui/workspace/tests/shell.rs @@ -208,6 +208,11 @@ fn narrow_window_swaps_tab_bar_for_tab_button() { assert!(!imp.tab_bar.is_visible(), "the tab bar stayed"); assert!(imp.tab_button.is_visible(), "no tab button took its place"); assert!(imp.split_view.is_collapsed()); + let button = session_menu_button(&test); + wait_until(WAIT, || button.is_mapped()).expect("Session Menu at the window floor"); + assert!(imp.content_header.measure(gtk::Orientation::Horizontal, -1).0 <= 360); + button.popup(); + wait_until(WAIT, || button.popover().is_some_and(|menu| menu.is_mapped())).expect("the narrow menu opens"); } #[gtk4::test] @@ -395,24 +400,105 @@ fn primary_menu_has_no_quit() { } #[gtk4::test] -fn the_application_exposes_a_menu_bar_with_quit() { - let test = TestWindow::picker("MenuBar"); - - let bar = test.app.menubar().expect("the application's menu bar"); - - let mut actions = Vec::new(); - collect_actions(&bar, &mut actions); +fn application_and_session_commands_have_separate_native_menus() { + let test = TestWindow::connected("NativeMenus"); + assert!( + test.app.menubar().is_none(), + "AdwApplicationWindow does not support a menu bar" + ); + let primary = test.app.menu_by_id("primary_menu").expect("the primary menu"); + let mut app_actions = Vec::new(); + collect_actions(primary.upcast_ref(), &mut app_actions); + assert_eq!(app_actions.len(), 10); + let button = session_menu_button(&test); + assert!(!button.is_primary(), "F10 belongs to Main Menu"); + crate::test_support::assert_labelled(&button).expect("the menu's accessible name"); + let mut session_actions = Vec::new(); + collect_actions(&button.menu_model().expect("the session menu"), &mut session_actions); for expected in [ - "win.new-connection", - "app.quit", - "app.preferences", - "app.shortcuts", - "app.about", + "win.safe-mode", + "win.show-history", + "win.show-saved-queries", + "win.export-database", + "win.import-sql-file", + "win.disconnect", ] { - assert!(actions.iter().any(|action| action == expected), "{expected} is missing"); + assert!( + session_actions.iter().any(|action| action == expected), + "{expected} is missing" + ); + assert!( + !app_actions.iter().any(|action| action == expected), + "{expected} is duplicated" + ); + } + for action in &app_actions { + assert!(!session_actions.contains(action), "{action} belongs to Main Menu"); } } +fn session_menu_button(test: &TestWindow) -> gtk::MenuButton { + let shell = test.window.shell().expect("the workspace shell"); + descendants(&shell.imp().content_header.get()) + .into_iter() + .filter_map(|widget| widget.downcast::().ok()) + .find(|button| button.tooltip_text().as_deref() == Some("Session Menu")) + .expect("Session Menu in the content header") +} + +fn click_menu_item(menu: >k::Popover, label: &str) { + let mut found = None; + wait_until(WAIT, || { + found = descendants(menu).into_iter().find(|widget| { + widget.type_().name() == "GtkModelButton" + && widget.property::>("text").as_deref() == Some(label) + && widget.is_mapped() + && widget.is_sensitive() + }); + found.is_some() + }) + .unwrap_or_else(|_| panic!("no enabled menu item {label}")); + found.expect("the item").emit_by_name::<()>("clicked", &[]); +} + +#[gtk4::test] +fn the_session_menu_changes_safe_mode_through_its_radio_item() { + let test = TestWindow::connected("SessionMenuSafeMode"); + let button = session_menu_button(&test); + button.popup(); + let menu = button.popover().expect("the session menu"); + click_menu_item(&menu, "Safe Mode"); + click_menu_item(&menu, "Confirm Writes"); + wait_until(WAIT, || { + test.window + .front_session() + .is_some_and(|(_, session)| session.safe_mode() == tablepro_core::SafeModeLevel::ConfirmWrites) + }) + .expect("the selected level to reach the session"); + assert_eq!( + test.window + .lookup_action("safe-mode") + .and_then(|action| action.state()) + .and_then(|state| state.get::()), + Some("confirm-writes".to_owned()) + ); +} + +#[gtk4::test] +fn the_session_menu_disconnects_the_session_in_front() { + let test = TestWindow::connected("SessionMenuDisconnect"); + let button = session_menu_button(&test); + button.popup(); + click_menu_item(&button.popover().expect("the menu"), "Disconnect"); + test.wait_for_page("picker"); + assert!(test.window.front_session().is_none()); + assert!(!descendants(&test.window).iter().any(|widget| { + widget + .downcast_ref::() + .is_some_and(|button| button.tooltip_text().as_deref() == Some("Session Menu")) + })); +} + #[gtk4::test] fn f9_toggles_sidebar() { let test = TestWindow::picker("F9"); @@ -583,7 +669,6 @@ fn the_main_menu_adds_a_connection_with_none_open() { choose_new_connection(&test, &test.window.content().expect("the picker")); } -/// Every action a menu names, through its sections and submenus. fn collect_actions(menu: &gio::MenuModel, actions: &mut Vec) { for item in 0..menu.n_items() { if let Some(action) = menu diff --git a/linux/crates/app/src/ui/workspace/workspace_shell.rs b/linux/crates/app/src/ui/workspace/workspace_shell.rs index 25eb2ae449..8ba4eb73bf 100644 --- a/linux/crates/app/src/ui/workspace/workspace_shell.rs +++ b/linux/crates/app/src/ui/workspace/workspace_shell.rs @@ -22,7 +22,7 @@ use crate::i18n::{gettext, gettext_f}; use crate::runtime::{DeliverInput, InputSender}; use crate::ui::SessionWindowInput; use crate::ui::a11y::describe_icon_button; -use crate::ui::shell::{PRIMARY_MENU, TAB_OVERVIEW_MENU, app_menu, primary_menu_button}; +use crate::ui::shell::{SESSION_MENU, TAB_OVERVIEW_MENU, app_menu, primary_menu_button}; /// The window action that shows and hides the sidebar, as GNOME Files /// names it. @@ -93,11 +93,16 @@ impl WorkspaceShell { let _ = imp.sender.set(sender); let app = window.application(); - let menu_button = primary_menu_button(app.as_ref()); - if let Some(menu) = app_menu(app.as_ref(), PRIMARY_MENU) { - menu_button.set_menu_model(Some(&with_safe_mode(&menu))); + imp.sidebar_header.pack_end(&primary_menu_button(app.as_ref())); + let session_menu = gtk::MenuButton::builder() + .icon_name(crate::ui::icons::VIEW_MORE) + .build(); + crate::ui::a11y::describe_icon_button(&session_menu, &gettext("Session Menu"), None); + match app_menu(app.as_ref(), SESSION_MENU) { + Some(menu) => session_menu.set_menu_model(Some(&with_safe_mode(&menu))), + None => session_menu.set_sensitive(false), } - imp.sidebar_header.pack_end(&menu_button); + imp.content_header.pack_end(&session_menu); super::workspace_actions::install(window, &shell); imp.history_gate @@ -758,8 +763,6 @@ fn tab_menu() -> gio::Menu { menu } -/// The main menu with the session's Safe Mode levels on top, as radio -/// items of the window's stateful `safe-mode` action. fn with_safe_mode(menu: &gio::MenuModel) -> gio::Menu { let levels = gio::Menu::new(); for level in tablepro_core::SafeModeLevel::ALL { @@ -806,12 +809,12 @@ mod tests { use crate::test_support::assert_access_keys; #[gtk4::test] - fn the_tab_menu_and_the_main_menu_give_each_item_its_own_access_key() { + fn the_tab_and_session_menus_give_each_item_its_own_access_key() { crate::register_test_resources(); let builder = gtk::Builder::from_resource(&format!("{RESOURCE_BASE_PATH}/gtk/menus.ui")); - let main: gio::MenuModel = builder.object(PRIMARY_MENU).expect("the main menu"); + let session: gio::MenuModel = builder.object(SESSION_MENU).expect("the session menu"); assert_access_keys(&tab_menu()); - assert_access_keys(&with_safe_mode(&main)); + assert_access_keys(&with_safe_mode(&session)); } } diff --git a/linux/data/resources/gtk/menus.ui b/linux/data/resources/gtk/menus.ui index 30452c9510..19a4b6979d 100644 --- a/linux/data/resources/gtk/menus.ui +++ b/linux/data/resources/gtk/menus.ui @@ -17,37 +17,6 @@ app.new-window
-
- - - Query _History - win.show-history - action-missing - - - Saved _Queries - win.show-saved-queries - action-missing - - - E_xport Database… - win.export-database - action-missing - - - Import SQL _File… - win.import-sql-file - action-missing - - - - _Disconnect - win.disconnect - action-disabled - -
_Import Connections… @@ -81,73 +50,7 @@
- - - - _File -
- - _New Connection… - win.new-connection - - - New _Group… - win.new-group - - - New _Window - app.new-window - -
-
- - E_xport Database… - win.export-database - action-missing - - - Import _SQL File… - win.import-sql-file - action-missing - -
-
- - _Import Connections… - win.import-connections - - - Import f_rom Another App… - win.import-from-app - - - _Export Connections… - win.export-connections - - - _Manage Tags… - win.manage-tags - -
-
- - _Disconnect - win.disconnect - action-disabled - - - _Close Tab - win.close-current - - - _Quit - app.quit - -
-
- - _View +
Query _History @@ -159,42 +62,22 @@ win.show-saved-queries action-missing -
-
- _Reopen Closed Tab - win.reopen-closed-tab + E_xport Database… + win.export-database action-missing - Close _All Tabs - win.close-all-tabs + Import SQL _File… + win.import-sql-file action-missing -
- - - _Edit -
- _Preferences - app.preferences - -
-
- - _Help -
- - _Keyboard Shortcuts - app.shortcuts - - - _About TablePro - app.about + _Disconnect + win.disconnect + action-disabled
-
From 2fa7b6095a6be16f464e45e2dc7684e981cda437 Mon Sep 17 00:00:00 2001 From: Ngo Quoc Dat Date: Mon, 9 Nov 2026 00:01:07 +0700 Subject: [PATCH 3/6] fix(linux-menus): remove unused primary menu export --- linux/crates/app/src/ui/shell/mod.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/linux/crates/app/src/ui/shell/mod.rs b/linux/crates/app/src/ui/shell/mod.rs index 512a448960..1e749b8e49 100644 --- a/linux/crates/app/src/ui/shell/mod.rs +++ b/linux/crates/app/src/ui/shell/mod.rs @@ -2,4 +2,4 @@ mod primary_menu_button; -pub(crate) use primary_menu_button::{PRIMARY_MENU, SESSION_MENU, TAB_OVERVIEW_MENU, app_menu, primary_menu_button}; +pub(crate) use primary_menu_button::{SESSION_MENU, TAB_OVERVIEW_MENU, app_menu, primary_menu_button}; From 654b41e4b7dc25a132a3c8fd3a8ea708dcb6cb46 Mon Sep 17 00:00:00 2001 From: Ngo Quoc Dat Date: Mon, 9 Nov 2026 17:59:17 +0700 Subject: [PATCH 4/6] fix(linux-workspace): drop the too_many_lines expectation update no longer meets --- linux/crates/app/src/ui/workspace/mod.rs | 4 ---- 1 file changed, 4 deletions(-) diff --git a/linux/crates/app/src/ui/workspace/mod.rs b/linux/crates/app/src/ui/workspace/mod.rs index 97905d18c9..1546b9b017 100644 --- a/linux/crates/app/src/ui/workspace/mod.rs +++ b/linux/crates/app/src/ui/workspace/mod.rs @@ -1330,10 +1330,6 @@ impl WorkspaceModel { } } - #[expect( - clippy::too_many_lines, - reason = "Each workspace input dispatches to its own handler" - )] fn update(&mut self, msg: WorkspaceInput) { match msg { WorkspaceInput::HealthChanged(health) => self.refresh_health_banner(&health), From c2780e9b7244761e26ac1c99de755705ce2c7539 Mon Sep 17 00:00:00 2001 From: Ngo Quoc Dat Date: Mon, 9 Nov 2026 19:06:41 +0700 Subject: [PATCH 5/6] fix(linux-workspace): drop New Query from the narrow header so it fits the window floor --- linux/crates/app/src/ui/workspace/tests/shell.rs | 5 +++++ linux/data/resources/ui/workspace-shell.ui | 3 +++ 2 files changed, 8 insertions(+) diff --git a/linux/crates/app/src/ui/workspace/tests/shell.rs b/linux/crates/app/src/ui/workspace/tests/shell.rs index b48ad03943..5847a9a357 100644 --- a/linux/crates/app/src/ui/workspace/tests/shell.rs +++ b/linux/crates/app/src/ui/workspace/tests/shell.rs @@ -220,6 +220,11 @@ fn narrow_window_swaps_tab_bar_for_tab_button() { assert!(!imp.tab_bar.is_visible(), "the tab bar stayed"); assert!(imp.tab_button.is_visible(), "no tab button took its place"); + assert!( + !imp.new_tab_button.is_visible(), + "New Query stayed beside the tab button" + ); + assert!(imp.tab_overview.property::("enable-new-tab")); assert!(imp.split_view.is_collapsed()); let button = session_menu_button(&test); wait_until(WAIT, || button.is_mapped()).expect("Session Menu at the window floor"); diff --git a/linux/data/resources/ui/workspace-shell.ui b/linux/data/resources/ui/workspace-shell.ui index 527d9c8b23..41f30f192d 100644 --- a/linux/data/resources/ui/workspace-shell.ui +++ b/linux/data/resources/ui/workspace-shell.ui @@ -42,6 +42,9 @@ true false true + + false From 299adc209908c665f4a9dfcb98f321bdb0336b0c Mon Sep 17 00:00:00 2001 From: Ngo Quoc Dat Date: Mon, 9 Nov 2026 21:13:09 +0700 Subject: [PATCH 6/6] fix(linux-grid): pass the NULL text to the row details' field search --- linux/crates/app/src/ui/data_grid/row_detail/fields.rs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/linux/crates/app/src/ui/data_grid/row_detail/fields.rs b/linux/crates/app/src/ui/data_grid/row_detail/fields.rs index ce300f2e15..fd8116f9c9 100644 --- a/linux/crates/app/src/ui/data_grid/row_detail/fields.rs +++ b/linux/crates/app/src/ui/data_grid/row_detail/fields.rs @@ -328,7 +328,8 @@ impl RowDetailPane { if wanted.is_empty() || column.name.to_lowercase().contains(&wanted) { return true; } - let value = field_value(&grid.tracked(), &row, &column); + // A NULL never matches, so the text it shows plays no part. + let value = field_value(&grid.tracked(), &row, &column, ""); !value.null && value.text.to_lowercase().contains(&wanted) }