Copy" profile that appears in the list
* without a page reload, copying the source's model.
* - The copy is an independent profile with its own settings page.
@@ -24,12 +25,24 @@ test.describe("Agent profile duplicate", () => {
try {
await testPage.goto("/settings/agents");
- // The per-row Duplicate action lives in the row's actions dropdown.
+ // Full desktop exposes the row actions directly, without the overflow menu.
const row = testPage.getByTestId("agent-profile-row").filter({ hasText: profile.name });
await expect(row).toBeVisible({ timeout: 15_000 });
- await row.getByRole("button", { name: "Profile actions" }).click();
- const duplicate = testPage.getByTestId(`duplicate-profile-${profile.id}`);
+ await expect(row.getByTestId(`profile-actions-inline-${profile.id}`)).toBeVisible();
+ await expect(row.getByTestId(`profile-actions-menu-${profile.id}`)).toHaveCount(0);
+ const duplicate = row.getByTestId(`duplicate-profile-inline-${profile.id}`);
+ const deleteButton = row.getByTestId(`delete-profile-inline-${profile.id}`);
await expect(duplicate).toBeVisible({ timeout: 15_000 });
+ await expect(duplicate).toHaveAccessibleName("Duplicate");
+ await expect(duplicate).toHaveText("");
+ await expect(duplicate).toHaveAttribute("data-size", "icon");
+ await expect(deleteButton).toHaveAccessibleName("Delete");
+ await expect(deleteButton).toHaveText("");
+ await expect(deleteButton).toHaveAttribute("data-size", "icon");
+ await duplicate.hover();
+ await expect(testPage.getByRole("tooltip", { name: "Duplicate" })).toBeVisible();
+ await deleteButton.hover();
+ await expect(testPage.getByRole("tooltip", { name: "Delete" })).toBeVisible();
await duplicate.click();
// Backend state: the copy is a new row with the source's model. The
@@ -75,6 +88,34 @@ test.describe("Agent profile duplicate", () => {
}
});
+ test("keeps profile actions in the overflow menu at tablet width", async ({
+ tabletTestPage,
+ apiClient,
+ }) => {
+ const { agents } = await apiClient.listAgents();
+ const agent = agents[0];
+ const profile = agent.profiles[0];
+
+ await tabletTestPage.goto("/settings/agents");
+
+ await expect
+ .poll(
+ async () =>
+ tabletTestPage.evaluate(() => document.documentElement.scrollWidth <= window.innerWidth),
+ { timeout: 15_000 },
+ )
+ .toBe(true);
+
+ const row = tabletTestPage.getByTestId("agent-profile-row").filter({ hasText: profile.name });
+ await expect(row).toBeVisible({ timeout: 15_000 });
+ await expect(row.getByTestId(`profile-actions-inline-${profile.id}`)).toHaveCount(0);
+ const trigger = row.getByTestId(`profile-actions-menu-${profile.id}`);
+ await expect(trigger).toBeVisible();
+ await trigger.tap();
+ await expect(tabletTestPage.getByTestId(`duplicate-profile-${profile.id}`)).toBeVisible();
+ await expect(tabletTestPage.getByTestId(`delete-profile-${profile.id}`)).toBeVisible();
+ });
+
test("duplicates from the profile page header and navigates to the copy", async ({
testPage,
apiClient,
diff --git a/apps/web/e2e/tests/settings/mobile-agent-profile-duplicate.spec.ts b/apps/web/e2e/tests/settings/mobile-agent-profile-duplicate.spec.ts
index 4ff1083573..8763e14ec0 100644
--- a/apps/web/e2e/tests/settings/mobile-agent-profile-duplicate.spec.ts
+++ b/apps/web/e2e/tests/settings/mobile-agent-profile-duplicate.spec.ts
@@ -31,9 +31,10 @@ test.describe("Mobile agent profile duplicate", () => {
const row = testPage.getByTestId("agent-profile-row").filter({ hasText: profile.name });
await expect(row).toBeVisible({ timeout: 15_000 });
+ await expect(row.getByTestId(`profile-actions-inline-${profile.id}`)).toHaveCount(0);
// The row's actions trigger exposes a touch-sized hitbox (>= 44px).
// Poll for the box: layout can settle a frame after visibility.
- const trigger = row.getByRole("button", { name: "Profile actions" });
+ const trigger = row.getByTestId(`profile-actions-menu-${profile.id}`);
await expect
.poll(
async () => {
diff --git a/docs/plans/agent-profile-inline-actions/plan.md b/docs/plans/agent-profile-inline-actions/plan.md
new file mode 100644
index 0000000000..2e8f3e7d4d
--- /dev/null
+++ b/docs/plans/agent-profile-inline-actions/plan.md
@@ -0,0 +1,129 @@
+---
+spec: docs/specs/agents/settings-profile-layout.md
+created: 2026-08-13
+status: done
+---
+
+# Implementation Plan: Inline agent profile actions
+
+## Overview
+
+Add a full-desktop presentation for profile-row Duplicate and Delete actions
+while retaining the existing overflow menu below the full-desktop breakpoint.
+The same action handlers and delete confirmation remain shared across both
+presentations. The work is frontend-only and does not change the profile API,
+store contract, or translated copy.
+
+## Frontend
+
+### Profile row action presentation
+
+- `apps/web/components/settings/agents/agent-profiles-section.tsx`
+ - Use the canonical `useResponsiveBreakpoint` hook and its
+ `isFullDesktop` value, which maps to viewport widths of at least 1024px.
+ - Render compact icon-only Duplicate and Delete buttons inline on full
+ desktop widths, retaining translated accessible names and showing the same
+ translated action names in hover/focus tooltips.
+ - Keep the existing three-dots menu as the only action presentation below
+ that boundary, including compact desktop, tablet, and mobile.
+ - Reuse `useProfileDuplicate`, `setConfirmOpen`, and
+ `AgentProfileDeleteConfirmDialog`; do not duplicate mutation or store
+ synchronization logic.
+ - Keep the absolute profile link underneath the action cluster and preserve
+ stable test IDs for both action presentations.
+
+## Tests
+
+- **What:** Profile rows render the correct action presentation at full desktop
+ and below the breakpoint, while Duplicate and Delete retain their existing
+ wiring.
+ **File:** `apps/web/components/settings/agents/agent-profiles-section.test.tsx`.
+ **How:** Mock the canonical responsive hook for full desktop and compact
+ layouts. Assert inline button visibility, overflow-menu visibility, and the
+ existing duplicate/delete behavior through the shared row controls.
+
+- **What:** Existing profile list behavior remains intact after the action
+ presentation split.
+ **File:** `apps/web/components/settings/agents/agent-profiles-section.test.tsx`.
+ **How:** Keep the current store read-after-write deletion and duplicate
+ coverage, updating only selectors needed for the two responsive branches.
+
+## E2E Tests
+
+- **Scenario:** A full desktop profile row exposes Duplicate and Delete inline
+ and the user can duplicate the seeded profile without opening a menu.
+ **File:** `apps/web/e2e/tests/settings/agent-profile-duplicate.spec.ts`.
+ **What to verify:** Assert the inline controls and absence of the overflow
+ trigger, verify both tooltips on hover, activate Duplicate, and verify the
+ copied row and model.
+
+- **Scenario:** A 900px tablet-width profile row keeps both actions in the
+ overflow menu and does not overflow its viewport.
+ **File:** `apps/web/e2e/tests/settings/agent-profile-duplicate.spec.ts`.
+ **What to verify:** Use the existing `tabletTestPage` fixture, assert inline
+ controls are absent, open the profile-actions menu, and verify both menu
+ actions are reachable with no document-level horizontal overflow.
+
+- **Scenario:** A Pixel 5 profile row keeps the overflow-menu path and retains
+ the same duplicate outcome.
+ **File:** `apps/web/e2e/tests/settings/mobile-agent-profile-duplicate.spec.ts`.
+ **What to verify:** Keep the touch-based menu interaction, assert the inline
+ controls are absent, and retain the existing 44px hitbox and overflow checks.
+
+## Mobile design contract
+
+- Desktop outcome: profile users can duplicate or delete directly from a full
+ desktop row without an extra menu click.
+- Mobile and tablet entry point: the existing visible three-dots trigger opens
+ the profile action menu; no new drawer or route is needed because these are
+ short contextual actions and the existing Radix menu has the repository's
+ mobile bottom-sheet treatment.
+- Nearest shipped exemplar: the current `ProfileRowActions` dropdown and the
+ existing mobile agent-profile duplicate flow. Reuse its trigger, menu,
+ touch-sized hitbox, and action handlers.
+- Mobile hierarchy: profile identity and metadata remain primary, with the
+ overflow trigger as the only row action control below the full-desktop
+ boundary.
+- Scroll owner and geometry: preserve the existing settings scroll owner; the
+ row action cluster must remain contained at 900px and phone widths, with no
+ document-level horizontal overflow.
+- Shared state and logic: both presentations call the same duplicate hook and
+ delete confirmation callback, so only visual composition changes by viewport.
+
+## Implementation Waves And Parallel Candidates
+
+Wave 1:
+
+- [x] [task-01-profile-row-actions](task-01-profile-row-actions.md)
+
+Wave 2:
+
+- [x] [task-02-profile-actions-e2e](task-02-profile-actions-e2e.md)
+
+The tasks are sequential because the E2E selectors and responsive assertions
+depend on the component markup from task 01.
+
+## Verification Results
+
+Passed.
+
+- `cd apps && pnpm install --frozen-lockfile` passed.
+- `cd apps/web && pnpm test -- components/settings/agents/agent-profiles-section.test.tsx` passed (9 tests).
+- `cd apps/web && pnpm run typecheck` passed.
+- `cd apps/web && pnpm exec eslint components/settings/agents/agent-profiles-section.tsx components/settings/agents/agent-profiles-section.test.tsx` passed with no errors or warnings.
+- `cd apps/web && pnpm run i18n:check` passed with the repository's existing advisory catalog warnings; no locale keys were added.
+- `cd apps/web && pnpm run i18n:ratchet` passed with 0 new-code violations and an intact guard allowlist.
+- `cd apps/web && pnpm e2e:run --project chromium tests/settings/agent-profile-duplicate.spec.ts` passed (3 tests: full desktop inline actions, 900px tablet overflow actions, and profile-page duplicate flow).
+- `cd apps/web && pnpm e2e:run --project mobile-chrome tests/settings/mobile-agent-profile-duplicate.spec.ts` passed (1 test).
+- The final desktop/tablet selector assertion rerun, `cd apps/web && pnpm e2e:run --no-build --project chromium tests/settings/agent-profile-duplicate.spec.ts`, passed (3 tests).
+- Both full managed E2E runs rebuilt the backend and pseudo-locale Vite assets; the final no-build rerun used those production artifacts. All runs cleaned their isolated E2E artifact directories. No failure artifacts remain.
+- Three fresh synthetic PR screenshots were captured, visually inspected, compressed, and validated through `.pr-assets/manifest.json` for full desktop, tablet, and mobile overflow-menu states. The capture-only spec was removed afterward.
+- The icon-only refinement was verified with the focused component suite (9
+ tests), managed desktop E2E (3 tests), managed mobile E2E (1 test), and a
+ fresh full-desktop screenshot. The screenshot shows compact 28px action
+ buttons centered in the profile row; the old visible labels are absent while
+ translated accessible names remain.
+- The tooltip refinement was verified with focus assertions in the component
+ suite and hover assertions in the desktop E2E flow. Both tooltips reuse the
+ existing translated Duplicate and Delete labels; the mobile overflow path is
+ unchanged.
diff --git a/docs/plans/agent-profile-inline-actions/task-01-profile-row-actions.md b/docs/plans/agent-profile-inline-actions/task-01-profile-row-actions.md
new file mode 100644
index 0000000000..b31aca509b
--- /dev/null
+++ b/docs/plans/agent-profile-inline-actions/task-01-profile-row-actions.md
@@ -0,0 +1,75 @@
+---
+id: "01-profile-row-actions"
+title: "Profile row action presentation"
+status: done
+wave: 1
+depends_on: []
+plan: "plan.md"
+spec: "../../specs/agents/settings-profile-layout.md"
+---
+
+# Task 01: Profile row action presentation
+
+## Acceptance
+
+- Full desktop profile rows show compact icon-only Duplicate and Delete buttons
+ inline, with translated accessible names, matching hover/focus tooltips, and
+ no visible profile-actions overflow trigger.
+- Compact desktop, tablet, and mobile profile rows keep the existing
+ three-dots menu as the only action presentation, with both actions inside it.
+- Duplicate and Delete use the existing mutation hook, confirmation dialog,
+ profile-link layering, and store synchronization behavior.
+
+## Verification
+
+```bash
+(cd apps && pnpm install --frozen-lockfile)
+(cd apps/web && pnpm test -- components/settings/agents/agent-profiles-section.test.tsx)
+(cd apps/web && pnpm run typecheck)
+(cd apps/web && pnpm exec eslint components/settings/agents/agent-profiles-section.tsx components/settings/agents/agent-profiles-section.test.tsx)
+(cd apps/web && pnpm run i18n:check)
+```
+
+## Files likely touched
+
+- `apps/web/components/settings/agents/agent-profiles-section.tsx`
+- `apps/web/components/settings/agents/agent-profiles-section.test.tsx`
+
+## Dependencies
+
+None.
+
+## Parallelism
+
+Sequential. The component and its responsive unit coverage form one vertical
+slice.
+
+## Inputs
+
+- Spec: `docs/specs/agents/settings-profile-layout.md`, especially the new
+ full-desktop and below-breakpoint scenarios.
+- Plan: `plan.md`, Frontend and Mobile design contract sections.
+- Existing patterns: `useResponsiveBreakpoint`, `useProfileDuplicate`, and
+ `AgentProfileDeleteConfirmDialog`.
+
+## Output contract
+
+Report changed files, the exact focused test/typecheck/lint/i18n commands and
+results, responsive selector decisions, and any blockers. Update this task's
+status and the parent plan only after all listed checks pass.
+
+## Results
+
+- `cd apps && pnpm install --frozen-lockfile` passed.
+- `cd apps/web && pnpm test -- components/settings/agents/agent-profiles-section.test.tsx` passed (9 tests).
+- `cd apps/web && pnpm run typecheck` passed.
+- `cd apps/web && pnpm exec eslint components/settings/agents/agent-profiles-section.tsx components/settings/agents/agent-profiles-section.test.tsx` passed with no errors or warnings.
+- `cd apps/web && pnpm run i18n:check` passed with the repository's existing advisory catalog warnings.
+- `cd apps/web && pnpm run i18n:ratchet` passed with 0 new-code violations.
+
+The responsive boundary uses the canonical `isFullDesktop` value. Full-desktop
+actions are compact icon-only buttons with translated accessible names and
+profile-scoped test IDs. Each inline button has a tooltip using the same
+translated action label; the overflow trigger and menu actions retain separate
+stable IDs. Both presentations call the same duplicate hook and delete
+confirmation callback.
diff --git a/docs/plans/agent-profile-inline-actions/task-02-profile-actions-e2e.md b/docs/plans/agent-profile-inline-actions/task-02-profile-actions-e2e.md
new file mode 100644
index 0000000000..34f1e75b5c
--- /dev/null
+++ b/docs/plans/agent-profile-inline-actions/task-02-profile-actions-e2e.md
@@ -0,0 +1,82 @@
+---
+id: "02-profile-actions-e2e"
+title: "Profile action responsive E2E coverage"
+status: done
+wave: 2
+depends_on: ["01-profile-row-actions"]
+plan: "plan.md"
+spec: "../../specs/agents/settings-profile-layout.md"
+---
+
+# Task 02: Profile action responsive E2E coverage
+
+## Acceptance
+
+- Desktop E2E proves that a full desktop profile row exposes Duplicate and
+ Delete inline, shows both action tooltips on hover, and duplicates the seeded
+ profile through the direct button.
+- Tablet-width E2E proves that inline controls are absent, the overflow menu
+ contains both actions, and the document remains horizontally contained.
+- Mobile E2E keeps the touch-based overflow path, proves inline controls are
+ absent, and preserves the existing duplicate outcome and 44px geometry.
+
+## Verification
+
+```bash
+(cd apps && pnpm install --frozen-lockfile)
+(cd apps/web && pnpm e2e:run --project chromium tests/settings/agent-profile-duplicate.spec.ts)
+(cd apps/web && pnpm e2e:run --project mobile-chrome tests/settings/mobile-agent-profile-duplicate.spec.ts)
+```
+
+The managed runner must rebuild the production Vite assets before the tests.
+Run headless only. Record the exact test counts and any failure-artifact or
+cleanup results below.
+
+## Files likely touched
+
+- `apps/web/e2e/tests/settings/agent-profile-duplicate.spec.ts`
+- `apps/web/e2e/tests/settings/mobile-agent-profile-duplicate.spec.ts`
+
+## Dependencies
+
+Task 01 must land first because the E2E selectors and responsive branches
+depend on the final profile-row markup.
+
+## Parallelism
+
+Sequential. Desktop, tablet, and mobile assertions share the same responsive
+action contract and managed fixture state.
+
+## Inputs
+
+- Spec: `docs/specs/agents/settings-profile-layout.md`, responsive action
+ scenarios.
+- Plan: `plan.md`, E2E Tests and Mobile design contract sections.
+- Existing patterns: `agent-profile-duplicate.spec.ts`,
+ `mobile-agent-profile-duplicate.spec.ts`, and the `tabletTestPage` fixture.
+
+## Output contract
+
+Report changed test files, exact managed-runner commands and test counts,
+screenshots or failure artifacts if produced, cleanup evidence, and
+synchronized task/plan status.
+
+## Results
+
+- `cd apps/web && pnpm e2e:run --project chromium tests/settings/agent-profile-duplicate.spec.ts` passed (3 tests).
+- `cd apps/web && pnpm e2e:run --project mobile-chrome tests/settings/mobile-agent-profile-duplicate.spec.ts` passed (1 test).
+- Final desktop/tablet selector assertion rerun with `cd apps/web && pnpm e2e:run --no-build --project chromium tests/settings/agent-profile-duplicate.spec.ts` passed (3 tests).
+
+The managed runner rebuilt the backend and pseudo-locale Vite assets for both
+runs, started from cleaned E2E artifact directories, and left no failure
+artifacts. Desktop coverage proves the compact icon-only inline path, the 900px
+tablet fixture proves the overflow path and document containment, and the
+mobile coverage keeps the touch menu and 44px trigger check.
+
+The desktop flow also verifies that hovering the icon-only Duplicate and Delete
+buttons exposes their matching translated action names.
+
+Three fresh synthetic PR screenshots were captured and visually inspected for
+full desktop, tablet, and mobile states. They were compressed, validated
+against `.pr-assets/manifest.json`, and the disposable capture spec was
+removed. The ignored asset files are ready for PR media publication.
diff --git a/docs/specs/agents/settings-profile-layout.md b/docs/specs/agents/settings-profile-layout.md
index 5aff57203d..16106b0b3f 100644
--- a/docs/specs/agents/settings-profile-layout.md
+++ b/docs/specs/agents/settings-profile-layout.md
@@ -34,6 +34,16 @@ to associate with the agent it changes.
- Existing profile rows, profile links, duplicate/delete actions, agent status
badges, authentication controls, and runtime-update controls keep their
current behavior.
+- On a full desktop viewport (at least 1024px wide), each profile row shows
+ compact icon-only **Duplicate** and **Delete** action buttons directly in the
+ row action area. The buttons retain translated accessible names, are small
+ and vertically centered. Hovering or focusing either button shows a tooltip
+ with its translated action name, and the row does not show the three-dots
+ profile-actions trigger at this width.
+- Below the full desktop boundary, including compact desktop, tablet, and
+ mobile viewports, each profile row keeps the three-dots profile-actions
+ trigger and exposes **Duplicate** and **Delete** in its overflow menu. Inline
+ action buttons are not rendered in these viewports.
- The desktop and mobile layouts expose the same actions and outcomes. On a
narrow touch viewport, card-header actions remain visible, reachable with a
touch target of at least 44px, and do not create document-level horizontal
@@ -56,6 +66,18 @@ to associate with the agent it changes.
- **GIVEN** a configured agent card, **WHEN** the user clicks **New profile**,
**THEN** the browser navigates to that agent's profile creation route and
the existing profile rows remain unchanged.
+- **GIVEN** a profile row in a viewport at least 1024px wide, **WHEN** the user
+ views the row, **THEN** compact icon-only **Duplicate** and **Delete** buttons
+ with translated accessible names are visible inline, vertically centered,
+ and the three-dots profile-actions trigger is absent. Hovering or focusing an
+ inline button shows a tooltip with the matching translated action name.
+- **GIVEN** a profile row in a viewport narrower than 1024px, **WHEN** the user
+ opens the profile-actions trigger, **THEN** the overflow menu contains
+ **Duplicate** and **Delete**, and no inline action buttons are rendered.
+- **GIVEN** a profile row with inline actions or overflow actions, **WHEN** the
+ user activates **Duplicate** or confirms **Delete**, **THEN** the existing
+ duplicate or delete behavior completes without changing the profile link or
+ other row metadata.
- **GIVEN** a phone viewport below 768px, **WHEN** the user opens the agents
settings page, **THEN** the card-header creation action and the section
toolbar actions remain visible and touch-reachable, the profile rows remain
@@ -64,8 +86,10 @@ to associate with the agent it changes.
## Out of scope
-- Changing the profile editor, profile-row actions, agent discovery, agent
- installation, or the backend/API contracts.
+- Changing the profile editor, agent discovery, agent installation, or the
+ backend/API contracts.
+- Changing the duplicate or delete operation, confirmation flow, profile link,
+ or store synchronization behavior.
- Renaming the existing translated **New profile**, **Setup profile**, refresh,
or agent-creation labels.
- Changing the profile count text used by unrelated task or picker surfaces.