Skip to content

Studio: show the hovered icon's tooltip when moving between adjacent icons - #13735

Merged
danielhanchen merged 1 commit into
mainfrom
studio-tooltip-icon-grace-area
Oct 14, 2026
Merged

danielhanchen merged 1 commit into
mainfrom
studio-tooltip-icon-grace-area

Conversation

@danielhanchen

@danielhanchen danielhanchen commented Oct 14, 2026 •

Copy link
Copy Markdown
Member

Fixes #13644

Problem

Moving the pointer quickly along the message action bar (Copy, Edit, Refresh, Read aloud, Fork, Delete, More) can leave the previous icon's label up while the pointer rests on its neighbour, for example "Read aloud" shown while Refresh is highlighted. With slightly different timing no label shows at all until the pointer moves again.

Cause

Radix tooltips are hoverable by default: when the pointer leaves a trigger, Radix keeps the tooltip open while the pointer travels inside a grace polygon spanning the exit point and the tooltip content, and while that transit flag is set no other trigger in the provider may open. Icon labels are wider than the 32 px icons and sit flush below them (sideOffset 0), so that polygon covers the lower half of the neighbouring icon. A pointer that stops there keeps the old label up and blocks the hovered icon's own tooltip.

Fix

TooltipIconButton sets disableHoverableContent on its tooltip, the same setting the sidebar (NAV_TOOLTIP_INTENT), the model picker and the prompt queue already use for their icon rows. Its tooltip is a plain string label, so nothing in it needs to be reachable with the pointer. This covers every TooltipIconButton (action bars, composer, attachments, prompt queue, dictation bar).

Test

tests/studio/playwright_tooltip_switch.py renders the action bar row with the production TooltipIconButton (smoke-tooltip-switch.html), hovers each icon, moves to each neighbour at 9 points inside the round button, and reads the open tooltip. It runs in Frontend CI next to the composer icon check.

base (main) this PR
chromium 42/108 0/108
firefox 42/108 0/108
webkit 46/108 0/108

(moves that showed a label other than the hovered icon's, or none)

npm test passes (12122 tests) and tsc -b is clean.

Before / after

Production TooltipIconButton action bar, dark theme, pointer moved from Read aloud onto the lower right of Refresh (merge base vs this branch):

Before: Read aloud label shown with the pointer on Refresh. After: Refresh label shown.

@danielhanchen danielhanchen self-assigned this Oct 14, 2026
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Oct 14, 2026 •

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-10-14T14:35:59.862193Z 344fab4 Manual request
🔒 Security Review ✅ Completed 2026-10-14T14:24:59.197469Z 344fab4 Manual request
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review 🔄 Running since 2026-10-14T14:21:43.993968Z 344fab4 PR opened
🔒 Security Review 🔄 Running since 2026-10-14T14:21:44.185088Z 344fab4 PR opened
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@danielhanchen

Copy link
Copy Markdown
Member Author

@codex review

@danielhanchen

Copy link
Copy Markdown
Member Author

@codex security review

@danielhanchen

Copy link
Copy Markdown
Member Author

@codex review

@chatgpt-codex-connector

Copy link
Copy Markdown

🛡️ Codex Security Review

Security review completed. No security issues were found in this pull request.

Reviewed commit: 344fab4dc1

View security finding report

Only the user who started this review can view the report in Codex.

ℹ️ About Codex security reviews in GitHub

This is an experimental Codex feature. Security reviews are triggered when:

  • You comment "@codex security review"
  • A regular code review gets triggered (for example, "@codex review" or when a PR is opened), and you’re opted in so security review runs alongside code review

Once complete, Codex will leave suggestions, or a comment if no findings are found.

danielhanchen pushed a commit to danielhanchen/unsloth-staging-2 that referenced this pull request Oct 14, 2026

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 344fab4dc1

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

<Tooltip>
// No grace area: the label is wider than the icon, so the path to it covers the next icon in
// a row and kept this label up (and that icon's away) while the pointer rested there.
<Tooltip disableHoverableContent={true}>

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P2 Badge Preserve hover access to icon tooltip content

Setting disableHoverableContent on the shared component makes every icon tooltip close as soon as the pointer leaves its small trigger, so mouse users—particularly users relying on magnification—cannot move onto the label to inspect it. This affects unrelated usages too, including longer explanatory labels such as the disabled compare-send reason in shared-composer.tsx, and violates the hoverable-content behavior expected for content revealed on hover. Please resolve the adjacent-trigger conflict without globally disabling hover access to all TooltipIconButton content.

Useful? React with 👍 / 👎.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

Keeping it. The tooltip stays open while the pointer is on the button, so every label (including the send-unavailable reason) is still readable on hover and announced via the sr-only text and aria-describedby. Hoverable content is exactly what causes #13644: Radix's grace polygon from a narrow icon to a wider label covers the neighbouring icon and blocks its tooltip. The sidebar (NAV_TOOLTIP_INTENT), model picker and prompt queue already disable it for the same reason, and none of these labels contain anything interactive.

@danielhanchen

Copy link
Copy Markdown
Member Author

@codex review

1 similar comment
@danielhanchen

Copy link
Copy Markdown
Member Author

@codex review

@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review: Didn't find any major issues. More of your lovely PRs please.

Reviewed commit: 344fab4dc1

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

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.

[Bug] wrong text on mouse over after prompt response

1 participant