feat(controller): live rootfs sizes via layered Clean Architecture pilot#6
Merged
Merged
Conversation
Replace the hardcoded OS rootfs sizes in InstallationPlanner with sizes fetched live from the Deploy server (latest_<tier>_<abi>.meta4), with a per-ABI hardcoded byte fallback for offline/error. Built as the reference Clean Architecture slice across domain/data/presentation under org.iiab.controller.rootfs, plus a shared util/ByteFormatter. - domain: Rootfs, RootfsTier, RootfsAbi, RootfsRepository (port) and GetRootfsSizeUseCase (validation + fallback rule). Pure JVM, no Android/net. - data: RootfsRemoteDataSource (parses meta4 <size>, in-memory cache), RootfsCatalog (URL convention + fallback bytes + ABI detection), RootfsRepositoryImpl (DTO -> entity, live-then-fallback). - presentation: RootfsViewModel + RootfsUiState + RootfsViewModelFactory. - seam: InstallationPlanner.resolveOsSizeGb() routes the OS size through the use case instead of the OS_*_GB constants (called on its existing worker). - build.gradle: add androidx.lifecycle viewmodel/livedata (Java, no Kotlin). - docs: CLAUDE.md layering guardrails + ROOTFS_SIZE_PILOT_ANALYSIS.md. - .gitattributes: normalize text files to LF. - tests: GetRootfsSizeUseCaseTest + ByteFormatterTest (8 JVM tests, green). Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
luisguzman-adfa
added a commit
to luisguzman-adfa/iiab-android
that referenced
this pull request
Jun 18, 2026
Continue the rootfs Clean Architecture slice (appdevforall#6). The install storage projection now resolves the OS size through the presentation layer, and the install screen handles the offline state. The radial gauge is left untouched. - DeployFragment observes RootfsViewModel and feeds the resolved OS size (live, with offline fallback) into the projection instead of going through InstallationPlanner.resolveOsSizeGb(). - Offline: disable the install button ("No connection") with a snackbar on tap, show an "Estimated sizes (offline)" caption when the size is a fallback, and skip the live fetch via a new attemptLive flag on GetRootfsSizeUseCase / RootfsViewModel (avoids the ~6s timeout). Addresses the connectivity-gating tech-debt item. - Add strings (en + es), a unit test (skipsLiveWhenOffline), and update CLAUDE.md (design map + new "Working in parallel" section) and controller/docs/TECH_DEBT_PLAN.md.
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.
Replace the hardcoded OS rootfs sizes in InstallationPlanner with sizes fetched live from the Deploy server (latest__.meta4), with a per-ABI hardcoded byte fallback for offline/error. Built as the reference Clean Architecture slice across domain/data/presentation under org.iiab.controller.rootfs, plus a shared util/ByteFormatter.