Registry Mirror
Skip to content

Conversation

@backnotprop

@backnotprop backnotprop commented Oct 17, 2026 •

Copy link
Copy Markdown
Owner

The owner asked for this on 2026-10-17: "I want an actual component tooltip. I don't want the web native, like, have to wait however many seconds for some, like, built-in thing to show up." He was hovering cut names in the list (project labels such as "northwind-industri…", sidebar projects) and got either the slow native title or nothing.

What changed

  • Every native title= in the Inbox window is now ui's Tooltip, through one wrapper, Tip (packages/inbox/components/Tip.tsx). It opens after 150 ms, and the next one opens at once within 400 ms (one TooltipProvider in InboxApp).
    • Cut text (list project labels, chips, subjects, the list header and folder, file names, archived rows, folded-line names and snippets, search rows and filter chips, the Decisions project switch, compose's To picker, agent-note paths, pairing addresses): the tooltip opens only while the text is actually cut.
    • Where the title said something the screen does not, it always opens: a sidebar project shows its whole name over its folder, a named search chip shows its subject, a time shows its full date.
    • Icon buttons and controls get a tooltip with the same words. Each keeps its own aria-label.
  • Tooltips are portaled. A trigger inside an open native <dialog> (search, compose, the agent-note and update dialogs) portals the tooltip into that dialog, so the dialog's top layer does not cover it. Panes never clip a tooltip.
  • A control that can be disabled hangs its tooltip on a .ib-tipwrap span, because a disabled button gets no pointer events.
  • Escape closes an open tooltip and still reaches the window, so Escape still closes a thread. Base UI's default swallowed the key, and inbox-mobile's Escape test caught it.
  • Nothing opens under (hover: none). No element became a tab stop.
  • clipTitle.ts is deleted.

The chip with no tooltip ("reconciliation-r…")

This had two causes, and both are fixed:

  1. isTextCut now also compares the text's Range width with the box's content width, to a hundredth of a pixel. It also counts any whole pixel of scrollWidth over clientWidth. Before, the check was scrollWidth > clientWidth + 1, which missed a 0.06 px ellipsis.
  2. The subject's flex-shrink goes from 1000 to 1000000. Flex shares a shortfall by factor times width, so with 1000 a chip lost a fraction of a pixel every time the subject shrank. The new e2e reproduces that with the old value: a 0.047 px overflow at a 520 px list. The list header's folder and compose's folder had the same pattern and got the same fix.

ui (additive)

ui's Tooltip gains two optional props: container (where the tooltip portals) and escapePassesThrough. Both are documented in HANDOFF.md. With neither prop set, the tooltip behaves exactly as before.

ui's own hover text (review follow-up)

ui gains HostTitle and configurePlannotatorUI({ componentTooltips }). The default is false, so plan review, annotate, code review and every other host keep their native titles. The Inbox turns it on, so these now show ui's Tooltip in the Inbox:

  • a message link to an attachment;
  • a question card's "Record as a decision" tag;
  • the annotation panel's and toolbar's buttons and labels. Where a title was a button's only name, it becomes the button's aria-label.

isTextCut moved to ui (utils/textCut.ts). A sidebar project keeps its folder as an accessible description (aria-describedby). .ib-tipwrap is now flex: none, so Mark read can no longer spill over Archive.

Left native

  • An iframe's title: it is the frame's accessible name, not a tooltip.
  • ui components not yet routed through HostTitle that the Inbox can show: CommentPopover, AnnotationToolstrip, the ImageAnnotator toolbar, CodeBlock's copy button, TableToolbar and TablePopout, DiagramBlock and the diagram viewer, CodeFilePopout, QuestionsPanelSection, and HtmlViewer's own controls.

Tests

  • New DOM test packages/inbox/componentTooltips.test.tsx (added to the test.yml DOM list): a cut row label, the sidebar project with and without the project menu, the 0.06 px chip, and no native title anywhere.
  • New e2e tests/e2e/inbox-tooltips.spec.ts, against the compiled binary at 1440 px, device scale 2, with a thread open:
    • no native title in the Inbox's own chrome;
    • the list label and sidebar tooltips appear in under 1 s, drawn on top;
    • no chip is cut by less than a pixel at six list widths;
    • a forced 0.06 px cut still opens its tooltip;
    • Escape with a tooltip open still closes the thread;
    • a disabled control still shows its tooltip.
  • Existing tests that asserted title now assert the tooltip: ack, agentNoteDialog, fullView, searchPalette, threadFolding, fileBack, openIn, plus the worst-case, search, phones and thread-folding e2e specs.
  • bun run typecheck: passes. The 54 Inbox DOM tests: 454 pass. Headless e2e passed: inbox, sidebar, worst-case, search, thread-folding, attachments, full-view, project-menu, compose, decisions, phones, thread-header, mobile, list-resize, open-stays-put and tooltips.

Screenshots (1440 px, a thread open): .product/drafts/inbox-tooltips/list-project-label-1440.png and sidebar-project-1440.png.

backnotprop and others added 4 commits October 17, 2026 12:35
… a fraction of a pixel opens its tooltip

Every native title= in the Inbox window becomes ui's Tooltip through one
wrapper, Tip (packages/inbox/components/Tip.tsx): 150 ms to open and the
next at once within 400 ms (one TooltipProvider in InboxApp). Cut text
opens it only while cut; where the title said something the screen does
not (a sidebar project's folder, a named search chip's subject, a full
date) it always opens. A disabled control hangs it on a wrapper the
pointer reaches. A trigger inside a native <dialog> portals into it.
Escape closes a tooltip and still reaches the window. clipTitle.ts is gone.

The owner's "reconciliation-r…" chip with no tooltip had two causes:
isTextCut now compares the text's Range width with the box (a 0.06 px
ellipsis counts), and the subject's flex-shrink goes from 1000 to
1000000 so a chip never loses a fraction of a pixel while the subject
shrinks.

