Fix clipped usage chart tooltip#82846
Conversation
|
Codex review: passed. Workflow note: Future ClawSweeper reviews update this same comment in place. How this review workflow works
Summary Reproducibility: yes. at source level. Current main renders an absolute Real behavior proof Next step before merge Security Review detailsBest possible solution: Land the focused floating-tooltip implementation after required exact-head checks, then let the linked Usage tooltip issue close through the PR's closing reference. Do we have a high-confidence way to reproduce the issue? Yes, at source level. Current main renders an absolute Is this the best way to solve the issue? Yes. A body-level fixed tooltip is the narrowest maintainable fix because it preserves the chart's horizontal overflow while escaping both clipping ancestors. What I checked:
Likely related people:
Remaining risk / open question:
Codex review notes: model gpt-5.5, reasoning high; reviewed against 7c416950c615. |
|
@clawsweeper automerge |
|
🦞✅ Source: What merged:
Automerge notes:
The automerge loop is complete. Automerge progress:
|
Summary: - The PR replaces per-bar absolute Usage chart tooltips with one viewport-fixed floating tooltip and adds focus/keyboard handling plus focused jsdom coverage. - Reproducibility: yes. at source level. Current main renders an absolute `.daily-bar-tooltip` inside `.daily- ... ` overflow contexts, and the linked issue plus PR before screenshot demonstrate the tall-bar clipping case. Automerge notes: - PR branch already contained follow-up commit before automerge: Merge branch 'main' into fix-usage-tooltip-clipping Validation: - ClawSweeper review passed for head edbb26a5be49bb3d459cb2517267926667eb3ed2. - Required merge gates passed before the squash merge. Prepared head SHA: edbb26a5be49bb3d459cb2517267926667eb3ed2 Review: openclaw/openclaw#82846 (comment) Co-authored-by: sandypockets <41454557+sandypockets@users.noreply.github.com> Approved-by: takhoffman Co-authored-by: takhoffman <781889+takhoffman@users.noreply.github.com>
Summary: - The PR replaces per-bar absolute Usage chart tooltips with one viewport-fixed floating tooltip and adds focus/keyboard handling plus focused jsdom coverage. - Reproducibility: yes. at source level. Current main renders an absolute `.daily-bar-tooltip` inside `.daily- ... ` overflow contexts, and the linked issue plus PR before screenshot demonstrate the tall-bar clipping case. Automerge notes: - PR branch already contained follow-up commit before automerge: Merge branch 'main' into fix-usage-tooltip-clipping Validation: - ClawSweeper review passed for head edbb26a5be49bb3d459cb2517267926667eb3ed2. - Required merge gates passed before the squash merge. Prepared head SHA: edbb26a5be49bb3d459cb2517267926667eb3ed2 Review: openclaw/openclaw#82846 (comment) Co-authored-by: sandypockets <41454557+sandypockets@users.noreply.github.com> Approved-by: takhoffman Co-authored-by: takhoffman <781889+takhoffman@users.noreply.github.com>
Summary: - The PR replaces per-bar absolute Usage chart tooltips with one viewport-fixed floating tooltip and adds focus/keyboard handling plus focused jsdom coverage. - Reproducibility: yes. at source level. Current main renders an absolute `.daily-bar-tooltip` inside `.daily- ... ` overflow contexts, and the linked issue plus PR before screenshot demonstrate the tall-bar clipping case. Automerge notes: - PR branch already contained follow-up commit before automerge: Merge branch 'main' into fix-usage-tooltip-clipping Validation: - ClawSweeper review passed for head edbb26a. - Required merge gates passed before the squash merge. Prepared head SHA: edbb26a Review: openclaw#82846 (comment) Co-authored-by: sandypockets <41454557+sandypockets@users.noreply.github.com> Approved-by: takhoffman Co-authored-by: takhoffman <781889+takhoffman@users.noreply.github.com>
Summary: - The PR replaces per-bar absolute Usage chart tooltips with one viewport-fixed floating tooltip and adds focus/keyboard handling plus focused jsdom coverage. - Reproducibility: yes. at source level. Current main renders an absolute `.daily-bar-tooltip` inside `.daily- ... ` overflow contexts, and the linked issue plus PR before screenshot demonstrate the tall-bar clipping case. Automerge notes: - PR branch already contained follow-up commit before automerge: Merge branch 'main' into fix-usage-tooltip-clipping Validation: - ClawSweeper review passed for head edbb26a. - Required merge gates passed before the squash merge. Prepared head SHA: edbb26a Review: openclaw#82846 (comment) Co-authored-by: sandypockets <41454557+sandypockets@users.noreply.github.com> Approved-by: takhoffman Co-authored-by: takhoffman <781889+takhoffman@users.noreply.github.com>
Summary: - The PR replaces per-bar absolute Usage chart tooltips with one viewport-fixed floating tooltip and adds focus/keyboard handling plus focused jsdom coverage. - Reproducibility: yes. at source level. Current main renders an absolute `.daily-bar-tooltip` inside `.daily- ... ` overflow contexts, and the linked issue plus PR before screenshot demonstrate the tall-bar clipping case. Automerge notes: - PR branch already contained follow-up commit before automerge: Merge branch 'main' into fix-usage-tooltip-clipping Validation: - ClawSweeper review passed for head edbb26a. - Required merge gates passed before the squash merge. Prepared head SHA: edbb26a Review: openclaw#82846 (comment) Co-authored-by: sandypockets <41454557+sandypockets@users.noreply.github.com> Approved-by: takhoffman Co-authored-by: takhoffman <781889+takhoffman@users.noreply.github.com>
Summary: - The PR replaces per-bar absolute Usage chart tooltips with one viewport-fixed floating tooltip and adds focus/keyboard handling plus focused jsdom coverage. - Reproducibility: yes. at source level. Current main renders an absolute `.daily-bar-tooltip` inside `.daily- ... ` overflow contexts, and the linked issue plus PR before screenshot demonstrate the tall-bar clipping case. Automerge notes: - PR branch already contained follow-up commit before automerge: Merge branch 'main' into fix-usage-tooltip-clipping Validation: - ClawSweeper review passed for head edbb26a. - Required merge gates passed before the squash merge. Prepared head SHA: edbb26a Review: openclaw#82846 (comment) Co-authored-by: sandypockets <41454557+sandypockets@users.noreply.github.com> Approved-by: takhoffman Co-authored-by: takhoffman <781889+takhoffman@users.noreply.github.com>
Summary: - The PR replaces per-bar absolute Usage chart tooltips with one viewport-fixed floating tooltip and adds focus/keyboard handling plus focused jsdom coverage. - Reproducibility: yes. at source level. Current main renders an absolute `.daily-bar-tooltip` inside `.daily- ... ` overflow contexts, and the linked issue plus PR before screenshot demonstrate the tall-bar clipping case. Automerge notes: - PR branch already contained follow-up commit before automerge: Merge branch 'main' into fix-usage-tooltip-clipping Validation: - ClawSweeper review passed for head edbb26a. - Required merge gates passed before the squash merge. Prepared head SHA: edbb26a Review: openclaw#82846 (comment) Co-authored-by: sandypockets <41454557+sandypockets@users.noreply.github.com> Approved-by: takhoffman Co-authored-by: takhoffman <781889+takhoffman@users.noreply.github.com>
Summary: - The PR replaces per-bar absolute Usage chart tooltips with one viewport-fixed floating tooltip and adds focus/keyboard handling plus focused jsdom coverage. - Reproducibility: yes. at source level. Current main renders an absolute `.daily-bar-tooltip` inside `.daily- ... ` overflow contexts, and the linked issue plus PR before screenshot demonstrate the tall-bar clipping case. Automerge notes: - PR branch already contained follow-up commit before automerge: Merge branch 'main' into fix-usage-tooltip-clipping Validation: - ClawSweeper review passed for head edbb26a. - Required merge gates passed before the squash merge. Prepared head SHA: edbb26a Review: openclaw#82846 (comment) Co-authored-by: sandypockets <41454557+sandypockets@users.noreply.github.com> Approved-by: takhoffman Co-authored-by: takhoffman <781889+takhoffman@users.noreply.github.com>
Summary: - The PR replaces per-bar absolute Usage chart tooltips with one viewport-fixed floating tooltip and adds focus/keyboard handling plus focused jsdom coverage. - Reproducibility: yes. at source level. Current main renders an absolute `.daily-bar-tooltip` inside `.daily- ... ` overflow contexts, and the linked issue plus PR before screenshot demonstrate the tall-bar clipping case. Automerge notes: - PR branch already contained follow-up commit before automerge: Merge branch 'main' into fix-usage-tooltip-clipping Validation: - ClawSweeper review passed for head edbb26a. - Required merge gates passed before the squash merge. Prepared head SHA: edbb26a Review: openclaw#82846 (comment) Co-authored-by: sandypockets <41454557+sandypockets@users.noreply.github.com> Approved-by: takhoffman Co-authored-by: takhoffman <781889+takhoffman@users.noreply.github.com>
Summary: - The PR replaces per-bar absolute Usage chart tooltips with one viewport-fixed floating tooltip and adds focus/keyboard handling plus focused jsdom coverage. - Reproducibility: yes. at source level. Current main renders an absolute `.daily-bar-tooltip` inside `.daily- ... ` overflow contexts, and the linked issue plus PR before screenshot demonstrate the tall-bar clipping case. Automerge notes: - PR branch already contained follow-up commit before automerge: Merge branch 'main' into fix-usage-tooltip-clipping Validation: - ClawSweeper review passed for head edbb26a. - Required merge gates passed before the squash merge. Prepared head SHA: edbb26a Review: openclaw#82846 (comment) Co-authored-by: sandypockets <41454557+sandypockets@users.noreply.github.com> Approved-by: takhoffman Co-authored-by: takhoffman <781889+takhoffman@users.noreply.github.com>
Summary: - The PR replaces per-bar absolute Usage chart tooltips with one viewport-fixed floating tooltip and adds focus/keyboard handling plus focused jsdom coverage. - Reproducibility: yes. at source level. Current main renders an absolute `.daily-bar-tooltip` inside `.daily- ... ` overflow contexts, and the linked issue plus PR before screenshot demonstrate the tall-bar clipping case. Automerge notes: - PR branch already contained follow-up commit before automerge: Merge branch 'main' into fix-usage-tooltip-clipping Validation: - ClawSweeper review passed for head edbb26a. - Required merge gates passed before the squash merge. Prepared head SHA: edbb26a Review: openclaw#82846 (comment) Co-authored-by: sandypockets <41454557+sandypockets@users.noreply.github.com> Approved-by: takhoffman Co-authored-by: takhoffman <781889+takhoffman@users.noreply.github.com>
Summary: - The PR replaces per-bar absolute Usage chart tooltips with one viewport-fixed floating tooltip and adds focus/keyboard handling plus focused jsdom coverage. - Reproducibility: yes. at source level. Current main renders an absolute `.daily-bar-tooltip` inside `.daily- ... ` overflow contexts, and the linked issue plus PR before screenshot demonstrate the tall-bar clipping case. Automerge notes: - PR branch already contained follow-up commit before automerge: Merge branch 'main' into fix-usage-tooltip-clipping Validation: - ClawSweeper review passed for head edbb26a. - Required merge gates passed before the squash merge. Prepared head SHA: edbb26a Review: openclaw#82846 (comment) Co-authored-by: sandypockets <41454557+sandypockets@users.noreply.github.com> Approved-by: takhoffman Co-authored-by: takhoffman <781889+takhoffman@users.noreply.github.com>
Summary: - The PR replaces per-bar absolute Usage chart tooltips with one viewport-fixed floating tooltip and adds focus/keyboard handling plus focused jsdom coverage. - Reproducibility: yes. at source level. Current main renders an absolute `.daily-bar-tooltip` inside `.daily- ... ` overflow contexts, and the linked issue plus PR before screenshot demonstrate the tall-bar clipping case. Automerge notes: - PR branch already contained follow-up commit before automerge: Merge branch 'main' into fix-usage-tooltip-clipping Validation: - ClawSweeper review passed for head edbb26a. - Required merge gates passed before the squash merge. Prepared head SHA: edbb26a Review: openclaw#82846 (comment) Co-authored-by: sandypockets <41454557+sandypockets@users.noreply.github.com> Approved-by: takhoffman Co-authored-by: takhoffman <781889+takhoffman@users.noreply.github.com>
Summary: - The PR replaces per-bar absolute Usage chart tooltips with one viewport-fixed floating tooltip and adds focus/keyboard handling plus focused jsdom coverage. - Reproducibility: yes. at source level. Current main renders an absolute `.daily-bar-tooltip` inside `.daily- ... ` overflow contexts, and the linked issue plus PR before screenshot demonstrate the tall-bar clipping case. Automerge notes: - PR branch already contained follow-up commit before automerge: Merge branch 'main' into fix-usage-tooltip-clipping Validation: - ClawSweeper review passed for head edbb26a. - Required merge gates passed before the squash merge. Prepared head SHA: edbb26a Review: openclaw#82846 (comment) Co-authored-by: sandypockets <41454557+sandypockets@users.noreply.github.com> Approved-by: takhoffman Co-authored-by: takhoffman <781889+takhoffman@users.noreply.github.com>
Summary
/usagecould be clipped for tall bars because each tooltip was rendered inside the overflow-clipped chart/card container.getBoundingClientRect(), flipped below when needed, and horizontally clamped inside the viewport.Change Type (select all)
Scope (select all touched areas)
Linked Issue/PR
Real behavior proof (required for external PRs)
/usagedaily usage bar chart tooltips could be clipped for tall bars because the tooltip was absolutely positioned inside the chart's overflow-clipped scrolling container.fix-usage-tooltip-clipping, Control UI source rendered through a repo-local Vite visual harness with fake daily usage data, and Playwright Chromium. The full OpenClaw runtime was not started.usage-tooltip-tall-desktop.png,usage-tooltip-short-desktop.png, andusage-tooltip-mobile-clamped.png. Terminal proof from the Playwright capture shows the fixed tooltip usesposition:"fixed",pointerEvents:"none",inChartContainer:false, and stays within the viewport on desktop and mobile..daily-chart-bars, uses a viewport-fixed layer, flips below in the narrow/top-edge case, and clamps horizontally inside the viewport.usage-tooltip-before-clipped.pngshows the old per-bar tooltip rendered inside the chart container. Terminal proof from the same harness showsposition:"absolute",inChartContainer:true, andclippedAboveChart:truefor the tall bar tooltip.Visual Evidence Files
Screenshots attached in the Evidence section below.
Captured DOM Proof
{"label":"before desktop tall bar","text":"May 1, 2026 1.2M tokens $8.42","position":"absolute","pointerEvents":"none","opacity":"1","inChartContainer":true,"clippedAboveChart":true,"tooltipTop":20,"tooltipBottom":89,"chartTop":91,"chartBottom":340,"viewportWidth":1280,"viewportHeight":720} {"label":"desktop tall bar","text":"May 1, 20261.2M tokens$8.42","position":"fixed","pointerEvents":"none","placement":"above","inChartContainer":false,"left":255,"right":337,"top":28,"bottom":97,"viewportWidth":1280,"viewportHeight":720} {"label":"desktop short bar","text":"May 2, 20264 tokens$0.01","position":"fixed","pointerEvents":"none","placement":"above","inChartContainer":false,"left":369,"right":451,"top":214,"bottom":283,"viewportWidth":1280,"viewportHeight":720} {"label":"mobile narrow tall bar","text":"May 1, 20261.2M tokens$8.42","position":"fixed","pointerEvents":"none","placement":"below","inChartContainer":false,"left":8,"right":90,"top":336,"bottom":405,"viewportWidth":360,"viewportHeight":640}Root Cause (if applicable)
Regression Test Plan (if applicable)
ui/src/ui/views/usage-render-overview.test.tsUser-visible / Behavior Changes
Daily usage chart tooltips remain visible for tall bars and stay within the viewport on narrow screens. Keyboard users can also focus daily bars and see the same tooltip details.
Diagram (if applicable)
Security Impact (required)
Yes/No) NoYes/No) NoYes/No) NoYes/No) NoYes/No) NoYes, explain risk + mitigation: N/ARepro + Verification
Environment
fix-usage-tooltip-clippingSteps
/usagedaily chart with representative daily usage containing both a tall bar and a short bar.Expected
Actual
Commands Run
Verification Result
node scripts/run-vitest.mjs ui/src/ui/views/usage-render-overview.test.ts: Passed.pnpm tsgo:test:ui: Passed.node scripts/run-oxlint.mjs --tsconfig config/tsconfig/oxlint.core.json ui/src/ui/views/usage-render-overview.ts ui/src/ui/views/usage-render-overview.test.ts: Passed with 0 warnings/errors.pnpm exec oxfmt --check --threads=1 ui/src/ui/views/usage-render-overview.ts ui/src/ui/views/usage-render-overview.test.ts ui/src/styles/usage.css: Passed.pnpm --dir ui build: Passed. Vite emitted an existing large chunk warning.git diff --check: Passed.codex review --uncommitted: Final review found no actionable correctness issues.node .artifacts/usage-tooltip-visual/capture.mjs: Passed and generated before/after screenshot artifacts.Evidence
Attach at least one:
Before
After
Human Verification (required)
What you personally verified (not just CI), and how:
position: fixed, outside.daily-chart-bars, andpointer-events: none.Review Conversations
Compatibility / Migration
Yes/No) YesYes/No) NoYes/No) NoRisks and Mitigations