Skip to content

refactor(deploy): extract Planner into PlannerController [ADFA-4434]#48

Merged
luisguzman-adfa merged 1 commit into
mainfrom
refactor/ADFA-4434-deployfragment-planner
Jun 24, 2026
Merged

refactor(deploy): extract Planner into PlannerController [ADFA-4434]#48
luisguzman-adfa merged 1 commit into
mainfrom
refactor/ADFA-4434-deployfragment-planner

Conversation

@luisguzman-adfa

Copy link
Copy Markdown
Collaborator

ADFA-4434 (PR 1 of 2) · Epic ADFA-1028. Strangler-fig, no behaviour change.

Decomposes the DeployFragment god class toward re-enabling the Fragment lint detectors disabled in #36.

What

  • New install/presentation/PlannerController (non-Fragment): tier selection, the module checkbox grid, the storage-size projection (RootfsViewModel + the LiveData observe()), and the Kiwix settings dialog. ~407 LOC moved off the Fragment — including the observe() the detector walks.
  • New install/presentation/PlannerHost: the seam the Fragment implements. "What to install" state (selectedTier, module checkboxes, kiwix overrides, isStorageSafe) stays in the Fragment via the host; updateDynamicButtons and the install-action are untouched. The controller owns only rootfsViewModel.
  • DeployFragment delegates via plannerController.bind(...) + createModulesGrid(). 2441 → 2052 LOC.

Scope

Lint detectors stay disabled (install-action still in the Fragment; that's PR 2 → InstallController). Follows the backup carve (#43).

Not in scope

Unrelated module-install regression seen on device (Ansible: /dev/shm → install ends in ~5s, falsely marked installed) is a pre-existing bug in the install execution (not touched here); tracked separately.

PR 1 of ADFA-4434 (decompose DeployFragment; epic ADFA-1028). Strangler-fig,
no behaviour change.

- New install/presentation/PlannerController (non-Fragment): tier selection,
  module checkbox grid, storage-size projection (RootfsViewModel + the LiveData
  observe()), and the Kiwix settings dialog. Moves ~407 LOC off the Fragment,
  incl. the observe() the lint detector walks.
- New install/presentation/PlannerHost: seam the Fragment implements. 'What to
  install' state (selectedTier, module checkboxes, kiwix overrides, isStorageSafe)
  stays in the Fragment via the host; updateDynamicButtons + install-action are
  untouched. Controller owns only rootfsViewModel.
- DeployFragment delegates via plannerController.bind(...) + createModulesGrid();
  3032 -> 2052 LOC (after the earlier backup carve, 2441 -> 2052 here).
- Lint detectors stay disabled (install-action still in the Fragment).

Verified: brace/paren balance, no dangling refs, no unprefixed Fragment calls,
import scan clean. NOT yet built locally.
@luisguzman-adfa luisguzman-adfa merged commit 4523383 into main Jun 24, 2026
1 check passed
@luisguzman-adfa luisguzman-adfa deleted the refactor/ADFA-4434-deployfragment-planner branch June 24, 2026 23:03
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