Skip to content

fix(web): remember selected pull request merge method - #7992

Open
QarthO wants to merge 1 commit into
pingdotgg:mainfrom
QarthO:tweak/persist-merge-method
Open

fix(web): remember selected pull request merge method#7992
QarthO wants to merge 1 commit into
pingdotgg:mainfrom
QarthO:tweak/persist-merge-method

Conversation

@QarthO

@QarthO QarthO commented Aug 23, 2026

Copy link
Copy Markdown

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 uiStateStore and 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.

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.
@coderabbitai

coderabbitai Bot commented Aug 23, 2026

Copy link
Copy Markdown

Important

Review skipped

Auto reviews are disabled on this repository. Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: Repository UI

Review profile: CHILL

Plan: Pro Plus

Run ID: 8bd54d17-49aa-497b-bbef-b6a8b82d6d1b

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review

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.

@github-actions github-actions Bot added vouch:unvouched PR author is not yet trusted in the VOUCHED list. size:M 30-99 changed lines (additions + deletions). labels Aug 23, 2026
@macroscopeapp

macroscopeapp Bot commented Aug 23, 2026

Copy link
Copy Markdown
Contributor

Persist selected pull request merge method in useUiStateStore

  • Moves pullRequestMergeMethod from local useState in PullRequestDetailPanel to the shared useUiStateStore so the selection survives component unmounts.
  • Adds MERGE_METHODS validation, a setPullRequestMergeMethod pure function, and serialization/hydration support in parsePersistedState and persistState.
  • Invalid or missing persisted values fall back to the default 'merge'.
  • Risk: existing localStorage payloads without pullRequestMergeMethod will hydrate to 'merge' rather than a previously selected value.

Macroscope summarized e8e16b6.

@macroscopeapp

macroscopeapp Bot commented Aug 23, 2026

Copy link
Copy Markdown
Contributor

Approvability

Verdict: 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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

size:M 30-99 changed lines (additions + deletions). vouch:unvouched PR author is not yet trusted in the VOUCHED list.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant