Skip to content

PR review mode: pluggable platforms and two-way review threads #1583

Not planned

Description

@backnotprop

Provenance stamp: This issue was triaged on September 20, 2026 as part of the older-than-90-days GitHub issue triage exercise.

Source issues: #671, #754

Summary

PR review mode is a closed, one-directional integration. It activates only for two hard-coded platforms, and even on those it can only post a new review — it cannot continue a conversation that already exists. Both source issues are consequences of that single shape.

The common requirement is that PR mode be described by a provider contract rather than a URL regex, and that a review thread be a two-way object rather than a read-only sidebar entry.

What the source issues requested

  • Allow PR review mode override for third-party platforms (e.g., via thirtparty MCP etc Bitbucket ...) #671 requested an override mechanism so third-party integrations (an MCP server, a custom tool, Bitbucket) can activate the rich PR review UI with their own data — the way the External Annotations API already lets external sources push inline comments. Today parsePRUrl() rejects any other URL and prMetadata stays null, so the header PR controls, Post Comments, thread UI and viewed sync never appear. The reporter offered to contribute.
  • [Feature Request] Render and continue GitHub PR review-thread comments inline on the diff #754 requested that GitHub review threads already fetched onto PRContext be rendered as markers anchored to the diff lines they belong to, visually distinct from the reviewer's own annotations, and that those threads be continuable from inside Plannotator — reply via POST /pulls/{n}/comments with in_reply_to, and resolve/unresolve via the GraphQL resolveReviewThread mutation.

Triage determination

Kept together because they touch the same boundary from opposite sides and would otherwise be designed twice. A provider contract that only supports "open a PR and post one review" would not be enough for a Bitbucket integration either — replying to an existing thread is table stakes on every platform. Conversely, building reply/resolve directly against gh's GitHub shapes would harden the two-platform assumption that #671 is asking to remove.

