Skip to content

Thread browser harnesses: reach Delete through the More menu, and attack Copy in the dismissal probe - #12827

Merged
danielhanchen merged 1 commit into
mainfrom
ci-heavy-thread-delete-menu
Oct 6, 2026
Merged

danielhanchen merged 1 commit into
mainfrom
ci-heavy-thread-delete-menu

Conversation

@danielhanchen

Copy link
Copy Markdown
Member

Summary

Frontend build + bundle sanity now fails on main in its Browser smoke for heavy-thread interaction cost step (for example #12810's own run):

[heavy-thread] HARNESS-BROKEN chromium at 25000 chars could not run the delete action at all
[heavy-thread] HARNESS-BROKEN chromium at 100000 chars could not run the delete action at all

It was hidden until the earlier steps in that job went green (#12781, #12810). The next step, Browser check for non-modal menu dismissal, would fail right after it for the same reason.

Which side is wrong

The harnesses. #12735 deliberately took Delete off the assistant action bar and made it the last item of the More menu. Three browser harnesses still asked for a Delete message button on the bar:

Harness In CI Effect
playwright_heavy_thread.py yes the delete action could not run, which is HARNESS-BROKEN
probe_dismiss_guard.py yes, the next step every case would return no Delete button
playwright_thread_weight.py no (measurement harness) the same broken delete

Change

  • heavy_thread and thread_weight: DELETE_JS opens More (pointerdown, like the menu action), finds the Delete item and clicks it. The menu is opened and the item found before the clock starts, so the number is still what selecting Delete costs; opening the menu is already the menu action's number. A menu it opened but could not use is closed with Escape.
  • probe_dismiss_guard: Delete is now inside the menu, where a dismissal cannot reach it. The probe now attacks the reply's Copy button, which is always on the bar and harmless if a click slips through. The verdict is whether a click reached Copy, counted on window in the bubble phase. The guard (lib/menu-dismiss.ts) swallows on document in the capture phase with stopPropagation, so a swallowed click never arrives there and one that slips past always does, however React re-renders the button. Two checks keep a pass from being vacuous:
    • each case first clicks Copy directly and requires that to be counted once (then blurs, so the focus cases start as before);
    • the press point must be uncovered by the open menu.
  • New tests/studio/test_thread_harness_controls_exist.py: every bar button (actionButton("X")) and More-menu item the three harnesses ask for must be rendered by the assistant action bar in thread.tsx, so the next move of a control fails there with its name instead of in a browser job.
  • The workflow comment over the dismissal step now says what a failure means.

Verification

  • SMOKE_HEAVY_CHARS=25000 python tests/studio/playwright_heavy_thread.py: main's script reports delete ran False and could not run the delete action at all; this branch reports delete ran True, 284ms, 20 messages before.
    • Locally both arms also log one 403 during seeding: a dev-server artifact of serving a symlinked node_modules, the same on main and absent in CI.
  • python tests/studio/probe_dismiss_guard.py --engine chromium: PASS. All 21 cases ran with no errors and every positive control counted one click.
    • With the guard's swallowClick disabled, it fails quick, held, touch and dismiss_then_space with dismissing the menu also clicked the control underneath.
  • test_thread_harness_controls_exist.py: passes; with main's three harnesses it fails, naming Delete message in each.
  • The heavy-thread, autoscroll and playwright-wiring contract tests pass (124).

…ack Copy in the dismissal probe

#12735 moved Delete off the assistant action bar into the More menu. Three
browser harnesses still asked for a "Delete message" button:

- playwright_heavy_thread.py could not run its delete action, which reports
  HARNESS-BROKEN and fails Frontend build + bundle sanity now that the steps
  before it pass. It now opens More and selects Delete, with the menu opened
  before the clock starts so the number is still what Delete costs.
- playwright_thread_weight.py, a measurement harness CI does not run, the same.
- probe_dismiss_guard.py, the next step in that job, attacked the Delete
  button and would error on every case. Delete is now inside the menu, where a
  dismissal cannot reach it, so the probe attacks the reply's Copy button and
  counts clicks reaching it on window in the bubble phase, which the guard's
  capture-phase swallow stops. Each case first clicks Copy directly and needs
  that counted, and needs the press point uncovered by the open menu.

test_thread_harness_controls_exist.py requires every control the three ask
for to be rendered by the assistant action bar in thread.tsx.
@danielhanchen

Copy link
Copy Markdown
Member Author

@codex review

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Oct 6, 2026 •

Copy link
Copy Markdown

Codex Review Summary

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

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-10-06T05:23:56.696899Z 89ed0cc 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. You're on a roll.

Reviewed commit: 89ed0cc61a

ℹ️ 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