Skip to content

fix: use GitHub merge state to fix misleading Mergeable classification#59

Merged
ibetitsmike merged 5 commits intomainfrom
mike/fix-pr-status-grouping
Mar 25, 2026
Merged

fix: use GitHub merge state to fix misleading Mergeable classification#59
ibetitsmike merged 5 commits intomainfrom
mike/fix-pr-status-grouping

Conversation

@ibetitsmike
Copy link
Collaborator

@ibetitsmike ibetitsmike commented Mar 24, 2026

Summary

PRs blocked by required reviews were incorrectly classified as Mergeable when checks passed. Now uses GitHub's mergeStateStatus field as the source of truth.

Changes

Rust backend (src-tauri/src/):

  • models.rs — Added merge_state_status: Option<String>
  • github.rs — Extended GraphQL fragment to fetch mergeStateStatus; idiomatic str::to_owned
  • menu.rs — Added is_actually_mergeable() helper; Mergeable filter uses merge state + excludes pending/failed checks; 8 unit tests with exclusivity assertions

Svelte frontend (src/lib/):

  • types.ts — Added MergeStateStatus literal union type; updated PullRequest field
  • stores.ts — Added isActuallyMergeable() and isCheckFailed() helpers; Mergeable filter uses merge state + excludes pending/failed checks
  • components.test.ts — 8 grouping tests with exclusivity assertions + review-requested boundary test

Verification

  • npm run test ✅ (29 passed)
  • npm run check ✅ (0 errors, 0 warnings)
  • npm run smoke
  • cargo test / cargo check
  • Codex Review ✅
Copy link

@chatgpt-codex-connector chatgpt-codex-connector bot left a comment

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 90ed561aa7

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

@ibetitsmike
Copy link
Collaborator Author

@codex review

Copy link

@chatgpt-codex-connector chatgpt-codex-connector bot left a comment

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 90ed561aa7

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

@ibetitsmike
Copy link
Collaborator Author

@codex review

@chatgpt-codex-connector
Copy link

Codex Review: Didn't find any major issues. Swish!

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

@ibetitsmike ibetitsmike merged commit cd6c470 into main Mar 25, 2026
13 of 14 checks passed
@ibetitsmike ibetitsmike deleted the mike/fix-pr-status-grouping branch March 25, 2026 17:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

1 participant