refactor: extract oasis-app main.rs monolith into 7 modules - #12
Conversation
Split the ~1,468-line main.rs (with ~970-line main()) into focused modules: - app_state.rs: Mode enum + AppState struct - input.rs: per-mode input dispatch (OSK, Desktop, App, Dashboard/Terminal) - commands.rs: terminal command output processing + remote listener/client polling - render.rs: SDI scene graph update per mode - launch.rs: deduplicated app launch logic (was 3 copies) - terminal_sdi.rs: terminal/wallpaper/media SDI helpers - vfs_setup.rs: VFS demo content population + 10 tests main.rs is now ~262 lines: init, main loop skeleton, and rendering. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Gemini AI Code ReviewIssues (if any)
Previous Issues (for incremental reviews)(none) Suggestions (if any)
Notes
Generated by Gemini AI (gemini-3-flash-preview). Supplementary to human reviews. |
Review Response Agent (Iteration 1)Status: No changes needed Fixed Issues
Ignored Issues
Deferred to Human
Notes
The agent reviewed feedback but determined no code changes were required. |
Without trim_output, if output_lines exceeded MAX_OUTPUT_LINES the terminal would display the oldest lines instead of the newest. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Gemini AI Incremental ReviewThis is an incremental review focusing on changes since the last review. Issues(none) Previous Issues
Suggestions
Notes
Generated by Gemini AI (gemini-3-flash-preview). Supplementary to human reviews. |
Review Response Agent (Iteration 2)Status: No changes needed Fixed Issues
Ignored Issues
Deferred to Human
Notes
The agent reviewed feedback but determined no code changes were required. |
Summary
main.rs(with a ~970-linemain()function) into 7 focused modules, reducingmain.rsto ~262 linesapp_state.rs(Mode enum + AppState struct),input.rs(per-mode input dispatch),commands.rs(terminal command output + remote polling),render.rs(SDI scene graph update),launch.rs(deduplicated app launch logic),terminal_sdi.rs(terminal/wallpaper/media SDI helpers),vfs_setup.rs(demo VFS population + tests)Test plan
cargo test --workspace-- all 33 test suites passcargo clippy --workspace -- -D warnings-- cleancargo fmt --all -- --check-- cleancargo build --release -p oasis-app-- builds successfullyGenerated with Claude Code