Skip to content

K2GO-434 refactor(setup): rebuild view-state + pipeline-loop controller (slices 5, 3b) - #602

Merged
luisguzman-adfa merged 2 commits into
mainfrom
refactor/K2GO-434-carveouts
Oct 1, 2026
Merged

luisguzman-adfa merged 2 commits into
mainfrom
refactor/K2GO-434-carveouts

Conversation

@luisguzman-adfa

Copy link
Copy Markdown
Collaborator

Extract two more SetupProgressActivity concerns into their own units.

  • Slice 5: RebuildUiState (pure domain) : the dashboard-rebuild
    phase/controls decision, replacing the inline logic in renderRebuild().
  • Slice 3b: SetupProgressController (Activity-scoped) : holds the
    provisioning-loop (readyPoll + orchestrateStep) and its latches; the
    Activity now resumes/pauses/kicks it and reads state via getters.

Behavior-preserving. 35 JVM domain tests green. Slice 3b device-smoked
on a OnePlus (OnePlus7T, Android 15): the "Finishing setup" screen
renders and drives a real ZIM download without crashing.

… a pure rule

Move the rebuild state -> view decision (phase + bottom-controls mode) out
of renderRebuild() into setup/domain/RebuildUiState (semantic enums, pure
JVM, unit-tested). renderRebuild() maps the phase to the row, status line
and controls, and keeps the st.message override. No behavior change.
… controller

Move the readyPoll loop + orchestrateStep + the pipeline latch state out of
SetupProgressActivity into SetupProgressController (Activity-scoped, driven
through a narrow Host); render() and the *InSession/prootActive predicates
read the latches back through getters. Behavior-preserving.
@luisguzman-adfa
luisguzman-adfa merged commit 8dd7c49 into main Oct 1, 2026
3 checks passed
@luisguzman-adfa
luisguzman-adfa deleted the refactor/K2GO-434-carveouts branch October 1, 2026 01:01
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