diff --git a/ui/src/e2e/session-ownership.e2e.test.ts b/ui/src/e2e/session-ownership.e2e.test.ts index 55ff56edf08d..26608d48c336 100644 --- a/ui/src/e2e/session-ownership.e2e.test.ts +++ b/ui/src/e2e/session-ownership.e2e.test.ts @@ -244,7 +244,8 @@ describeControlUiE2e("Control UI session ownership", () => { }); await currentPage.goto(`${server?.baseUrl ?? ""}new`); - const draftToggle = currentPage.getByLabel("Start as draft"); + // Playwright check()/isChecked() support role="switch" buttons via aria-checked. + const draftToggle = currentPage.getByRole("switch", { name: "Draft", exact: true }); await draftToggle.waitFor(); await captureUiProof(currentPage, "02-create-draft-available.png"); await draftToggle.check(); @@ -326,7 +327,7 @@ describeControlUiE2e("Control UI session ownership", () => { }); await currentPage.goto(`${server?.baseUrl ?? ""}new`); - const draftToggle = currentPage.getByLabel("Start as draft"); + const draftToggle = currentPage.getByRole("switch", { name: "Draft", exact: true }); await draftToggle.check(); await gateway.setSessionSharingPolicy({ allowedSessionVisibilities: ["shared"], @@ -356,6 +357,6 @@ describeControlUiE2e("Control UI session ownership", () => { await currentPage.goto(`${server?.baseUrl ?? ""}new`); await currentPage.locator(".new-session-page__message").waitFor(); - expect(await currentPage.getByLabel("Start as draft").count()).toBe(0); + expect(await currentPage.getByRole("switch", { name: "Draft", exact: true }).count()).toBe(0); }); }); diff --git a/ui/src/i18n/locales/en.ts b/ui/src/i18n/locales/en.ts index 5f51f581da9c..ec200c07e4bb 100644 --- a/ui/src/i18n/locales/en.ts +++ b/ui/src/i18n/locales/en.ts @@ -568,7 +568,8 @@ export const en: TranslationMap = { worktreeNameInvalid: "Worktree names use lowercase letters, digits, and dashes.", incognito: "Incognito", incognitoDescription: "Keep this thread only until the Gateway restarts", - startAsDraft: "Start as draft", + draft: "Draft", + draftDescription: "Keep this thread to yourself until you publish it", messagePlaceholder: "What should this thread work on?", readingAttachment: "Reading attachment", start: "Start thread", diff --git a/ui/src/pages/new-session/catalog-target.ts b/ui/src/pages/new-session/catalog-target.ts index 27b101bb9d2e..234b0d4be3cb 100644 --- a/ui/src/pages/new-session/catalog-target.ts +++ b/ui/src/pages/new-session/catalog-target.ts @@ -78,7 +78,6 @@ export function renderBar(params: { data?: NewSessionRouteData; agentSelect: unknown; placeSelect: unknown; - draftVisibilityControl: unknown; retrying: boolean; onRetry: () => void; }) { @@ -86,7 +85,7 @@ export function renderBar(params: { return html`