Skip to content

fix(desktop): keep tooltips clear of the native window controls - #8893

Closed
Gigioxx wants to merge 1 commit into
pingdotgg:mainfrom
Gigioxx:t3code/fix-tooltip-window-controls
Closed

Gigioxx wants to merge 1 commit into
pingdotgg:mainfrom
Gigioxx:t3code/fix-tooltip-window-controls

Conversation

@Gigioxx

@Gigioxx Gigioxx commented Aug 31, 2026 •

Copy link
Copy Markdown
Contributor

Problem

In the desktop app, hovering the line-wrapping toggle in the diff panel toolbar showed its tooltip inside the titlebar strip, where the OS composites the minimize, maximize, and close buttons above every DOM layer. The tooltip was hidden behind the native controls. Raising z-index cannot fix it, because those controls are not part of the page (#8882).

Change

The shared TooltipPopup positioner reserves the window-controls-overlay height as top collision padding, so a tooltip that would land in that strip flips below its trigger instead. The height comes from navigator.windowControlsOverlay.getTitlebarAreaRect() through a new useWindowControlsOverlayHeight hook that tracks geometrychange. It is 0 in a regular browser, so web placement is unchanged. Fixing it in the shared tooltip covers every tooltip near the top of the window, not just the one in the report.

Scope and approval

Small, focused fix for an obvious bug: a tooltip rendered under native window controls and could not be read. #8882 is not yet triaged; a maintainer confirmed the approach still addresses the reported placement and asked only for the rebase: #8893 (comment)

Verification

  • Established the problem in the Electron dev app on Linux over CDP: the trigger sits at y 39.5 with a 40px overlay strip. Before the change the positioner reported side="top" at y 9.5, inside the strip; after it reported side="bottom" at y 71.5.
  • Re-probed neighbouring tooltips in the same session (titlebar controls, diff toolbar, sidebar footer, composer). Placement was unchanged everywhere the strip is not in the way.
  • Rebased onto main at 0cf482b in this session. Resolved the conflict in windowControlsOverlay.ts by keeping getElectronPlatformClassNames private (from refactor(web): keep app utilities private and remove dead helpers #10227) with the new overlay-height hook above it.
  • On the rebased head: web tsc --noEmit reported no errors; vp lint and vp fmt --check on both changed files are clean.
  • Not checked in this session: a desktop run on the rebased head, and macOS/Windows titlebars. The screenshots below are from the earlier head on Linux.
Before After
Tooltip hidden behind the maximize and close buttons Tooltip flipped below the toolbar, clear of the window controls

Fixes #8882

Built with Claude Opus 5 in T3 Code. Rebase and body update by Claude Opus 5.5 via Claude Code.

@coderabbitai

coderabbitai Bot commented Aug 31, 2026 •

Copy link
Copy Markdown

Warning

Review limit reached

Only developers with an assigned seat can use this organization's usage-based review budget, and seats here are assigned manually. Ask an admin to assign a seat, or change the review continuation mode in Billing.

Next included review available in 1 minute.

Check out review usage here.

View limit details

Limit details: You’ve used all 10 included reviews currently available.

Learn how review limits work.

Review configuration:

⚙️ Run configuration

Configuration used: Repository: pingdotgg/t3code/.coderabbit.yaml

Review profile: CHILL

Plan: Advanced

Run ID: 2ea00c0f-1aa5-4c23-ae59-4b43fc684da8

📥 Commits

Reviewing files that changed from the base of the PR and between c57a04b and 4065116.

📒 Files selected for processing (2)
  • apps/web/src/components/ui/tooltip.tsx
  • apps/web/src/lib/windowControlsOverlay.ts
  • Autopilot · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Autopilot is currently an internal CodeRabbit preview.


Comment @coderabbitai help to get the list of available commands.

@github-actions github-actions Bot added vouch:unvouched PR author is not yet trusted in the VOUCHED list. size:M 30-99 changed lines (additions + deletions). labels Aug 31, 2026
macroscopeapp[bot]
macroscopeapp Bot previously approved these changes Aug 31, 2026
@macroscopeapp

macroscopeapp Bot commented Aug 31, 2026 •

Copy link
Copy Markdown
Contributor

Approvability

Verdict: Approved at 1f5afaa

Macroscope's review found this PR approvable — This is a localized tooltip-positioning fix with safe zero-height behavior outside overlay-enabled desktop windows. It changes no APIs, data, security-sensitive code, deployment configuration, or static-analysis settings.

Notes:

  • Diff unchanged. Approvability was decided on eligibility alone.

You can add or adjust custom eligibility rules. Learn more.

@shivamhwp

Copy link
Copy Markdown
Collaborator

Note: GPT-6 on behalf of shivam (@shivamhwp).

This conflicts with current main in windowControlsOverlay.ts after #10227 made getElectronPlatformClassNames private. Please update the branch, retain that private helper, and keep the new overlay-height hook above it. The collision-padding approach still addresses the reported tooltip placement.

@juliusmarminge juliusmarminge added the macroscope-review Opt PRs made by unvouched contributors in for Macroscope review. Vouched contributors auto-reviews label Sep 30, 2026 — with ChatGPT Codex Connector
@macroscopeapp
macroscopeapp Bot dismissed their stale review September 30, 2026 23:35

Dismissing prior approval to re-evaluate 1f5afaa

A tooltip that flipped up out of the diff panel toolbar landed inside the
titlebar strip, where the OS composites the minimize/maximize/close buttons
above every DOM layer. No z-index can win that, so reserve the strip as
collision padding and let the tooltip flip down instead.
@Gigioxx
Gigioxx force-pushed the t3code/fix-tooltip-window-controls branch from 1f5afaa to 4065116 Compare October 1, 2026 05:23
@Gigioxx

Gigioxx commented Oct 1, 2026

Copy link
Copy Markdown
Contributor Author

[claude-opus-5-5] Responding on behalf of Guille

Rebased onto current main in 4065116. getElectronPlatformClassNames stays private as in #10227, and useWindowControlsOverlayHeight sits above it. Web typecheck, lint, and format pass on the rebased head.

@maria-rcks

Copy link
Copy Markdown
Collaborator

Note

Written by claude-opus-5-5 on behalf of Maria

Hi! We are cleaning up open PRs, and this one appears to have been created with an older model (opus 5). If this change is really important, we recommend rebuilding the PR with a newer model if possible.

@maria-rcks maria-rcks closed this Oct 11, 2026
@maria-rcks

Copy link
Copy Markdown
Collaborator

Note

Written by claude-opus-5-5 on behalf of Maria

Reopening, this was closed by mistake. Sorry for the noise!

@maria-rcks maria-rcks reopened this Oct 11, 2026
@juliusmarminge

Copy link
Copy Markdown
Member

Note

Grok responding on behalf of Julius.

Closing as superseded by #17672, which landed on main with this same collision-padding approach and fixes #8882. Thanks for working this out and for the rebase, @Gigioxx!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

macroscope-review Opt PRs made by unvouched contributors in for Macroscope review. Vouched contributors auto-reviews size:M 30-99 changed lines (additions + deletions). vouch:unvouched PR author is not yet trusted in the VOUCHED list.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Bug]: line wrapping tooltip interferes with close button of the app

4 participants