feat(updater): drop manual Check from Overview + Improvements tabs too

Consistency pass across the App Center Overview area: no tab has a top-level
manual "Check" button anymore — scans are automatic.

- Overview tab: remove the header "Check now"; the hero already reports last-scan
  time, and the unscanned sub-copy no longer points at a button that's gone.
- Improvements tab: remove the header "Check"; lead its body with the same
  auto-check line (right-side Check-now nudge) as the Updates tab.
- Remove the now-unused checkBtn helper.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
librelad 2026-07-18 23:22:22 +01:00
parent 6b93554040
commit 71e1defa5f

View File

@ -177,11 +177,12 @@ class OverviewManager {
// extra inset — same rhythm as the Backups/Migrate sub-tab strips) — so
// the renderers below only ever produce the body (never a heading or its
// action buttons).
const checkBtn = (label) => `<button class="updater-btn" data-updater-action="check">↻ ${label}</button>`;
const body = (html) => `<div class="ov-tab-body">${html}</div>`;
switch (id) {
case 'overview':
pane.innerHTML = this.renderHeader(id, checkBtn('Check now')) + body(this.renderOverview());
// No manual "Check" — scans run automatically; the hero already reports
// the last scan time, and the Updates/Improvements tabs carry the nudge.
pane.innerHTML = this.renderHeader(id) + body(this.renderOverview());
break;
case 'updates': {
// Preserve which rows are expanded across a rebuild — a background
@ -200,7 +201,7 @@ class OverviewManager {
break;
}
case 'improvements':
pane.innerHTML = this.renderHeader(id, checkBtn('Check')) + body(this.renderImprovements());
pane.innerHTML = this.renderHeader(id) + body(this.renderImprovements());
break;
case 'backups': this.mountBackupCenter(pane); break;
case 'migrate': this.mountMigrate(); break;
@ -358,7 +359,7 @@ class OverviewManager {
sub = bits.join(' · ');
}
} else {
sub = 'The first automatic scan runs within a couple of minutes — or hit Check now.';
sub = 'The first automatic scan runs within a couple of minutes.';
}
const chip = (id, label, n) =>
`<button class="ov-chip${this.board === id ? ' active' : ''}" data-overview-action="board" data-board="${id}">${label}${n ? ` <span class="ov-chip-n">${n}</span>` : ''}</button>`;
@ -615,9 +616,12 @@ class OverviewManager {
// ---- Improvements tab (reuse the updater's hotfix renderer) ---------------
renderImprovements() {
// withToolbar=false — the fleet tab's "Check" button lives in the shared
// header action slot, so the embedded renderer skips its own toolbar.
return this.updater ? this.updater.renderImprovements(false) : `<div class="updater-empty">Improvements unavailable.</div>`;
// withToolbar=false — the embedded renderer skips its own toolbar; the
// auto-check line (with its right-side Check-now nudge) leads the body
// instead, matching the Updates tab.
return this.updater
? this.updater.renderAutoCheckLine() + this.updater.renderImprovements(false)
: `<div class="updater-empty">Improvements unavailable.</div>`;
}
// ---- Backups tab (fleet health glance; actions deep-link per app) ---------