Skip to content

feat(ui): rework sidebar tooltip, adjust autostart pr copy#2247

Merged
jonathanlab merged 2 commits into
mainfrom
posthog-code/signal-autostart-copy-and-sidebar-tooltip
May 20, 2026
Merged

feat(ui): rework sidebar tooltip, adjust autostart pr copy#2247
jonathanlab merged 2 commits into
mainfrom
posthog-code/signal-autostart-copy-and-sidebar-tooltip

Conversation

@jonathanlab
Copy link
Copy Markdown
Contributor

adjusted tooltip usage in sidebar, adjusted copy for autostart PRs to be clear about billing


Created with PostHog Code

@greptile-apps
Copy link
Copy Markdown
Contributor

greptile-apps Bot commented May 20, 2026

Prompt To Fix All With AI
Fix 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

Comment thread apps/code/src/renderer/features/sidebar/components/SidebarItem.tsx
Comment thread apps/code/src/main/services/agent/service.test.ts Outdated
Generated-By: PostHog Code
Task-Id: 3e2da6ae-1cfe-453c-bd8b-43d7de6feb51
@jonathanlab jonathanlab force-pushed the posthog-code/signal-autostart-copy-and-sidebar-tooltip branch from ac36c40 to 6c08982 Compare May 20, 2026 13:45
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
@jonathanlab jonathanlab enabled auto-merge (squash) May 20, 2026 14:00
@jonathanlab jonathanlab merged commit 30980c8 into main May 20, 2026
15 checks passed
@jonathanlab jonathanlab deleted the posthog-code/signal-autostart-copy-and-sidebar-tooltip branch May 20, 2026 14:01
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.

2 participants