refactor: rewrite query results system with clean architecture#512
Open
refactor: rewrite query results system with clean architecture#512
Conversation
Phase 0: Add ResultSet @observable class and extend QueryTab with resultSets array, activeResultSetId, isResultsCollapsed. Phase 1: Extract TableViewCoordinator from DataGridView.swift into DataGridCoordinator.swift. DataGridView.swift now contains only the NSViewRepresentable shell + helper types. Zero behavior change.
- Cmd+Opt+R: Toggle Results panel collapse/expand - Cmd+[: Previous Result tab - Cmd+]: Next Result tab - View menu items + command actions wired - Keyboard shortcuts docs updated
…ccessView - ResultsPanelView: orchestrates result tab bar, error banner, content area - ResultTabBar: horizontal scrollable tabs with pin/close/close-others - InlineErrorBanner: red dismissable error banner with optional AI fix button - ResultSuccessView: compact DDL/DML success (replaces full-screen QuerySuccessView)
- Wrap resultsSection in conditional on isResultsCollapsed in queryTabContent - Smooth animation (200ms easeInOut) when toggling collapse - Auto-expand results when new query results arrive (single + multi-statement) - Table tabs and structure tabs unaffected
- executeMultipleStatements builds a ResultSet for each statement with deep-copied rows, column types, execution time, and table name - applyPhase1Result creates a ResultSet sharing the same RowBuffer - Pinned results preserved on re-execution, unpinned replaced - Auto-expand collapsed results panel on new data
…resultsSection Replace old QuerySuccessView with ResultSuccessView, add result tab bar for multi-result display, add inline error banner. Uses real DataGridView (not placeholder). Structure and Explain paths unchanged.
…ridView layout gap
… height after collapse
… frame-based layout
… for split resize
…ntentSize constraint
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Full rewrite of the query results system with clean architecture, native macOS design, and new features.
New Architecture
@Observableclass) — single result set per SQL statement, replacing monolithic single-result properties on QueryTabFeatures Added
What's Preserved (unchanged)
Files
Test plan
;separated) → each gets own ResultSet in tab.resultSets