Skip to content

Commit fe4cf27

Browse files
committed
refactor(site/src/pages/AgentsPage): tidy the automations flag doc and focus test
Describe automationsFlag.ts as holding both the page route and the experiment flag, and let the focus-return test wait only for the focus it asserts. --- _Generated with [`xum`](https://github.com/coder/xum) • Model: `anthropic:claude-opus-5-5` • Thinking: `high`_
1 parent 5f9cdb3 commit fe4cf27

2 files changed

Lines changed: 2 additions & 10 deletions

File tree

‎site/src/pages/AgentsPage/AgentAutomationsPage.test.tsx‎

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -248,13 +248,6 @@ describe("AgentAutomationsPage", () => {
248248
});
249249
await user.keyboard("{Escape}");
250250

251-
await waitFor(() => {
252-
expect(
253-
screen.queryByRole("dialog", {
254-
name: `Chats for ${mockAutomation.name}`,
255-
}),
256-
).not.toBeInTheDocument();
257-
});
258251
await waitFor(() => {
259252
expect(viewChats).toHaveFocus();
260253
});

‎site/src/pages/AgentsPage/components/Automations/automationsFlag.ts‎

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
/**
2-
* Automations are an experiment. Every surface that links to or renders the
3-
* automations page checks this flag, so the page stays hidden until the
4-
* deployment enables the chat-automations experiment.
2+
* The automations page route and the chat-automations experiment flag that
3+
* gates the page and its entry points.
54
*/
65
import { useDashboard } from "#/modules/dashboard/useDashboard";
76

0 commit comments

Comments
 (0)