Skip to content

Chat UI: find the Full access consent dialog by its slots, not its wording - #12640

Merged
danielhanchen merged 2 commits into
mainfrom
ci/full-access-consent-by-slot
Oct 3, 2026
Merged

danielhanchen merged 2 commits into
mainfrom
ci/full-access-consent-by-slot

Conversation

@danielhanchen

@danielhanchen danielhanchen commented Oct 3, 2026 •

Copy link
Copy Markdown
Member

Problem

Chat UI Tests is red on main since #12630 (Studio: shorter permission menu, Learn more, calmer Full access). The permission step fails with:

Expect "to_be_visible" get_by_role("alertdialog").get_by_role("heading", name="Enable Full access?")
...
- alertdialog "Turn on Full access?":
  - heading "Turn on Full access?" [level=2]

#12630 reworded the consent dialog: Enable Full access? is now Turn on Full access?, and the confirm button I understand is now Turn on. The consent flow itself did not change, so this is the test pinning copy, not a product regression.

Fix

  • Studio: shorter permission menu, Learn more, calmer Full access #12630 also removed the pill's data-variant="danger" for Full access on purpose. With the dialog found, the step failed on the next line (Locator expected to have attribute 'danger', staging Linux and Mac). That assertion is dropped; expect_mode("Full access") already checks the pill's label.

  • tests/studio/playwright_chat_ui.py: the Full access step finds the dialog title, Cancel and confirm through the data-slot attributes the shared AlertDialog parts render (alert-dialog-title, alert-dialog-cancel, alert-dialog-action). It still checks the substance: the title names Full access, the body warns about the sandbox, Cancel leaves the previous mode, and confirming turns Full access on without persisting it.

  • tests/studio/test_chat_ui_full_access_consent.py (new, fast shard): pins both halves of that contract so a drift shows up in seconds instead of in the Playwright job:

    • the step looks up no dialog heading or button by a literal name;
    • each slot selector is one alert-dialog.tsx renders, and the Full access dialog in permission-mode-select.tsx is built from AlertDialogTitle, AlertDialogCancel and AlertDialogAction;
    • the dialog title still names Full access and the body still mentions the sandbox;
    • every attribute the step asserts on the pill is one the composer pill renders.

Verification

  • New guard: 9 passed on this branch.
  • Sabotage:
    • main's driver: 4 failed (literal lookups, slot constants missing);
    • retitling the dialog without "Full access": 1 failed;
    • swapping AlertDialogAction for a plain Button: 1 failed;
    • restoring the data-variant danger assertion: 1 failed.
  • tests/test_formatter_fixed_point.py and test_chat_ui_permission_reload_wait.py pass.

#12630 reworded the Full access consent dialog (Enable Full access? became
Turn on Full access?, I understand became Turn on). The consent flow did not
change, but the Chat UI permission step looked the heading and the confirm
button up by their old English names, so Chat UI Tests went red on main.

The step now reaches the title, Cancel and confirm through the data-slot
attributes the shared AlertDialog parts render, and still checks that the
title names Full access and the body warns about the sandbox. A fast-shard
test pins both halves: the step names no dialog copy, and the dialog is still
built from the parts those slots come from.
@danielhanchen

Copy link
Copy Markdown
Member Author

@codex review

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Oct 3, 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-03T15:53:49.451451Z d8aa345 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. What shall we delve into next?

Reviewed commit: 6b3ff1a7b4

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

#12630 also dropped data-variant="danger" from the composer pill on
purpose (calmer Full access), so the next line of the permission step failed
once the dialog lookup was fixed. expect_mode already checks the pill reads
Full access. The fast guard now also pins every attribute the step reads off
the pill to one the pill renders.
@unslothai unslothai deleted a comment from chatgpt-codex-connector Bot Oct 3, 2026
@danielhanchen

Copy link
Copy Markdown
Member Author

@codex review

@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review: Didn't find any major issues. Nice work!

Reviewed commit: d8aa3453ac

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

@danielhanchen
danielhanchen merged commit 93769f5 into main Oct 3, 2026
@danielhanchen
danielhanchen deleted the ci/full-access-consent-by-slot branch October 3, 2026 16:07
JoshuaL3000 pushed a commit to JoshuaL3000/unsloth that referenced this pull request Oct 4, 2026
…rding (unslothai#12640)

* Find the Full access consent dialog by its slots, not its wording

unslothai#12630 reworded the Full access consent dialog (Enable Full access? became
Turn on Full access?, I understand became Turn on). The consent flow did not
change, but the Chat UI permission step looked the heading and the confirm
button up by their old English names, so Chat UI Tests went red on main.

The step now reaches the title, Cancel and confirm through the data-slot
attributes the shared AlertDialog parts render, and still checks that the
title names Full access and the body warns about the sandbox. A fast-shard
test pins both halves: the step names no dialog copy, and the dialog is still
built from the parts those slots come from.

* Stop asserting the Full access pill's removed danger variant

unslothai#12630 also dropped data-variant="danger" from the composer pill on
purpose (calmer Full access), so the next line of the permission step failed
once the dialog lookup was fixed. expect_mode already checks the pill reads
Full access. The fast guard now also pins every attribute the step reads off
the pill to one the pill renders.
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