Files
dev-updater/app/androidApp/src/main/kotlin/com/example
irisandClaude Opus 5 283b971186 Offer the rollback, and call it Downgrade
Picking an old commit from the phone detaches HEAD, so every rollback is
parked by construction -- and a parked checkout withheld the commit
comparison entirely. The card answered the move with "up to date" and
nothing to press, which left a rollback unfinishable from the phone.

The withholding was right for one direction only. A checkout parked past
what was built is somebody looking, and nagging about it is nagging about
a decision. A checkout parked *behind* it is somebody rolling back, and
there the point of the move is to get that commit built and installed.

So `git::is_ancestor` asks which of the two commits is the later one --
one extra process, and only where they already differ -- and
`Freshness::BuiltAhead` says the build is. It is stale like `Behind`, so
the card leaves "Up to date" and both Update buttons come alive;
`updateWord` then says Downgrade, at both scales and by one rule, the way
`buildWord` does. Nothing else about the press differs, which is what was
asked for. The row says "newer than the checkout" rather than "out of
date", which is the wrong direction.

Two things fell out of it. `UpdateButton` asks about the direction before
comparing file times, since what is on disk stays older than the phone's
copy right up until the press rebuilds it -- otherwise a card with a
rollback waiting says "Reinstall". And a project-wide Update now does the
build-and-install half alone when there is nothing to pull *from* -- a
parked checkout, a branch tracking nothing, or `gitPull` off -- rather
than failing on a pull it was never going to make, which is what a
downgrade press used to hit.

Verified end to end against a throwaway checkout driven through a scratch
server: `current` on the built commit, `builtAhead` once parked back on
the one before it.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01KuRzBWJuEGaWmMhDuX3X3p
2026-09-06 22:57:55 -04:00
..