From bef31742b78c75f78e116dba91f97704d4cf0b1c Mon Sep 17 00:00:00 2001 From: Valdemar Lorenzen Date: Mon, 19 Oct 2026 16:00:22 +0200 Subject: [PATCH] feat: omit SQLite paths from sidebar labels --- TODO.md | 2 +- src/connection.rs | 11 ++++------- src/main.rs | 1 + 3 files changed, 6 insertions(+), 8 deletions(-) diff --git a/TODO.md b/TODO.md index f0b7555..8c50777 100644 --- a/TODO.md +++ b/TODO.md @@ -17,7 +17,7 @@ - [x] put the help text inside it's own pane so it fits the design more cleanly. - [x] move the table name in the results pane from the bottom-left border title to top-right border title instead - [x] remove the bottom navigation help panel and have a keybinding overview appear in a floating window when pressing `?` in normal mode -- [ ] remove the path from the database entry in the sidebar (can be viewed in the info panel) +- [x] remove the path from the database entry in the sidebar (can be viewed in the info panel) - [ ] info panel should also pop up when pressing `i` on a child entry of that database entry in the sidebar (instead of only when the parent/database connection is hovered) - [ ] `line:col` indicator in the bottom-right status bar should never disappear but instead display "N/A" in that case. - [ ] database type indicator should be moved down just left of the "line:col" indicator like in the attached image \ No newline at end of file diff --git a/src/connection.rs b/src/connection.rs index d5c5dc2..c6ad1c3 100644 --- a/src/connection.rs +++ b/src/connection.rs @@ -684,13 +684,10 @@ impl Form { fn label(&self) -> String { crate::db::display_text(&if self.provider == 1 { let path = Path::new(&self.path.value); - format!( - "{} · {}", - path.file_name() - .unwrap_or(path.as_os_str()) - .to_string_lossy(), - self.path.value - ) + path.file_name() + .unwrap_or(path.as_os_str()) + .to_string_lossy() + .into_owned() } else { format!( "{} · {}@{}:{}", diff --git a/src/main.rs b/src/main.rs index c622f02..3e7093b 100644 --- a/src/main.rs +++ b/src/main.rs @@ -41,6 +41,7 @@ Navigation: i Show configured database info (Esc/Enter closes; passwords omitted) r Refresh relations and the active relation Connected databases have a trailing * and show their tables/views beneath them. + SQLite sidebar entries show only the filename; the info window shows the full path. Enter on the connected database collapses/expands it without reconnecting. Keybindings float above the workspace; Up/Down/jk scroll, Home/End/g/G jump. Query Insert mode and connection/password fields keep ? as literal text.