Repository navigation
test(ui): measure the identity menu after the resize settles - #207579
Merged
Merged
Conversation
- The 390x360 viewport places the open menu with a position-try fallback. Chrome keeps that fallback for layout reads until the next rendering update, so a baseline read right after setViewportSize could be stale. - Wait two animation frames before the baseline read.
Contributor
|
🦞👀 Pull request received. I will update this pull request when review starts. ClawSweeper review completeClawSweeper finished reviewing this revision. The review result is being finalized. |
github-actions Bot
pushed a commit
to Desicool/openclaw
that referenced
this pull request
Nov 29, 2026
…w#207579) ## Problem `ui/src/e2e/openclaw-id-menu.e2e.test.ts:178` fails intermittently at the bottom anchor check (line 506): the menu bottom reads 822, the baseline 595.39. It fails with the same numbers each time and more often under host load. It passes in most CI runs. ## Cause The test owns this failure. The product is correct. - The 390px case opens the menu in a 390x360 viewport. The menu (587px) does not fit above its trigger, so Chrome places it with the `--oc-overlay-fit` position-try fallback (`ui/src/components/solid/overlay.css:65`): top 8, bottom 595.39. - The test then calls `setViewportSize({ height: 900 })` and immediately reads `before = menu.boundingBox()`. - Chrome keeps the last successful position option for layout reads until the next rendering update re-chooses it ([CSS anchor positioning, ResizeObserver timing](https://drafts.csswg.org/css-anchor-position-1/#fallback-apply)). If no frame runs between the resize and the read, `before` is the stale fallback box (bottom 595.39). After the frame, the base `top span-right` placement fits, and the menu sits above its trigger (bottom 822). - Whether a frame lands in that gap depends on timing, so the failure is load-sensitive. Users never see the stale box: that update re-lays out the menu before paint. Only synchronous layout reads in the gap observe it. ## Fix Wait two animation frames after the resize, before the baseline read. The double `requestAnimationFrame` is the existing convention in the Control UI e2e suite. Test only: +8 / -1. ## Evidence - Probe on `origin/main` (6a65ab0), 390px light: right after `setViewportSize`, `position-area: span-right` with bottom 595.39. Two frames later, `span-right top` with bottom 822. - Main, file alone: 3 of 4 runs red with `822 vs 595.390625`. - Forced condition on main (read `before` in the window `resize` handler, the earliest point after the resize): 3 of 3 red with the same numbers. - This branch, file alone: 3 of 3 green under higher host load than the red main runs. The local shard-6 file set passed once. - `pnpm tsgo:test:ui`, oxlint and oxfmt on the file: clean. Co-authored-by: Ayaan Zaidi <[email protected]>
tideclaw-bot
pushed a commit
that referenced
this pull request
Nov 30, 2026
…207547) ## Problem `ui/src/e2e/linked-session-navigation.e2e.test.ts:76` fails on main in `checks-ui-e2e (6/10)`: both cases time out after 30 s waiting for the worktree owner "Session" link to be visible. Log signature (CI run 46147302963, shard 6): `locator.waitFor: Timeout 30000ms exceeded … waiting for locator('openclaw-worktrees-page').getByRole('link', { name: 'Session', exact: true }) to be visible`. The failure looked order-dependent, but it is not. The file fails alone on main 440945f. #203716 (1a05dca) moved the owner link into the row's collapsed `<details class="worktree-row__details">` (`ui/src/pages/worktrees/worktrees-page.tsx:315-328`) and did not update this test. The CI failure screenshot shows the row collapsed with the link hidden. Main CI skips ui-e2e through changed-file selection, so the red shows only on PRs that select the shard. ## Solution The test now opens the row's repository details, as a user does, before it waits for the link. The click and href identity checks do not change. ## Impact - Test-only. No product change. - Users: no change. With #203716 the owner Session link is one disclosure click away. This PR keeps that design. Putting the link back outside the disclosure is a separate product decision. ## Evidence - Red on main: alone on 440945f, 2/2 cases time out at the same locator. - Green on this branch: `linked-session-navigation.e2e` 2/2 and `worktrees.e2e` 9/9. - `pnpm check:changed`: typecheck, lint and format pass. The dead-export scan fails on 5 existing main exports that this PR does not touch. - Shard proof: the 109-file CI shard-6 set, run locally 3 times on this head. `linked-session-navigation.e2e` passed 2/2 in every run. Two runs passed 109/109. The third run, on a heavily loaded host, failed 3 unrelated files: two initial-roster load timeouts and an `openclaw-id-menu.e2e:178` geometry check, which is tracked separately. - PR CI: `checks-ui-e2e (1/2)` ran `linked-session-navigation.e2e`, and it passed 2/2. Co-authored-by: Ayaan Zaidi <[email protected]> (cherry picked from commit 27036be) Companion audit: #207883 adds worktree cleanup statuses, not delete-dialog path identity. #207398 optimizes scans, #207547 checks owner navigation, and #203819/#201422/#207982/#207579 touch styles, strings, or other fixtures; no prerequisite established. Co-authored-by: RomneyDa <[email protected]>
tideclaw-bot
pushed a commit
that referenced
this pull request
Nov 30, 2026
* fix(worktrees): identify the checkout before deletion Co-authored-by: vyctorbrzezowski <[email protected]> * fix: show the exact checkout before deleting a worktree Worked on by: - @vyctorbrzezowski Co-authored-by: vyctorbrzezowski <[email protected]> OpenClaw-Publication: 4b537414-6701-8ad6-bf14-7f1def12956c * fix: keep exact checkout identity in compact worktree rows Co-authored-by: vyctorbrzezowski <[email protected]> * fix: satisfy lint in the touched test * fix: satisfy lint in the Worktrees page * fix(ui): reuse Settings layout constraints for worktree rows --------- Co-authored-by: roboclaw-bot <[email protected]> Co-authored-by: vyctorbrzezowski <[email protected]> (cherry picked from commit 1a05dca) Companion audit: #207883 adds worktree cleanup statuses, not delete-dialog path identity. #207398 optimizes scans, #207547 checks owner navigation, and #203819/#201422/#207982/#207579 touch styles, strings, or other fixtures; no prerequisite established. Release adaptation: Use stable list records for repository labels, keep stable create and removal behavior, and show the exact checkout in both existing confirmation dialogs. Co-authored-by: RomneyDa <[email protected]>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
ui/src/e2e/openclaw-id-menu.e2e.test.ts:178fails intermittently at the bottom anchor check (line 506): the menu bottom reads 822, the baseline 595.39. It fails with the same numbers each time and more often under host load. It passes in most CI runs.Cause
The test owns this failure. The product is correct.
--oc-overlay-fitposition-try fallback (ui/src/components/solid/overlay.css:65): top 8, bottom 595.39.setViewportSize({ height: 900 })and immediately readsbefore = menu.boundingBox().beforeis the stale fallback box (bottom 595.39). After the frame, the basetop span-rightplacement fits, and the menu sits above its trigger (bottom 822).Users never see the stale box: that update re-lays out the menu before paint. Only synchronous layout reads in the gap observe it.
Fix
Wait two animation frames after the resize, before the baseline read. The double
requestAnimationFrameis the existing convention in the Control UI e2e suite. Test only: +8 / -1.Evidence
origin/main(27036be), 390px light: right aftersetViewportSize,position-area: span-rightwith bottom 595.39. Two frames later,span-right topwith bottom 822.822 vs 595.390625.beforein the windowresizehandler, the earliest point after the resize): 3 of 3 red with the same numbers.pnpm tsgo:test:ui, oxlint and oxfmt on the file: clean.