Skip to content

fix(desktop): merge the right pull request and ignore advisory checks - #3795

Merged
LHagfoss merged 1 commit into
mainfrom
fix/desktop-pull-merge-panel
Nov 15, 2026
Merged

LHagfoss merged 1 commit into
mainfrom
fix/desktop-pull-merge-panel

Conversation

@LHagfoss

Copy link
Copy Markdown
Owner

What

Fixes to the merge button from #3792, plus trimming the pull request panel.

  • Wrong pull request: the opened pull number survived a thread switch. Open chore(ci): release v0.115.0 #2781 in one project, select a thread in another, and the panel showed that project's chore(ci): release v0.115.0 #2781 with a live Merge button. The opened pull is now kept per project and machine, so a switch goes back to the list.
  • Advisory checks: the button counted every check, while the engine's merge (ADVISORY_CHECKS in pull_requests.rs, and scripts/pr-merge.sh) ignores the portability jobs. A failing advisory job disabled Merge although merge_when_green would merge. The control now reads the detail's check runs without the advisory jobs, and the list's counts stand in until the runs are read. The Checks headline follows the same rule, and advisory rows get an "advisory" tag.
  • Remote threads: Merge is hidden on a thread from another machine, the same as "Work on this in a thread" (the panel would send that machine's path to this engine).
  • Confirm state: the armed button changes colour and reads "Press again to merge" or "Press again to merge when green", instead of a "Confirm merge?" that looked the same as the unarmed button.
  • Drafts and finished pulls: with no Merge beside it, the overflow menu reads "Actions ⌄" instead of a lone "···".
  • Less repetition: the panel's "Pull requests" heading is gone (the tab already says it), and the state filter or "All pull requests" now sits in that bar. The header's check mark is gone (the Checks headline is the one count), the blocked button reads "Merge" (disabled) instead of repeating the failing count, the inner "Overview" tab is now "Details" so there are no longer two Overview tabs, and the Overview file list is gone (the Diff tab lists the files).
  • Mock: /view now returns the list row for the number asked, with matching check runs. chore(ci): release v0.115.0 #2781's failure is an advisory job and fix(desktop): handle slash-command actions and select command-created threads #2795's a real one, so the list and the detail no longer disagree.

Changelog

The merge button no longer acts on another project's pull request after a thread switch, ignores advisory checks the way the merge does, and asks for confirmation more clearly.

Testing

  • bun run check (2,805 pass).
  • New src/ui/MergeButton.test.tsx renders the button: merge, waiting, blocked without the count, advisory failure not blocking, draft/finished rendering nothing. New pullMerge.test.ts cases cover the advisory rule and the headline.
  • In the mock: a remote thread shows "Actions" with no Merge; on a local thread chore(ci): release v0.115.0 #2781 offers Merge and the armed state reads "Press again to merge"; switching threads returns the panel to the list.

The pull request panel keeps an opened pull per project and machine, so switching threads no longer leaves another project's #N with a live Merge button. The merge control reads the detail's check runs and leaves out the advisory portability jobs the engine's merge ignores. Merge is hidden on threads from another machine, the armed button changes colour and says what the second press does, and the panel drops its repeated heading, the header check mark and the Overview file list the Diff tab already has.
@github-actions github-actions Bot added the fix A bug fix label Nov 15, 2026
@LHagfoss
LHagfoss merged commit b41182e into main Nov 15, 2026
9 checks passed
@LHagfoss
LHagfoss deleted the fix/desktop-pull-merge-panel branch November 15, 2026 12:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

fix A bug fix

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant