Structure View Refactor & Keyboard Handling Migration#24
Merged
Conversation
…ation ## Structure View Refactor - Replace custom table views with DataGridView for consistent UX - Add StructureChangeManager for O(1) change tracking (mirrors DataChangeManager) - Implement copy/paste/undo/redo using responder chain pattern - Add visual feedback for changes (yellow=modified, green=inserted, red=deleted) - Support schema previews and SQL generation for ALTER TABLE operations ## Keyboard Handling Migration - Replace custom ESC key system with native responder chain (cancelOperation) - Use interpretKeyEvents for standard shortcuts (delete, copy, paste, undo) - Add KeyCode enum for readable key event handling - Remove EscapeKey* files (no longer needed) ## Alert System Consolidation - Create AlertHelper utility for consistent alert dialogs - Replace SwiftUI .alert() with native NSAlert for better modal behavior - Remove MainContentAlerts.swift (replaced by inline confirmations) - Remove InlineErrorBanner (errors now shown as modal alerts) ## Performance Improvements - Add granular DataGridView reloading (only reload changed rows) - Implement visual state caching in change managers - Pre-load all table columns in SQLSchemaProvider (was limited to 5) - Remove unnecessary deep copying in QueryExecutionService ## Bug Fixes - Fix duplicate refresh alerts (Structure View now handles own notifications) - Fix date format settings requiring full reload (now reloads visible rows only) - Add AnyChangeManager protocol wrapper for unified data/structure change tracking - Remove debug print statements from StructureChangeManager, SQLSchemaProvider, DatabaseManager ## Files Changed - Modified: 35 files - Deleted: 6 files (EscapeKey system, InlineErrorBanner, MainContentAlerts) - Added: 9 files (StructureChangeManager, SchemaModels, AlertHelper, etc.)
Collaborator
Author
|
@codex review |
|
Codex review is not enabled for this repo. Please contact the admins of this repo to enable Codex. |
6 tasks
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
Complete refactor of the Structure View to match the data grid UX and migrate keyboard handling to native responder chain patterns.
Structure View Refactor
Keyboard Handling Migration
cancelOperation(_:)interpretKeyEventsfor delete, copy, paste, undo, redoAlert System Improvements
Performance Enhancements
Bug Fixes
Testing
Architecture Notes
Change Manager Pattern
Both DataChangeManager and StructureChangeManager now follow the same O(1) pattern:
Responder Chain Pattern
Keyboard shortcuts now use Apple's standard responder chain:
Custom Pasteboard Type
Structure View uses com.tablepro.structure to avoid conflicts with data grid's tab-separated format.
Files Changed
Modified: 35 files
Deleted: 6 files (EscapeKey system, old alert components)
Added: 9 files (StructureChangeManager, SchemaModels, AlertHelper, etc.)
Breaking Changes
None - all changes are internal refactoring with no API changes.