feat: add connection colors, query history, SQL autocomplete, and EXPLAIN visualizer
Add four developer/QA features: - Connection color coding: color picker in dialog, colored indicators across toolbar, tabs, status bar, and connection selectors - Query history: Rust backend with JSON file storage (500 entry cap), sidebar panel with search/clear, auto-recording from workspace - Schema-aware SQL autocomplete: backend fetches column metadata, CodeMirror receives schema namespace with public tables unprefixed - EXPLAIN ANALYZE visualizer: recursive tree view with cost-colored bars, expand/collapse nodes, buffers info, Results/Explain tab toggle Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -21,18 +21,36 @@ export function ConnectionSelector() {
|
||||
);
|
||||
}
|
||||
|
||||
const activeConn = connectedList.find((c) => c.id === activeConnectionId);
|
||||
|
||||
return (
|
||||
<Select
|
||||
value={activeConnectionId ?? undefined}
|
||||
onValueChange={setActiveConnectionId}
|
||||
>
|
||||
<SelectTrigger className="h-7 w-[200px] text-xs">
|
||||
<SelectValue placeholder="Select connection" />
|
||||
<div className="flex items-center gap-1.5">
|
||||
{activeConn?.color && (
|
||||
<span
|
||||
className="h-2.5 w-2.5 shrink-0 rounded-full"
|
||||
style={{ backgroundColor: activeConn.color }}
|
||||
/>
|
||||
)}
|
||||
<SelectValue placeholder="Select connection" />
|
||||
</div>
|
||||
</SelectTrigger>
|
||||
<SelectContent>
|
||||
{connectedList.map((conn) => (
|
||||
<SelectItem key={conn.id} value={conn.id}>
|
||||
{conn.name}
|
||||
<div className="flex items-center gap-1.5">
|
||||
{conn.color && (
|
||||
<span
|
||||
className="h-2.5 w-2.5 shrink-0 rounded-full"
|
||||
style={{ backgroundColor: conn.color }}
|
||||
/>
|
||||
)}
|
||||
{conn.name}
|
||||
</div>
|
||||
</SelectItem>
|
||||
))}
|
||||
</SelectContent>
|
||||
|
||||
Reference in New Issue
Block a user