Add clickable PR status tooltip in sidebar thread list#125

merged3
main
codething/442a51f1
openedMar 1, 2026byJJulius Marminge
View on GitHubTwo-way sync enabledPR last imported 14d ago

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 fb5aee327adc9ae944810a4040ba24952e70dd3d. 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.

Added 1 commit

  • Add clickable PR status tooltip in sidebar threads82dd65f
Synced from GitHub

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.

Ccursor[bot]reviewed ยท 2 inline threadsMar 1, 2026
Synced from GitHub

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.

apps/web/src/components/Sidebar.tsxline 777Outdated ยท 82dd65fOpen thread
โ€ฆโ€ฆ@@ -734,6 +767,14 @@ export default function Sidebar() {
774+ to: "/$threadId",
775+ params: { threadId: thread.id },
776+ });
777+ }}
Ccursor[bot]on line 777Mar 1, 2026

Keyboard events from nested button trigger parent navigation

Medium Severity

The onKeyDown handler on the outer div[role="button"] doesn't check whether the event originated from the div itself or from a nested interactive element. When the inner PR <button> has focus and the user presses Enter or Space, the keydown event bubbles up to the parent div, triggering thread navigation. Additionally, event.preventDefault() called on the bubbled event suppresses the button's native activation behavior, so openPrLink never fires. The result is that keyboard-activating the PR icon navigates to the thread instead of opening the PR URL.

Additional Locations (1)

Fix in Cursorย Fix in Web

apps/web/src/components/Sidebar.tsxline 811Outdated ยท 82dd65fOpen thread
โ€ฆโ€ฆ@@ -761,14 +802,24 @@ export default function Sidebar() {
808+ <button
809+ type="button"
810+ aria-label={prStatus.tooltip}
811+ title={prStatus.tooltip}
Ccursor[bot]on line 811Mar 1, 2026

Native title attribute duplicates custom tooltip on hover

Low Severity

The PR icon <button> has both a title attribute and is wrapped in a custom Tooltip/TooltipPopup. On hover, the browser's native tooltip from title and the custom TooltipPopup will both appear, resulting in two overlapping tooltips showing the same text. The title attribute is likely left over and needs to be removed now that the custom tooltip handles it.

Additional Locations (1)

Fix in Cursorย Fix in Web

Added 2 commits

  • Avoid popup-open false errors on mobile browsers4e54afb
  • Remove redundant PR status title attributefb5aee3