Skip to content

ADFA-4898 (follow-up): in-flight controls for a running proot module install — confirmed cancel + stall hint - #494

Merged
luisguzman-adfa merged 6 commits into
mainfrom
feat/ADFA-4898-stall-cancel
Aug 28, 2026
Merged

ADFA-4898 (follow-up): in-flight controls for a running proot module install — confirmed cancel + stall hint#494
luisguzman-adfa merged 6 commits into
mainfrom
feat/ADFA-4898-stall-cancel

Conversation

@luisguzman-adfa

Copy link
Copy Markdown
Collaborator

The remaining in-flight controls of ADFA-4898 (which shipped failure surfacing + retry): cancel
a running module install, and a movement-based stall hint. Plus localization of the new strings.

P5 — confirmed cancel + immediate retry

Cancel a running module from its live card: a strong confirmation, then a clean kill of the
runrole (proot --kill-on-exit takes its container children), local_vars rolled back to
install/enabled: False so a half-installed module is never offered as installed, and the module
marked failed so the existing per-module Retry appears at once. Ordering mirrors
finishModuleQueue (InstallGuard cleared before postDone) so the pdsm-stopped server restarts; the
base system is untouched. Cancel reuses the host detail bar's secondary slot (Back stays primary).
revertModuleInLocalVars now writes explicit False (was delete-only), covering the graceful-failure
path too.

P4 — movement-based stall hint (surface only)

