Skip to content

fix(app): let the model tooltip fit its content - #58201

Open
bertolo1988 wants to merge 12 commits into
anomalyco:devfrom
bertolo1988:tooltip-fit-content
Open

bertolo1988 wants to merge 12 commits into
anomalyco:devfrom
bertolo1988:tooltip-fit-content

Conversation

@bertolo1988

@bertolo1988 bertolo1988 commented Oct 22, 2026 •

Copy link
Copy Markdown

Issue for this PR

Closes #58200

Type of change

  • Bug fix
  • New feature
  • Refactor / code improvement
  • Documentation

What does this PR do?

The V2 model tooltip is hard-coded to w-[180px]. Long model names and values are truncated even when there is room on screen, and longer localized values can clip.

This changes the tooltip content container to size to its contents (w-max), keeping 180px as the minimum and adding a 320px ceiling. Short tooltips look unchanged; long ones get the space they need and still truncate at the ceiling.

The original screenshot is from the Console models view, which is deployed from a separate codebase. It shows the same 180px lock making "Input & Output" spill outside the tooltip. This PR applies the equivalent fix to the app's model tooltip, which has the same fixed width.

How did you verify your code works?

I rendered the real ModelTooltip markup with the deployed app CSS in headless Chrome, using a long model name and a long reasoning value. Before the change the model name renders as "Claude Sonnet 4.5 (late..." at 180px; after the change the tooltip grows to fit the full name and the other rows still render correctly.

npx [email protected] --check packages/app/src/providers/models/tooltip.tsx also passes.

Screenshots / recordings

Before (fixed 180px, model name truncated):

Model tooltip before

After (sizes to content, still capped at 320px):

Model tooltip after

Original report (Console models view, same fixed-width failure):

Model tooltip overflow

Checklist

  • I have tested my changes locally
  • I have not included unrelated changes in this PR

Added by the opencode bot (AI-generated).

Related: #50257

@github-actions github-actions Bot added the needs:compliance This means the issue will auto-close after 2 hours. label Oct 22, 2026

@opencode-agent opencode-agent Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

The change looks sound from reading the code, but I couldn't check it visually: it's an app UI change and there's no browser in my environment. The V2 tooltip uses the compact look, which has no width limit of its own. So w-max capped by max-w-[320px] gives the column a fixed width between 180px and 320px, and the rows' existing min-w-0 truncate keeps cutting off long values at 320px. Short tooltips should look the same as before. packages/app type-checks.

Public API: unchanged.

Could you add before/after screenshots of the app's own model tooltip (the model picker in the web or desktop app) with a long model name? The current screenshot is from the Console, which is a separate codebase, so it doesn't show this component. Whether the tooltip should grow beyond 180px is a design call for maintainers.

Related: #50257

@github-actions github-actions Bot removed the needs:compliance This means the issue will auto-close after 2 hours. label Oct 22, 2026
@github-actions

Copy link
Copy Markdown
Contributor

Thanks for updating your PR! It now meets our contributing guidelines. 👍

@opencode-agent opencode-agent Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

The only new commit is a merge of dev. It doesn't touch packages/app or packages/ui, so the change itself is the same one I reviewed before. Thanks for adding before/after screenshots of the app's own model tooltip, which is what I asked for last time; I can't view the images myself, so maintainers should take a look. Nothing new to raise: from the code, the tooltip still grows between 180px and 320px and still cuts off long values at 320px.

Public API: unchanged.

@opencode-agent opencode-agent Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

The only new commit is another merge of dev, and it doesn't touch packages/app or packages/ui. The tooltip change is the same one I reviewed before, so I have nothing new to raise.

Public API: unchanged by this pull request.

@opencode-agent opencode-agent Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

The only new commit is another merge of dev, and it doesn't touch the model tooltip or the shared tooltip component. The change is the same one I reviewed before, so I have nothing new to raise.

Public API: unchanged by this pull request.

@opencode-agent opencode-agent Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

The only new commit is another merge of dev, and it doesn't touch the model tooltip or the shared tooltip component. The change is the same one I reviewed before, so I have nothing new to raise.

Public API: unchanged by this pull request.

@opencode-agent opencode-agent Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

The only new commit is another merge of dev, and it doesn't touch the model tooltip or the shared tooltip component. The change is the same one I reviewed before, so I have nothing new to raise.

Public API: unchanged by this pull request.

@opencode-agent opencode-agent Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

The only new commit is another merge of dev. The merged changes to the shared tooltip component only affect when it closes on pointer leave, not its layout or width, so they don't interact with this change. The change is the same one I reviewed before, so I have nothing new to raise.

Public API: unchanged by this pull request.

@opencode-agent opencode-agent Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

The only new commit is another merge of dev, which removes a CI workflow and doesn't touch the tooltip. The change is the same one I reviewed before, so I have nothing new to raise.

Public API: unchanged by this pull request.

@usrnk1

usrnk1 commented Oct 28, 2026

Copy link
Copy Markdown
Contributor

we no longer use this tooltip as of 2.2.0

This branch has not been deployed

No deployments
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.

app: model tooltip is locked to 180px and truncates its content

2 participants