Skip to content

Offer update-anyway choices when auto-update hits local changes - #52

Merged
cursor[bot] merged 1 commit into
mainfrom
cursor/update-anyway-local-changes-3e81
Aug 5, 2026
Merged

Offer update-anyway choices when auto-update hits local changes#52
cursor[bot] merged 1 commit into
mainfrom
cursor/update-anyway-local-changes-3e81

Conversation

@Narehood

@Narehood Narehood commented Aug 5, 2026

Copy link
Copy Markdown
Owner

Summary

When auto-update finds uncommitted local changes, prompt instead of silently skipping.

Behavior

  • Interactive auto-update now offers:
    1. Stash changes and continue
    2. Discard changes and continue
    3. Cancel
  • Non-interactive sessions still skip (safe for unattended runs)
  • Manual update / branch-switch paths keep the same stash/discard flow, with clearer “and continue” labels

Why

Hosts with dirty working trees (common after local edits) were stuck at “automatic update was skipped” with no way to proceed from the prompt.

Open in Web Open in Cursor 

Summary by CodeRabbit

  • New Features
    • Automatic updates now handle local changes more safely.
    • Interactive sessions can stash or discard changes and continue; non-interactive sessions skip updates without modifying local files.
  • Bug Fixes
    • Clarified update prompts and improved behavior when uncommitted changes are detected.
  • Documentation
    • Updated automatic-update guidance to reflect the new behavior.
  • Tests
    • Added coverage for update prompts and the option to continue after handling local changes.
  • Chores
    • Updated the installer version to 3.8.1.

Prompt to stash or discard uncommitted changes during automatic menu
updates instead of silently skipping, while still skipping in
non-interactive sessions.

Co-authored-by: Michael <Narehood@users.noreply.github.com>
@coderabbitai

coderabbitai Bot commented Aug 5, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

📝 Walkthrough

Walkthrough

The installer version changes to 3.8.1. Automatic updates now skip dirty working trees in non-interactive sessions and prompt interactively. Documentation and update-flow tests cover the new behavior.

Changes

Update flow

Layer / File(s) Summary
Dirty-tree update behavior
install.sh, tests/update-flow.sh, README.md
The installer uses version 3.8.1, updates local-change prompt text, skips automatic updates in non-interactive sessions, and tests the new prompts. The README documents the behavior.

Estimated code review effort: 2 (Simple) | ~10 minutes

Possibly related PRs

  • Narehood/VM-Setup#26: Both changes modify install.sh update handling, versioning, and uncommitted-change prompts.
  • Narehood/VM-Setup#48: This change extends the update-flow changes in install.sh and tests/update-flow.sh.

Suggested reviewers: cursoragent

🚥 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 summarizes the main change: interactive update-anyway choices when automatic updates encounter local changes.
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
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch cursor/update-anyway-local-changes-3e81

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

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

@cursor
cursor Bot marked this pull request as ready for review August 5, 2026 18:43
@cursor
cursor Bot merged commit c48fc34 into main Aug 5, 2026
2 of 3 checks passed
@cursor
cursor Bot deleted the cursor/update-anyway-local-changes-3e81 branch August 5, 2026 18:46

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Actionable comments posted: 1

🧹 Nitpick comments (1)
tests/update-flow.sh (1)

89-97: 📐 Maintainability & Code Quality | 🔵 Trivial | 🏗️ Heavy lift

Test the update branches, not only the prompt text.

These assertions pass when the strings exist anywhere in install.sh; they do not verify runtime behavior. Add a dirty-repository test for non-TTY skipping, interactive cancellation, stashing, and discarding.

🤖 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 `@tests/update-flow.sh` around lines 89 - 97, Strengthen the update-flow test
around the dirty-repository handling in install.sh by executing each relevant
branch rather than only grepping for prompt text: verify non-TTY mode skips the
update, interactive cancellation leaves the repository unchanged, stashing
proceeds with the update while preserving changes, and discarding removes the
local changes before continuing. Reuse the existing test setup and assertions in
tests/update-flow.sh, and retain prompt checks only if they remain necessary.
🤖 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 `@README.md`:
- Around line 117-118: Update the README paragraph describing automatic updates
to document the interactive “0. Cancel” option, including that selecting it
preserves local changes; keep the existing dirty-tree and non-interactive
behavior description intact and align the wording with install.sh’s update flow.

---

Nitpick comments:
In `@tests/update-flow.sh`:
- Around line 89-97: Strengthen the update-flow test around the dirty-repository
handling in install.sh by executing each relevant branch rather than only
grepping for prompt text: verify non-TTY mode skips the update, interactive
cancellation leaves the repository unchanged, stashing proceeds with the update
while preserving changes, and discarding removes the local changes before
continuing. Reuse the existing test setup and assertions in
tests/update-flow.sh, and retain prompt checks only if they remain necessary.
🪄 Autofix

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: defaults

Review profile: CHILL

Plan: Pro Plus

Run ID: a35220b9-da79-414e-82ff-9996e37127e0

📥 Commits

Reviewing files that changed from the base of the PR and between f719b8c and 720ce9f.

📒 Files selected for processing (3)
  • README.md
  • install.sh
  • tests/update-flow.sh

Comment thread README.md
Comment on lines +117 to +118
prompts to stash or discard local changes when the working tree is dirty (or skips in
non-interactive sessions).

Copy link
Copy Markdown
Contributor

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

Document the cancel option.

Interactive automatic updates also offer 0. Cancel and keep local changes when selected. Add this behavior so the paragraph matches install.sh Lines 575-579.

🤖 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 `@README.md` around lines 117 - 118, Update the README paragraph describing
automatic updates to document the interactive “0. Cancel” option, including that
selecting it preserves local changes; keep the existing dirty-tree and
non-interactive behavior description intact and align the wording with
install.sh’s update flow.

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.

2 participants