Repository navigation
Split the UI crate into modules - #27
Merged
Merged
Conversation
main changed lib.rs and wx_app.rs after this branch split them into modules (expert mode and channels, the version-check generation, row channel tags, the wizard summary's Program line, the GitHub token fix and more), so those changes are carried into the modules the code moved to: - 53 of 61 hunks applied where their code now lives; the other 8 (struct fields, a changed signature, imports, a hunk spanning two new modules) were ported by hand. - New code got homes in the same spirit as the split: wizard/expert_mode.rs for the RABBIT_EXPERT switch and the run's channels, wx_app/expert_mode.rs for the unlock chord, build choices and run state; the row channel helpers sit next to package_rows in wizard/packages.rs. - The channel and row tests moved to wizard/tests/packages.rs, and the OSARA list-order test into wx_app/expert_mode.rs. A three-way comparison of every item (base, main, this branch, merged) found no change from either side lost: 442 of 446 match exactly, and the other 4 differ only in rustfmt line wrapping. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
CI installed whatever stable Rust was current, so Rust 1.99 (released
2026-09-28) started failing clippy on code nobody had changed. All
workflows now install 1.99 explicitly, and the workspace declares it as
rust-version, so a new Rust release can't turn CI red on its own and
every build uses the same compiler.
1.99's new lints are fixed: chunks_exact with a constant size becomes
as_chunks in text_file.rs and in a reapack.rs test, and a test's
std::io::{Read, Write} import that 1.99 reports as unused is dropped.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Pinning dtolnay/rust-toolchain to 1.99 installs a fresh toolchain with only the components listed. @stable had been borrowing rustfmt from the runner's preinstalled Rust, so cargo fmt --check failed in CI and would have failed release validation too. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Timtam
added a commit
to math65/rabbit
that referenced
this pull request
Oct 6, 2026
main split the UI crate into modules (Timtam#27) after this branch was made, so its changes to lib.rs and wx_app.rs are carried into the modules the code moved to: - The voiceover module is declared in the new lib.rs, and the two new strings join WizardText in wizard/model.rs and wizard/text.rs. - The Mac package list changes (the shared toggle, its state helper, the Space key handler and the model's new return type) go into wx_app/packages_page/dataview.rs. That module is gated as a whole, so the per-item cfg(not(target_os = "windows")) lines are dropped. A three-way comparison of every item (base, this branch, main, merged) found nothing lost on either side. dataview.rs only builds on macOS, so it was also type-checked on Windows by pointing the package page at it for the check: no errors. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Timtam
added a commit
to math65/rabbit
that referenced
this pull request
Oct 6, 2026
The module split (Timtam#27) gave dataview.rs its own imports, and six of them were never used there: two Enter key codes the Windows-side widgets use, and four functions the toggle code calls with crate:: paths or doesn't call at all. macOS builds only warned about them, but they hid any new warning in the file. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Timtam
added a commit
to math65/rabbit
that referenced
this pull request
Oct 6, 2026
main now has the UI crate split (Timtam#27) and Timtam#29 as merged there, so this branch's own changes to wx_app.rs are carried into the modules the code moved to: - The announce helper and its priority go into wx_app/globals.rs, made crate-visible because the progress page, the version check and the Mac package list all call it. - The announcements land in wx_app/progress_ui.rs, wx_app/version_check.rs and wx_app/packages_page/dataview.rs; the toggle's new return type drops the per-item cfg, as the whole module is macOS-only. - choice_shown_note moves next to its only caller in dataview.rs: in widgets.rs it was dead code on Windows, and it had been placed between set_optional_choice_shown and that function's doc comment. A three-way comparison of every item (base, this branch, main, merged) found nothing lost. dataview.rs was also type-checked on Windows by pointing the package page at it: no errors, no warnings. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Timtam
added a commit
to math65/rabbit
that referenced
this pull request
Oct 6, 2026
main split the UI crate into modules (Timtam#27) and gained the issue Timtam#32 check for an open REAPER in the Install handler since this branch was made: - The Install handler becomes the shared start_install closure as this branch intended. Timtam#32's REAPER check is its first statement, so Enter on the Review summary runs the same check as the button. - bind_review_enter_installs moves to wx_app/widgets.rs, next to bind_done_page_enter_closes it is modelled on, made crate-visible. - The CHANGELOG entry keeps its place among main's Fixed entries. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
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.
What changed
rabbit-ui-wxdragonwas two files:lib.rs(6114 lines) andwx_app.rs(6922 lines). Both are now split by topic. No behavior change: this is a move of code, not a rewrite.Wizard data layer (
lib.rstowizard/)lib.rsis now 17 lines and only declares the modules andrun_gui. The wizard logic moved intowizard.rsplus:model.rsbootstrap.rsWizardModeltext.rstarget.rspackages.rsconfiguration.rsrequest.rsWizardInstallRequestreview.rsinstall.rsself_update.rsoutcome.rssummary.rsSetupReportto done page textlabels.rsThe 2446-line test module became
wizard/tests/with one file per area and shared fixtures intests/support.rs. All 54 tests kept, all pass.wx shell (
wx_app.rstowx_app/)wx_app.rskeepsrunand the step constants (1079 lines). The rest moved to:globals.rsclose_guard.rsself_update_ui.rsprogress_ui.rsProgressEventto gauge, status line, logpackages_page.rspackages_page/native.rsTreeCtrlpagepackages_page/native_tree_checkboxes.rsTVS_CHECKBOXEShelperspackages_page/dataview.rsDataViewCtrlpagepages.rsbuild_*_pageandadd_pagesversion_check.rswidgets.rsWizardWidgetsplus the small readers, sync helpers, andupdate_navigationshell.rsThe two
can_launch_reaper_path/planned_reaper_launch_path_for_targettests moved with their code intowidgets.rs.How it was checked
#[allow(unused_imports)]on an import that no longer exists, and themod native_tree_checkboxeswrapper).cargo fmt --all --check,cargo clippy --workspace --all-targets,cargo clippy -p rabbit-ui-wxdragon --features gui --all-targets, andcargo test --workspaceare clean.cargo test -p rabbit-ui-wxdragon --features guiruns 56 tests, all pass.pub(crate), so the public API is stillrun_guiplus the wizard types.Not done
runinwx_app.rsis still about 1000 lines. Its event handler blocks each capture a dozenRc/Arcclones from the surrounding scope, so pulling them out means either 20 parameter functions or first bundling that state into a struct. That is a design change rather than a move, so it is left for a follow up.