A running module with no runrole output and no write-directory growth for a generous window
(120s) surfaces a "seems stalled" hint on the live card, next to the Cancel/Retry escape. It
never auto-kills: the foreground service keeps running and the hint clears when movement resumes.
Heartbeat on each log line + a bounded, file-capped write-dir growth backstop for quiet network
phases (e.g. calibre-web's git clone). Published via a separate stalled LiveData kept out of the
immutable ModuleQueueState. The per-module write-dir map is best-effort and logs if a module is
unmapped, so the fallback is visible, not silent.

Strings / localization

The 5 new strings (P4 hint + P5 cancel-confirm dialog) live in strings.xml and are translated
across all 33 locales. The non-English translations are best-effort and should get a
native-speaker / translation-service review before release.

Not in scope

No pause/resume, no auto-kill-on-stall (the foreground service is the keep-alive guardian), no
byte-level resume inside the runrole (role-side).

Verification (device — OnePlus 7T, Android 15)

  • P5 — PASS (all): cancel stops the runrole, rolls local_vars to install/enabled: False, surfaces
    "Couldn't install" + Retry at once, base system intact (server restarts, marker cleared, no
    Recover), and Retry reinstalls cleanly to Installed.
  • P4 — PASS: never appears during a healthy install; appears after ~120s of no output and no
    write-dir growth (forced by freezing the runrole with SIGSTOP), never kills the install, and
    clears the moment movement resumes.

Known follow-up (separate, not this PR)

A pre-existing reliability issue in the post-install server restart / auto-hand-off to Library
(the index can hang on "sending you to your library" until a relaunch). Not caused by this change;
to be filed as its own bug (ADFA-4919 area, not ADFA-5330).

…or a running module install

The remaining in-flight controls of ADFA-4898 (which shipped failure surfacing + retry).

P5 — confirmed cancel + immediate retry: cancel a running module from its live card. A strong
confirmation, then a clean kill of the runrole (proot --kill-on-exit takes its container
children), local_vars rolled back to install/enabled: False so a half-installed module is never
offered as installed, and the module marked failed so the existing per-module Retry appears at
once. Ordering mirrors finishModuleQueue (InstallGuard cleared before postDone) so the
pdsm-stopped server restarts; the base system is untouched. Cancel reuses the host detail bar's
secondary slot (Back stays primary). revertModuleInLocalVars now writes explicit False (was
delete-only), covering the graceful-failure path too.

P4 — movement-based stall hint (surface only): a running module with no runrole output and no
write-directory growth for a generous window (120s, above Freshness.STALE_MS) shows a
"seems stalled" hint on the live card, next to the Cancel/Retry escape. It never auto-kills:
the foreground service keeps running and the hint clears when movement resumes or on a terminal.
Heartbeat stamped on each log line + a bounded, file-capped write-dir growth backstop for quiet
network phases (calibre-web's git clone); published via a separate stalled LiveData kept out of
the immutable ModuleQueueState.
- ModuleInstallFragment: rename the stalled-observer lambda param, which shadowed the
  onCreateView Bundle parameter `s`.
- SetupProgressActivity: qualify Intent as android.content.Intent in confirmCancelModule
  (the class was not imported).
…ranslate_yet.xml

The 5 new strings (P4 stall hint + P5 cancel-confirm dialog) move out of strings.xml into a
translatable="false" beta file, so the build stays clean (no MissingTranslation) until the 33
locales are translated. Move each back into strings.xml (dropping translatable="false") when
its translations land.
…w fondo)

The per-module write-dir map is a best-effort backstop and a silent drift point. Keep it
fail-safe (a wrong/missing path just falls back to the log heartbeat, never a false verdict)
but log the unmapped case at watch start, so a module added without a mapped dir is noticed in
logcat instead of silently losing its growth backstop. Comment updated (keep-in-sync + fail-safe).
Move the 5 new strings (P4 stall hint + P5 cancel-confirm dialog) out of the temporary
strings_beta_notranslate_yet.xml holding file into strings.xml (default English) and add
translations to every values-*/strings.xml, so the build is clean (no MissingTranslation) with
the strings fully localized.

The non-English translations are best-effort and should get a native-speaker / translation-service
review pass before release; the wording is easy to refine per locale since each lives in its own
values-*/strings.xml.
…/ADFA-4898-stall-cancel

# Conflicts:
#	controller/app/src/main/res/values-ar/strings.xml
#	controller/app/src/main/res/values-az/strings.xml
#	controller/app/src/main/res/values-bg/strings.xml
#	controller/app/src/main/res/values-bn/strings.xml
#	controller/app/src/main/res/values-cs/strings.xml
#	controller/app/src/main/res/values-de/strings.xml
#	controller/app/src/main/res/values-el/strings.xml
#	controller/app/src/main/res/values-es/strings.xml
#	controller/app/src/main/res/values-fa/strings.xml
#	controller/app/src/main/res/values-fr/strings.xml
#	controller/app/src/main/res/values-gu/strings.xml
#	controller/app/src/main/res/values-hi/strings.xml
#	controller/app/src/main/res/values-hu/strings.xml
#	controller/app/src/main/res/values-in/strings.xml
#	controller/app/src/main/res/values-it/strings.xml
#	controller/app/src/main/res/values-ja/strings.xml
#	controller/app/src/main/res/values-ko/strings.xml
#	controller/app/src/main/res/values-lt/strings.xml
#	controller/app/src/main/res/values-nl/strings.xml
#	controller/app/src/main/res/values-no/strings.xml
#	controller/app/src/main/res/values-pl/strings.xml
#	controller/app/src/main/res/values-pt/strings.xml
#	controller/app/src/main/res/values-ro/strings.xml
#	controller/app/src/main/res/values-ru-rRU/strings.xml
#	controller/app/src/main/res/values-sk/strings.xml
#	controller/app/src/main/res/values-sr/strings.xml
#	controller/app/src/main/res/values-sw/strings.xml
#	controller/app/src/main/res/values-ta/strings.xml
#	controller/app/src/main/res/values-tr/strings.xml
#	controller/app/src/main/res/values-uk/strings.xml
#	controller/app/src/main/res/values-vi/strings.xml
#	controller/app/src/main/res/values-yo/strings.xml
#	controller/app/src/main/res/values-zh-rCN/strings.xml
@luisguzman-adfa
luisguzman-adfa merged commit d3211ee into main Aug 28, 2026
3 checks passed
@luisguzman-adfa
luisguzman-adfa deleted the feat/ADFA-4898-stall-cancel branch August 28, 2026 19:23
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