Skip to content

fix(ui): keep the browser's own tooltip from doubling an open info tip - #35759

Merged
KiroCrewCaptain merged 1 commit into
mainfrom
fix/infotip-open-title
Nov 12, 2026
Merged

KiroCrewCaptain merged 1 commit into
mainfrom
fix/infotip-open-title

Conversation

@javenciu

Copy link
Copy Markdown
Contributor

Problem / Motivation

Goal: a hovered info tip shows its hint once, in its own bubble, never with the browser's native tooltip on top of it or beside it.

With the mouse resting on an info glyph, Chromium shows its own title tooltip over the open bubble after its usual delay, so the hint appears twice and the native box covers the bubble's text (first screenshot below). Two causes:

  • The glyph keeps its title until the tip opens, HOVER_OPEN_DELAY_MS (150 ms) after the mouse arrives. The browser reads the title under the pointer as it moves and shows it after its own delay without reading it again, so a pointer that stops on the glyph gets the native tooltip anyway.
  • Once open, the glyph has no title attribute at all, so the browser falls back to the nearest titled ancestor after any pointer movement. RegistryManager.tsx nests the tip in a span whose title is the same hint (the registry tier badges), and fix(chat): word the cache footer note plainly and put its reason in an info tip #35631 met the same fallback with the reply footer's summary title.

Why it matters

InfoTip is the app's one help-tip pattern, rendered in 52 files. Its own doc comment says the browser's tooltip must never double it, and on hover it does, with the native box hiding the bubble it doubles.

Not a goal

  • Removing the closed glyph's title. It stays the native fallback and what assistive technology reads as the description when the tip is closed.
  • Keyboard and touch behaviour. Focus opens the tip as before, and a touch keeps the title, since only a mouse shows native tooltips.
  • A new tooltip component.

What changed (motivation → approach → change)

Approach: the title has to be gone in the very event that brings the mouse to the glyph, before the browser reads it, and it has to be empty (not absent) while the tip is open, so no ancestor's title stands in for it.

  • website/src/components/InfoTip.tsx: a pointerOn state, set when a mouse enters the glyph and cleared when it leaves; the glyph's title is '' while a mouse is on it or the tip is open, and the hint otherwise. The enter handler sets the state with flushSync, because pointer-enter updates are not committed synchronously and the browser reads the title right after the event. The doc comment says why the title is emptied rather than removed.
  • website/src/test/InfoTip.test.tsx: two assertions now expect an empty title on an open tip; new tests: a mouse on the glyph empties the title at once and a pass-through restores it; a touch keeps the title; an open tip inside a titled element leaves its own empty title as the nearest one.
  • website/src/test/ChatSidebar.olderSessionsTip.test.tsx: the pinned-tip assertion expects the empty title.

Backwards compatibility

Compatible: the closed glyph still carries its hint as title, and the open glyph still describes itself through aria-describedby; the only difference is an empty title where there was none, while a mouse is on the glyph or the tip is open.

Removes nothing: no prop, export or behaviour is removed.

Tests

  • Before: with main's InfoTip.tsx, 5 of the changed and new assertions fail (four in InfoTip.test.tsx, one in ChatSidebar.olderSessionsTip.test.tsx); the touch case is a negative control and passes on both.
  • After: the 75 test files that render an info tip or query its "More information" button pass (1,660 tests), as do eslint on the changed files and tsc -p tsconfig.app.json.
  • The comment-history gate, the brand gate and the inclusive-language terms in .woke.yml pass on the added lines.
  • Reproduce: cd website && npx vitest run src/test/InfoTip.test.tsx src/test/ChatSidebar.olderSessionsTip.test.tsx
  • Proof: not provable -- frontend test (prove.py runs Python only)

Manual verification

