Skip to content

Add auto-updater, Apple signing prep, and fix git status loop#8

Merged
erictli merged 1 commit intomainfrom
release-prep-and-git-fix
Feb 4, 2026
Merged

Add auto-updater, Apple signing prep, and fix git status loop#8
erictli merged 1 commit intomainfrom
release-prep-and-git-fix

Conversation

@erictli
Copy link
Owner

@erictli erictli commented Feb 4, 2026

Summary

  • Auto-updates: Add tauri-plugin-updater with pubkey and GitHub release endpoint so the app can check for and install updates
  • macOS release prep: Configure bundle targets (dmg, app), set minimum system version to 10.15, and gitignore .env.build secrets
  • Fix git status infinite loop: refreshStatus in GitContext had status in its useCallback deps, creating a cycle where every status fetch triggered a re-render that re-fired the effect. Replaced with refs for initial-load tracking, in-flight protection, and a stable file-change listener

Test plan

  • Verify app builds and launches with npm run tauri dev
  • Confirm git status in footer updates correctly without blinking/flickering
  • Type rapidly in a note with git enabled — footer should remain stable
  • Verify updater plugin initializes without errors

🤖 Generated with Claude Code

Summary by CodeRabbit

Release Notes

  • New Features

    • Added automatic update functionality to keep the application current with the latest improvements.
  • Chores

    • Updated project dependencies to enable new features.
    • Configured macOS build settings with specified system version requirements.
    • Improved overall application stability and performance through internal optimizations.

…nite loop

- Add tauri-plugin-updater with pubkey and GitHub release endpoint for auto-updates
- Configure macOS bundle targets (dmg, app) and minimum system version
- Add updater permission to capabilities
- Ignore .env.build secrets file
- Fix infinite re-render loop in GitContext where refreshStatus depended on
  status state, causing a cycle: refreshStatus → setStatus → new refreshStatus
  reference → effect re-fires → repeat. Use refs for initial load tracking,
  in-flight protection, and a stable file-change listener.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
@coderabbitai
Copy link

coderabbitai bot commented Feb 4, 2026

📝 Walkthrough

Walkthrough

The PR integrates the Tauri updater plugin into the application by adding dependencies, initializing the plugin in the Tauri builder, and configuring updater settings. Additionally, it refactors GitContext to manage refresh state using internal refs, preventing concurrent operations and eliminating unnecessary re-renders.

Changes

Cohort / File(s) Summary
Updater Plugin Integration
.gitignore, package.json, src-tauri/Cargo.toml, src-tauri/capabilities/default.json, src-tauri/src/lib.rs, src-tauri/tauri.conf.json
Adds @tauri-apps/plugin-updater and tauri-plugin-updater dependencies, initializes the updater plugin in the Tauri builder, grants updater capability permissions, and configures updater settings including GitHub endpoints and public key. Also restricts macOS build targets to dmg and app, sets minimum macOS version to 10.15, and adds .env.build to gitignore.
State Management Refactoring
src/context/GitContext.tsx
Introduces hasLoadedRef and refreshInFlightRef to manage load state and prevent concurrent refresh invocations without triggering re-renders. Adds stable refreshStatusRef to prevent re-registering file-change listeners. Updates dependency array and simplifies loading spinner logic to only display on first load.

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~20 minutes

Possibly related PRs

Poem

🐰 A plugin arrives, the updater takes flight,
Refs manage the state, no re-renders in sight,
GitHub now beckons for fresh builds to share,
While debounce listeners float light as the air! 🚀

🚥 Pre-merge checks | ✅ 2 | ❌ 1
❌ Failed checks (1 warning)
Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 50.00% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (2 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title accurately captures the three main changes: the auto-updater addition, macOS signing preparation (Apple signing prep), and the git status loop fix.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing touches
  • 📝 Generate docstrings
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch release-prep-and-git-fix

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

@erictli erictli merged commit 62c9c45 into main Feb 4, 2026
1 check passed
@erictli erictli deleted the release-prep-and-git-fix branch February 5, 2026 14:53
Shayaan-Azeem pushed a commit to Shayaan-Azeem/scratch that referenced this pull request Mar 10, 2026
…nite loop (erictli#8)

- Add tauri-plugin-updater with pubkey and GitHub release endpoint for auto-updates
- Configure macOS bundle targets (dmg, app) and minimum system version
- Add updater permission to capabilities
- Ignore .env.build secrets file
- Fix infinite re-render loop in GitContext where refreshStatus depended on
  status state, causing a cycle: refreshStatus → setStatus → new refreshStatus
  reference → effect re-fires → repeat. Use refs for initial load tracking,
  in-flight protection, and a stable file-change listener.

Co-authored-by: Claude Opus 4.5 <noreply@anthropic.com>
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