Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
61 commits
Select commit Hold shift + click to select a range
5f59651
feat(linux-sidebar): add a bottom bar with an Add menu
sedax90 Nov 8, 2026
5aae8d8
docs(linux-sidebar): name the changelog entry for its PR
sedax90 Nov 8, 2026
985b30f
feat(linux-sidebar): choose which schemas the sidebar lists
sedax90 Nov 8, 2026
bb49b7c
chore(linux): changelog and translation sources for the schema filter
sedax90 Nov 8, 2026
c23a769
feat(linux-sidebar): drag the sidebar's edge to set its width
sedax90 Nov 9, 2026
c4c0ff8
chore(linux): changelog for the sidebar width
sedax90 Nov 9, 2026
19a9393
feat(linux-sidebar): group a schema's objects by kind
sedax90 Nov 9, 2026
639bcab
chore(linux): changelog for the sidebar kinds
sedax90 Nov 9, 2026
810a042
Merge remote-tracking branch 'origin/main' into feat/linux-sidebar-fo…
datlechin Nov 9, 2026
db6a574
refactor(linux-sidebar): build the Add menu from the session's afford…
datlechin Nov 9, 2026
3638efa
Merge branch 'feat/linux-sidebar-footer' into feat/linux-sidebar-sche…
datlechin Nov 9, 2026
752a82a
refactor(linux-sidebar): keep the sidebar's schema filter per connect…
datlechin Nov 9, 2026
5be78a8
Merge branch 'feat/linux-sidebar-schema-filter' into feat/linux-sideb…
datlechin Nov 9, 2026
489b5bd
refactor(linux-sidebar): cap the sidebar at the width the user set an…
datlechin Nov 9, 2026
a1cb30b
Merge branch 'feat/linux-sidebar-width' into feat/linux-sidebar-kinds
datlechin Nov 9, 2026
2cfee43
refactor(linux-sidebar): list a schema's other kinds in a group row e…
datlechin Nov 9, 2026
830c7c0
refactor(linux-sidebar): keep the schema chooser's calls inside the w…
datlechin Nov 9, 2026
f4ae9c2
Merge branch 'feat/linux-sidebar-schema-filter' into feat/linux-sideb…
datlechin Nov 9, 2026
9a4aeaf
Merge branch 'feat/linux-sidebar-width' into feat/linux-sidebar-kinds
datlechin Nov 9, 2026
02500ed
Merge remote-tracking branch 'origin/main' into feat/linux-sidebar-fo…
datlechin Nov 10, 2026
f016cc1
fix(linux-sidebar): bring MenuModelExt into scope for the Add menu
datlechin Nov 10, 2026
a713a0b
Merge branch 'feat/linux-sidebar-footer' into feat/linux-sidebar-sche…
datlechin Nov 10, 2026
e9dc84e
Merge branch 'feat/linux-sidebar-schema-filter' into feat/linux-sideb…
datlechin Nov 10, 2026
5785e79
Merge branch 'feat/linux-sidebar-width' into feat/linux-sidebar-kinds
datlechin Nov 10, 2026
71f75ee
fix(linux-sidebar): keep a kind the core adds later with the tables
datlechin Nov 10, 2026
6726fd4
ci(linux-sidebar): run CI again, GitHub made no run for the last push
datlechin Nov 10, 2026
b5366ca
Merge remote-tracking branch 'origin/main' into feat/linux-sidebar-fo…
datlechin Nov 10, 2026
b8daab3
Merge commit 'b5366cab44522197a1b4f04706894a79908b6be6' into feat/lin…
datlechin Nov 10, 2026
e1fbb9a
Merge commit 'b8daab30aba3b5fa3dd285dc2329da160a630858' into feat/lin…
datlechin Nov 10, 2026
500153c
Merge commit 'e1fbb9a965724fc26831fff6a75abcfe18a02e8d' into feat/lin…
datlechin Nov 10, 2026
bb14cfa
refactor(linux-sidebar): split the window's input handler and the she…
datlechin Nov 10, 2026
2f37db9
Merge branch 'feat/linux-sidebar-footer' into feat/linux-sidebar-sche…
datlechin Nov 10, 2026
4c87cc7
refactor(linux-sidebar): hold the schema filter's state in one place …
datlechin Nov 10, 2026
0f447a1
Merge branch 'feat/linux-sidebar-schema-filter' into feat/linux-sideb…
datlechin Nov 10, 2026
1403635
Merge branch 'feat/linux-sidebar-width' into feat/linux-sidebar-kinds
datlechin Nov 10, 2026
99167fd
Merge remote-tracking branch 'origin/main' into feat/linux-sidebar-fo…
datlechin Nov 10, 2026
605f168
test(linux-sidebar): check a read-only session built an empty Add menu
datlechin Nov 10, 2026
9436fee
Merge commit '605f16888a4686ce51e777f3c04c7645f13af994' into feat/lin…
datlechin Nov 10, 2026
51fd97d
fix(linux-sidebar): update the schema checks in place so a toggle kee…
datlechin Nov 10, 2026
bc19cc2
Merge commit '51fd97db8' into feat/linux-sidebar-width
datlechin Nov 10, 2026
51691b9
fix(linux-sidebar): follow a touch drag on the width handle and keep …
datlechin Nov 10, 2026
46748c2
Merge commit '51691b9c3' into feat/linux-sidebar-kinds
datlechin Nov 10, 2026
a7757da
fix(linux-sidebar): recount a kind's group when a new list lands unde…
datlechin Nov 10, 2026
adcd6b4
fix(linux-sidebar): name the schema filter button in its template
datlechin Nov 10, 2026
d37db76
Merge commit 'adcd6b48b' into feat/linux-sidebar-width
datlechin Nov 10, 2026
ab6bc64
Merge commit 'd37db7686f6eb2e38b52afa266d0bf3d055333c3' into feat/lin…
datlechin Nov 10, 2026
6fc2d81
Merge remote-tracking branch 'origin/main' into feat/linux-sidebar-fo…
datlechin Nov 10, 2026
4f661ac
Merge commit '6fc2d8145' into feat/linux-sidebar-schema-filter
datlechin Nov 10, 2026
80fbf1e
Merge commit '4f661ac33' into feat/linux-sidebar-width
datlechin Nov 10, 2026
4bb9b1e
Merge commit '80fbf1e96' into feat/linux-sidebar-kinds
datlechin Nov 10, 2026
ad44265
Merge remote-tracking branch 'origin/main' into feat/linux-sidebar-sc…
datlechin Nov 11, 2026
3ce048d
Merge commit 'ad4426599' into feat/linux-sidebar-width
datlechin Nov 11, 2026
b5a40c8
Merge commit '3ce048d58' into feat/linux-sidebar-kinds
datlechin Nov 11, 2026
20768af
Merge remote-tracking branch 'origin/main' into feat/linux-sidebar-sc…
datlechin Nov 11, 2026
2780774
Merge commit '20768afe1' into feat/linux-sidebar-width
datlechin Nov 11, 2026
ee5ed74
Merge commit '27807745b' into feat/linux-sidebar-kinds
datlechin Nov 11, 2026
7d9a827
fix(linux-sidebar): check the saved filter settings in the sidebar sc…
datlechin Nov 11, 2026
397536a
Merge commit '7d9a82794' into feat/linux-sidebar-width
datlechin Nov 11, 2026
f0499f8
Merge commit '397536ad0' into feat/linux-sidebar-kinds
datlechin Nov 11, 2026
ee8ca79
Merge remote-tracking branch 'origin/main' into feat/linux-sidebar-width
datlechin Nov 11, 2026
0837c6c
Merge commit 'ee8ca7939' into feat/linux-sidebar-kinds
datlechin Nov 11, 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
4 changes: 2 additions & 2 deletions linux/ARCHITECTURE.md
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ Each window is a `SessionWindow` (`crates/app/src/ui/session_window/`) for its c
- 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 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. Below the tree, a bar holds the Add menu the session in front builds from what its engine makes and whether it may write; the Favorites scope hides it. 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.
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. Below the tree, a bar holds the Add menu the session in front builds from what its engine makes and whether it may write; the Favorites scope hides it. A handle on the sidebar's edge sets the most it takes ([toolkit-workarounds.md](docs/toolkit-workarounds.md#a-sidebar-the-user-can-widen)). 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.

