Repository navigation
fix(app): let the model tooltip fit its content - #58201
bertolo1988 wants to merge 12 commits into
Conversation
There was a problem hiding this comment.
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
|
Thanks for updating your PR! It now meets our contributing guidelines. 👍 |
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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.
|
we no longer use this tooltip as of 2.2.0 |
Issue for this PR
Closes #58200
Type of change
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
ModelTooltipmarkup 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.tsxalso passes.Screenshots / recordings
Before (fixed 180px, model name truncated):
After (sizes to content, still capped at 320px):
Original report (Console models view, same fixed-width failure):
Checklist
Added by the opencode bot (AI-generated).
Related: #50257