ui Tooltip gains two additive props, container and escapePassesThrough
(HANDOFF.md); unset, it is unchanged.

Co-Authored-By: Claude <noreply@anthropic.com>
…scription)

- .ib-tipwrap is flex: none, so Mark read never shrinks and spills over
  Archive in a tight header (e2e from 320 to 1440 px).
- ui gains HostTitle and configurePlannotatorUI({ componentTooltips })
  (default false: native titles, every other host unchanged). The Inbox
  opts in, so a message link to an attachment, a question card's decision
  tag, and the annotation panel's and toolbar's buttons and labels show
  ui's Tooltip; a title that was a button's only name becomes its
  aria-label. isTextCut moves to ui (utils/textCut.ts).
- Sidebar project rows keep their folder as an accessible description
  (aria-describedby on visually hidden text).
- HANDOFF.md describes isTextCut and the new seam.
- The search e2e hovers a cut right-to-left line and reads its tooltip.

Co-Authored-By: Claude <noreply@anthropic.com>
- HostTitle on: a title that is not the control's name stays its
  description (a hidden element named by aria-describedby), so a screen
  reader still hears "Not attached to this message", "Open <path> beside
  the thread", the Unanchored explanation and the "Show annotated files"
  hints. Off: the exact native title, an empty title included.
- Tests with componentTooltips off: every wrapper keeps its title and adds
  no aria-label or description (HostTitle.dom.test.tsx, links.test.tsx).
- isTextCut takes a part selector instead of knowing the Inbox's class.
- The sidebar folder description is `hidden` (not read twice).
- ui's Tooltip draws at z-[110], above the annotation toolbar.

Co-Authored-By: Claude <noreply@anthropic.com>
Resolved:
- inbox.css: .ib-lhead h1 keeps main's type-knob font size; .ib-path keeps
  this branch's flex shrink of 1000000. The tail keeps both Soft's blocks
  and the tooltip rules.
- playwright.config.ts: one testMatch with inbox-soft-polish.spec.ts and
  inbox-tooltips.spec.ts.

Tooltips now portal into the window's root (data-pn-tooltip-root; ui's
tooltipContainerOf, which HostTitle uses too) so the Soft switches reach
them: with --ib-soft-float on, a tooltip ([data-pn-tooltip]) floats like the
menus and the toast (Soft's shadow, no outline); off, ui's border and shadow.

Co-Authored-By: Claude <noreply@anthropic.com>
@backnotprop
backnotprop merged commit 7d06fcd into main Oct 17, 2026
29 checks passed
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.

1 participant