Skip to content

Phase 12 - Refactoring: App promotion to Actor#188

Draft
lorenzoberts wants to merge 6 commits into
lorenzo/actor-refactor-phase-11from
lorenzo/actor-refactor-phase-12
Draft

Phase 12 - Refactoring: App promotion to Actor#188
lorenzoberts wants to merge 6 commits into
lorenzo/actor-refactor-phase-11from
lorenzo/actor-refactor-phase-12

Conversation

@lorenzoberts

Copy link
Copy Markdown
Collaborator

No description provided.

This commit introduces the application actor protocol without changing
runtime behavior. AppMessage defines the control and query messages for the
upcoming AppActor, AppTransition models frame-cycle outcomes, and AppError
gains variants for UI, input, and dependency failures at the actor boundary.

This commit is part of the architecture's refactoring phase 12.

Signed-off-by: lorenzoberts <lorenzobs@usp.br>
This commit wraps the existing event loop in an AppActor and AppHandle without
changing application behavior. main now spawns the actor and awaits
run_until_done, establishing the actor lifecycle entry point while run logic
still flows through the transitional handler path.

This commit is part of the architecture's refactoring phase 12.

Signed-off-by: lorenzoberts <lorenzobs@usp.br>
This commit relocates screen-handling and loading logic under the app
boundary and inlines the former run_app loop inside AppActor. The handler
module is removed so application orchestration lives entirely within the app
crate, with per-screen flows dispatched from the actor's input path.

This commit is part of the architecture's refactoring phase 12.

Signed-off-by: lorenzoberts <lorenzobs@usp.br>
This commit adds the mpsc control path between AppHandle and AppActor. The
handle exposes shutdown, get_view_model, and get_input_context over the
message protocol while input events continue through the existing subscriber
channel, separating control queries from the hot input loop.

This commit is part of the architecture's refactoring phase 12.

Signed-off-by: lorenzoberts <lorenzobs@usp.br>
This commit makes startup validation an AppActor concern. External dependency
checks run at the beginning of the actor loop and surface failures as AppError
through run_until_done, removing the ad hoc validation path from main.
AppHandle::initialize remains available over the message protocol for explicit
queries.

This commit is part of the architecture's refactoring phase 12.

Signed-off-by: lorenzoberts <lorenzobs@usp.br>
This commit adds structured tracing across AppActor lifecycle, message
handling, and I/O-heavy flow branches without changing behavior. Actor start,
stop, initialization failures, and per-screen dispatch are observable through
the tracing subscriber.

This commit completes the architecture's refactoring phase 12.

Signed-off-by: lorenzoberts <lorenzobs@usp.br>
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