Skip to content

test(web): aim panel tab clicks at the title, not the tab - #572

Merged
thellert merged 1 commit into
mainfrom
worktree-fix+panel-browser-test-targets
Aug 12, 2026
Merged

test(web): aim panel tab clicks at the title, not the tab#572
thellert merged 1 commit into
mainfrom
worktree-fix+panel-browser-test-targets

Conversation

@thellert

Copy link
Copy Markdown
Collaborator

Three tests in test_panels_browser.py fail or flake on main, and the browser lane is path-filtered so nothing under those paths had changed to surface them.

Two of them click a service tile's dock tab as a whole. That was fine when a tab was just a title and a close button, but a panel now contributes controls into its own tile header — artifacts renders a search box and filter chips — which widens the tab to roughly 417px. Playwright clicks an element's centre, so the click lands in the search input: no tile focus, no focus POST, and the assertions fail on the downstream symptom rather than the cause. One of the two only failed intermittently because it raced the contributions rendering; a narrow tab still hit the title. A third site was passing on the same luck.

The drag test is unrelated. Its synthetic HTML5 drag gave dockview two fixed 100ms sleeps to process a dragover and resolve a drop target. dockview resolves that asynchronously and needs more than one processed dragover, so under the load of a full-file run the budget expired, the drop was silently ignored, and the failure surfaced as a missing tab.

Focusing the tab title is the durable target: it is the region that means "focus this tile" regardless of what a panel contributes beside it. The drag now polls for dockview's own .dv-drop-target-selection.dv-drop-target-bottom overlay, which both waits on the real signal and doubles as an assertion that the geometry resolved to an edge split — and throws by name if it never does.

Test-only; no product behaviour changes. Verified against 6c2d8473's parent that the focus-echo commit did not cause any of this. Full file 36/36 twice, and CI's exact browser-lane command 114 passed locally.

A service tile's tab is as wide as whatever the panel contributes into its
header, so an element-centre click on the tab lands inside a contributed
control — for artifacts, its search input — and focuses nothing. Focus the
tab title instead, which always means "focus this tile".

The rail-drag drop sequence now waits for dockview's own drop-target overlay
instead of two fixed sleeps. dockview resolves the target asynchronously and
only after a dragover it has processed, so the fixed budget expired under
load and the drop was silently ignored; a drop with no resolved target now
fails by name rather than as a missing tab.
@thellert
thellert merged commit 2e71023 into main Aug 12, 2026
44 checks passed
@thellert
thellert deleted the worktree-fix+panel-browser-test-targets branch August 12, 2026 14:07
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.

1 participant