feat(github): add pull request level actions - #699
Merged
Conversation
Harry19081
marked this pull request as ready for review
August 6, 2026 04:40
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
ORGII's shared GitHub pull-request pages expose conversation reviews but do not provide the pull-request lifecycle controls available in GitHub. Users must leave ORGII to merge, enable merge automation, manage requested reviewers, or close and reopen a pull request. The different PR hosts also need one authoritative implementation so their status and controls cannot drift.
Solution
Add one borderless, background-free PR-level action row to the shared
PrDetailPanel, which covers Source Control, My Station, tabs, and chat-hosted PR views. The row supports repository-allowed merge methods, expected-head guards, auto-merge, merge-queue enqueue/dequeue behavior, direct reviewer requests/removals, and close/reopen. Existing whole-PR Approve, Request changes, and Comment controls remain in Conversation.Add typed Tauri commands and REST/GraphQL payloads for those mutations. Every action flows through one scoped mutation dispatcher and reconciles the authoritative PR bundle afterward. Merge metadata and merge-queue state are loaded concurrently with the existing compare request, and the lifted tab header derives status from the refreshed detail.
The API shapes follow GitHub's documented pull-request merge endpoint, review-request endpoints, and current GraphQL input schema.
Potential risks
GitHub repository policies, branch protection, token permissions, and transient mergeability can still reject an action after the UI presents it; server errors are surfaced and the panel reconciles after both success and failure. PR detail now makes one best-effort GraphQL metadata request in parallel with its existing compare request, which adds API/rate-limit cost; a metadata failure degrades to the existing REST state rather than failing the detail page. Reviewer management currently supports direct users returned by the repository's assignable-user source, not team review requests.
No live destructive GitHub mutation or desktop screenshot was performed. The PR remains Draft pending a signed-in visual/action pass. Rollback is reverting commit
22759aa87; there is no schema, persistence, configuration, dependency, or public wire-format migration.Verification
npx vitest run src/api/tauri/github/pullRequests.test.ts src/shared/pr/prLevelActions.test.ts src/modules/WorkStation/CodeEditor/Panels/EditorPrimarySidebar/content/PullRequestContent/detail/PrConversationTab.test.ts src/modules/WorkStation/CodeEditor/Panels/EditorPrimarySidebar/content/PullRequestContent/detail/PrDetailPanel.test.ts src/modules/WorkStation/CodeEditor/Panels/EditorPrimarySidebar/hooks/useWorkstationPrDetail.test.ts— 5 files, 22 tests passed.npx tsc --noEmit --pretty false— passed.npx eslint src/api/tauri/github/pullRequests.ts src/api/tauri/github/pullRequests.test.ts src/shared/pr/prLevelActions.ts src/shared/pr/prLevelActions.test.ts src/modules/WorkStation/CodeEditor/Panels/EditorPrimarySidebar/content/PullRequestContent/detail/PrLevelActions.tsx src/modules/WorkStation/CodeEditor/Panels/EditorPrimarySidebar/content/PullRequestContent/detail/PrDetailPanel.tsx src/modules/WorkStation/CodeEditor/Panels/EditorPrimarySidebar/content/PullRequestContent/detail/PrDetailPanel.test.ts src/modules/WorkStation/CodeEditor/Panels/EditorPrimarySidebar/content/PullRequestContent/detail/PrConversationTab.test.ts src/modules/WorkStation/CodeEditor/Panels/EditorPrimarySidebar/hooks/useWorkstationPrDetail.ts src/modules/WorkStation/CodeEditor/Panels/EditorPrimarySidebar/hooks/useWorkstationPrDetail.test.ts src/modules/WorkStation/TabContent/renderers/githubPrDetail.tsx src/store/workstation/codeEditor/workstationSelectedPrAtom.ts— passed.cargo clippy -p integrations --all-targets -- -D warnings— passed.cargo test -p integrations pr_action_payload_tests --lib— 6 tests passed.rustfmt --edition 2021 --check crates/integrations/src/github/client.rs crates/integrations/src/github/commands/pulls.rs— passed.git diff --cached --checkand the repository pre-commit hook — passed; the hook reran lint-staged, TypeScript, scoped Rust clippy, and staged-file integrity checks.Audit
frontend-ui-auditskill was not present in this checkout, so no skill-format report was generated.