Split launcher, hotkey and windows-layout into parse/plan/exec and platform modules#936
Open
multiplex55 wants to merge 3 commits intomodulesfrom
Open
Split launcher, hotkey and windows-layout into parse/plan/exec and platform modules#936multiplex55 wants to merge 3 commits intomodulesfrom
multiplex55 wants to merge 3 commits intomodulesfrom
Conversation
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.
Motivation
platformarea so platform calls are isolated and easier to mock.Description
src/launcher.rsinto three pieces:src/launcher/parse.rs(action classification andparse_action_kind),src/launcher/plan.rs(pureplan_action/LaunchPlan), andsrc/launcher/exec.rs(side-effectful execution,launch_actiondelegates toexecute_plan); updatedsrc/launcher.rsto re-export the new surface.src/hotkey.rsintosrc/hotkey/parse.rs(pureparse_hotkey,parse_key, parser tests) andsrc/hotkey/runtime.rs(listener,HotkeyTrigger/HotkeyListenerand runtime helpers), keepingsrc/hotkey.rsas a thin façade exporting the parse/runtime API.src/platform/windows_api.rsand addedpub mod platform;insrc/lib.rs, then re-exported platform helpers fromsrc/window_manager.rsso existing callers continue to work.src/windows_layout.rsinto a small façade plussrc/windows_layout/plan.rswith pure matching/score/selection logic (is_rule_match,match_score,restore_plan_select_bestand unit tests) andsrc/windows_layout/apply.rsfor applying plans (keeps runtime side effects).hotkey/parse.rs, launcher planning tests inlauncher/plan.rs, and layout rule scoring / best-candidate selection tests inwindows_layout/plan.rs.Testing
cargo fmtas part of the work (code formatting/fixups applied).cargo check --lib/ dependency build to validate the changes, but the full compile was not allowed to complete before handoff so a full build verification is not claimed.cargo testrun was interrupted during the session.Codex Task