Skip to content

Add PR badge to sidebar task list#2422

Open
rafaeelaudibert wants to merge 1 commit into
mainfrom
posthog-code/sidebar-pr-badge
Open

Add PR badge to sidebar task list#2422
rafaeelaudibert wants to merge 1 commit into
mainfrom
posthog-code/sidebar-pr-badge

Conversation

@rafaeelaudibert
Copy link
Copy Markdown
Member

Summary

  • Adds a small clickable PR badge to the right of each task in the sidebar that has a linked pull request.
  • The badge shows #NNN when a PR number can be extracted from the URL (GitHub / GitLab / Bitbucket URL shapes) and falls back to PR otherwise. Clicking opens the PR externally via openUrlInBrowser.
  • Sourced from the existing TaskData.cloudPrUrl field — no new fetches or schema changes.

Test plan

  • Open the app with at least one task that has a latest_run.output.pr_url set; confirm the badge appears on the right of the row.
  • Click the badge — the PR opens in the system browser and the row itself does not get selected.
  • Hover the row — the pin/archive toolbar still appears; the badge remains visible.
  • Confirm tasks without a PR URL show no badge.
  • Verify keyboard activation (Enter / Space) on the badge opens the PR.

Tasks in the sidebar with a linked pull request now show a small clickable badge on the right side of the row. The badge displays the PR number (e.g. `#123`) when it can be extracted from the URL and falls back to `PR` otherwise; clicking it opens the PR in the user's browser via `openUrlInBrowser`. The URL is sourced from the existing `TaskData.cloudPrUrl` field (populated from `task.latest_run.output.pr_url`), so no new data plumbing is needed.

Generated-By: PostHog Code
Task-Id: ba55cf1b-c69e-4b32-b689-9a00d3831b64
@rafaeelaudibert rafaeelaudibert requested a review from a team May 28, 2026 20:48
@charlesvien
Copy link
Copy Markdown
Member

useful

@greptile-apps
Copy link
Copy Markdown
Contributor

greptile-apps Bot commented May 28, 2026

Reviews (1): Last reviewed commit: "Add PR badge to sidebar task list" | Re-trigger Greptile

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.

2 participants