Skip to content

feat(updater): add background update indicator - #29

Merged
LRainner merged 1 commit into
masterfrom
codex/add-update-indicator
Jul 30, 2026
Merged

feat(updater): add background update indicator#29
LRainner merged 1 commit into
masterfrom
codex/add-update-indicator

Conversation

@LRainner

@LRainner LRainner commented Jul 30, 2026

Copy link
Copy Markdown
Owner

Summary

  • check for updates in the background after startup and at most once every 24 hours
  • persist newly discovered versions and show an orange indicator beside About until viewed
  • reuse the existing update card and download flow without adding release notes or notifications
  • grant the main window only the updater check permission

Validation

  • Frontend tests: 47 passed
  • Rust tests: 39 passed
  • Settings E2E: 6 passed
  • Production build
  • Cargo check
  • Clippy with warnings denied
  • Rust format check
  • git diff --check

Summary by CodeRabbit

  • New Features

    • Added background update checks with retry and periodic scheduling.
    • Added a visible indicator for newly available updates in Settings.
    • Update status persists across app reloads and can be acknowledged from the About page.
  • Bug Fixes

    • Improved update-state handling across app versions and repeated checks.
  • Tests

    • Added coverage for persisted update indicators, state changes, throttling, and reload behavior.

@coderabbitai

coderabbitai Bot commented Jul 30, 2026

Copy link
Copy Markdown

Review Change Stack

📝 Walkthrough

Walkthrough

Adds persisted update-check state, background updater scheduling, and settings-page update indicators. The About navigation displays unseen updates, acknowledges them when opened, and receives state changes from background checks.

Changes

Update Indicator Flow

Layer / File(s) Summary
Update state persistence and timing
src/update-indicator.ts, src/update-indicator.test.ts
Adds validated storage state, update-seen tracking, version invalidation, throttling, retry timing, and tests for these behaviors.
Background update scheduling
src-tauri/capabilities/update-check.json, src/main.ts
Enables updater checks for the main window and schedules delayed background checks that persist and emit update results.
Settings indicator integration
src/settings.ts, src/settings.html, src/styles.css, e2e/settings.e2e.ts
Connects update events and persisted state to the About indicator, update card, styling, and reload coverage.

Estimated code review effort: 3 (Moderate) | ~20 minutes

Sequence Diagram(s)

sequenceDiagram
  participant MainProcess
  participant TauriUpdater
  participant SettingsPage
  participant AboutTab
  MainProcess->>TauriUpdater: check for available update
  TauriUpdater-->>MainProcess: return update result
  MainProcess-->>SettingsPage: emit UPDATE_STATE_EVENT
  SettingsPage->>SettingsPage: refresh update indicator
  SettingsPage-->>AboutTab: display update dot
  AboutTab->>SettingsPage: acknowledge known update
Loading

Possibly related PRs

  • LRainner/AgentCat#9: Both changes modify the settings About/update UI and updater integration.
🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly matches the main change: adding a background updater check and persisted update indicator.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch

Comment @coderabbitai help to get the list of available commands.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@src/styles.css`:
- Line 119: Update the fill and stroke color value in the .settings-nav-icon svg
rule from currentColor to lowercase currentcolor to satisfy Stylelint's
value-keyword-case rule.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro Plus

Run ID: 9a7d1e6f-d45a-491d-a85e-b06f31fb656b

📥 Commits

Reviewing files that changed from the base of the PR and between c8eded8 and 18c9286.

⛔ Files ignored due to path filters (1)
  • src-tauri/gen/schemas/capabilities.json is excluded by !**/gen/**
📒 Files selected for processing (8)
  • e2e/settings.e2e.ts
  • src-tauri/capabilities/update-check.json
  • src/main.ts
  • src/settings.html
  • src/settings.ts
  • src/styles.css
  • src/update-indicator.test.ts
  • src/update-indicator.ts

Comment thread src/styles.css
.settings-nav-item strong { font-size: 13px; }
.settings-nav-item small { margin-top: 2px; overflow: hidden; color: #879395; font-size: 9px; text-overflow: ellipsis; white-space: nowrap; }
.settings-nav-icon { display: grid; flex: 0 0 28px; place-items: center; width: 28px; height: 28px; border-radius: 9px; color: #66787a; background: #dfe8e5; }
.settings-nav-icon svg { width: 17px; height: 17px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

📐 Maintainability & Code Quality | 🟡 Minor | ⚡ Quick win

Fix the configured Stylelint violation.

currentColor fails value-keyword-case; use currentcolor so Stylelint passes.

Proposed fix
-.settings-nav-icon svg { width: 17px; height: 17px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
+.settings-nav-icon svg { width: 17px; height: 17px; fill: none; stroke: currentcolor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
.settings-nav-icon svg { width: 17px; height: 17px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.settings-nav-icon svg { width: 17px; height: 17px; fill: none; stroke: currentcolor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
🧰 Tools
🪛 Stylelint (17.14.1)

[error] 119-119: Expected "currentColor" to be "currentcolor" (value-keyword-case)

(value-keyword-case)

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@src/styles.css` at line 119, Update the fill and stroke color value in the
.settings-nav-icon svg rule from currentColor to lowercase currentcolor to
satisfy Stylelint's value-keyword-case rule.

Source: Linters/SAST tools

@LRainner
LRainner merged commit 22b85eb into master Jul 30, 2026
8 checks passed
@LRainner
LRainner deleted the codex/add-update-indicator branch July 30, 2026 09:44
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