Repository navigation
ADFA-5312: show a running proot module as installing, not "no system / Recover" - #483
Merged
Merged
Conversation
…/ 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.
…ADFA-5312-module-install-state
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.
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.
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"
(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.