Skip to content

fix(web): prevent narrow session tooltips#1114

Merged
tiann merged 1 commit into
tiann:mainfrom
techotaku39:fix/web-session-tooltip-width
Jul 24, 2026
Merged

fix(web): prevent narrow session tooltips#1114
tiann merged 1 commit into
tiann:mainfrom
techotaku39:fix/web-session-tooltip-width

Conversation

@techotaku39

Copy link
Copy Markdown
Contributor

Summary

  • size non-row hover tooltips to their intrinsic content width
  • retain the existing 14rem maximum so detailed attention and schedule tooltips still wrap
  • cover short localized tooltip copy with a regression test

Problem

Session attention indicators use an 8px dot as the containing block for an absolutely positioned tooltip. Non-row tooltips had only a maximum width, so their auto width could collapse to the narrow trigger. CJK copy such as 有新活动 then wrapped one character per line and appeared vertical.

Fix

Add Tailwind's w-max to non-row tooltip panels while keeping max-w-[14rem]. Short labels now use their max-content width, while longer rich tooltip content remains bounded and wraps normally. Row-spanning tooltips keep their existing sizing behavior.

Related: #940, #941

Test plan

  • bun typecheck
  • bun run test:web (158 files, 1298 tests)
  • Regression test verifies localized non-row tooltips receive both w-max and max-w-[14rem]
  • Manual browser check: hover an unread session dot and confirm 有新活动 renders horizontally

AI disclosure

AI-assisted implementation and PR drafting: OpenAI Codex (gpt-5.6-sol).

@techotaku39 techotaku39 reopened this Jul 23, 2026

@github-actions github-actions Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Findings

  • No findings.

Summary

  • Review mode: initial
  • Reviewed the full latest diff for web/src/components/HoverTooltip.tsx and web/src/components/HoverTooltip.test.tsx; no high-confidence correctness, security, regression, data loss, performance, or maintainability issues found in the added/modified lines.
  • Residual risk: the new regression is class-level only; real browser layout behavior for CJK tooltip copy is not exercised by this review.

Testing

  • Not run (automation)

HAPI Bot

@tiann
tiann merged commit ee5b023 into tiann:main Jul 24, 2026
3 of 4 checks passed
veniai pushed a commit to veniai/hapi that referenced this pull request Jul 25, 2026
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