Summary
src/App.tsx has become the orchestration point for too many unrelated desktop-shell concerns: lazy imports, panel state, command registration, keyboard shortcuts, worktree switching, sidebar actions, and top-level content selection all live in one file.
Evidence
src/App.tsx is currently over 2,000 lines long.
- The file declares a very large set of lazy-loaded panels and also coordinates their open/close behavior.
- Command palette registration, global shortcut wiring, dashboard actions, content-tab routing, and sidebar action exposure are all handled in the same component.
- Recent bug work in this area already overlaps shortcut closures and render-time side effects, which suggests the shell controller is hard to reason about and hard to change safely.
Impact
- The main app shell is expensive to understand and risky to modify.
- Small feature additions tend to expand the central controller instead of staying local to a feature boundary.
- Bugs in shell behavior are more likely to cross-cut unrelated panels and workflows.
Suggested fix
- Extract shell concerns into focused hooks/components such as command registration, shortcut handling, panel orchestration, and project/worktree selection.
- Keep
App.tsx as a composition layer rather than the behavioral home for every desktop feature.
- Add a lightweight architecture note describing the intended ownership boundaries for shell state.
Acceptance criteria
App.tsx is materially smaller and mostly declarative.
- Command/shortcut/panel behavior is covered by clearer ownership boundaries.
- New shell features can be added without expanding one central controller file.
Summary
src/App.tsxhas become the orchestration point for too many unrelated desktop-shell concerns: lazy imports, panel state, command registration, keyboard shortcuts, worktree switching, sidebar actions, and top-level content selection all live in one file.Evidence
src/App.tsxis currently over 2,000 lines long.Impact
Suggested fix
App.tsxas a composition layer rather than the behavioral home for every desktop feature.Acceptance criteria
App.tsxis materially smaller and mostly declarative.