Skip to content

Commit 8927b88

Browse files
committed
refactor: replace QueryEditor with SqlEditor component
- Create focused SqlEditor component for SQL editing with intellisense - Remove unused QueryEditor component and its styles - Integrate SqlEditor into QueryWorkspace to eliminate code duplication - Fix TypeScript errors in intellisense implementation - Add required range property to Monaco completion items - Update documentation to reflect new architecture
1 parent 626857a commit 8927b88

File tree

11 files changed

+370
-693
lines changed

11 files changed

+370
-693
lines changed

CLAUDE.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ src/
3232
│ ├── DatabaseConnection/ # Connection dialog/form
3333
│ ├── DatabaseExplorer/ # Database tree view
3434
│ ├── Layout/ # Layout components
35-
│ ├── QueryEditor/ # SQL editor component
35+
│ ├── QueryWorkspace/ # Query workspace with SQL editor
3636
│ ├── QueryResults/ # Results grid
3737
│ └── ThemeSwitcher/ # Theme selection dropdown
3838
└── lib/
@@ -57,7 +57,7 @@ Currently supports:
5757
1. **No Connection**: Shows MainPanel with connection options and saved connections
5858
2. **Active Connection**: Shows ActiveConnectionLayout with:
5959
- DatabaseExplorer (left panel, resizable)
60-
- QueryWorkspace (right panel) containing QueryEditor and QueryResults
60+
- QueryWorkspace (right panel) containing SqlEditor and QueryResults
6161

6262
## Development Guidelines
6363

@@ -114,7 +114,7 @@ npm run typecheck # if available
114114
- Implement actual database connection logic
115115
- Add database-specific drivers (pg, mysql2, etc.)
116116
- Implement tree view in DatabaseExplorer
117-
- Add query execution in QueryEditor
117+
- Query execution is implemented in QueryWorkspace with SQL intellisense
118118
- Implement results display in QueryResults
119119

120120
## Important Notes

README.md

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,6 @@ data-pup/
8686
│ │ ├── ActiveConnectionLayout/ # Main connected view
8787
│ │ ├── ConnectionCard/ # Connection display cards
8888
│ │ ├── DatabaseExplorer/ # Database tree view
89-
│ │ ├── QueryEditor/ # SQL editor component
9089
│ │ ├── QueryHistory/ # Query history panel
9190
│ │ ├── QueryTabs/ # Tab management
9291
│ │ ├── QueryWorkspace/ # Query workspace container

src/renderer/components/Layout/MainPanel.tsx

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
1-
import { Box, Flex, Text, Button, ScrollArea, Heading } from '@radix-ui/themes'
2-
import { Card, Logo } from '../ui'
1+
import { Box, Flex, Text, Button, Heading } from '@radix-ui/themes'
2+
import { Logo } from '../ui'
33
import { DatabaseConnection } from '../DatabaseConnection/DatabaseConnection'
4-
import { QueryEditor } from '../QueryEditor/QueryEditor'
54
import { ThemeSwitcher } from '../ThemeSwitcher'
65
import { ActiveConnectionLayout } from '../ActiveConnectionLayout'
76
import { ConnectionCard, ConnectionCardSkeleton } from '../ConnectionCard'

src/renderer/components/QueryEditor/QueryEditor.css

Lines changed: 0 additions & 82 deletions
This file was deleted.

0 commit comments

Comments
 (0)