Skip to content

ADFA-5339 feat(dashboard): the card's update-affordance rule and shared fetch - #518

Merged
luisguzman-adfa merged 1 commit into
mainfrom
feat/ADFA-5339-dashboard-update-ui
Sep 1, 2026
Merged

luisguzman-adfa merged 1 commit into
mainfrom
feat/ADFA-5339-dashboard-update-ui

Conversation

@luisguzman-adfa

Copy link
Copy Markdown
Collaborator

The pure rule that turns an update-check outcome into a card state — primary action (Update vs Rebuild), status pill, offline, version subtitle — plus the one place that fetches it (cache → live → offline). Both the module-hub row and the detail card will consume these instead of each re-implementing the logic, so the two surfaces can't drift. DashboardCardState is android-free and unit-tested (7 cases); DashboardCardStatus is the thin glue over the existing /update-check + UpdateStatusCache. No consumer yet — the UI wiring lands in the next commit.

ADFA-5339 feat(app): update-aware Dashboard card + cancel confirmation (Surfaces 1 & 5)

Wires both Dashboard-card surfaces to the shared rule/fetch. Surface 1: the primary action reads "Update" when a newer REST-core build exists and "Rebuild" when up to date (de-emphasized), on the module-hub row and the detail card; offline shows a "No connection" pill and no Update affordance; the version target rides in the subtitle ("REST core · v1.2.7 → v1.3.0"), not the button. The action is unchanged — it still routes through DashboardRebuild.confirmAndStart. Surface 5: the in-card Cancel and the notification's Cancel both confirm ("Stop the update?") before signalling the server; the notification can't host a dialog, so it routes through a transparent DashboardCancelConfirmActivity.

Device-verified over 1.2.12 (== main): both cards show Rebuild (up to date), offline shows No connection, and both Cancel paths raise the confirm dialog. UPDATE_AVAILABLE can't be shown on a box that is already on main; it's covered by the resolver's unit tests.

New strings live in values/strings_5339.xml, temporarily translatable="false" so the strict MissingTranslation lint passes while the 38-locale translations are pending; the l10n step migrates them into strings.xml and deletes that file.

…ed fetch

The pure rule that turns an update-check outcome into a card state — primary action (Update vs
Rebuild), status pill, offline, version subtitle — plus the one place that fetches it
(cache → live → offline). Both the module-hub row and the detail card will consume these instead of
each re-implementing the logic, so the two surfaces can't drift. DashboardCardState is android-free
and unit-tested (7 cases); DashboardCardStatus is the thin glue over the existing /update-check +
UpdateStatusCache. No consumer yet — the UI wiring lands in the next commit.

ADFA-5339 feat(app): update-aware Dashboard card + cancel confirmation (Surfaces 1 & 5)

Wires both Dashboard-card surfaces to the shared rule/fetch. Surface 1: the primary action reads
"Update" when a newer REST-core build exists and "Rebuild" when up to date (de-emphasized), on the
module-hub row and the detail card; offline shows a "No connection" pill and no Update affordance;
the version target rides in the subtitle ("REST core · v1.2.7 → v1.3.0"), not the button. The action
is unchanged — it still routes through DashboardRebuild.confirmAndStart. Surface 5: the in-card
Cancel and the notification's Cancel both confirm ("Stop the update?") before signalling the server;
the notification can't host a dialog, so it routes through a transparent
DashboardCancelConfirmActivity.

Device-verified over 1.2.12 (== main): both cards show Rebuild (up to date), offline shows No
connection, and both Cancel paths raise the confirm dialog. UPDATE_AVAILABLE can't be shown on a box
that is already on main; it's covered by the resolver's unit tests.

New strings live in values/strings_5339.xml, temporarily translatable="false" so the strict
MissingTranslation lint passes while the 38-locale translations are pending; the l10n step migrates
them into strings.xml and deletes that file.
@luisguzman-adfa
luisguzman-adfa merged commit c2cdcb1 into main Sep 1, 2026
3 checks passed
@luisguzman-adfa
luisguzman-adfa deleted the feat/ADFA-5339-dashboard-update-ui branch September 1, 2026 19:32
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