Originally created by: Akarsh-Hegde
The dashboard had no update surface — only the tray popover showed the "Update available" banner (and update.rs's module doc already claimed a "dashboard sidebar" banner that was never implemented, or was dropped in the Tauri fold). This adds the dashboard sibling, reusing the exact same commands so both surfaces behave identically.
Placed as a small accent card at the top of the sidebar (OverviewPanel), matching the existing "Board cleanup available" CTA — noticeable without taking over the header.
invoke('check_update'); renders only when state === 'available' (up-to-date / error / unsupported stay silent, like the popover) — consent-based.invoke('install_update') (download + verify + relaunch); shows Downloading… N% from the update-progress event, and Update failed on rejection.next dev browser) invoke throws, the effect swallows it, and the card never renders.ui/components/timeline/UpdateCard.tsx (new) — the card + all update logic.ui/components/timeline/OverviewPanel.tsx — mounts <UpdateCard /> at the top of the sidebar overview.ui/lib/api-types.ts — UpdateStatus + UpdateProgress types mirroring update.rs.ui/__tests__/update-card.test.ts (new) — guards command reuse, consent-based render, Tauri-safe degradation, the OverviewPanel mount, and that it's not a header banner.The dashboard window already shares the capability that grants check_update/install_update + the update-progress event (the popover uses them under the same set).
tsc --noEmit: clean · next build: clean · bun test: 188 passcheck_update finds a newer version, so it can't be exercised in next dev / without a real pending update (same constraint as the popover banner).🤖 Generated with Claude Code
Originally posted by: coderabbitai[bot]
✨ Finishing Touches
🧪 Generate unit tests (beta)
- [ ] Create PR with unit tests - [ ] Commit unit tests in branch `feat/dashboard-update-banner`Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.
❤️ Share
- [X](https://twitter.com/intent/tweet?text=I%20just%20used%20%40coderabbitai%20for%20my%20code%20review%2C%20and%20it%27s%20fantastic%21%20It%27s%20free%20for%20OSS%20and%20offers%20a%20free%20trial%20for%20the%20proprietary%20code.%20Check%20it%20out%3A&url=https%3A//coderabbit.ai) - [Mastodon](https://mastodon.social/share?text=I%20just%20used%20%40coderabbitai%20for%20my%20code%20review%2C%20and%20it%27s%20fantastic%21%20It%27s%20free%20for%20OSS%20and%20offers%20a%20free%20trial%20for%20the%20proprietary%20code.%20Check%20it%20out%3A%20https%3A%2F%2Fcoderabbit.ai) - [Reddit](https://www.reddit.com/submit?title=Great%20tool%20for%20code%20review%20-%20CodeRabbit&text=I%20just%20used%20CodeRabbit%20for%20my%20code%20review%2C%20and%20it%27s%20fantastic%21%20It%27s%20free%20for%20OSS%20and%20offers%20a%20free%20trial%20for%20proprietary%20code.%20Check%20it%20out%3A%20https%3A//coderabbit.ai) - [LinkedIn](https://www.linkedin.com/sharing/share-offsite/?url=https%3A%2F%2Fcoderabbit.ai&mini=true&title=Great%20tool%20for%20code%20review%20-%20CodeRabbit&summary=I%20just%20used%20CodeRabbit%20for%20my%20code%20review%2C%20and%20it%27s%20fantastic%21%20It%27s%20free%20for%20OSS%20and%20offers%20a%20free%20trial%20for%20proprietary%20code)Comment
@coderabbitai helpto get the list of available commands.Originally posted by: adityaharishch
Review: correctness-focused pass
Verified the two claims that matter most for correctness:
check_update/install_updateare pre-existing commands (lib.rs:542-543) andupdate-progressis an existing event — thedefault.jsoncapability already lists"windows": ["main", "dashboard", "setup", "uninstall", "tray-tooltip"], so the dashboard window already had access. The PR's "no capability change" claim is accurate — no silent-invoke-denial risk here.subscribe('/api/update/progress', null, 'update-progress', ...)correctly passescommand: nullfor a delta-only stream (matchesbridge.ts's documented convention — no snapshot prime, caller doesn't need one sincepctnaturally starts atnulland the card doesn't render pre-available).One minor, non-blocking note: on a failed install,
onInstall's retry doesn't resetpctback tonull(UpdateCard.tsx— onlyinstalling/failedare reset). If a user retries after a partial download failure, the card can briefly show the stale percentage from the failed attempt until the nextupdate-progressevent arrives. Cosmetic only — not a correctness bug, and self-corrects on the first progress tick.Logic otherwise checks out: consent-based render (
if (!status) return nullgated onstate === 'available'), Tauri-safe degradation (isTauri()guard on both effects, mount cleanup viacancelledflag on the async check), and the mount site (OverviewPanel.tsx, notLayoutBanners.tsx) matches the PR's stated intent from the second commit's course-correction. Test file's assertions line up with the actual component behavior.No correctness issues found — LGTM.
Originally posted by: Akarsh-Hegde
Addressed the review feedback and resolved the merge conflicts against
pre-main:Review fix — @adityaharishch's non-blocking note:
onInstall's retry path resetinstalling/failedbut leftpctstale, so retrying after a partial-download failure could briefly show the previous attempt's percentage until the nextupdate-progresstick. Fixed by resettingpcttonullinonInstall(UpdateCard.tsx), with a guarding test added inupdate-card.test.ts.Merge conflicts — merged latest
pre-mainin. Only one real conflict:ui/lib/api-types.ts, where this PR'sUpdateStatus/UpdateProgresstypes and the just-merged What's New PR'sReleaseNote/RoadmapItem/WhatsNewDatatypes both landed at the same spot in the file. Resolved by keeping both additions side by side (no logic conflict, just adjacent insertions).Verified after resolving:
cargo test,cargo clippy -- -D warnings,cargo fmt --check,bun test(202 pass),tsc/next buildall clean — and the pre-push hook (fmt + clippy + tests + UI build/tests + security audit) passed on push. CI is green.This is ready to be merged pending a maintainer's final look.
Ticket changed by: Akarsh-Hegde