chore: simplify keyboard input action execution#1650
Conversation
Move press, key-down, and key-up workflows into a stateless executor so the keyboard use case retains only validation, setup, logging, and dispatch. Preserve input update ordering, timeout escalation, and cleanup behavior.
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Pro Run ID: ⛔ Files ignored due to path filters (1)
📒 Files selected for processing (3)
📝 WalkthroughWalkthroughKeyboard input simulation logic for Press, KeyDown, and KeyUp actions is extracted from ChangesKeyboard Input Action Executor Extraction
Estimated code review effort: 3 (Moderate) | ~25 minutes Sequence Diagram(s)sequenceDiagram
participant UseCase as SimulateKeyboardUseCase
participant Executor as KeyboardInputActionExecutor
participant InputSystem
UseCase->>Executor: ExecutePress/ExecuteKeyDown/ExecuteKeyUp(Keyboard, Key, ct)
Executor->>Executor: validate key state and duration
Executor->>InputSystem: register transient key/overlay state
Executor->>InputSystem: subscribe onAfterUpdate
InputSystem-->>Executor: wasPressedThisFrame edge observed
Executor->>Executor: wait for observation/timeout window
Executor->>Executor: cleanup (unregister, rollback, timeout scheduling)
Executor-->>UseCase: SimulateKeyboardResponse
Possibly related PRs
🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Refs: Refactor round 3 ToDo R3-2
Summary
User Impact
Changes
Verification