feat(desktop): add a Discover button to the Agents page header

The agent catalog was only reachable through the New agent card's
dropdown; give discovery a first-class entry point next to the other
page actions (and in the compact overflow menu).

Signed-off-by: Thomas Petersen <thomasp@squareup.com>
This commit is contained in:
Thomas Petersen
2026-08-04 22:01:15 +02:00
parent 53c6a82ec8
commit 65ec21f8f3

View File

@@ -1,5 +1,5 @@
import * as React from "react";
import { EllipsisVertical, OctagonX, Settings2 } from "lucide-react";
import { Compass, EllipsisVertical, OctagonX, Settings2 } from "lucide-react";
import {
consumePendingSnapshotImport,
subscribeSnapshotImport,
@@ -141,6 +141,16 @@ export function AgentsView() {
action={
<>
<div className="flex flex-wrap justify-end gap-2 [@container(max-width:40rem)]:hidden">
<Button
data-testid="discover-agents-button"
disabled={personas.isPending}
onClick={() => personas.openCatalog()}
size="sm"
variant="outline"
>
<Compass />
Discover
</Button>
<Button
data-testid="agent-defaults-button"
ref={fullAiDefaultsTriggerRef}
@@ -183,6 +193,13 @@ export function AgentsView() {
</Button>
</DropdownMenuTrigger>
<DropdownMenuContent align="end">
<DropdownMenuItem
disabled={personas.isPending}
onSelect={() => personas.openCatalog()}
>
<Compass />
Discover
</DropdownMenuItem>
<DropdownMenuItem
onSelect={() => {
openAiDefaults(compactActionsTriggerRef.current);