DB & Dev Tools · Databases: connections, schemas, queries, structure, Redis

A new chapter, src/devtools. ConnectionManager lists saved connections
with their engine and address, or why one failed, and connects on Enter;
ConnectionForm fills a connection with a port checked from 1 to 65535,
tests it and saves it. SchemaTree shows schemas, tables, views and
fields with keys marked; ERDiagram draws tables and their foreign keys
on NodeGraph, whose fixed wires show only the sockets that hold one.
QueryHistory finds past runs and runs one again; QueryPlanViewer shows
each step's share of the cost. TableStructureEditor edits fields in
place; IndexManager lists and draws up indexes; RedisKeyBrowser finds
keys by glob and lays out each type. QueryEditor is editor::CodeEditor,
whose lexer now knows SQL's words, and QueryResultGrid is
tables::DataGrid. lists::row_action keeps a row's button its own.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
ZacharyZhang-NYandClaude Opus 5.5 committed 2026-09-27 08:51:45 -04:00
1 parent 94ae7e73e7
commit 4c9727d67c
20 files changed
+2602 -14

No files matched your search

+1
View File
@@ -22,6 +22,7 @@ pub use long::{InfiniteList, VirtualList};
pub use outline::Outline;
pub(crate) use sections::Sections;
pub use select::SelectableList;
pub(crate) use select::row_action;
pub(crate) use select::{Pick, picked};
pub use sortable::SortableList;
pub use swipe::{SwipeAction, SwipeableListItem};
+19 -2
View File
@@ -1,8 +1,8 @@
use std::rc::Rc;
use gpui::{
App, Div, ElementId, InteractiveElement, IntoElement, ParentElement, RenderOnce, ScrollHandle,
SharedString, StatefulInteractiveElement, StyleRefinement, Styled, Window, div,
App, Div, ElementId, InteractiveElement, IntoElement, MouseButton, ParentElement, RenderOnce,
ScrollHandle, SharedString, StatefulInteractiveElement, StyleRefinement, Styled, Window, div,
};
use super::ListItem;
@@ -276,6 +276,23 @@ impl RenderOnce for SelectableList {
}
}
/// A button inside a pressable row: its press and its Space or Enter stay its own, so the row neither selects nor activates.
pub(crate) fn row_action(button: impl IntoElement) -> gpui::Div {
div()
.flex_none()
.on_mouse_down(MouseButton::Left, |_, window, cx| {
window.prevent_default();
cx.stop_propagation();
})
.on_key_down(|event, _, cx| {
let key = event.keystroke.key.as_str();
if matches!(key, "space" | "enter") && !event.keystroke.modifiers.modified() {
cx.stop_propagation();
}
})
.child(button)
}
#[cfg(test)]
mod tests {
use gpui::SharedString;