🧹 [code health improvement] Extract page loading logic in curriculum viewer#7
🧹 [code health improvement] Extract page loading logic in curriculum viewer#7dynamikdev wants to merge 1 commit intomasterfrom
Conversation
* 🎯 **What:** Extracted the document page loading logic inside `load_curriculum_pages` into a new helper function `load_pages_for_document`. * 💡 **Why:** `load_curriculum_pages` was lengthy and slightly unreadable due to inline data manipulations and variable bindings for accessing the global manifest. This new abstraction neatly scopes that complexity into a separate functional unit. * ✅ **Verification:** Validated that existing unit tests pass using `cargo test --bin HEMA-training-tool -- --test-threads=1 ui::curriculum_test` and verified compilation with `cargo check`. Code review confirmed it to be entirely safe and correct. * ✨ **Result:** A more readable `load_curriculum_pages` system without behavior changes. Co-authored-by: dynamikdev <717692+dynamikdev@users.noreply.github.com>
|
👋 Jules, reporting for duty! I'm here to lend a hand with this pull request. When you start a review, I'll add a 👀 emoji to each comment to let you know I've read it. I'll focus on feedback directed at me and will do my best to stay out of conversations between you and other bots or reviewers to keep the noise down. I'll push a commit with your requested changes shortly after. Please note there might be a delay between these steps, but rest assured I'm on the job! For more direct control, you can switch me to Reactive Mode. When this mode is on, I will only act on comments where you specifically mention me with New to Jules? Learn more at jules.google/docs. For security, I will only act on instructions from the user who triggered this task. |
This PR addresses the code health task in
src/ui/curriculum.rsby extracting the page loading logic into a smaller, cleaner helper function. It improves code readability while maintaining the exact same functional behavior.PR created automatically by Jules for task 11833162593342191724 started by @dynamikdev