Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
25 commits
Select commit Hold shift + click to select a range
0e0eff5
feat(linux-workspace): add Open Quickly to find a table or view by name
sedax90 Nov 8, 2026
3c6e7f5
docs(linux-workspace): add the changelog entry
sedax90 Nov 8, 2026
a1a7726
feat(linux-workspace): find saved queries in Open Quickly
sedax90 Nov 8, 2026
25bd08a
docs(linux-workspace): add the changelog entry
sedax90 Nov 8, 2026
57b9e74
fix(linux-workspace): keep Open Quickly current and keyboard accessible
datlechin Nov 8, 2026
ab018e1
fix(linux-workspace): preserve quick open input order
datlechin Nov 8, 2026
c56e409
fix(linux-workspace): load saved queries within Open Quickly
datlechin Nov 8, 2026
7c8f876
fix(linux-workspace): keep loading state until catalog arrives
datlechin Nov 8, 2026
21456ef
test(linux-workspace): place query fixtures under tests
datlechin Nov 8, 2026
c18395b
fix(linux-workspace): match qualified searches and use a unique acces…
datlechin Nov 8, 2026
e1805ca
fix(linux-workspace): merge qualified search and access key fixes
datlechin Nov 8, 2026
6d1cd63
refactor(linux-workspace): group search dialog messages
datlechin Nov 8, 2026
ce41c9c
refactor(linux-workspace): merge search dialog dispatch grouping
datlechin Nov 8, 2026
8135e54
fix(linux-workspace): scroll quick results after native layout
datlechin Nov 8, 2026
9014033
fix(linux-workspace): merge quick result scrolling after layout
datlechin Nov 8, 2026
e6c9ca2
Merge remote-tracking branch 'origin/main' into feat/linux-quick-swit…
datlechin Nov 9, 2026
89c4c75
Merge commit 'e6c9ca2fc' into feat/linux-open-quickly-queries
datlechin Nov 9, 2026
e83241f
refactor(linux-workspace): bind the workspace to its session in a helper
datlechin Nov 9, 2026
ad0b7fa
Merge commit 'e83241f1b' into feat/linux-open-quickly-queries
datlechin Nov 9, 2026
5602648
Merge remote-tracking branch 'origin/main' into feat/linux-quick-swit…
datlechin Nov 9, 2026
348ec64
Merge commit '56026483d' into feat/linux-open-quickly-queries
datlechin Nov 9, 2026
82b7d23
Merge remote-tracking branch 'origin/main' into feat/linux-quick-swit…
datlechin Nov 10, 2026
df5d72f
Merge commit '82b7d2315d768a100cdf47e24689f5f02d7cc337' into feat/lin…
datlechin Nov 10, 2026
cf2bc39
Merge remote-tracking branch 'origin/main' into feat/linux-quick-swit…
datlechin Nov 10, 2026
9e33325
Merge commit 'cf2bc3925128378af8c44cc3a5e9819a9dfcc45b' into feat/lin…
datlechin Nov 10, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions linux/changelog.d/4121.added.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Open Quickly (Ctrl+Shift+O) finds tables and views across the connection’s schemas.
1 change: 1 addition & 0 deletions linux/changelog.d/4133.added.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Open Quickly finds saved queries by name and opens them in a new editor tab.
13 changes: 9 additions & 4 deletions linux/crates/app/src/application/accelerators.rs
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@ use AcceleratorScope::{Application, Component, Local, Stock};
use ShortcutListing::{Listed, Unlisted};
use ShortcutOwner::{
AssistantComposer, BrowseTab, CellEditor, ConnectionTree, DiagramCanvas, DiagramTab, EditorResults, FilterStrip,
Grid, GridCell, HistoryRow, InlineSuggestion, PickerPage, PickerRow, SqlEditor, SqlEditorCursors, SqlEditorTab,
StructureTab, WorkspaceShell,
Grid, GridCell, HistoryRow, InlineSuggestion, PickerPage, PickerRow, QuickOpen, SqlEditor, SqlEditorCursors,
SqlEditorTab, StructureTab, WorkspaceShell,
};
use ShortcutSection::{BrowseTable, DataGrid, ErDiagram, General, TableStructure, Tabs};

Expand Down Expand Up @@ -73,6 +73,11 @@ pub const ACCELERATORS: &[Accelerator] = &[
application("app.new-window", &["<Primary><Shift>n"], General),
application("app.preferences", &["<Primary>comma"], General),
application("win.show-history", &["<Primary><Shift>h"], General),
// Matches Open Quickly in the macOS app.
application("win.quick-open", &["<Primary><Shift>o"], General),
component(QuickOpen, "quick-open.next", &["Down"], Unlisted),
component(QuickOpen, "quick-open.previous", &["Up"], Unlisted),
component(QuickOpen, "quick-open.structure", &["<Primary>Return"], Unlisted),
// As in GIMP and Inkscape.
application("win.export-results", &["<Primary><Shift>e"], General),
// As in GNOME Files.
Expand All @@ -88,8 +93,7 @@ pub const ACCELERATORS: &[Accelerator] = &[
application("win.reopen-closed-tab", &["<Primary><Shift>t"], Tabs),
// Ctrl+Tab stays the tab view's next tab, as across GNOME.
application("win.switch-recent-tab", &["<Primary>e"], Tabs),
// As in GNOME Web and Console.
application("win.show-tabs", &["<Primary><Shift>o"], Tabs),
application("win.show-tabs", &["<Primary><Alt>o"], Tabs),
// AdwTabView's own controller, which runs in the capture phase. The
// workspace removes its Ctrl+Home and Ctrl+End pairs, so the lists
// and the editor inside the tabs keep those keys.
Expand Down Expand Up @@ -563,6 +567,7 @@ pub fn local_shortcut_controller(owner: ShortcutOwner) -> gtk::ShortcutControlle
/// The name `local_shortcut_controller` gives the owner's controller.
pub const fn controller_name(owner: ShortcutOwner) -> &'static str {
match owner {
QuickOpen => "tablepro-quick-open-shortcuts",
WorkspaceShell => "tablepro-workspace-shell-shortcuts",
BrowseTab => "tablepro-browse-tab-shortcuts",
GridCell => "tablepro-grid-cell-shortcuts",
Expand Down
1 change: 1 addition & 0 deletions linux/crates/app/src/application/shortcut_owner.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
pub enum ShortcutOwner {
WorkspaceShell,
BrowseTab,
QuickOpen,
/// A data grid's column view, ahead of the list's own key bindings.
GridCell,
/// A data grid's column view, after a focused editor had its turn.
Expand Down
1 change: 1 addition & 0 deletions linux/crates/app/src/ui/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@ mod name_entry;
mod picker;
mod plain_toast;
mod preferences_dialog;
mod quick_open;
mod result_pane;
pub(crate) mod safe_mode;
mod saved_queries_dialog;
Expand Down
75 changes: 75 additions & 0 deletions linux/crates/app/src/ui/quick_open/matching.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1,75 @@
#[derive(Debug, Clone, Copy, PartialEq, Eq, PartialOrd, Ord)]
pub(super) struct Rank(u8, usize);

pub(super) fn normalize(text: &str) -> Vec<char> {
text.chars().flat_map(char::to_lowercase).collect()
}

pub(super) fn rank(typed: &[char], name: &[char]) -> Option<Rank> {
if typed.is_empty() || name.starts_with(typed) {
return Some(Rank(0, 0));
}
if let Some(at) = name.windows(typed.len()).position(|window| window == typed) {
return Some(Rank(1, at));
}
// A qualified name must not pick up letters from a different identifier.
if typed.contains(&'.') {
return None;
}
let mut wanted = typed.iter();
let mut next = wanted.next();
let mut first = None;
for (position, letter) in name.iter().enumerate() {
if next == Some(letter) {
first.get_or_insert(position);
next = wanted.next();
if next.is_none() {
return Some(Rank(2, position - first.unwrap_or(position) + 1 - typed.len()));
}
}
}
None
}

#[cfg(test)]
mod tests {
use super::*;

fn score(typed: &str, name: &str) -> Option<Rank> {
rank(&normalize(typed.trim()), &normalize(name))
}

#[test]
fn classes_never_overlap_even_for_long_names() {
let prefix = score("ab", "ab").unwrap();
let inside = score("ab", &format!("{}ab", "x".repeat(2_000))).unwrap();
let scattered = score("ab", "axb").unwrap();
assert!(prefix < inside && inside < scattered);
}

#[test]
fn whitespace_case_unicode_and_order() {
assert_eq!(score(" ", "orders"), Some(Rank(0, 0)));
assert_eq!(score(" ÉT ", "Études"), Some(Rank(0, 0)));
assert_eq!(score("ods", "orders"), Some(Rank(2, 3)));
assert_eq!(score("sro", "orders"), None);
assert_eq!(score("longer", "a"), None);
assert_eq!(score("x", ""), None);
}

#[test]
fn dotted_searches_keep_the_identifier_contiguous() {
assert_eq!(score("sales.orders", "sales.orders"), Some(Rank(0, 0)));
assert_eq!(score("sales.ord", "sales.orders"), Some(Rank(0, 0)));
assert!(score("sales.orders", "SELECT * FROM sales.orders").is_some());
assert_eq!(score("sales.orders", "sales.order_items"), None);
assert_eq!(score("sales.orders", "sales_archive.orders"), None);
assert!(score("ods", "orders").is_some());
}

#[test]
fn nearer_substrings_and_tighter_subsequences_rank_first() {
assert!(score("ar", "bar").unwrap() < score("ar", "xxbar").unwrap());
assert!(score("ab", "axb").unwrap() < score("ab", "axxxb").unwrap());
}
}
Loading
Loading