Skip to content

Commit 21f972a

Browse files
committed
feat: implement multi-connection management system
- Refactor AppHeader to remove API endpoint editing functionality. - Enhance AppSidebar to include a connection selector and manage connections. - Update ConnectionStatus page to handle multiple connections and display their statuses. - Create ConnectionModal for adding, editing, and deleting connections. - Introduce useMigrateConnections hook to migrate from single to multi-connection setup. - Add alert dialog component for confirming connection deletions. - Update UI components to reflect new connection management features.
1 parent a74beca commit 21f972a

File tree

10 files changed

+1089
-239
lines changed

10 files changed

+1089
-239
lines changed

bun.lock

Lines changed: 36 additions & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "gigapi-ui",
3-
"version": "1.0.22",
3+
"version": "1.0.23",
44
"type": "module",
55
"description": "UI interface for GigAPI: The Infinite Timeseries Lakehouse. GigAPI UI provides a slick web interface to query time-series using GigAPI Catalog Metadata + DuckDB",
66
"scripts": {
@@ -18,6 +18,7 @@
1818
"dependencies": {
1919
"@hookform/resolvers": "^5.2.1",
2020
"@monaco-editor/react": "^4.7.0",
21+
"@radix-ui/react-alert-dialog": "^1.1.15",
2122
"@radix-ui/react-checkbox": "^1.3.2",
2223
"@radix-ui/react-dialog": "^1.1.14",
2324
"@radix-ui/react-dropdown-menu": "^2.1.15",

src/App.tsx

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,7 @@ import { SidebarInset, SidebarProvider } from "@/components/ui/sidebar";
3333
import { CommandPalette } from "@/components/shared/CommandPalette";
3434
import { ArtifactProvider } from "@/contexts/ArtifactContext";
3535
import Loader from "./components/shared/Loader";
36+
import { useMigrateConnections } from "@/hooks/useMigrateConnections";
3637

3738
// const VERSION = import.meta.env.PACKAGE_VERSION;
3839

@@ -58,6 +59,7 @@ function AppInitializer() {
5859
return;
5960
}
6061

62+
// Connect to the selected connection on startup
6163
connect().catch((error) => {
6264
console.error("🔥 [AppInitializer] Connection failed:", error);
6365
});
@@ -147,6 +149,9 @@ export default function App() {
147149
const [connectionState] = useAtom(connectionStateAtom);
148150
const [isConnected] = useAtom(isConnectedAtom);
149151

152+
// Migrate old connections
153+
useMigrateConnections();
154+
150155
useEffect(() => {
151156
// Global error handler
152157
const handleUnhandledRejection = (event: PromiseRejectionEvent) => {

0 commit comments

Comments
 (0)