feat(ui): rework sidebar tooltip, adjust autostart pr copy#2247
Merged
jonathanlab merged 2 commits intoMay 20, 2026
Conversation
Contributor
Prompt To Fix All With AIFix the following 2 code review issues. Work through them one at a time, proposing concise fixes.
---
### Issue 1 of 2
apps/code/src/renderer/features/sidebar/components/SidebarItem.tsx:31-46
**Tooltip shown even for non-truncated labels**
The old implementation used `scrollWidth > clientWidth` to gate the tooltip, so it only appeared when the text was actually clipped. The new `Tooltip` wraps every string/number label unconditionally, meaning a short label like "Home" will pop up a tooltip reading "Home" after 600 ms — redundant noise on every hover. The `truncate` CSS alone doesn't signal to the tooltip whether overflow actually occurred at runtime.
### Issue 2 of 2
apps/code/src/main/services/agent/service.test.ts:465-496
**Tests not parameterised**
The four `it()` cases here share identical structure — input options and expected outcome — and would be cleaner as a single `it.each` table. The team prefers parameterised tests; this is a good candidate since each case only varies in the input array and the expected result.
Reviews (1): Last reviewed commit: "feat(ui): rework sidebar tooltip, adjust..." | Re-trigger Greptile |
Generated-By: PostHog Code Task-Id: 3e2da6ae-1cfe-453c-bd8b-43d7de6feb51
ac36c40 to
6c08982
Compare
Greptile flagged that the tooltip showed even for short labels that weren't actually clipped. Toggle pointer-events on the label span via a ResizeObserver so base-ui's hover handlers only fire when the text overflows. Avoids state churn and per-row re-renders. Generated-By: PostHog Code Task-Id: 3e2da6ae-1cfe-453c-bd8b-43d7de6feb51
k11kirky
approved these changes
May 20, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
adjusted tooltip usage in sidebar, adjusted copy for autostart PRs to be clear about billing
Created with PostHog Code