Skip to content

GitHub plugin: picking a PR in the thread sidebar should persist the thread↔PR link #4509

Description

@Andrew-Brevard

Summary

In the thread's right sidebar, the GitHub panel says "No pull request is linked to this thread yet — pick one". Picking a PR there shows it, but the choice is never saved. Switching sidebar tabs (or reopening the thread) drops back to the picker, and the thread stays unlinked.

Current behavior (github plugin 0.2.1)

  • The picker's onPick only sets component state in the thread panel; nothing is persisted.
  • pullForThread resolves a thread's PR only from:
    1. the environment's branch PR (sdk.environments.pullRequest), or
    2. a link:pr:<repo>#<n> KV record, which is written only by addLink when a thread is spawned from Send agent / Review with agent.
  • So an existing thread, or a thread without a git branch (e.g. a personal-workspace environment), can't be linked to a PR at all.

Requested

  • Picking a PR in the thread panel should persist a link (reuse addLink with the current threadId), so it survives tab switches and reloads and shows up in the PR's linked threads.
  • A way to unlink or change the linked PR from the same panel.
  • Optionally, a CLI equivalent, e.g. bb github link <repo>#<number> [--thread <id>].

Steps to reproduce

  1. Open any thread whose environment branch has no PR.
  2. Open the GitHub tab in the right sidebar and pick a PR.
  3. Switch to another sidebar tab, then back.
  4. The picker shows again; the PR isn't linked.

Activity

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

    confirmed-reproBug reproduced again from a clean trusted checkout; see linked reportgithubBuilt-in plugin: githubuiApp shell, sidebar, composer, rendering

    Type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions