Phase 11 - Refactoring: UI Actor creation#187
Draft
lorenzoberts wants to merge 6 commits into
Draft
Conversation
This commit introduces the paint-ready data model for the UI actor boundary. UiScene and its per-screen scene types describe what the terminal painter needs for one frame, without embedding Ratatui or application state. UiError and UiTheme complete the actor scaffold alongside the existing terminal and input protocols. This commit is part of the architecture's refactoring phase 11. Signed-off-by: lorenzoberts <lorenzobs@usp.br>
This commit moves popup state and scroll bounds into an owned AppPopup enum in the application layer, replacing the self-rendering PopUp trait object in AppState. The UI layer now paints popups by matching on AppPopup variants instead of dispatching through dynamic objects, keeping popup data on the app side of the UI boundary. This commit is part of the architecture's refactoring phase 11. Signed-off-by: lorenzoberts <lorenzobs@usp.br>
This commit replaces the thin AppState reference wrapper with an owned AppViewModel that carries a per-screen ScreenViewModel discriminant and an optional PopupViewModel. Projection from AppState is centralized so UI modules receive only the data their screen needs, and cross-cutting display values are pre-computed before rendering. This commit is part of the architecture's refactoring phase 11. Signed-off-by: lorenzoberts <lorenzobs@usp.br>
…subdirectory This commit splits UI presentation into composition and painting. UiCore turns an AppViewModel into a UiScene; the painter maps that scene onto a Ratatui frame without making layout or widget decisions. Screen modules move under ui/screens/, each exposing scene building and paint entry points, so the two-stage ViewModel → Scene → terminal draw pipeline is explicit in the module structure. This commit is part of the architecture's refactoring phase 11. Signed-off-by: lorenzoberts <lorenzobs@usp.br>
…Snapshot to UiScene This commit narrows the terminal actor boundary to drawing pre-composed UI scenes. TerminalFrame::Main now carries a UiScene instead of an application render snapshot, and the terminal session paints directly through the UI painter. AppRenderSnapshot and the inline draw path inside the terminal layer are removed so scene composition stays entirely on the UI side. This commit is part of the architecture's refactoring phase 11. Signed-off-by: lorenzoberts <lorenzobs@usp.br>
This commit promotes the UI layer to a dedicated actor with UiMessage, UiHandle, and a BuildScene request path. run_app now projects application state into a view model and asks the UI actor to build each frame's scene before handing it to the terminal actor, matching the spawn-and-shutdown lifecycle already used by the terminal and input actors. This commit completes the architecture's refactoring phase 11. 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.