refactor(tui): split content.rs into modular components#63
Merged
daisuke8000 merged 1 commit intomainfrom Dec 20, 2025
Merged
Conversation
Split the large content.rs (4,084 lines) into organized submodules: - mod.rs (2,644 lines): ContentPanel struct, state management, navigation, Component trait implementation - views.rs (1,002 lines): View rendering functions (render_welcome, render_questions, render_collections, render_query_result, etc.) - modals.rs (367 lines): Modal overlay rendering (render_sort_modal, render_filter_modal, render_result_search_bar) Key changes: - Use Rust's split impl pattern for better code organization - Apply pub(super) for internal visibility control - Fix borrow checker conflicts in render_result_table by accessing self.query_result internally instead of passing as parameter - Remove unused imports (Paragraph, LoadStateConfig) from mod.rs This is PR 8 of the crates refactoring plan, following the same incremental approach as PRs 1-7.
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
content.rs(4,084 lines) into organized submodules for better maintainabilityChanges
mod.rsviews.rsmodals.rsKey Technical Details
impl ContentPanelblocks distributed across filespub(super)for internal module functionsrender_result_tableaccessesself.query_resultinternally to avoid parameter conflictsDual Review Summary
Reviewed with Claude + Gemini dual-review:
pub(super)usage follows Rust best practicesTest plan
cargo test- 32 tests passedcargo clippy- No warningscargo fmt- Applied