A native tooltip exists only on a real display, so this was checked in headed Chromium (Playwright's own build) on a private X display at 2x. The page renders the registry tier row's markup from RegistryManager.tsx: a span titled with the hint, holding the real Badge and the real InfoTip with the same hint. The real pointer was moved onto the glyph and held still for 3 seconds, then the display was captured. With main's InfoTip, the native tooltip covers the bubble. With this change, only the bubble shows. An intermediate version that emptied the title only once the tip was open still showed the doubled tooltip, because the browser had already read the title when the pointer arrived; that is why the title goes in the entering event.

Screenshots / video

The registry tier row with the pointer resting on the info glyph for 3 seconds, light theme.

Before (main): the browser's tooltip covers the bubble.

Before: the native tooltip covers the open info tip

After: only the bubble.

After: only the info tip's bubble shows

Related Issues

Follows #35631, whose review found an open tip letting the reply footer's title show beside it; this fixes the cause in InfoTip for every caller.

Sibling sweep

Swept: git grep -n "<InfoTip" -- website/src, looking for a tip inside an element with a title, and git grep -n 'role="tooltip"' -- website/src, looking for other custom tooltips whose trigger keeps a native title.
Sibling: website/src/components/InfoTip.tsx -- changed here
Sibling: website/src/components/RegistryManager.tsx -- not affected -- its tier rows nest the tip in a titled span, and the empty glyph title covers them with no change to the file
Sibling: website/src/components/InstantTip.tsx -- not affected -- it puts no native title on its anchor

Pattern harvest

Rule candidate: review-prompt
Pattern: a custom tooltip whose trigger keeps a native title until the tooltip opens shows the hint twice on hover, because the browser reads the title when the pointer arrives and shows it after its own delay.

Checklist

  • At most two commits (one is the norm), with a Conventional Commits title (feat|fix|docs|style|refactor|perf|test|chore|ci|build|revert: ...)
  • Existing tests pass and new tests added for new functionality
  • Self-review completed; code follows project style guidelines
  • Documentation updated (if applicable)
  • No secrets, credentials, or internal references in the diff

Contribution License Agreement

An info tip's glyph kept its `title` until the tip opened, a moment after
the mouse arrived. The browser reads the title under the pointer as it
moves and shows it after its own delay, so with the pointer still the hint
appeared twice: the bubble, covered by a native tooltip. Once open, the
glyph dropped its title altogether, so a titled ancestor's tooltip (the
registry tier badge row, a footer summary) could show beside the bubble
instead. The glyph now empties its title in the same event that brings the
mouse there (flushSync, so it lands before the browser reads it) and keeps
it empty while the tip is open; empty rather than absent, so no ancestor's
title stands in for it.
@javenciu
javenciu requested review from a team and KiroCrewCaptain as code owners November 12, 2026 06:15
@javenciu
javenciu requested a review from mbriones98 November 12, 2026 06:15
@javenciu
javenciu enabled auto-merge (squash) November 12, 2026 06:16
@github-actions github-actions Bot added the readiness: checking Automated validation is still running label Nov 12, 2026
@github-actions

Copy link
Copy Markdown
Contributor

First Principles Review (Opus 5.5) — ✅ PASS

Premise-level review of 4ff0b4f744f216704120bf3fb8b783c4b8e0cb51 — why this exists and whether the shipped surface is the smallest honest version. Updated in place on each push. A BLOCK verdict blocks PR readiness; PASS does not.

First-Principles-Verdict: PASS

Nothing blocks. Both changes are aimed at the cause, inside InfoTip itself, so all 52 callers get the fix with no edits of their own.

What this change ships

Inventory (4 items) — 4 justified

Intent: a person hovering an info glyph sees its hint once, in the bubble, with no native browser tooltip over it or beside it. FIX.

  1. A mouse arriving on the glyph empties its native title straight away, before the tip opens — justified
  2. An open tip's glyph carries an empty title rather than none, so a titled parent's tooltip no longer shows beside the bubble — justified
  3. A mouse that passes through without opening the tip gets the glyph's title back — justified
  4. The InfoTip doc comment and test pins change from "title dropped" to "title emptied". The goal of the old pin (no doubled tooltip) still holds, and the description gives the parent-title fallback and fix(chat): word the cache footer note plainly and put its reason in an info tip #35631 as the reason — justified

[FIRST-PRINCIPLES-REVIEWED] 4ff0b4f

Description read

[DESCRIPTION-READ] 54e46815d95dee4e36c385c9e2a6fa8e10ecb97d2752b27ff0058b3f9eb791ff

That sha256 names the PR description this verdict read. Recompute it with .github/scripts/pr-description-capture.sh; if it differs, the description changed after this verdict was formed and any finding drawn from the description is unproven.

@github-actions

Copy link
Copy Markdown
Contributor

Design Review (Opus 5.5) — ✅ PASS

Design-level review of 4ff0b4f744f216704120bf3fb8b783c4b8e0cb51 — updated in place on each push. A BLOCK verdict blocks PR readiness; PASS does not.

Design-Verdict: PASS

Nothing blocks: the fix is local to InfoTip, can be reverted cleanly, and before/after screenshots of this revision are attached.

[DESIGN-REVIEWED] 4ff0b4f

Description read

[DESCRIPTION-READ] 45918ec3a122dc2d5d0d612be57380534c801e0db9904edb458819cc7fb5e402

That sha256 names everything this verdict read: the PR description, plus the 1 evidence file(s) the workflow collected from it and handed this review. It covers that evidence because the media strip replaces every attachment URL with the same placeholder, so an edit swapping one attachment for another would leave the description's captured text identical while what this review judged changed. Recompute it with .github/scripts/pr-description-capture.sh over the same inputs; if it differs, the description or that evidence changed after this verdict was formed and any finding drawn from either is unproven.

@github-actions

Copy link
Copy Markdown
Contributor

UX Review (Opus 5.5) — ✅ PASS

UX-level review of 4ff0b4f744f216704120bf3fb8b783c4b8e0cb51 — updated in place on each push. A BLOCK verdict blocks PR readiness; PASS does not.

UX-Verdict: PASS

Nothing blocks: the change adds no control and no copy. The blind reader saw shot-01 as two boxes repeating the same text, "it looks broken", and saw shot-02 as one clean, readable bubble.

Notes

  • The blind reader was unsure whether the "Team reviewed" badge is clickable, did not know what "registry" means, and could not tell whether "Apps clone without your Git credentials" was reassurance or a warning. That copy predates this PR and belongs in a follow-up, not this one.

[UX-REVIEWED] 4ff0b4f

Description read

[DESCRIPTION-READ] df02652153de6fc30e572cffbe51b8d95d06c55468edd6dba85ca9cf9909471a

That sha256 names everything this verdict read: the PR description, plus the 5 evidence file(s) the workflow collected from it and handed this review. It covers that evidence because the media strip replaces every attachment URL with the same placeholder, so an edit swapping one attachment for another would leave the description's captured text identical while what this review judged changed. Recompute it with .github/scripts/pr-description-capture.sh over the same inputs; if it differs, the description or that evidence changed after this verdict was formed and any finding drawn from either is unproven.

@github-actions

Copy link
Copy Markdown
Contributor

Opus 5.5 Review — ✅ no blocking findings

Reviewed 4ff0b4f744f216704120bf3fb8b783c4b8e0cb51 — this comment is updated in place on each push.

Review details

No findings.

[OPUS-REVIEWED] 4ff0b4f

Verdict parsed from the review's SHA-scoped output markers for commit 4ff0b4f744f216704120bf3fb8b783c4b8e0cb51.

False positive or not applicable? A repository writer can comment:
/ai-review override fable 4ff0b4f744f216704120bf3fb8b783c4b8e0cb51 false-positive: <reason, 20 to 500 characters>

@github-actions

Copy link
Copy Markdown
Contributor

GPT 6.1 Review — ✅ no blocking findings

GPT 6.1 completed its review of 4ff0b4f744f216704120bf3fb8b783c4b8e0cb51 and found no blocking issues.

This comment is updated in place on each push.

Review details

No findings.
[GPT-REVIEWED] 4ff0b4f

False positive or not applicable? A repository writer can comment:
/ai-review override gpt 4ff0b4f744f216704120bf3fb8b783c4b8e0cb51 false-positive: <reason, 20 to 500 characters>

@KiroCrewCaptain

Copy link
Copy Markdown
Collaborator

Code change approver recommendation: Approve

Why: the decider estimates a 7% chance that this change introduces a defect, within the 12% limit for approving on its own, and every check passes.

InfoTip now gives the glyph an empty title while a mouse is on it (committed with flushSync in the pointer-enter event) or the tip is open, and the hint otherwise. An empty title blocks a titled ancestor's tooltip from falling back in. Traced paths: pass-through restores the title; glyph-to-bubble keeps it empty while open; close with the mouse still there keeps it empty; touch and keyboard unchanged; accessible name and description intact. Other "title absent" assertions in the repo belong to other components; the InfoTip ones are updated. New tests would fail on main. Frontend CI was still pending at review time.

An automated recommendation, not a review: a maintainer still decides. It approves on its own only when the estimated chance of a defect is at most 12% and the change has at most 400 changed lines. Decider v3c (217fe607) · commit 4ff0b4f744 · 65 changed lines. If this recommendation is wrong, reply here: replies are how the approver is evaluated.

@github-actions github-actions Bot added readiness: passed Eligible automated validation passed for the current revision and removed readiness: checking Automated validation is still running labels Nov 12, 2026

@bolichen97 bolichen97 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.

Read the whole diff, tests included.

  • The glyph's title is now empty rather than removed while the tip is open, and from the moment a mouse pointer enters. A browser shows the nearest title at or above the hovered element, so removing it let a titled ancestor's tooltip appear beside the bubble. An empty title blocks that, and the new test checks btn.closest('[title]') stays the glyph.
  • onPointerEnter sets pointerOn inside flushSync for a mouse only, so the title is gone before the browser reads it, and onPointerLeave clears it, which gives the title back after a pass-through. A touch pointer keeps its title, and a test pins that. flushSync runs in a React event handler, which is allowed.
  • The existing assertions that expected the attribute to be absent now expect an empty string, and the comments match. The PR description has before and after screenshots. No regex added.

Checks are green on this head. The author holds auto-merge, so I am not setting it.

I did not run the tests locally.

@KiroCrewCaptain
KiroCrewCaptain merged commit 4382ed0 into main Nov 12, 2026
96 of 97 checks passed
@KiroCrewCaptain
KiroCrewCaptain deleted the fix/infotip-open-title branch November 12, 2026 08:06

@KiroCrewCaptain KiroCrewCaptain left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Tier 1 auto-approve: fix (3 files). Criteria: no conflict, no requested changes, security path denylist clean, design-doc gate clean, security checklist all-NO, no reviewer-lane findings, readiness signal fresh for this head SHA, declared category matches the diff. Category: the info tip empties its title as a mouse arrives, so the browser tooltip no longer doubles it, with tests.

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

Labels

readiness: passed Eligible automated validation passed for the current revision

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants