Phase 8 - Refactoring: Terminal and Input actor setup #184
Draft
lorenzoberts wants to merge 9 commits into
Draft
Phase 8 - Refactoring: Terminal and Input actor setup #184lorenzoberts wants to merge 9 commits into
lorenzoberts wants to merge 9 commits into
Conversation
This commit introduces the initial input protocol types for the Phase 8 refactor. It defines raw terminal events, semantic input events, input context, key binding timing, and a mapper that translates terminal input into application intent while preserving current screen-specific bindings. It also adds mapper coverage for popup handling, edit mode, function keys, release filtering, resize and tick events, details modifiers, and the gg chord. This commit is part of the architecture's refactoring phase 8. Signed-off-by: lorenzoberts <lorenzobs@usp.br>
This commit moves crossterm event reading behind the input protocol boundary. The new terminal event source converts raw crossterm events into TerminalEvent values, filters key release events, and preserves key state so the existing handler flow can continue to receive KeyEvent during the transition. It also adds coverage for key conversion, release filtering, resize events, and ignored terminal events. This commit is part of the architecture's refactoring phase 8. Signed-off-by: lorenzoberts <lorenzobs@usp.br>
This commit moves the lazy screen update logic out of the handler loop and into App::process_system_updates. The main loop still preserves the existing input dispatch behavior, but non-input updates such as initial mailing list loading, latest patchset loading, and empty bookmark fallback now live behind an App boundary. It also adds App::input_context as the state projection that will feed the input mapper once the remaining handlers consume semantic InputEvent values. This commit is part of the architecture's refactoring phase 8. Signed-off-by: lorenzoberts <lorenzobs@usp.br>
This commit updates the popup input boundary to consume semantic InputEvent values instead of raw crossterm KeyEvent values. Help, info, and review trailer popups now handle navigation through the shared input protocol while preserving the existing popup scroll behavior. It also adds a temporary raw-key bridge in the handler loop so popup input can move to InputEvent before the screen handlers are migrated. This commit is part of the architecture's refactoring phase 8. Signed-off-by: lorenzoberts <lorenzobs@usp.br>
This commit updates the mailing list, bookmarked patchsets, and edit config handlers to consume semantic InputEvent values instead of raw crossterm KeyEvent values. The existing handler loop now uses the input mapper for these screens while preserving the current behavior and leaving the more complex latest and details screens on the temporary raw-key path. This commit is part of the architecture's refactoring phase 8. Signed-off-by: lorenzoberts <lorenzobs@usp.br>
This commit updates the latest patchsets handler to consume semantic InputEvent values instead of raw crossterm KeyEvent values. The handler loop now routes the latest screen through the input mapper while preserving existing navigation, pagination, loading, and patchset error handling behavior. This commit is part of the architecture's refactoring phase 8. Signed-off-by: lorenzoberts <lorenzobs@usp.br>
This commit updates the patchset details handler to consume semantic InputEvent values instead of raw crossterm KeyEvent values. Details-specific input such as preview scrolling, panning, toggles, modifiers, review trailers, and action consolidation now flows through the shared input protocol. It also removes the nested gg key polling from the handler, relying on the stateful input mapper instead, and moves the post-user-IO Enter wait behind the terminal event source boundary. This commit is part of the architecture's refactoring phase 8. Signed-off-by: lorenzoberts <lorenzobs@usp.br>
This commit updates the main handler loop to translate TerminalEvent values into semantic InputEvent values before dispatching to popups or screen handlers. The old raw-key bridge is removed, so run_app now uses the input context and mapper as the single path between terminal events and application input handling. It also removes the temporary KeyEvent reconstruction helper from KeyInput now that handlers no longer consume raw crossterm input. This commit is part of the architecture's refactoring phase 8. Signed-off-by: lorenzoberts <lorenzobs@usp.br>
This commit removes transitional input helpers that are no longer needed after the main loop was wired through InputEvent. Test-only constructors are limited to test builds, KeyInput no longer preserves unused crossterm key state, and the input module now documents the actor-free protocol boundary introduced in Phase 8. It also adjusts App::input_context to satisfy the repository clippy rules. This commit completes the architecture's refactoring phase 8. Signed-off-by: lorenzoberts <lorenzobs@usp.br>
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.
No description provided.