refactor: consolidate per-stage GUI files into src/gui/stages/#199
Merged
refactor: consolidate per-stage GUI files into src/gui/stages/#199
Conversation
Each stage's config, message, apply logic, and view function are now co-located in a single file instead of scattered across 3 directories. Old import paths preserved via re-exports in gui/config and gui/messages.
Import directly from gui::stages instead. Deletes the now-empty gui/config/ directory and gui/messages/stage.rs.
Contributor
There was a problem hiding this comment.
Pull request overview
This PR refactors the GUI stage implementation by consolidating each stage’s config, message, apply/update logic, and view into a single co-located module under src/gui/stages/, while preserving existing public import paths via re-exports from gui/config and gui/messages.
Changes:
- Introduces
gui::stagesas the new home for per-stage*Configand*Messagetypes, plus stageviewfunctions. - Centralizes stage orchestration (
StageType,StageConfig,StageMessage, runtime construction, apply, and stage view dispatch) insrc/gui/stages/mod.rs. - Maintains backward compatibility by re-exporting from
src/gui/config/mod.rsandsrc/gui/messages/stage.rs, and simplifies the stage list UI by usingStageConfig::view().
Reviewed changes
Copilot reviewed 23 out of 23 changed files in this pull request and generated no comments.
Show a summary per file
| File | Description |
|---|---|
| src/gui/stages/mod.rs | New central module defining StageType, StageMessage, StageConfig and dispatch (to_runtime, apply, view). |
| src/gui/stages/filter.rs | Moves Filter stage config/message/apply/view into one file. |
| src/gui/stages/preamp.rs | Moves Preamp stage config/message/apply/view into one file. |
| src/gui/stages/compressor.rs | Moves Compressor stage config/message/apply/view into one file. |
| src/gui/stages/tonestack.rs | Moves ToneStack stage config/message/apply/view into one file. |
| src/gui/stages/poweramp.rs | Moves PowerAmp stage config/message/apply/view into one file. |
| src/gui/stages/level.rs | Moves Level stage config/message/apply/view into one file. |
| src/gui/stages/noise_gate.rs | Moves NoiseGate stage config/message/apply/view into one file. |
| src/gui/stages/multiband_saturator.rs | Moves MultibandSaturator stage config/message/apply/view into one file. |
| src/gui/mod.rs | Exposes the new stages module from gui. |
| src/gui/messages/stage.rs | Preserves old message import paths by re-exporting stage message types from gui::stages. |
| src/gui/config/mod.rs | Preserves old config import paths by re-exporting stage config/types from gui::stages. |
| src/gui/components/stage_list.rs | Simplifies stage rendering to stage.view(...) instead of matching each variant. |
| src/gui/components/mod.rs | Removes the old components::stages module from exports. |
| src/gui/components/stages/mod.rs | Removes the old stage view module listing (now superseded by gui::stages). |
| src/gui/config/*.rs | Removes per-stage config files that were migrated into src/gui/stages/*.rs. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
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.
Each stage's config, message, apply logic, and view function are now co-located in a single file instead of scattered across 3 directories. Old import paths preserved via re-exports in gui/config and gui/messages.