updater#13
Conversation
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (1)
🚧 Files skipped from review as they are similar to previous changes (1)
📝 WalkthroughWalkthroughAdds Tauri updater and process plugins (Rust + JS), configures updater endpoints and capabilities, registers plugins in the Tauri builder, implements a frontend update check with toast-driven install+relaunch, and adds a cross-platform GitHub Actions release workflow publishing draft releases on version tags. ChangesApp Update System
Release Automation Pipeline
Sequence Diagram(s)sequenceDiagram
participant Layout as +layout.svelte
participant Updater as src/lib/updater.ts
participant Tauri as Tauri Runtime
participant UI as Toast
Layout->>Updater: schedule checkForUpdates() after 3s
Updater->>Tauri: check for updates
alt update available
Tauri-->>Updater: update info
Updater->>UI: show "Install & Restart"
UI-->>Updater: user clicks install
Updater->>Tauri: downloadAndInstall()
Tauri->>Tauri: relaunch()
else no update
Tauri-->>Updater: no update
end
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~25 minutes Possibly related PRs
Poem
🚥 Pre-merge checks | ✅ 3 | ❌ 2❌ Failed checks (1 warning, 1 inconclusive)
✅ Passed checks (3 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Warning There were issues while running some tools. Please review the errors and either fix the tool's configuration or disable the tool if it's a critical failure. 🔧 ESLint
ESLint skipped: no ESLint configuration detected in root package.json. To enable, add Comment |
There was a problem hiding this comment.
Actionable comments posted: 4
🤖 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 @.github/workflows/release.yml:
- Around line 28-39: Replace mutable action references with pinned 40-character
commit SHAs: change actions/checkout@v4, oven-sh/setup-bun@v2,
dtolnay/rust-toolchain@stable, Swatinem/rust-cache@v2 and
tauri-apps/tauri-action@v0 to their respective full commit SHAs (you may add the
existing tag as a comment for readability); update the workflow to use those
SHAs everywhere these action identifiers appear so the pipeline no longer tracks
mutable refs.
- Line 73: The workflow currently sets releaseDraft: true which leaves GitHub
releases as drafts and prevents updater discovery; change the releaseDraft
property in the release job from true to false (i.e., set releaseDraft: false)
so releases are published instead of drafted, ensuring the Tauri updater and
public API can discover them.
In `@src-tauri/tauri.conf.json`:
- Around line 21-23: The configured auto-update "endpoints" entry currently
points to
"https://github.com/anide-app/anide/releases/latest/download/latest.json" which
only resolves published releases and thus won't surface draft releases from your
draft-release workflow; either change the CI to publish releases (set
releaseDraft: false) or replace the endpoints entry with an endpoint that can
return draft releases (for example use the GitHub Releases API for the repo such
as the /repos/{owner}/{repo}/releases or
/repos/{owner}/{repo}/releases/tags/{tag} endpoint with appropriate auth) so
update checks include drafts—update the "endpoints" array value accordingly and
ensure any necessary auth/token handling is implemented.
In `@src/lib/updater.ts`:
- Around line 12-17: The Install & Restart action lacks error handling and
protection against concurrent clicks—wrap the onClick callback body (the calls
to update.downloadAndInstall() and relaunch()) in a try/catch and surface errors
to the user (e.g., via the existing UI notification/logger) and ensure the catch
re-enables UI state; add a guard flag (e.g., isInstalling) or disable the action
while running to prevent double-clicks and set/clear that flag before/after
awaiting downloadAndInstall() and relaunch(); update references: the action
object’s onClick, update.downloadAndInstall(), and relaunch() so failures are
caught and the UI state is consistent.
🪄 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: Path: .coderabbit.yaml
Review profile: CHILL
Plan: Pro Plus
Run ID: f74cef22-9e17-42e6-ac6c-e5d23ff32c4c
⛔ Files ignored due to path filters (2)
bun.lockis excluded by!**/*.locksrc-tauri/Cargo.lockis excluded by!**/*.lock
📒 Files selected for processing (8)
.github/workflows/release.ymlpackage.jsonsrc-tauri/Cargo.tomlsrc-tauri/capabilities/default.jsonsrc-tauri/src/lib.rssrc-tauri/tauri.conf.jsonsrc/lib/updater.tssrc/routes/+layout.svelte
Summary by CodeRabbit
New Features
Chores