feat: approve PR button + auto-update via tauri-plugin-updater - #8
Merged
Merged
Conversation
…roved - New "Aprovar" action in the PR header (visible on both Conversa and Arquivos tabs); opens a small popover with optional review comment - Backend computes viewer_has_approved from the latest non-dismissed review submitted by the viewer; when true the header shows a greyed "Aprovado" chip instead of the green button - New approve_pull_request command wraps the addPullRequestReview GraphQL mutation with event=APPROVE Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
- Background task in update_checker queries /repos/IsraelAraujo70/prism/releases/latest every 3 hours (10-minute backoff on errors); compares the tag against CARGO_PKG_VERSION via semver-major/minor/patch and emits a prism:update-info event with the result - Tauri commands get_update_info and check_updates_now expose the cached state and let the UI force an immediate check - Sidebar UpdatePill (above UserMenu) appears when has_update is true, links to the GitHub release page, and can be dismissed for a given version via localStorage Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
🔍 PR checksType: ✅ Merging will trigger a release (minor bump)
Auto-generated by |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: f7b2392b42
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
Drops the bespoke 3h GitHub releases poll in favor of the official tauri-plugin-updater so the app can download, verify, and install signed bundles in-process — no more "open the release page in a browser" detour. - Removed src-tauri/src/update_checker.rs and the get_update_info / check_updates_now Tauri commands (no longer needed; the plugin exposes check() / downloadAndInstall() directly to JS) - Added tauri-plugin-updater + tauri-plugin-process to Cargo.toml and the JS counterparts (@tauri-apps/plugin-updater, plugin-process); registered both behind #[cfg(desktop)] in lib.rs - tauri.conf.json: bundle.createUpdaterArtifacts=true, plugins.updater endpoint pointing at the GitHub release "latest" download URL, and the minisign pubkey from ~/.tauri/prism-updater.key.pub - capabilities/default.json: added updater:default, process:default, process:allow-restart so the renderer can drive the flow - update-pill.tsx: rewritten on top of the plugin. Polls check() every 3h plus on mount; renders Atualizar → Baixando X% → Reiniciar with Started/Progress/Finished events, calls relaunch() on completion, and surfaces the underlying error message on failure - release.yml: tauri-action now receives TAURI_SIGNING_PRIVATE_KEY + TAURI_SIGNING_PRIVATE_KEY_PASSWORD; the asset rename step skips latest.json / *.tar.gz / *.sig so the manifest URLs keep resolving after the strip-version pass Requires TAURI_SIGNING_PRIVATE_KEY + TAURI_SIGNING_PRIVATE_KEY_PASSWORD secrets configured in the repo (already added). Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Merged
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
addPullRequestReviewGraphQL mutation withevent=APPROVE.tauri-plugin-updaterso the app actually downloads, verifies and installs signed bundles in-process (no more "open the release page" detour). The sidebarUpdatePillpollscheck()every 3h plus on mount and walks the user throughAtualizar → Baixando X% → Reiniciar. Pill UX inspired by t3code's SidebarUpdatePill.What changed
Approve button
commands.rs: newapprove_pull_requestcommand +viewer_has_approvedfield onPrDetailspr-viewer.tsx: header button + popover, greyed "Aprovado" chip when applicableAuto-update
tauri-plugin-updater+tauri-plugin-process(Rust) and@tauri-apps/plugin-updater+@tauri-apps/plugin-process(JS); registered behind#[cfg(desktop)]tauri.conf.json:bundle.createUpdaterArtifacts=true,plugins.updater.endpointspointing athttps://github.com/IsraelAraujo70/prism/releases/latest/download/latest.json, and the minisign pubkeycapabilities/default.json:updater:default,process:default,process:allow-restartupdate-pill.tsx: rewritten on top of the plugin — handlesStarted/Progress/Finishedevents, surfaces errors, callsrelaunch()on completion, dismissable per version via localStoragerelease.yml:tauri-actionnow receivesTAURI_SIGNING_PRIVATE_KEY+TAURI_SIGNING_PRIVATE_KEY_PASSWORD; the asset rename step skipslatest.json/*.tar.gz/*.sigso the manifest URLs keep resolving after the strip-version passsrc-tauri/src/update_checker.rs+get_update_info/check_updates_nowcommands) was removed — the plugin replaces itRequired setup (already done on this repo)
tauri signer generate(private key stored at~/.tauri/prism-updater.key, no password)Settings → Secrets and variables → Actions:TAURI_SIGNING_PRIVATE_KEY← contents of the private key fileTAURI_SIGNING_PRIVATE_KEY_PASSWORD← empty stringTest plan
Approve button
SubmitReviewPanelstill owns that flow)Auto-update
v0.1.3) → CI builds, signs, uploads bundles +latest.jsonto the releasev0.1.2build locally → within ~3h (or on next launch) the pill appears with the new version🤖 Generated with Claude Code