Problem
crates/tui/src/tui/app.rs has a large App struct and broad impl App block. The analysis characterized this as a god object:
- roughly 150 fields on
App
- thousands of lines of methods
- many concerns mixed in one impl
- a
ComposerState sub-struct exists, but ownership/method boundaries are still blurry
Proposed shape
Move methods and state toward owning sub-struct/modules:
app/mod.rs
app/types.rs
app/builder.rs
app/composer.rs
app/history.rs
app/status.rs
- additional modules only when they remove real ownership confusion
Use an AppBuilder or equivalent for the current App::new initialization path.
Acceptance criteria
Risk
High. Do not start until lower-risk test extraction and renderer/API/module splits have landed.
Problem
crates/tui/src/tui/app.rshas a largeAppstruct and broadimpl Appblock. The analysis characterized this as a god object:AppComposerStatesub-struct exists, but ownership/method boundaries are still blurryProposed shape
Move methods and state toward owning sub-struct/modules:
app/mod.rsapp/types.rsapp/builder.rsapp/composer.rsapp/history.rsapp/status.rsUse an
AppBuilderor equivalent for the currentApp::newinitialization path.Acceptance criteria
App::newis moved into a builder/init module without behavior change.ComposerStateor an app/composer module.impl App.Risk
High. Do not start until lower-risk test extraction and renderer/API/module splits have landed.