## UI architecture

Expand Down Expand Up @@ -141,7 +141,7 @@ Each engine builds its trust as `../core/ARCHITECTURE.md`, Trust, says. On Linux

The app tells each session what its connection cannot see, as `../core/ARCHITECTURE.md`, Sessions and health, describes: `GNetworkMonitor` reports a change in the network, and while a session is open a 5 s timer compares `CLOCK_BOOTTIME` with `CLOCK_MONOTONIC` to notice a suspend. A session parked on an SSH host key shows the fingerprint in its banner's Review Key. When the review cannot accept the key, because ssh's configuration takes keys only from known_hosts or the key is revoked, its dialog offers Retry for after the user fixes the key outside TablePro.

The sidebar's tree lists an open connection's schemas, the default one first and the engine's own last, and each schema's tables and views, with one menu whose items carry the table they act on. Its rows come from a `SidebarIndex`, sorted by collation key and given its search keys on a blocking thread, behind a `GListModel` that makes a row's object only when asked for it; `GtkTreeListModel` asks for every table of a schema it opens. Each search, and each new list, picks the rows it keeps on a blocking thread too. What a search finds is a flat `GtkListView`, a section per schema in a `GtkFlattenListModel` that reads only the rows on screen, and it takes a search's rows in one removal and one addition unless a newer search or list overtook them. The Schemas button in the sidebar's bottom bar keeps the schemas the tree and its search list, by connection and database in the filter settings file; none kept lists every schema, and a banner says how many a filter leaves out. It follows every schema's list through a watch the window drops before the session closes, and reads that list again when a reconnect commits the default schema's; a refresh that fails keeps the list and says so in a toast. The editor's completion reads the catalog when it opens: the default schema's objects, a named schema's objects after `schema.`, and the columns of the tables the statement names. Its candidates are built with that read on the runtime, and its `ProposalList` ranks them for the typed word and makes a proposal only for a row GtkSourceView shows. Either list thus costs the GTK thread the rows on screen, not the catalog, which the large-catalog case checks with 50,000 tables ([testing.md](docs/testing.md#large-catalog-case)).
The sidebar's tree lists an open connection's schemas, the default one first and the engine's own last, and each schema's tables, after a row for each other kind it holds (views, materialized views, foreign tables, sequences, procedures, functions, triggers) that opens on that kind's objects, with one menu whose items carry the table they act on. Each kind is one stretch of its schema's run of the index, so a group's row lists it as lazily as a schema lists its tables; a group keeps its node across new lists, so the tree keeps it open. Its rows come from a `SidebarIndex`, sorted by collation key and given its search keys on a blocking thread, behind a `GListModel` that makes a row's object only when asked for it; `GtkTreeListModel` asks for every table of a schema it opens. Each search, and each new list, picks the rows it keeps on a blocking thread too. What a search finds is a flat `GtkListView`, a section per schema in a `GtkFlattenListModel` that reads only the rows on screen, and it takes a search's rows in one removal and one addition unless a newer search or list overtook them. The Schemas button in the sidebar's bottom bar keeps the schemas the tree and its search list, by connection and database in the filter settings file; none kept lists every schema, and a banner says how many a filter leaves out. It follows every schema's list through a watch the window drops before the session closes, and reads that list again when a reconnect commits the default schema's; a refresh that fails keeps the list and says so in a toast. The editor's completion reads the catalog when it opens: the default schema's objects, a named schema's objects after `schema.`, and the columns of the tables the statement names. Its candidates are built with that read on the runtime, and its `ProposalList` ranks them for the typed word and makes a proposal only for a row GtkSourceView shows. Either list thus costs the GTK thread the rows on screen, not the catalog, which the large-catalog case checks with 50,000 tables ([testing.md](docs/testing.md#large-catalog-case)).

## Workspace tab system

Expand Down
1 change: 1 addition & 0 deletions linux/changelog.d/4155.added.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
The sidebar can be widened by dragging its edge or with the arrow keys, and every window keeps that width.
1 change: 1 addition & 0 deletions linux/changelog.d/4159.changed.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
The sidebar lists a schema's views, sequences, routines and triggers in a row for each kind, above its tables.
1 change: 1 addition & 0 deletions linux/crates/app/src/ui/workspace/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ mod schema_chooser;
mod schema_filter;
mod session_watches;
mod sidebar;
mod sidebar_width;
mod status_pages;
mod structure;
mod structure_target;
Expand Down
44 changes: 28 additions & 16 deletions linux/crates/app/src/ui/workspace/sidebar/connection_tree.rs
Original file line number Diff line number Diff line change
Expand Up @@ -782,9 +782,7 @@ impl TreeInner {
let Some(node) = row.item().and_downcast::<TreeNode>() else {
continue;
};
if node.kind() != NodeKind::Schema {
rows.extend(child_rows(&row));
}
rows.extend(rows_holding_nodes(&row, &node));
open.insert(node);
}
open
Expand All @@ -804,9 +802,7 @@ impl TreeInner {
continue;
}
expand(&row);
if node.kind() != NodeKind::Schema {
rows.extend(child_rows(&row));
}
rows.extend(rows_holding_nodes(&row, &node));
}
}

Expand All @@ -829,7 +825,7 @@ impl TreeInner {
let lone = (schemas.n_items() == 1)
.then(|| schemas.item(0).and_downcast::<TreeNode>())
.flatten()
.filter(|schema| schema.rows().is_some_and(|rows| rows.n_items() > 0));
.filter(|schema| schema.children().is_some_and(|rows| rows.n_items() > 0));
{
let mut branches = self.branches.borrow_mut();
let Some(branch) = branches.get_mut(key) else {
Expand Down Expand Up @@ -979,15 +975,21 @@ impl TreeInner {
table: &TableRef,
open: bool,
) -> Option<gtk::TreeListRow> {
let (schema, offset) = self.view_of(key)?.locate(table)?;
let located = self.view_of(key)?.locate(table)?;
if open {
expand(connection);
}
let schema = child_row(connection, &schema)?;
let mut parent = child_row(connection, &located.schema)?;
if open {
expand(&schema);
expand(&parent);
}
schema.child_row(offset)
if let Some(group) = &located.group {
parent = child_row(&parent, group)?;
if open {
expand(&parent);
}
}
parent.child_row(located.offset)
}

/// Select the row of `table`, or of the session's connection, in the
Expand Down Expand Up @@ -1103,7 +1105,7 @@ impl TreeInner {
};
match node.kind() {
NodeKind::Connection => activate_connection(&self.pane(which).list_view, node, self.stored(node)),
NodeKind::Group | NodeKind::Schema => {
NodeKind::Group | NodeKind::Schema | NodeKind::ObjectGroup => {
if let Some(row) = self.rows.row(position).filter(|_| which == Which::Tree) {
row.set_expanded(!row.is_expanded());
}
Expand Down Expand Up @@ -1223,7 +1225,7 @@ impl TreeInner {
}
NodeKind::Connection => self.connection_menu(node),
NodeKind::Group => self.group_menu(node),
NodeKind::Placeholder => None,
NodeKind::ObjectGroup | NodeKind::Placeholder => None,
}
}

Expand All @@ -1246,7 +1248,7 @@ impl TreeInner {
match node.kind() {
NodeKind::Group => node.group_id().map(LibraryItem::Group),
NodeKind::Connection => self.stored(node).map(LibraryItem::Connection),
NodeKind::Schema | NodeKind::Placeholder => None,
NodeKind::Schema | NodeKind::ObjectGroup | NodeKind::Placeholder => None,
}
}

Expand Down Expand Up @@ -1741,8 +1743,18 @@ fn top_rows(tree: &gtk::TreeListModel) -> Vec<gtk::TreeListRow> {
(0..count).filter_map(|position| tree.child_row(position)).collect()
}

/// The rows under an open row, which never holds a schema's tables when
/// walked from the roots.
// A schema's rows below its groups are objects, which may be many thousands.
fn rows_holding_nodes(row: &gtk::TreeListRow, node: &TreeNode) -> Vec<gtk::TreeListRow> {
match node.kind() {
NodeKind::Schema => {
let groups = node.groups().map_or(0, |groups| groups.n_items());
(0..groups).filter_map(|position| row.child_row(position)).collect()
}
NodeKind::ObjectGroup | NodeKind::Placeholder => Vec::new(),
NodeKind::Group | NodeKind::Connection => child_rows(row),
}
}

fn child_rows(row: &gtk::TreeListRow) -> Vec<gtk::TreeListRow> {
let count = row.children().map_or(0, |children| children.n_items());
(0..count).filter_map(|position| row.child_row(position)).collect()
Expand Down
Loading
Loading