Current state verified on main (2026-09-20):

  • parsePRUrl recognises only GitHub/GHE /pull/ and GitLab /-/merge_requests/ (packages/shared/pr-types.ts:347-380); PRRef.platform is a closed union (:305-314); every PR route requires a prMetadata produced by fetchPR through gh/glab (packages/server/review.ts:220,295). No injection path exists.
  • reviewThreads are fetched and rendered only in the sidebar (packages/review-editor/components/PRCommentsTab.tsx:160-166); DiffViewer and AllFilesCodeView reference them zero times. in_reply_to and resolveReviewThread have zero occurrences repo-wide; hideResolved is a client-side filter, not a mutation.
  • What did ship and lowers the cost: launchable Review Agents ([Feature request] Allow AI agents to review code and show their suggestion in plannotator #611) put non-session-author findings on diff lines as inline comments, so the machinery for rendering a line-anchored marker that is not the reviewer's own already exists.

Acceptance criteria

  • PR mode activation is expressed as a provider contract (identity, metadata, threads, submit, viewed-sync), not as a URL regex over two platforms.
  • An external source can supply PR metadata and threads without Plannotator shipping that platform's client — the External Annotations API is the precedent for the shape.
  • A provider may declare partial capability (for example: threads yes, viewed-sync no) and the UI hides what is unsupported rather than failing.
  • Existing review threads render as markers anchored to their diff line, visually distinct from the reviewer's own annotations, with resolved threads hidden behind a toggle.
  • A thread can be replied to from the diff or the PR Comments panel, and the reply appears in the thread without refetching the whole PR context.
  • A thread can be resolved and unresolved from Plannotator, with local state updated accordingly.
  • GitHub and GitLab remain fully supported through the same contract, with no regression to the current gh/glab paths.
  • The --patch-file static-patch mode stays the documented answer for "just show me a diff", distinct from PR mode.
  • Allow PR review mode override for third-party platforms (e.g., via thirtparty MCP etc Bitbucket ...) #671 and [Feature Request] Render and continue GitHub PR review-thread comments inline on the diff #754 can be closed once their requirements are represented here. [Feature Request] Render and continue GitHub PR review-thread comments inline on the diff #754 carries an accepted commitment, which this issue inherits.

Notes

If the maintainer would rather not couple these: the alternative is to keep #754 open on its own (it is the better-specified and more-demanded half, 4 👍) and close #671 with a direction for the contributor. Consolidating is recommended because the provider contract is what decides where the reply/resolve code lives.

Activity

  1. added
    enhancement
    triage
    on Sep 21, 2026
  2. Toparvion commented on Sep 30, 2026

    @Toparvion

    Looking forward for this to be implemented. I'm using Plannotator with cloud BitBucket which is now quite cumbersome. I hope the PR review mode will work well with Guided Review as it's a feature that makes the Plannotator the best-in-class tool for our team.

  3. backnotprop commented on Sep 30, 2026

    @backnotprop
    OwnerAuthor

    @Toparvion Bitbucket Cloud PR review is out in v0.27.23.

    plannotator review https://bitbucket.org/<workspace>/<repo>/pull-requests/<id> opens the PR with the diff, a local checkout, existing comments and Guided Review. From there you can post inline and general comments, approve, or request changes. It uses an Atlassian API token: set PLANNOTATOR_BITBUCKET_EMAIL and PLANNOTATOR_BITBUCKET_TOKEN. The setup guide, including which token scopes to pick, is here: https://plannotator.ai/docs/guides/bitbucket/

    Not in yet: replying to or resolving existing threads, syncing viewed files back to Bitbucket, stacked PRs, and Bitbucket Data Center. This issue stays open for the thread work. Let us know how it goes with your team.

  4. Toparvion commented on Oct 1, 2026

    @Toparvion

    @backnotprop , thank you for the rapid reaction and the implementation!

    I've tested the 0.27.24 release against a real, quite large Pull Request in our BitBucket with:

    • multiple reviewers;
    • pre-existing comments;
    • my comments both inline and on a file;
    • combined with Guided Review.

    General impression - works like a charm 🪄

    A few observations by the way:

    • I ran the review from my Claude Code session and, while reviewing the code, hit the 30 minute timeout which made Claude forcibly stop the Plannotator process. Happily, when I re-ran it again, the Plannotator restored all of my comments. I only had to relaunch the Guided Review session;
    • The "Open PR after submit" checkbox in the final dialog didn't work due to browser's block (perhaps it considered the PR opening an advertising popup)
    • The overall PR comment that I posted from the final dialog (with "Request Changes" resolution) is displayed in BitBucket as the last one, though expected to be the topmost one. Not sure if this can be altered by the Plannotator.

    We'll keep using this feature, so more feedback can be gathered later.

  5. added a commit that references this issue on Oct 1, 2026
  6. backnotprop commented on Oct 2, 2026

    @backnotprop
    OwnerAuthor

    @Toparvion thanks for testing it on a real team PR. All three points are addressed in v0.27.25:

    • "View on Bitbucket after submitting" now opens. The tab is created the moment you click submit and sent to the PR once the review posts, so the browser no longer blocks it as a popup. The Feedback Sent screen also has a plain link.
    • The overall comment shows on top. Bitbucket's activity feed lists newest first, so the summary is now posted after the inline comments and lands above them.
    • The 30-minute cutoff comes from Claude Code, which stops a slash command's shell after about 30 minutes. You can raise it with BASH_DEFAULT_TIMEOUT_MS in the env block of ~/.claude/settings.json (for example "14400000" for 4 hours). Note it also raises the default for every other command Claude runs. Details are in the Claude Code guide under "Long reviews". Your comments are restored either way, as you saw.

    More feedback is very welcome.

  7. DeLoWaN commented on Oct 12, 2026

    @DeLoWaN

    I am looking forward to this as well.

    I am heavily using review and guided review to review my peers work, but I would also like to use plannotator to be able to respond to my peers comments on my own PRs.

    • view the comments with surrounding diff to understand the context of each comment
    • ask the agent questions or implement fixes directly from plannotator
    • be able to respond to the comments (or the agent directly do it)

    As right now I still must use the web interface of gitlab to do it.

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    acceptedenhancementtriage

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions