Repository navigation
Description
Summary
The floating toolbar of a selected canvas node can overlap the Switch project control in the top bar after a drag. When that happens, the toolbar intercepts pointer events, so the user (and Playwright) cannot click the project switcher.
This surfaced in the isolated browser CI for both PR #422 and PR #512, although neither PR changes the affected canvas/selection layout code. It should be diagnosed and fixed independently of those Agent PRs.
CI failure evidence
- #512 browser isolated job:
tests/browser/canvas_progressive_load.mjs,open()at line 107, called byverifyLocale()around line 151. - Playwright repeatedly found
.cw-project-chevron(Switch project) visible and enabled, but.cw-node-toolbar-anchor [data-action="panorama"](720 panorama) intercepted pointer events for the full 20-second click timeout. - The isolated browser lane passed 29/30 workflows. The earlier [feat] agent: download original conversation traces as a ZIP archive (#421) #422 failure had the same blocker signature.
Isolated investigation (2026-11-25)
A read-only investigation against upstream main b9b7e587 and #512 head 09606283 found a plausible concrete mechanism using temporary instrumentation (removed after the experiment):
- The fixture drags and selects the Delayed node initially located around canvas coordinates
(40, 80). - With an initial viewport
(0, 0, 1), the selected node's floating toolbar can be placed at approximately y = 28, overlapping the project switcher's vertical region y = 17–51. - The viewport adjustment that should move the toolbar down is gated by
blocked === false, involvingsrc/canvas/useSelectionPresentation.tsand the interaction state insrc/canvas/workspace/useWorkspaceInteraction.tsx(around lines 615–621). - During drag,
blockedis true. Its calculation readspointerGesture.current.moved, which is a mutable ref and does not itself schedule a React render after pointer release. In an instrumented local run, the toolbar still covered the switcher for ~1.4 seconds after release; a later Retry interaction triggered a render and the viewport adjustment finally ran. - This indicates a real hit-testing/layout overlap. A later render can make the test pass incidentally; an exact reproduction of the CI sequence that leaves it overlapping for the full 20 seconds was not obtained. Potential interruption by
userNavigation()/stopPresentation()remains a hypothesis, not a confirmed root cause.
Control runs (no production code changes)
| Tree | Scenario | Pass |
|---|---|---|
#512 head 09606283 |
canvas_progressive_load alone |
7/7 |
Upstream main b9b7e587 |
canvas_progressive_load alone |
7/7 |
| #512 head | canvas_switch then canvas_progressive_load |
9/10; a different off-screen-node assertion failed once |
| Upstream main | Same pair | 10/10 |
The test runs shared a host and the experiments do not establish a failure probability. They do not reproduce the specific CI pointer-block failure locally. The repeated cross-PR CI signature and the overlapping DOM/geometry support tracking this as a separate baseline canvas problem, rather than attributing it to #512.
Scope / desired behavior
- The selected-node toolbar must not prevent interacting with global top-bar controls after dragging, pointer release, or viewport changes.
- Preserve actual node selection and toolbar functionality, keyboard/pointer interactions, and viewport positioning.
- Review how the presentation adjustment is retriggered when a gesture ends, including whether a ref-only state transition or
lastLayoutsuppresses a needed second attempt. - Prefer product behavior correctness over a test-only workaround. Do not use Playwright
force: true, arbitrary waits, or broader timeouts to hide an obstruction. - Verify the behavior with the actual project-switch button and a selected/dragged node, not merely with a mocked click event.
- Cover both en-US and zh-CN and ensure the progressive-loading browser workflow remains stable.
Overlap check
PR #511, merged 2026-11-25, changes other nightly browser tests and documentation. The inspected #511 diff does not include canvas_progressive_load.mjs or the selection presentation logic. Please recheck latest main before implementing.
Ownership
Tracking and investigation only. Unassigned, no implementation or PR committed by this issue. Once the remaining CI-only sequence is reproduced, propose a focused product-side fix and regression test. Related to #422 and #512 but should be independently reviewed.
Activity