Skip to content

The fastest, cheapest, most efficient open-source agent harness. Run more than 500 agents on a $10 VPS.

test(chat): name the control test for what it asserts\n\nThe test was titled "the action bar still renders, and Copy still works" while\nasserting only that the Copy button is visible. @coderabbitai is right that the\ntitle overclaims — a broken `ActionBarPrimitive.Copy` handler would pass it.\n\nRenamed to "the action bar itself still renders after the Edit button is\nwithheld", which is what it does and what it is for: a control proving the\n"no Edit button" assertion beside it is not satisfied by a regression that\ndropped the whole action bar.\n\nClipboard behaviour is deliberately not tested here — it is a separate feature\nthis PR does not touch, it would need clipboard permissions, and exercising it\nwould not make the control stronger. Noted in the test.\n\nVerified: 3 passed (39.2s) through the shared CI slot.\n

M3gA-Mindc5460334caa3
diff --git a/app/test/playwright/specs/chat-user-message-edit-affordance.spec.ts b/app/test/playwright/specs/chat-user-message-edit-affordance.spec.ts
index 6fa7988340..a0d7e189c4 100644
--- a/app/test/playwright/specs/chat-user-message-edit-affordance.spec.ts
+++ b/app/test/playwright/specs/chat-user-message-edit-affordance.spec.ts
@@ -124,7 +124,9 @@ test.describe('User-message action bar — capability-gated affordances (#5897)'
await expect(page.locator('.aui-edit-composer-input')).toHaveCount(0);
});
- test('the action bar still renders, and Copy still works', async ({ page }) => {
+ test('the action bar itself still renders after the Edit button is withheld', async ({
+ page,
+ }) => {
const input = await openChat(page);
const userMessage = await sendOneTurn(page, input, 'copy me');
@@ -135,6 +137,12 @@ test.describe('User-message action bar — capability-gated affordances (#5897)'
// the Edit button must not remove the bar it lived in. Without this, a
// regression that dropped the whole action bar — or never rendered the
// message — would satisfy "no Edit button" and look like a pass.
+ //
+ // This asserts the Copy button is PRESENT, not that copying works. The
+ // title used to say "Copy still works", which overclaimed — clipboard
+ // behaviour is a separate feature this PR does not touch, and testing it
+ // here would need clipboard permissions and would not make the control any
+ // stronger.
await expect(page.getByRole('button', { name: 'Copy response' })).toBeVisible();
});