Skip to content

refactor(shell): split MainScreen into a layout, a navigator, dialogs and a pure shortcut table (#1503) - #1718

Merged
ZhuchkaTriplesix merged 6 commits into
devfrom
refactor/main-screen-coordinators
Oct 18, 2026
Merged

ZhuchkaTriplesix merged 6 commits into
devfrom
refactor/main-screen-coordinators

Conversation

@ZhuchkaTriplesix

Copy link
Copy Markdown
Member

Closes #1503

main_screen.dart went from 1773 to 390 lines. No behaviour change; each step was checked with the main_screen, e2e, guards and app tests locally.

new file what moved
main_content_split.dart the resizable sidebar split with its spring, and the connections panel slot (were private classes of the same file)
main_screen_shortcuts.dart the window-wide shortcut table: MainScreenShortcuts.resolve(event, cmdOrCtrl, shift, alt) returns a MainShortcut (pure, Russian layout included); the screen only maps it to an action
main_screen_navigator.dart every pick in the tree and quick switcher (Postgres, MySQL, SQLite, extension, Redis, Mongo), the unsaved-work check, go home / close workspace
main_screen_dialogs.dart new connection (form, URL, SQLite file), welcome tour, demo playground, files opened from the file manager, the read-only lock with its Safe Mode confirmation and re-lock timer
main_screen_chrome.dart ShellTitleBar and ShellStatusBar as widgets

MainContentSplitState lost its underscore with the move; the perf bench looks it up by name and is updated.

Tests added: the shortcut table per key, modifier and layout; the navigator (repeat pick is a no-op, the pending Mongo collection and its notification, Redis, close vs home). The existing safe-mode, sidebar, file-launch and e2e shell tests are unchanged and pass.

One thing I left alone: the build still has a CallbackShortcuts map that repeats most of what the global handler does; removing it is a behaviour question, not part of this split.

@github-actions github-actions Bot added frontend Theme parser epic label: frontend ui User interface components and widgets ux User experience, keyboard shortcuts and interactions P2 Medium priority / Parity & Refactoring labels Oct 18, 2026
@github-actions github-actions Bot added this to the 0.5.0 milestone Oct 18, 2026
@ZhuchkaTriplesix
ZhuchkaTriplesix merged commit 35996da into dev Oct 18, 2026
16 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

frontend Theme parser epic label: frontend P2 Medium priority / Parity & Refactoring ui User interface components and widgets ux User experience, keyboard shortcuts and interactions

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant