Skip to content

refactor: Split src/app.rs monolith into src/ui/ submodules #24

Description

@Rowrow620

Description of the Feature

src/app.rs has grown to over 6,900 lines of code in a single file. Splitting this file into a modular src/ui/ directory will reduce merge conflicts for open-source contributors and make the codebase easier to navigate.

Proposed Solution

Refactor UI rendering code from src/app.rs into submodules inside src/ui/:

  • src/ui/sidebar.rs: Roadmap navigation and problem search
  • src/ui/inspector.rs: Python trace code inspector and scope variables
  • src/ui/dashboard.rs: Full-screen NeetCode 150 Mastery grid
  • src/ui/modal.rs: Settings and Keyboard Shortcuts popup windows

Implementation Steps

  1. Create directory src/ui/ and define module exports in src/ui/mod.rs.
  2. Move sidebar rendering functions from src/app.rs to src/ui/sidebar.rs.
  3. Move code trace and scope rendering functions to src/ui/inspector.rs.
  4. Move full-screen dashboard grid code to src/ui/dashboard.rs.
  5. Update src/app.rs to call submodule render methods.
  6. Verify build health by running cargo test and cargo fmt --all -- --check.

Acceptance Criteria

To merge a pull request for this issue:

  • Code Formatting: cargo fmt --all -- --check completes without warnings.
  • All Tests Pass: cargo test passes 100% of unit tests.
  • Architecture: src/app.rs size is significantly reduced and UI components live in src/ui/.
  • Clean Git Branch: Changes are committed to a feature branch targeting dev.

Step-by-Step Contribution Guide

  1. Claim this issue: Comment below that you are working on this issue to receive assignment.
  2. Fork and Branch: Create a new branch off dev named refactor-app-submodules.
  3. Make and Test Changes: Run cargo fmt --all and cargo test locally to verify build health.
  4. Submit PR: Push your branch to GitHub and create a Pull Request targeting the dev branch.

Additional Information

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions