fix(web): remember selected pull request merge method - #7992
Conversation
Switching a pull request's merge method only lived in local component state, so every newly opened pull request reset it back to merge. The choice now persists in the UI state store, following the reader across pull requests and sessions, with invalid stored methods sanitized back to merge. Built with x-preview-f-free (ox-alpha) using opencode.
|
Important Review skippedAuto reviews are disabled on this repository. Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: Repository UI Review profile: CHILL Plan: Pro Plus Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
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. Comment |
Persist selected pull request merge method in
|
ApprovabilityVerdict: Skipped Macroscope did not run approvability analysis for this PR. Macroscope could not determine whether this PR modifies its approvability configuration, so the PR was not approved automatically. A PR that may change the rules that govern approval is never approved automatically. |
What Changed
switching from merge method is persisted
Why
i like to squash and merge. i didnt like having to switch to squash every single time
Disclosure
Used AI (ox alpha btw) whole heartedly in the code, but i the human wrote this.
i really dont care if this gets merged, but i really would the problem to be solved
Note
Low Risk
UI preference persistence only; merge still uses the repo’s allowed methods, so this does not change merge execution or permissions.
Overview
Remembers the last merge strategy the user picked (merge, squash, or rebase) across pull requests and sessions, instead of resetting to merge every time the panel opens.
The preference lives in
uiStateStoreand localStorage. Invalid or unknown values are ignored and default to merge. If a repository does not allow the saved method, the UI still falls back to the first allowed method so a persisted choice cannot force an unsupported merge.Reviewed by Cursor Bugbot for commit e8e16b6. Bugbot is set up for automated code reviews on this repo. Configure here.