Skip to content

Add clickable PR status tooltip in sidebar thread list#125

Merged
juliusmarminge merged 3 commits intomainfrom
codething/442a51f1
Mar 1, 2026
Merged

Add clickable PR status tooltip in sidebar thread list#125
juliusmarminge merged 3 commits intomainfrom
codething/442a51f1

Conversation

@juliusmarminge
Copy link
Copy Markdown
Member

@juliusmarminge juliusmarminge commented Mar 1, 2026

Summary

  • replace per-thread PR state mapping with full PR metadata (state, number, title, URL)
  • add PR status tooltip content (#<number> <state>: <title>) and render it via Tooltip
  • make PR status icon clickable to open the PR URL through nativeApi.shell.openExternal
  • add error toasts when external link opening is unavailable or fails
  • improve thread row keyboard accessibility by handling Enter/Space navigation

Testing

  • Not run (no test changes in this patch)
  • Verify PR icon appears for threads whose git status branch matches the thread branch
  • Verify hovering PR icon shows tooltip with PR number/state/title
  • Verify clicking PR icon opens the PR in the external browser and does not trigger thread navigation
  • Verify keyboard Enter and Space on a focused thread row navigate to that thread
  • Verify error toast appears if native API is unavailable or openExternal rejects

Note

Medium Risk
Touches sidebar navigation interactions and external link opening behavior; regressions could break thread navigation or PR link launching across browsers.

Overview
Adds a clickable PR status indicator to the sidebar thread list: per-thread git status mapping now retains full PR metadata (state/number/title/url) and renders a tooltip with that detail; clicking the PR icon opens the PR via nativeApi.shell.openExternal with error toasts on failure.

Improves thread row accessibility by making the row keyboard-activatable (Enter/Space) and adjusting the row render element. Updates shell.openExternal to stop throwing when window.open returns null (to avoid false negatives on some mobile browsers).

Written by Cursor Bugbot for commit fb5aee3. This will update automatically on new commits. Configure here.

Note

Add a clickable PR status tooltip to the sidebar thread list and wire button clicks to api.shell.openExternal in Sidebar.tsx

Make the PR indicator a focusable button with a tooltip and open the PR URL via the native API; refactor to pass the full PR object to prStatusIndicator and map threads to full PR data; adjust api.shell.openExternal to always resolve in browser environments.

📍Where to Start

Start with Sidebar and the openPrLink handler in Sidebar.tsx, then review prStatusIndicator usage and the PR mapping memo; finally check createWsNativeApi in wsNativeApi.ts.

Macroscope summarized fb5aee3.

- Show PR number/title in a tooltip on each thread PR icon
- Open PR links externally from the sidebar and show error toasts on failure
- Improve thread row keyboard handling after switching to a non-button render

Co-authored-by: codex <codex@users.noreply.github.com>
@coderabbitai
Copy link
Copy Markdown

coderabbitai bot commented Mar 1, 2026

Important

Review skipped

Auto reviews are disabled on this repository. Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch codething/442a51f1

Comment @coderabbitai help to get the list of available commands and usage tips.

Copy link
Copy Markdown
Contributor

@cursor cursor bot left a comment

Choose a reason for hiding this comment

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

Cursor Bugbot has reviewed your changes and found 2 potential issues.

Bugbot Autofix is ON, but it could not run because the spend limit has been reached. To enable Bugbot Autofix, raise your spend limit in the Cursor dashboard.

Comment thread apps/web/src/components/Sidebar.tsx
Comment thread apps/web/src/components/Sidebar.tsx Outdated
- Stop throwing when `window.open` returns `null` in `wsNativeApi`
- Keep opening external links in a new tab and rely on browser popup policy
- Drop `title` from the PR status button in `Sidebar` to avoid duplicate tooltip text
@juliusmarminge juliusmarminge merged commit cafe335 into main Mar 1, 2026
4 checks 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