GeezerVison is showing github.com — feat(ui): allow span tooltip triggers inside buttons by liambreen · Pull Request #57894 · anomalyco/opencode
Conversation
liambreen
commented
Oct 21, 2026
•
edited by opencode-agent
Bot
Loading
Uh oh!
There was an error while loading. Please reload this page.
Issue for this PR
Refs #55446 — small prep change for the tab-grouping PR that follows.
Type of change
- Bug fix
- New feature
- Refactor / code improvement
- Documentation
What does this PR do?
Tooltip's Kobalte trigger renders as a div, which the HTML content model forbids inside buttons. This adds an optional triggerAs prop so a call site can request a span trigger instead, and types the trigger ref as HTMLElement accordingly.
Nothing in the app uses it yet. The follow-up tab-grouping PR needs it: the horizontal group badge shows its project name on hover, and the trigger has to live inside the header button (wrapping the button itself would trip the tooltip component's expanded-disclosure suppression).
How did you verify your code works?
bun typecheck in packages/ui and bun run check at the repo root, both green.
- The prop is additive with a
div default, so existing call sites are untouched.
Screenshots / recordings
Non-visual API addition.
Checklist
- I have tested my changes locally
- I have not included unrelated changes in this PR
Added by the opencode bot (AI-generated).
Related: #55446
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
Tooltip's Kobalte trigger renders as a div, which the HTML content
model forbids inside buttons. triggerAs lets a call site request a span
trigger; upcoming tab-group badges use it to show the project name on
hover from inside their header buttons.
This was referenced Oct 21, 2026
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The change looks sound. It's additive, and with the default (div) existing tooltips render and behave as before. packages/ui type-checks with it. The ref is only used through HTMLElement methods, so widening its type is safe. The trigger's display: flex rule applies the same to a span, so layout shouldn't shift. I didn't render it, because nothing in the app uses the prop yet. Its only user is #57896, so it may be easiest to land the two together.
Public API: none affected. It adds an optional triggerAs?: "div" | "span" prop to the internal UI Tooltip component (backwards compatible); SDK, server, plugin, config and CLI are unchanged.
Related: #55446
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Assignees
No one assigned
Milestone
No milestone
Development
Successfully merging this pull request may close these issues.
Uh oh!
There was an error while loading. Please reload this page.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.