Repository navigation
fix(ui): tell checking for updates apart from updating - #147724
Conversation
|
🦞👀 Pull request received. I will update this pull request when review starts. ClawSweeper review completeClawSweeper finished reviewing this revision. The review result is being finalized. |
|
Codex review: needs maintainer review before merge. Reviewed September 14, 2026, 1:03 PM ET / 17:03 UTC (Revision 3). ClawSweeper reviewWhat this changesThe Control UI distinguishes update checks from installation progress, shows check failures as warnings, and preserves recorded outcomes and previously known updates. Merge readiness✅ Ready for maintainer review The fix remains necessary on current main. Both previous review findings are resolved, and no new blocking defect was found. The inspected before/after screenshots support the changed UI behavior. Priority: P2 Review scores
Verification
How this fits togetherSettings → Updates receives availability, campaign, and installation status from the Gateway through the application overlay controller. That controller feeds the settings page and shared update dialog while retaining authoritative update outcomes. flowchart TD
A[Gateway status and events] --> B[Update overlay controller]
B --> C[Check progress and warnings]
B --> D[Recorded update outcome]
C --> E[Settings Updates page]
D --> E
C --> F[Shared update dialog]
D --> F
Before mergeNone. Agent review detailsSecurityNone. PR surfaceSource +81, Tests +273. Total +354 across 16 files. View PR surface stats
Review metrics
Root-cause clusterRelationship: Members:
Proposal only: this assessment does not dispatch repair, suppress jobs, mutate sibling items, close, or merge anything. Technical reviewBest possible solution: Keep checking feedback separate within the existing overlay owner while preserving update outcomes, known availability, and shared action interlocks. Do we have a high-confidence way to reproduce the issue? Yes: current main visibly maps a pending status check to installation-busy presentation, and the supplied before/after browser captures demonstrate the distinction. This review did not execute a reproduction. Is this the best way to solve the issue? Yes: the patch uses the existing overlay and confirmation owners, preserves their interlocks, and fixes both previously identified test-contract mismatches without changing updater or persisted-state contracts. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning medium; reviewed against cb5c760d943e. LabelsLabel changes:
Label justifications:
EvidenceWhat I checked:
Likely related people:
Rating scale
Overall follows the weaker of proof and patch quality. Workflow
HistoryReview history (2 earlier review cycles)
|
c4c902e to
2a3cbba
Compare
512fc47 to
a933acd
Compare
|
Merged via squash.
|
* fix(ui): tell checking for updates apart from updating * fix(ui): preserve diverged checkout updates after check errors * test(ui): align update status mock with boolean result * test(ui): align stale update refresh proof with checking state
Closes #147503
What Problem This Solves
Opening Settings → Updates said “Updating…” while only checking for an update. A failed check was labeled as an update failure and offered recovery for an installation that never started.
User Impact
The page now says “Checking for updates…” while checking. “Update now” keeps its label and is disabled with an explanatory tooltip. A failed check shows a warning with its reason and offers “Check for updates” again; a previously known update remains available to install.
Why This Change Was Made
The view now receives checking separately from update execution. Check failures have their own banner, so they cannot replace a recorded update result or create a false update attempt. Existing update, restart, configuration, hold, retry, and reporting interlocks remain in place. A failed recheck keeps the actual failure visible even without a run record, reaches the update dialog that initiated it, and preserves a confirmed Git checkout update.
Evidence
Final head
5440e34bd0e39d48d9cfbc77b464214961168a52retains the production code from the full-suite and screenshot evidence below. The final test-only follow-ups align the status-refresh mock with its boolean result and update the existing stale-Git-refresh browser proof to expect the checking state while its response is deferred.Fresh regression proof: the same Dev checkout (1 local commit, 3 remote commits, checks disabled, no advertised target) and rejected status request on
5117090024855196bc525962bd10abfbaa902072and repaired head2a3cbbaf365e0d3ce08134c4d4ef3e34fa5d886e. The warning remains visible; Update now changes from disabled to enabled. Both captures were inspected, use synthetic data, and show the real route at 1440 × 1300 in dark English.Earlier evidence for the checking/copy changes follows. These captures predate the diverged-checkout repair.
The real
/settings/updatesroute was captured in Chromium at 1440 × 1300, dark theme, English, with identical synthetic Gateway data. Before is parentbe0494ea666d2267c7814dc2e7f9b86e88144776. Pending responses were held; timeout captures use the actual 5,000 ms request timeout. Each image was inspected. The resolved-availability control images are byte-identical.The recovery pairs use actual dialog actions with the same synthetic responses on the parent and candidate: a failed update without a run record followed by a status timeout, and a retained running report followed by a timeout from the dialog’s “Check status” action.
Validation of the repaired candidate:
node scripts/run-vitest.mjs run --config ui/vitest.config.ts ui/src/pages/config ui/src/app— 154 files, 2,547 tests passed on2a3cbbaf365e0d3ce08134c4d4ef3e34fa5d886e, including the configuration browser tests.node scripts/check-changed.mjs -- <all 15 PR files>on512fc47af0cb081bb6d0cc047e3f713ccce689f1— passed, exit 0: core/UI types, i18n, guards, dead exports, formatting, and lint. No baseline or generated translation changes.512fc47af0cb081bb6d0cc047e3f713ccce689f1— 3 files, 113 tests passed: Updates renderer, routed configuration page, and update confirmation runtime. This head only aligns a test mock with the boolean status-refresh result introduced on main; its production code matches the full-suite and screenshot head above.node scripts/check-changed.mjs -- ui/src/e2e/update-stale-git-refresh-proof.e2e.test.ts— passed, exit 0, including the UI E2E type graph, guards, formatting, dead exports, and lint. Combined with the unchanged 15-file validation above, this covers all 16 PR files.oxfmton all repair files andgit diff --check— passed.behindanddivergedcommits keep Update now enabled; unknown availability keeps it disabled with the explanatory title. Manual retry blocks actions while pending, clears the warning on success, and restores availability. These checks sent noupdate.runrequest.5440e34bd0e39d48d9cfbc77b464214961168a52. All effective checks completed successfully; superseded contexts were accounted for. No CI rerun was needed.Consumer coverage (source trace plus the application/configuration suite unless stated otherwise):
createApplicationUpdateOverlays→ConfigPageandcreateUpdateProgressWatcher: status errors retain availability, schedule, run, and actual failure. Success, context reset, and a new update request clear the separate check warning. Request/connection/admin fencing remains intact.ConfigPage.isUpdateBusy→renderUpdates: only execution/reconciliation drives “Updating…”.isCuratedConfigMutationDisabled,sessionObserverBusy, andConfigProps.updatingexplicitly retainupdateStatusRefreshing. This preserves policy, meeting capture, session storage, memory, Talk, security, generic configuration (view/session-sources), and observer (view-appearance-preferences) locks.renderUpdates: primary update, Hold 1 h, Check status, Retry update, and Report update failure retain their checking interlocks. Check-failure retry uses the same refresher. Known package targets and Gitbehind/divergedcommits remain actionable after a failed check; unknown availability stays disabled with an explanatory title.app-shell-viewandsidebar-issue-item→sidebar-update-card: their existing running/reconciliation busy projections and confirmation flow remain unchanged.sidebar-attention-updateandsidebar-menus-renderretain the existing sharedisUpdateActionablepolicy. The Settings Apply/save-indicator projection also remains unchanged.app-shell-view→app-sidebar-base→app-sidebar-render→sidebar-attention→sidebar-attention-panel.runtime→sidebar-issue-item→sidebar-update-card→confirmAndStartUpdateRuntime. Settings uses the same watcher directly. Both dialog entry modes retain real run/admission failures while showing check errors and clearing them after recovery.settings-sidebarreceivesupdateBusyandwatchUpdateProgressbut currently does not read either prop.navigation-surfaceforwards them to its floating card, whose current visibility requires UI refresh and uses the reload action. These inactive paths were checked by source.custodian-alert-cardretains a dormanttarget.kind === "update"call to confirmation, watcher, and status refresh. Current producers inupdate-triage.runtimeandsidebar-attention-itemsemit navigation to Updates or Model Providers; the alert store does not hydrate external update actions. The former producer was removed by @vyctorbrzezowski in improve(ui): unify sidebar footer and issues panel #125070. Source/history checked; no active Custodian update flow is claimed or introduced.chat.updating: Settings now usesupdates.page.updating; the remaining shared dialog use represents an actual update request. Warning color is scoped to the failed-check status row.Risk and coverage
The main risk is confusing an in-flight or failed read with an update outcome. Renderer state tests, the routed initial-check/timeout/retry flow, retained-run and admission-failure tests, Git checkout availability (including
divergedwith retained remote commits), and the application suite cover that boundary. Warning text color is scoped only to the new check-failure state. No updater, service, protocol, configuration, or stored-state contract changes.No live installation or Gateway restart was performed. Browser evidence uses the mock Gateway and synthetic data. Foreign translations follow the existing post-merge localization workflow. Exact-head CI and native landing gates passed. Merged as
66d697c958dffd64f53706eab78c24db9b6271e0.