Skip to content

Conversation

@austinamorusoyardstick
Copy link
Owner

This pull request introduces a feature to resolve all unresolved review threads in a GitHub pull request (PR) through the application's user interface. It includes new commands, user prompts, error handling, and integration with the GitHub CLI for fetching and resolving threads. Additionally, it improves logging and state management to ensure a smooth user experience.

New Feature: Resolve All PR Conversations

  • Added command to resolve all unresolved review threads: Introduced resolveAllPRConversations function and resolveConversationsMsg type to handle the resolution of review threads using the GitHub CLI and GraphQL API. [1] [2]
  • Confirmation dialog for resolving threads: Added a confirmation overlay (overlay.NewConfirmationOverlay) to prompt users before resolving all threads. [1] [2]
  • New keybinding: Introduced ctrl+r as the keybinding to trigger the "resolve all PR conversations" feature. [1] [2] [3]

UI and State Management Enhancements

  • Improved state transitions: Ensured proper state handling when overlays are nil or actions are confirmed, including returning to the appropriate state after resolving threads. [1] [2] [3]
  • Error and success message handling: Updated the UI to display detailed success or error messages after attempting to resolve threads, with logs added to an error log for debugging. [1] [2]

GitHub CLI Integration

  • Fetching unresolved threads: Added GetUnresolvedThreads method to retrieve unresolved review threads using a GraphQL query.
  • Resolving threads: Added ResolveThread method to resolve individual threads via a GraphQL mutation.
  • Enhanced error handling: Improved error messages for common GitHub CLI issues, such as authentication errors or missing PRs.

Keybindings and Help Updates

  • Help menu update: Documented the new ctrl+r keybinding in the help menu for resolving all PR conversations.

These changes collectively enhance the application's functionality for managing PR conversations, providing users with a streamlined and reliable way to resolve all unresolved threads directly from the interface.

austinamorusoyardstick and others added 30 commits July 30, 2025 13:59
🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <[email protected]>
Prompt users to confirm before resolving all conversations on a PR. The dialog
clearly states the action cannot be undone and provides cancel/confirm options.
Preserve PR review state instead of resetting to default when closing confirmation dialogs
Copy link

@gemini-code-assist gemini-code-assist bot left a comment

Choose a reason for hiding this comment

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

Code Review

This pull request introduces a valuable feature for resolving all PR conversations directly from the UI. The implementation is comprehensive, covering UI, state management, and GitHub API integration.

I've left a few comments on areas that could be improved:

  • Refactoring duplicated logic for showing the confirmation dialog to improve maintainability.
  • Addressing a potential bug in the GraphQL query that could miss conversations if a PR has more than 100 threads.
  • Changing an unconventional keybinding (ctrl+c) to improve usability and avoid conflicts with standard terminal behavior.
  • Removing some leftover debug code.

Once these points are addressed, this will be a solid addition to the application. Great work on the detailed error handling and user-facing messages!

@austinamorusoyardstick
Copy link
Owner Author

/gemini review

Copy link

@gemini-code-assist gemini-code-assist bot left a comment

Choose a reason for hiding this comment

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

Code Review

This pull request introduces a well-implemented feature for resolving all PR conversations. The GitHub API interactions, including pagination and error handling, are robust. My review focuses on improving UI consistency, cleaning up logging, and suggesting a potential refactoring to reduce code duplication. The most critical issue is an inconsistent and problematic keybinding in the PR review UI.

@austinamorusoyardstick
Copy link
Owner Author

/gemini review

Copy link

@gemini-code-assist gemini-code-assist bot left a comment

Choose a reason for hiding this comment

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

Code Review

This pull request introduces a valuable feature for resolving all PR conversations. The implementation is generally solid, with good use of GraphQL pagination and improved error handling for the GitHub CLI. I've identified a few areas for improvement, mainly concerning API efficiency, code duplication, and error handling robustness. Addressing these points will make the feature more performant and maintainable. Great work on this!

@austinamorusoyardstick
Copy link
Owner Author

/gemini review

Copy link

@gemini-code-assist gemini-code-assist bot left a comment

Choose a reason for hiding this comment

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

Code Review

This pull request introduces a valuable feature for resolving all PR conversations directly from the UI. The implementation is well-structured, with good use of Bubble Tea's command/message pattern and a thoughtful refactoring of GraphQL calls to handle pagination. The error handling has also been improved to provide more specific feedback to the user. I've included a couple of suggestions to further improve the robustness of the error handling by using sentinel errors instead of string matching, which will make the application more resilient to changes in external dependencies.

@austinamorusoyardstick austinamorusoyardstick merged commit ef7d782 into main Jul 31, 2025
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant