Skip to content

ADFA-5312: show a running proot module as installing, not "no system / Recover" - #483

Merged
luisguzman-adfa merged 5 commits into
mainfrom
fix/ADFA-5312-module-install-state
Aug 27, 2026
Merged

luisguzman-adfa merged 5 commits into
mainfrom
fix/ADFA-5312-module-install-state

Conversation

@luisguzman-adfa

Copy link
Copy Markdown
Collaborator

During a proot module runrole the system is deliberately stopped and the install
marker is held, so SystemStateEvaluator.isSystemInstalled() reads false. Home and
Module management branched on that before consulting the module queue, so a healthy
in-progress install was presented as an absent/damaged system and offered destructive
actions (Install a system / Recover / Retry) that start a competing operation over the
same rootfs the runrole holds.

Home (header + cards, LibraryHomeFragment) and Module management (ModuleHubFragment)
now consult ModuleQueueRepository.isRunning() before the no-system path: the header
shows "Installing", the cards keep their last-known state instead of "Not installed",
and Module management shows the installing module instead of "Install a system first"

  • Recover. ModuleHubFragment also re-probes on queue start/stop so the state stays live
    (it previously only re-probed on resume). The surfaces that already consult the queue
    (LibraryActivity, SetupProgressActivity) are unchanged.

The module notification's missing progress bar (report symptom #4) is a separate
follow-up, not in this change.

Verification (device): install a proot module (Kolibri/Calibre-Web) from Settings >
Module management, background the app, and confirm Home shows "Installing" (not "No
library / Couldn't start"), Module management shows the installing module (no Recover),
and app cards are not mislabeled "Not installed" — during the run and until it finishes.

…/ Recover"

During a proot module runrole the system is deliberately stopped and the
install marker is held, so SystemStateEvaluator.isSystemInstalled() reads
false. Home and Module management branched on that before consulting the
module queue, so a healthy in-progress install showed as an absent/damaged
system and offered destructive actions (Install a system / Recover / Retry)
over the same rootfs the runrole holds.

Now Home (header + cards) and Module management consult
ModuleQueueRepository.isRunning() before the no-system path: the header shows
"Installing", the cards keep their last-known state, and Module management
shows the installing module instead of "Install a system first / Recover".
Module management also re-probes on queue start/stop so the state stays live.
…ff isSystemInstalled()

Follow-up to the Home/Modules fix: instead of each UI screen re-deriving "is a
system installed" from SystemStateEvaluator.isSystemInstalled() plus an ad-hoc
set of running flags — the pattern that made a running proot module read as a
false "no system / Recover" — there is now one shared display verdict.

- system/domain/SystemVerdict: pure READY / INSTALLING / NO_SYSTEM / DAMAGED /
  CLONE_RECEIVING / CLONE_SHARING, unit-tested. Reuses InterruptedInstallDetector
  as the DAMAGED sub-oracle.
- SystemFactsReader.verdict(ctx): gathers the raw signals in the one reader.
- Home (header, cards, get-more, card sheet), Module management, Connect,
  Module detail and Clone-Send switch on the verdict — an install in progress
  shows installing/busy, never Recover/Install-a-system. Also fixes the same
  latent bug on Connect, Module detail, Clone and on backup/restore (deep op).
- Boot gate, server-start gate and the recovery dialog keep their strict checks
  untouched; the verdict is display-only. isSystemInstalled() gains a javadoc
  pointer to it.
…ff isSystemInstalled()

Follow-up to the narrow Home/Modules fix in this branch: instead of each UI
screen re-deriving "is a system installed" from
SystemStateEvaluator.isSystemInstalled() plus its own ad-hoc set of running
flags — the pattern that made a running proot module (server stopped, marker
held) read as a false "no system / Recover" — there is now one shared display
verdict that every screen switches on.

- system/domain/SystemVerdict: pure READY / INSTALLING / NO_SYSTEM / DAMAGED /
  CLONE_RECEIVING / CLONE_SHARING, unit-tested (SystemVerdictTest). Reuses
  InterruptedInstallDetector as the DAMAGED sub-oracle; DAMAGED is withheld
  until the server has been observed, so it never flashes pre-poll.
- system/data/SystemFactsReader.verdict(ctx): gathers the raw signals in the
  one reader (rootfs, marker, installer/module/deep-op running, clone flags,
  server up + known).
- Home (header, cards, get-more, card sheet), Module management, Connect,
  Module detail and Clone-Send now branch on the verdict — an install in
  progress shows installing/busy, never Recover/Install-a-system. This also
  fixes the same latent bug on Connect, Module detail, Clone and on a
  backup/restore (deep op), which the narrow fix did not reach.
- Home tells the two INSTALLING axes apart: a system op with the server down
  (verdict INSTALLING) now renders an amber "Installing — please wait"
  (H_INSTALLING_SYSTEM, new string k2go_home_installing_system, localized
  across all 33 locales), like the clone "wait" states, instead of the green
  "Adding content" that is meant for a content download over a live box.
- Boot gate, server-start gate and the recovery dialog keep their strict
  checks (isSystemInstalled / InterruptedInstallDetector) untouched — the
  verdict is display-only. isSystemInstalled() gains a javadoc pointer to it.

Clone-Send keeps isSystemInstalled() for send-readiness on purpose (a
clone-send holds no install marker), with the busy-vs-Recover split handled in
render.
updateHeaderFromCards and the card gate each computed SystemFactsReader.verdict()
independently within one refresh, so the header and the cards could answer from
two readings taken moments apart. Read it once (passVerdict, alongside
passContent/systemInstalled) and share it — the "once per decision" rule the file
already follows. Event handlers (Get more, card sheet) still read fresh on tap.
@luisguzman-adfa
luisguzman-adfa merged commit bb50c3f into main Aug 27, 2026
3 checks passed
@luisguzman-adfa
luisguzman-adfa deleted the fix/ADFA-5312-module-install-state branch August 27, 2026 10:27
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