Skip to content

fix(ui): keep branch and editor tooltips beside their buttons - #133556

Merged
steipete merged 2 commits into
mainfrom
fix/menu-tooltip-button-anchors
Aug 30, 2026
Merged

steipete merged 2 commits into
mainfrom
fix/menu-tooltip-button-anchors

Conversation

@steipete

@steipete steipete commented Aug 30, 2026 •

Copy link
Copy Markdown
Contributor

Closes #133553

What Problem This Solves

Fixes an issue where users hovering the conversation branch button see its hint in the window's top-left instead of beside the button, including the disabled explanation while an agent works. The file/diff sidebar editor-menu hint has the same defect.

Why This Change Was Made

The tooltip wrapped a Web Awesome dropdown whose host uses display: contents and therefore has no anchor rectangle. Both controls now use the existing title-tooltip adapter directly on their buttons. The button remains the direct dropdown trigger so menu geometry, selection, and disabled-state handling stay intact; no shared positioning algorithm or dependency changes.

Best-fix verdict: repair the invalid composition at its owners. Moving the tooltip inside slot="trigger" would reintroduce the earlier menu-positioning bug; changing shared tooltip geometry would add unnecessary special cases.

Provenance: raw-parent patch comparison verifies commit 87a7084e963 (PR #115352, branch-menu positioning) moved the branch tooltip outside the dropdown. This repair keeps that commit's direct button/menu anchor invariant.

User Impact

Branch and editor hints appear next to the hovered button. Branch switching remains unavailable while the agent is working, and both menus still dispatch their selected action.

Evidence

  • Added real-Chromium production-renderer regression coverage for idle branch, busy/disabled branch, and editor menu. All three failed on pre-fix geometry and pass after the repair; enabled menu selection and tooltip dismissal are covered too.
  • 15 browser tests passed (new regression + title-tooltip accessibility sibling suite).
  • 141 focused unit tests passed (header, sidebar, shared tooltip).
  • 4 route-helper unit tests and 9 focused E2E tests passed after repairing the CI readiness race below (sidebar interactions and encoded route readiness).
  • Complete revised five-file changed gates passed: formatting, UI/core-test typechecks, lint, style lint, i18n, dead exports, and repository guards.
  • Fresh automated review returned scoped-clean (P0 default), no accepted/actionable findings.
  • Production delta: +83/-93 (net -10, including indentation churn). Tooltip regression tests: +95/-0; CI helper/test repair: +77/-19 (test support +23/-18, tests +54/-1). No added production helper, state, configuration, or dependency.

Commands:

node scripts/run-vitest.mjs run --config "$PWD/ui/vitest.config.ts" --root ui --project browser src/pages/chat/components/chat-pane-header.browser.test.ts src/components/tooltip-title.browser.test.ts
node scripts/run-vitest.mjs ui/src/pages/chat/components/chat-pane-header.test.ts ui/src/pages/chat/components/chat-sidebar.test.ts ui/src/components/tooltip.test.ts
node scripts/run-vitest.mjs ui/src/test-helpers/control-ui-e2e.test.ts
node scripts/run-vitest.mjs run --config test/vitest/vitest.ui-e2e.config.ts --configLoader runner ui/src/e2e/sidebar-interactions.e2e.test.ts ui/src/e2e/control-ui-route-readiness.e2e.test.ts
node scripts/check-changed.mjs -- ui/src/pages/chat/components/chat-pane-header.ts ui/src/pages/chat/components/chat-sidebar-editor-menu.ts ui/src/pages/chat/components/chat-pane-header.browser.test.ts ui/src/test-helpers/control-ui-e2e.ts ui/src/test-helpers/control-ui-e2e.test.ts

Before / after (Chromium production-component proof)

Before:

Tooltip detached at the window origin

After:

Disabled branch tooltip beside its hovered button

Both captures were inspected. These are browser component screenshots, not an authenticated end-to-end agent conversation.

Live-flow proof gap

A separate isolated source UI connected to a fresh loopback gateway and completed chat startup. Its empty state had no verified model, so it displayed “No models available” and then Model Setup; no branched conversation or editor trigger was reachable through the normal UI. The preexisting gateway build also showed source/bundle version skew. No existing credentials, operator gateway state, or injected session state were used to bypass setup. The live busy-branch flow is therefore unproven; the deterministic production-renderer geometry failure/pass above is the change-specific proof. Both isolated servers were stopped.

CI-discovered readiness race

The first exact-head CI run failed only UI E2E shard 8/14: the native new-tab test threw after 2.305s, not the helper's 60s timeout. Playwright permits its browser-context page event before the new document's app element exists; waitForControlUiRoute incorrectly dereferenced that absent element both in its polling predicate and in failure diagnostics.

The helper now treats an absent app as not ready and retains the original error cause in diagnostics. Two deterministic regressions fail before/pass after, and the original failing native-tab flow plus encoded-route sibling tests pass. No retries, increased timeout, or weaker route assertion were added. This small test-support repair is included because it blocked this PR's CI.

Mechanical refresh after an unrelated CI failure

The next CI run passed all UI checks but failed the docs release-navigation expectation. That correction was already merged in PR #133581, commit 7504a3b3c45393e793e2a3960585a4e781da94cd. This branch is rebased onto that existing fix; no duplicate docs edits were added to this PR. All five PR files are byte-identical before and after the refresh. Rebase sanity passed: all 6 docs-sync tests and all 4 readiness-helper tests.

node scripts/run-vitest.mjs test/scripts/docs-sync-publish.test.ts ui/src/test-helpers/control-ui-e2e.test.ts

@clawsweeper

clawsweeper Bot commented Aug 30, 2026

Copy link
Copy Markdown
Contributor

🦞👀
ClawSweeper picked this up.

Pull request received. I will update this pull request when review starts.

@openclaw-barnacle openclaw-barnacle Bot added app: web-ui App: web-ui size: M maintainer Maintainer-authored PR labels Aug 30, 2026
@steipete
steipete marked this pull request as ready for review August 30, 2026 21:21
@steipete steipete self-assigned this Aug 30, 2026
@clawsweeper clawsweeper Bot added P3 Low-priority cleanup, docs, polish, ergonomics, or speculative work. rating: 🐚 platinum hermit Good normal PR readiness with ordinary maintainer review expected. status: 👀 ready for maintainer look ClawSweeper has no concrete contributor-facing blocker left for this PR. labels Aug 30, 2026
@clawsweeper

clawsweeper Bot commented Aug 30, 2026 •

Copy link
Copy Markdown
Contributor

Codex review: needs maintainer review before merge. Reviewed August 30, 2026, 6:36 PM ET / 22:36 UTC.

ClawSweeper review

What this changes

This PR places branch and editor tooltip text on their actual dropdown buttons and makes Control UI route readiness wait until a newly opened page has mounted its app element.

Merge readiness

⚠️ Ready for maintainer review - 3 items remain

Keep this member-owned, maintainer-labeled repair open for normal merge handling. The direct button-title composition uses the existing tooltip adapter, preserves the dropdown trigger and selection guard, and has focused browser and route-readiness coverage; no blocking correctness or security finding was identified. Exact-head CI is still running.

Priority: P3
Reviewed head: e5553517a4db3ae37a5d4623a8176fae5b391334
Owner decision: Required. See Decision needed.

Review scores

Measure Result What it means
Overall readiness 🐚 platinum hermit (4/6) The patch is a coherent owner-boundary repair with focused behavioral coverage and no identified correctness or security blocker.
Proof confidence 🌊 off-meta tidepool Not applicable: This is a member-authored PR, so the external-contributor proof gate does not apply; the supplied PR context nevertheless maps before/after Chromium evidence and the new browser regression to the changed button-title tooltip path.
Patch quality 🐚 platinum hermit (4/6) No actionable review findings were identified.

Verification

Check Result Evidence
Real behavior Not applicable Not applicable: This is a member-authored PR, so the external-contributor proof gate does not apply; the supplied PR context nevertheless maps before/after Chromium evidence and the new browser regression to the changed button-title tooltip path.
Evidence reviewed 7 items Current-main failure shape: The PR base wraps each Web Awesome dropdown in an openclaw tooltip, so the tooltip owns the dropdown host rather than the real slotted button; the proposed head instead retains the button as the direct trigger.
Tooltip owner boundary: The existing title-tooltip adapter discovers titled elements from document pointer/focus events and asks the shared tooltip to preview for that exact element, preserving direct anchor geometry without a wrapper.
Branch behavior: The branch button remains the direct dropdown trigger, carries the disabled reason or normal hint as its title, and keeps the existing selection guard against active or disabled branches.
Findings None None.
Security None None.

How this fits together

The Control UI chat header and file sidebar render dropdown-trigger buttons for branch switching and opening a file in an editor. A document-level title-tooltip adapter turns those button titles into positioned hints, while the UI E2E helper waits for the app router to settle.

flowchart LR
  User[Chat user] --> Header[Chat header or file sidebar]
  Header --> Trigger[Dropdown trigger button]
  Trigger --> Hint[Title tooltip adapter]
  Trigger --> Menu[Dropdown menu]
  Menu --> Action[Branch switch or editor launch]
  Tests[Browser and route tests] --> Header
Loading

Decision needed

Question Recommendation
After the exact-head checks complete successfully, should this member-owned Control UI repair be landed? Land after green CI: Merge the focused repair once the current head's required checks are green.

Why: The patch appears correct, but the item is member-authored and carries the protected maintainer label, so automated cleanup must not close or merge it.

Before merge

  • Resolve merge risk (P1) - Exact-head required checks are still in progress, so merge should wait for their terminal green result.
  • Complete next step (P2) - No repair is required from ClawSweeper; a maintainer should land the current patch after exact-head CI completes green.
Agent review details

Security

None.

PR surface

Source -5, Tests +148. Total +143 across 5 files.

View PR surface stats
Area Files Added Removed Net
Source 3 106 111 -5
Tests 2 149 1 +148
Docs 0 0 0 0
Config 0 0 0 0
Generated 0 0 0 0
Other 0 0 0 0
Total 5 255 112 +143

Review metrics

Metric Value Why it matters
Production versus test delta production +83/-93 (net -10); tests +149/-1; test support +23/-18 The production change removes wrapper composition overall while adding focused browser and route-helper regression coverage.

Root-cause cluster

Relationship: fixed_by_candidate
Canonical: #133553
Summary: This PR is the linked candidate repair for the reported branch and editor tooltip-placement defect.

Members:

Proposal only: this assessment does not dispatch repair, suppress jobs, mutate sibling items, close, or merge anything.

Merge-risk options

Maintainer options:

  1. Decide the mitigation before merge
    Retain the direct-button title-tooltip arrangement and land it after the exact-head checks finish green.
  2. Pause or close
    Do not merge this PR until maintainers decide whether the risk is worth taking.

Technical review

Best possible solution:

Retain the direct-button title-tooltip arrangement and land it after the exact-head checks finish green.

Do we have a high-confidence way to reproduce the issue?

Yes, at source level: the base composition wraps the dropdown host, and the added Chromium regression exercises the three affected rendered controls. This read-only environment could not independently run the browser test or retrieve the linked media because network access was unavailable.

Is this the best way to solve the issue?

Yes. Reusing the document-level title-tooltip adapter on the real button fixes the anchor at the owning control while retaining the existing dropdown trigger, event handlers, and disabled selection guard.

AGENTS.md: found and applied where relevant.

Codex review notes: model internal, reasoning high; reviewed against 7504a3b3c453.

Labels

Label justifications:

  • P3: This is a focused Control UI tooltip and test-readiness repair with no demonstrated data, security, delivery, or availability impact.
  • rating: 🐚 platinum hermit: Overall readiness is 🐚 platinum hermit; proof is 🌊 off-meta tidepool and patch quality is 🐚 platinum hermit.
  • status: 👀 ready for maintainer look: ClawSweeper has no concrete contributor-facing blocker left for this PR. Not applicable: This is a member-authored PR, so the external-contributor proof gate does not apply; the supplied PR context nevertheless maps before/after Chromium evidence and the new browser regression to the changed button-title tooltip path.

Evidence

What I checked:

Likely related people:

  • steipete: Suggested for follow-up; no historical authorship or introduction is verified. (role: unverified routing candidate; confidence: low)
  • Vincent Koc: Suggested for follow-up; no historical authorship or introduction is verified. (role: unverified routing candidate; confidence: low)

Rank-up moves

Optional improvements that raise the rating; they are not merge blockers.

  • Wait for the exact-head required checks to complete green before merging.

Rating scale

Score Internal tier Crab rank Meaning
6/6 S 🦀 challenger crab Exceptional readiness
5/6 A 🦞 diamond lobster Very strong readiness
4/6 B 🐚 platinum hermit Good normal PR; ordinary maintainer review
3/6 C 🦐 gold shrimp Useful, but confidence is limited
2/6 D 🦪 silver shellfish Proof or implementation needs work
1/6 F 🧂 unranked krab Not merge-ready
N/A NA 🌊 off-meta tidepool Rating does not apply

Overall follows the weaker of proof and patch quality.
Shiny media proof means a screenshot, video, or linked artifact directly shows the changed behavior. Runtime, network, CSP, and security claims still need visible diagnostics.

Workflow

  • ClawSweeper keeps one durable marker-backed review comment per issue or PR.
  • Re-runs edit this comment so the latest verdict, findings, and automation markers stay together instead of adding duplicate bot comments.
  • A fresh review can be triggered by eligible @clawsweeper re-review comments, exact-item GitHub events, scheduled/background review runs, or manual workflow dispatch.
  • PR/issue authors and users with repository write access can comment @clawsweeper re-review or @clawsweeper re-run on an open PR or issue to request a fresh review only.
  • Maintainers can also comment @clawsweeper review to request a fresh review only.
  • Fresh-review commands do not start repair, autofix, rebase, CI repair, or automerge.
  • Maintainer-only repair and merge flows require explicit commands such as @clawsweeper autofix, @clawsweeper automerge, @clawsweeper fix ci, or @clawsweeper address review.
  • Maintainers can comment @clawsweeper explain to ask for more context, or @clawsweeper stop to stop active automation.

History

Review history (2 earlier review cycles)
  • reviewed 2026-08-30T21:28:49.665Z sha 4e5ef61ee4201e1efca767845b8948c1ac0d835f :: needs maintainer review before merge. :: none
  • reviewed 2026-08-30T22:10:27.394Z sha 227058844bd83daf229eb20fcd1993fcaedb13e5 :: needs maintainer review before merge. :: none

@steipete

steipete commented Aug 30, 2026 •

Copy link
Copy Markdown
Contributor Author

Land-ready for e5553517a4db3ae37a5d4623a8176fae5b391334: CI run 33339287690, attempt 1 completed success, including the required openclaw/ci-gate.

  • Latest ClawSweeper review covers this exact head, has no code/security findings, and asks to wait for green CI plus maintainer handling. Both conditions are satisfied by this result and the explicit landing request. No enforced independent-approval rule applies to these paths.
  • Personally inspected installed Web Awesome and Playwright contracts, and downloaded/viewed the published before/after screenshots. The tooltip uses the actual button anchor; direct dropdown triggers and disabled selection guards remain intact.
  • The native-tab readiness race is covered by two failing-before/passing-after regressions and a passing rerun of the original E2E flow. No retry or timeout increase was introduced.
  • The unrelated docs expectation failure was already fixed by PR #133581. Rebase preserves all five PR file contents and stable patch ID ebd5793115130d381e743f5b51a5d49ab3b72a1b; 6 docs and 4 readiness sanity tests pass. No duplicate docs edits.
  • Local proof: 15 browser, 141 header/sidebar/tooltip unit, 4 helper unit, and 9 E2E cases passed; the complete changed-file gate and fresh full-PR autoreview (P0 threshold) passed. Production net -10 lines; test support net +5; tests net +148.
  • Full authenticated busy-branch UI proof remains unavailable in the isolated setup (no verified model/branched session, preexisting source/dist skew). The attached screenshots are explicitly Chromium production-component proof; no operator gateway or credentials were modified.

Validation commands:

node scripts/run-vitest.mjs run --config "$PWD/ui/vitest.config.ts" --root ui --project browser src/pages/chat/components/chat-pane-header.browser.test.ts src/components/tooltip-title.browser.test.ts
node scripts/run-vitest.mjs ui/src/pages/chat/components/chat-pane-header.test.ts ui/src/pages/chat/components/chat-sidebar.test.ts ui/src/components/tooltip.test.ts
node scripts/run-vitest.mjs ui/src/test-helpers/control-ui-e2e.test.ts
node scripts/run-vitest.mjs run --config test/vitest/vitest.ui-e2e.config.ts --configLoader runner ui/src/e2e/sidebar-interactions.e2e.test.ts ui/src/e2e/control-ui-route-readiness.e2e.test.ts
node scripts/check-changed.mjs -- ui/src/pages/chat/components/chat-pane-header.ts ui/src/pages/chat/components/chat-sidebar-editor-menu.ts ui/src/pages/chat/components/chat-pane-header.browser.test.ts ui/src/test-helpers/control-ui-e2e.ts ui/src/test-helpers/control-ui-e2e.test.ts
node scripts/run-vitest.mjs test/scripts/docs-sync-publish.test.ts ui/src/test-helpers/control-ui-e2e.test.ts

Proceeding through the native scripts/pr prepare/merge flow.

@clawsweeper

clawsweeper Bot commented Aug 30, 2026 •

Copy link
Copy Markdown
Contributor

🦞🧹
ClawSweeper re-review requested.

I asked ClawSweeper to review this item again.
Action: item re-review queued (workflow sweep.yml, event exact_review_queue).
Result: when the review finishes, ClawSweeper will create the durable review comment if needed or update the existing comment in place.

Re-review progress:

@clawsweeper clawsweeper Bot added the proof: 📸 screenshot Contributor real behavior proof includes screenshot evidence. label Aug 30, 2026
@steipete
steipete force-pushed the fix/menu-tooltip-button-anchors branch from 2270588 to e555351 Compare August 30, 2026 22:29
@clawsweeper clawsweeper Bot removed the proof: 📸 screenshot Contributor real behavior proof includes screenshot evidence. label Aug 30, 2026
@steipete
steipete merged commit 94f6ceb into main Aug 30, 2026
159 of 161 checks passed
@steipete
steipete deleted the fix/menu-tooltip-button-anchors branch August 30, 2026 22:57
@steipete

Copy link
Copy Markdown
Contributor Author

Merged via squash.

github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Aug 31, 2026
…aw#133556)

* fix(ui): anchor branch and editor tooltips beside their buttons

* test(ui): wait for app mount before checking route readiness
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

app: web-ui App: web-ui maintainer Maintainer-authored PR P3 Low-priority cleanup, docs, polish, ergonomics, or speculative work. rating: 🐚 platinum hermit Good normal PR readiness with ordinary maintainer review expected. size: M status: 👀 ready for maintainer look ClawSweeper has no concrete contributor-facing blocker left for this PR.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Bug: branch and editor tooltips appear at the top-left of the window

1 participant