Files
dev-updater/app/androidApp
irisandClaude Opus 5 af605211e2 Pull, Update, Remove -- and a card that says when its build is behind
Iris's call: three buttons on a project's row, where Pull takes the
commits and stops and Update goes the whole way -- pull, build what that
brought in, install every APK it produced. Splitting them is the same
reasoning that stopped a checkout building: bringing a checkout up to
date is cheap and something you do while looking, and the expensive half
belongs to the button that says it does it.

Update is composed from the two things the app already does rather than
given a route of its own, so each half reports where it already did. It
skips a component whose build just failed, and hands the installer one
APK at a time: an install intent is modal, so two fired together means
the second replaces the first and a component is silently never
installed. The rest wait in ComponentState.ReadyToInstall, offered again
by continuePendingInstalls -- the same machinery as a download waiting
for a wrongly-signed copy to be removed. Deriving "is the installer
free?" from the component states could not work, because handing a file
over clears the state it would have read; caught by pressing Update on a
project that builds two APKs.

The project-wide Rebuild goes with it, and ProjectState collapses to one
Working(what, status): Pull, Update and moving the checkout differ in
nothing but the label, and the old one said "Pulling and building" for
all three.

Then the two things behind "nothing was flagged as out of date, and Pull
is disabled" after switching ai-app onto another branch:

  - hasWorkWaiting is now one predicate for both the "Up to date" heading
    and whether Update can be pressed, and it counts a component whose
    build no longer matches the checkout. Without that a branch switch
    left the card filed under "Up to date" with only a small note in one
    component's row.

  - A moved checkout re-asks its remote (RemoteChecks::recheck, on top of
    a new Checks::forget). The cached answer was about the branch just
    left and was reported with checkPending false, so a branch one commit
    behind its upstream read as one with nothing to pull. Measured: git
    said [behind 1] while the card said newCommits false.

A component's install button says Install rather than Build where nothing
is built yet, since the button beside it now says Build.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
2026-09-02 20:56:44 -04:00
..