From bb40c96f983654423889240793a99bedda58f73e Mon Sep 17 00:00:00 2001 From: Lumen Stage1 Date: Mon, 5 Oct 2026 10:44:47 -0500 Subject: [PATCH] status: READY state gains 'Check for updates' button wired to the sync flow (previously no way to pull a newer package once READY) --- src/ui/views/status/status.ts | 4 ++++ tests/unit/status.test.ts | 11 +++++++++++ 2 files changed, 15 insertions(+) diff --git a/src/ui/views/status/status.ts b/src/ui/views/status/status.ts index 4fee8dd..43f2d75 100644 --- a/src/ui/views/status/status.ts +++ b/src/ui/views/status/status.ts @@ -170,6 +170,10 @@ export function createStatusView( ); break; case "READY": + // READY must still be able to pull a newer published package; + // onGetData runs the sync flow ("You already have the latest" + // when there is nothing new). + buttons.append(actionButton("Check for updates", actions.onGetData)); break; } buttons.append(actionButton("Check my data", actions.onCheckData)); diff --git a/tests/unit/status.test.ts b/tests/unit/status.test.ts index 6a5ecdf..5331083 100644 --- a/tests/unit/status.test.ts +++ b/tests/unit/status.test.ts @@ -72,6 +72,17 @@ describe("Status view", () => { expect(view.querySelectorAll(".status-check--ok")).toHaveLength(2); }); + it("READY offers Check for updates wired to the sync flow", () => { + const a = actions(); + const view = createStatusView(report(), a); + const btn = [...view.querySelectorAll("button")].find( + (b) => b.textContent === "Check for updates", + ); + expect(btn).toBeTruthy(); + btn?.dispatchEvent(new MouseEvent("click")); + expect(a.onGetData).toHaveBeenCalledTimes(1); + }); + it("PARTIAL enumerates missing and offers Continue setup", () => { const a = actions(); const view = createStatusView(