Repository navigation
fix(ui): keep branch and editor tooltips beside their buttons - #133556
Conversation
|
🦞👀 Pull request received. I will update this pull request when review starts. |
|
Codex review: needs maintainer review before merge. Reviewed August 30, 2026, 6:36 PM ET / 22:36 UTC. ClawSweeper reviewWhat this changesThis 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 readinessKeep 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 Review scores
Verification
How this fits togetherThe 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
Decision needed
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
Agent review detailsSecurityNone. PR surfaceSource -5, Tests +148. Total +143 across 5 files. View PR surface stats
Review metrics
Root-cause clusterRelationship: Members:
Proposal only: this assessment does not dispatch repair, suppress jobs, mutate sibling items, close, or merge anything. Merge-risk optionsMaintainer options:
Technical reviewBest 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. LabelsLabel justifications:
EvidenceWhat I checked:
Likely related people:
Rank-up movesOptional improvements that raise the rating; they are not merge blockers.
Rating scale
Overall follows the weaker of proof and patch quality. Workflow
HistoryReview history (2 earlier review cycles)
|
|
Land-ready for e5553517a4db3ae37a5d4623a8176fae5b391334: CI run 33339287690, attempt 1 completed success, including the required
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.tsProceeding through the native |
|
🦞🧹 I asked ClawSweeper to review this item again. Re-review progress:
|
2270588 to
e555351
Compare
|
Merged via squash.
|
…aw#133556) * fix(ui): anchor branch and editor tooltips beside their buttons * test(ui): wait for app mount before checking route readiness
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: contentsand 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
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.tsBefore / after (Chromium production-component proof)
Before:
After:
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;
waitForControlUiRouteincorrectly 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.