Skip to content

feat(resolver): ✨ add resolver trait definitions and module structure#17

Merged
justapithecus merged 1 commit intomainfrom
andrew/feat/resolver/traits
Feb 7, 2026
Merged

feat(resolver): ✨ add resolver trait definitions and module structure#17
justapithecus merged 1 commit intomainfrom
andrew/feat/resolver/traits

Conversation

@justapithecus
Copy link
Member

Summary

Introduce the v2 resolver abstraction module with trait definitions for three independent sub-interfaces that extract all platform-specific behavior into composable adapters. This is PR 1 of 4 in the resolver abstraction implementation.

Highlights

  • SessionResolver trait: focused_session() maps the windowing environment to clippy sessions
  • HotkeyProvider trait: register()/unregister() for global key binding lifecycle, returns HotkeyRegistration with an UnboundedReceiver<HotkeyEvent> channel
  • ClipboardProvider trait: read()/write() for system clipboard access (Send + Sync for async broker contexts)
  • ResolverError enum with Session, Hotkey, Clipboard variants
  • ResolverSet struct composes one adapter per sub-interface via Box<dyn Trait>
  • KeyBinding and HotkeyEvent types replace the X11-specific Action enum

Test plan

  • cargo test — all 227 tests pass (no new tests; trait-only PR)
  • cargo clippy --all-targets -- -Dwarnings — clean
  • cargo fmt --check — clean

🤖 Generated with Claude Code

Introduce the v2 resolver abstraction with three independent
sub-interfaces for platform-specific behavior:

- SessionResolver: focused session detection
- HotkeyProvider: global key binding registration and event delivery
- ClipboardProvider: system clipboard read/write

Also defines ResolverError, ResolverSet, KeyBinding, HotkeyEvent,
and HotkeyRegistration types. No implementations or consumers yet —
traits are wired in subsequent PRs.

See CONTRACT_RESOLVER.md.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@justapithecus justapithecus merged commit 3d6e359 into main Feb 7, 2026
4 checks passed
@justapithecus justapithecus deleted the andrew/feat/resolver/traits branch February 7, 2026 21:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant