Skip to content

Long-chat gate: settle pointer targets before a trusted hover or click - #17274

Merged
danielhanchen merged 2 commits into
mainfrom
studio-gate-source-card-flake
Nov 9, 2026
Merged

danielhanchen merged 2 commits into
mainfrom
studio-gate-source-card-flake

Conversation

@danielhanchen

Copy link
Copy Markdown
Member

Problem

The long-chat gate sometimes reports source_card as NOT_RUN ("never reached sel in this mode, OK in default"), most often in Liquid 3D at 200 turns. It has failed Frontend CI on unrelated PRs (the Ubuntu composer leg of #17007, local runs of other branches).

Cause

The thread viewport is scroll-smooth. The harness's scrollIntoView({block: 'nearest'}) therefore animated and returned while the target was still moving: on a freshly loaded 200-turn page the last source chip starts 3,000 to 19,000 px below the viewport, and scrollTop kept climbing for about 2 s after the call. block: 'nearest' from below also parks the chip at the viewport's bottom edge (y about 836 to 875 of 900), which is under the floating composer, so the trusted Playwright hover landed on the composer and no hover card opened. Both natural failures had the chip at [643, 836, 151, 26] with button.composer-pill-btn under its centre.

Change

  • The target scroll uses behavior: 'instant'.
  • Before a trusted pointer action (hover, pclick) only, the harness waits until the target's rect holds for 3 frames (capped at 120) and checks that the target is the element under its own centre; if something covers it, it centres the target instantly and waits again. A target already clear gets no extra scroll.
  • Measurement, fail rules and areas are unchanged; nothing is skipped.

Results

Liquid 3D, 200 turns, 2 to 4 browsers in parallel on a loaded host:

before after
full 30-area sweep 2 of 32 NOT_RUN 0 of 30
chip forced under the composer 16 of 16 NOT_RUN 0 of 16

source_card CPU on passing runs is comparable (median 1038 ms, range 796 to 2291, before; 1284 ms, 1037 to 1846, after). tests/studio/test_area_matrix.py: 32 pass.

The thread viewport is scroll-smooth, so the gate's scrollIntoView animated and returned while the
target was still moving, and block: nearest from below left it at the viewport's bottom edge under the
floating composer. The trusted hover then landed on the composer, so source_card intermittently
reported NOT_RUN (never reached sel) at 200 turns. Scroll instantly, wait until the target holds still,
and centre it only if something else is under its centre.
@danielhanchen

Copy link
Copy Markdown
Member Author

@codex review

@chatgpt-codex-connector

Copy link
Copy Markdown
Codex Review Summary: 🔄 Running

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review 🔄 Running since 2026-11-09T16:19:50.360374Z 6886450 PR opened
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Nov 9, 2026 •

Copy link
Copy Markdown
Codex Review Summary: ✅ Completed

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-11-09T16:21:02.429692Z 6886450 Manual request
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review: Didn't find any major issues. Keep it up!

Reviewed commit: 6886450f56

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

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