feat(resolver): ✨ wire hotkey client to use resolver traits#19
Merged
justapithecus merged 1 commit intomainfrom Feb 7, 2026
Merged
feat(resolver): ✨ wire hotkey client to use resolver traits#19justapithecus merged 1 commit intomainfrom
justapithecus merged 1 commit intomainfrom
Conversation
8366784 to
80ebc65
Compare
Migrate the hotkey client from direct X11 calls to platform-agnostic resolver trait objects: - run() now accepts &dyn SessionResolver + &mut dyn HotkeyProvider - HotkeyProvider::register() replaces manual parse/grab/event-thread - SessionResolver::focused_session() replaces X11 + process tree walk - HotkeyEvent replaces internal Action enum; classify_event() removed - main.rs constructs X11Shared → X11SessionResolver + X11HotkeyProvider The hotkey client is now fully platform-agnostic. Platform knowledge lives entirely in the resolver adapter implementations. X11Context and related dead code annotated with #[allow(dead_code)] for cleanup in PR 4. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
a82f6c6 to
7439d21
Compare
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.
Summary
Migrate the hotkey client from direct X11 calls to platform-agnostic resolver trait objects. After this PR, the hotkey client has zero platform-specific code — all X11 knowledge lives in the resolver adapter implementations. This is PR 3 of 4 (the critical migration PR).
Highlights
hotkey::run()signature change: now accepts&dyn SessionResolver+&mut dyn HotkeyProviderinstead of callingX11ContextdirectlyHotkeyProvider::register()replaces manual parse_binding → grab_key → spawn_event_thread sequenceSessionResolver::focused_session()replacesget_active_window_pid()→resolve_session()pipelineHotkeyEventreplaces internalActionenum;classify_event()removed (classification moved into X11HotkeyProvider)main.rsconstructsX11Shared→X11SessionResolver+X11HotkeyProviderand passes tohotkey::run()#[allow(dead_code)]for cleanup in PR 4Test plan
cargo test— all 227 tests passcargo clippy --all-targets -- -Dwarnings— cleancargo fmt --check— cleanclippyctl hotkey --capture-key Super+Shift+C --paste-key Super+Shift+V --clipboard-key Super+Shift+X— all three hotkeys should behave identically to pre-migration🤖 Generated with Claude Code