Skip to content

An open-source, faster Devin alternative

TypeScript

refactor(agent-ui): simplify overview and integration settings

Igor Zalutski89da33b45df9
diff --git a/web/src/components/agent-deploy-source.test.tsx b/web/src/components/agent-deploy-source.test.tsx
index 72679a06..b0d84285 100644
--- a/web/src/components/agent-deploy-source.test.tsx
+++ b/web/src/components/agent-deploy-source.test.tsx
@@ -3,7 +3,10 @@ import { renderToStaticMarkup } from 'react-dom/server'
import { MemoryRouter } from 'react-router-dom'
import { describe, expect, it } from 'vitest'
import type { DeploymentSource } from '@/api/schemas'
-import { AgentDeploySource } from '@/components/agent-deploy-source'
+import {
+ AgentDeploySource,
+ DeploymentSourceSummary,
+} from '@/components/agent-deploy-source'
const agentId = 'agt_aaaaaaaaaaaaaaaaaaaaaaaa'
const source: DeploymentSource = {
@@ -43,6 +46,27 @@ function renderPinnedSource(nextSource: DeploymentSource = source) {
)
}
+function renderSourceSummary(nextSource: DeploymentSource | null) {
+ const queryClient = new QueryClient({
+ defaultOptions: { queries: { retry: false, staleTime: Infinity } },
+ })
+ queryClient.setQueryData(['agent-deploy-source', agentId], nextSource)
+ queryClient.setQueryData(['deploy-app'], {
+ installed: true,
+ install_url: null,
+ configure_url: 'https://github.com/settings/installations/123',
+ account: 'diggerhq',
+ repository_selection: 'selected',
+ repositories: [],
+ })
+
+ return renderToStaticMarkup(
+ <QueryClientProvider client={queryClient}>
+ <DeploymentSourceSummary agentId={agentId} onOpenSettings={() => {}} />
+ </QueryClientProvider>,
+ )
+}
+
describe('profile-pinned repository management', () => {
it('shows the reviewed source and safe management actions without an editable picker', () => {
const html = renderPinnedSource()
@@ -75,3 +99,23 @@ describe('profile-pinned repository management', () => {
expect(html).not.toContain('Configure GitHub')
})
})
+
+describe('deployment source summary', () => {
+ it('shows the connected source without duplicating the editor', () => {
+ const html = renderSourceSummary(source)
+
+ expect(html).toContain('GitHub</h2>')
+ expect(html).toContain('diggerhq/oc-flue-starter')
+ expect(html).toContain('main')
+ expect(html).toContain('Manage GitHub')
+ expect(html).not.toContain('Select a repo')
+ })
+
+ it('distinguishes an installed GitHub app from an agent source', () => {
+ const html = renderSourceSummary(null)
+
+ expect(html).toContain('GitHub app connected')
+ expect(html).toContain('diggerhq · No source repository')
+ expect(html).toContain('Manage GitHub')
+ })
+})
diff --git a/web/src/components/agent-deploy-source.tsx b/web/src/components/agent-deploy-source.tsx
index 5cca92a2..cf16ffea 100644
--- a/web/src/components/agent-deploy-source.tsx
+++ b/web/src/components/agent-deploy-source.tsx
@@ -25,6 +25,7 @@ import {
PanelTitle,
} from '@/components/panel'
import { Button } from '@/components/ui/button'
+import { Skeleton } from '@/components/ui/skeleton'
import { Input, Select } from '@/components/form'
import { GithubMark } from '@/components/github-mark'
import { SourceProfileChangedRecovery } from '@/components/source-profile-changed-recovery'
@@ -177,7 +178,7 @@ async function pollDeployUntilActive(
}
/**
- * Source card (Overview right rail) — minimal. Connect a GitHub repo as the agent's source:
+ * Source settings — minimal. Connect a GitHub repo as the agent's source:
* not installed → a single Connect (install) button; installed → an editable repo / directory /
* branch picker (pre-filled when already linked) + a quiet Disconnect + an "Add more repos" link.
* Pushes to the branch create new revisions; re-applying the picker (Update) pulls HEAD into one.
@@ -185,17 +186,14 @@ async function pollDeployUntilActive(
*/
export function AgentDeploySource({
agentId,
- autoFocusPicker = false,
profilePinned = false,
}: {
agentId: string
- autoFocusPicker?: boolean
/** Reviewed imports can be managed or unlinked, but not switched in place. */
profilePinned?: boolean
}) {
const navigate = useNavigate()
const queryClient = useQueryClient()
- const pickerRef = useRef<HTMLDivElement>(null)
const [repo, setRepo] = useState('')
const [path, setPath] = useState('')
const [branch, setBranch] = useState('main')
@@ -321,23 +319,6 @@ export function AgentDeploySource({
if (r?.default_branch) setBranch(r.default_branch)
}
- // Arrived via a setup CTA (?connect=github) → scroll the picker in + focus it (once).
- const focusedRef = useRef(false)
- useEffect(() => {
- if (
- autoFocusPicker &&
- !focusedRef.current &&
- app?.installed &&
- pickerRef.current
- ) {
- focusedRef.current = true
- pickerRef.current.scrollIntoView({ behavior: 'smooth', block: 'center' })
- pickerRef.current
- .querySelector<HTMLElement>('button, [role="combobox"], input, select')
- ?.focus()
- }
- }, [autoFocusPicker, app?.installed])
-
// Repo options — include the linked repo even if it's not in the installable list.
const repoOptions = (app?.repositories ?? []).map((r) => ({
value: r.full_name,
@@ -437,7 +418,7 @@ export function AgentDeploySource({
</p>
</div>
) : (
- <div className="space-y-3" ref={pickerRef}>
+ <div className="space-y-3">
{justConnected && !source ? (
<p className="text-xs">
<span className="font-medium text-green-600 dark:text-green-500">
@@ -526,3 +507,81 @@ export function AgentDeploySource({
</Panel>
)
}
+
+export function DeploymentSourceSummary({
+ agentId,
+ onOpenSettings,
+}: {
+ agentId: string
+ onOpenSettings: () => void
+}) {
+ const appQuery = useQuery({
+ queryKey: ['deploy-app'],
+ queryFn: getDeployApp,
+ })
+ const sourceQuery = useQuery({
+ queryKey: ['agent-deploy-source', agentId],
+ queryFn: async () => {
+ try {
+ return (await getDeploymentSource(agentId)).source
+ } catch (error) {
+ if (error instanceof ApiError && error.status === 404) return null
+ throw error
+ }
+ },
+ })
+ const source = sourceQuery.data
+ const loading = appQuery.isLoading || sourceQuery.isLoading
+ const unavailable = appQuery.isError || sourceQuery.isError
+
+ let title = 'Not connected'
+ let detail = 'Connect the GitHub app to deploy this agent from a repository.'
+ if (source) {
+ title = source.full_name || 'Repository connected'
+ detail = [source.path || null, source.production_ref]
+ .filter(Boolean)
+ .join(' · ')
+ } else if (appQuery.data?.installed) {
+ title = 'GitHub app connected'
+ detail = appQuery.data.account
+ ? `${appQuery.data.account} · No source repository`
+ : 'No source repository'
+ }
+
+ return (
+ <Panel>
+ <PanelHeader className="border-b-0 pb-2">
+ <PanelTitle className="flex items-center gap-2">
+ <GithubMark className="size-4" /> GitHub
+ </PanelTitle>
+ </PanelHeader>
+ <PanelContent className="pt-1">
+ {loading ? (
+ <Skeleton className="h-10 w-full" />
+ ) : unavailable ? (
+ <p className="text-muted-foreground text-sm">
+ GitHub status is unavailable.
+ </p>
+ ) : (
+ <div className="min-w-0">
+ <p className="truncate text-sm font-medium">{title}</p>
+ <p className="text-muted-foreground mt-0.5 truncate text-xs">
+ {detail}
+ </p>
+ </div>
+ )}
+ <Button
+ type="button"
+ variant="ghost"
+ size="sm"
+ className="text-muted-foreground hover:text-foreground mt-2 -ml-3"
+ onClick={onOpenSettings}
+ >
+ {source || appQuery.data?.installed
+ ? 'Manage GitHub'
+ : 'Connect GitHub'}
+ </Button>
+ </PanelContent>
+ </Panel>
+ )
+}
diff --git a/web/src/components/agent-hooks-panel.tsx b/web/src/components/agent-hooks-panel.tsx
index b7a470ff..769c5a99 100644
--- a/web/src/components/agent-hooks-panel.tsx
+++ b/web/src/components/agent-hooks-panel.tsx
@@ -83,7 +83,7 @@ export function AgentHooksPanel({ agentId }: { agentId: string }) {
})
return (
- <Panel id="hooks" className="scroll-mt-36">
+ <Panel id="hooks" tabIndex={-1} className="scroll-mt-36 outline-none">
<PanelHeader>
<div>
<PanelTitle>Hook URLs</PanelTitle>
diff --git a/web/src/components/agent-invocation-panels.test.tsx b/web/src/components/agent-invocation-panels.test.tsx
index 02d38d7b..b3f00159 100644
--- a/web/src/components/agent-invocation-panels.test.tsx
+++ b/web/src/components/agent-invocation-panels.test.tsx
@@ -2,32 +2,21 @@ import { QueryClient, QueryClientProvider } from '@tanstack/react-query'
import { renderToStaticMarkup } from 'react-dom/server'
import { MemoryRouter } from 'react-router-dom'
import { describe, expect, it } from 'vitest'
-import type { Agent } from '@/api/client'
import { AgentHooksPanel } from './agent-hooks-panel'
-import { AgentUrlPanel } from './agent-url-panel'
-const agent: Agent = {
- id: 'agt_0123456789abcdef01234567',
- name: 'Reviewer',
- invoke_url: 'https://agt-0123456789abcdef01234567.agents.opencomputer.dev',
- model: 'anthropic/claude-opus-4-8',
- runtime: 'claude',
- credential_id: 'managed',
- revision: 1,
- created_at: '2026-07-22T00:00:00.000Z',
-}
+const agentId = 'agt_0123456789abcdef01234567'
function renderPanels() {
const queryClient = new QueryClient({
defaultOptions: { queries: { retry: false, staleTime: Infinity } },
})
- queryClient.setQueryData(['agent-hooks', agent.id], {
+ queryClient.setQueryData(['agent-hooks', agentId], {
pages: [
{
data: [
{
id: 'hk_0123456789abcdef01234567',
- agent_id: agent.id,
+ agent_id: agentId,
name: 'grafana-prod',
status: 'revoked',
secret_last4: 'xYz0',
@@ -45,22 +34,16 @@ function renderPanels() {
return renderToStaticMarkup(
<QueryClientProvider client={queryClient}>
<MemoryRouter>
- <AgentUrlPanel agent={agent} />
- <AgentHooksPanel agentId={agent.id} />
+ <AgentHooksPanel agentId={agentId} />
</MemoryRouter>
</QueryClientProvider>,
)
}
-describe('Agent invocation panels', () => {
- it('keeps root invocation server-only and renders Hook audit metadata', () => {
+describe('Agent Hook settings', () => {
+ it('renders Hook audit metadata without recovering its secret', () => {
const markup = renderPanels()
- expect(markup).toContain(agent.invoke_url)
- expect(markup).toContain('Server-side only')
- expect(markup).toContain('Run test')
- expect(markup).toContain('View sessions')
- expect(markup).toContain(`/agents/${agent.id}/sessions`)
expect(markup).toContain('grafana-prod')
expect(markup).toContain('Secret exposure detected')
expect(markup).toContain('ends in xYz0')
diff --git a/web/src/components/agent-url-panel.tsx b/web/src/components/agent-url-panel.tsx
deleted file mode 100644
index c8d0560a..00000000
--- a/web/src/components/agent-url-panel.tsx
+++ /dev/null
@@ -1,114 +0,0 @@
-import { useState } from 'react'
-import { Link } from 'react-router-dom'
-import { ExternalLink, Play } from 'lucide-react'
-import { invokeAgent, type Agent } from '@/api/client'
-import { notifyError } from '@/lib/errors'
-import {
- Panel,
- PanelContent,
- PanelHeader,
- PanelTitle,
-} from '@/components/panel'
-import { Button } from '@/components/ui/button'
-import { Textarea } from '@/components/form'
-import { CopyRow } from '@/components/copy-row'
-import { ApiHint } from '@/components/api-hint'
-
-const DEFAULT_PAYLOAD = `{
- "task": "Summarize the latest support request"
-}`
-
-export function AgentUrlPanel({ agent }: { agent: Agent }) {
- const [payload, setPayload] = useState(DEFAULT_PAYLOAD)
- const [parseError, setParseError] = useState<string | null>(null)
- const [pending, setPending] = useState(false)
- const [sessionId, setSessionId] = useState<string | null>(null)
-
- const run = async () => {
- let body: unknown
- try {
- body = JSON.parse(payload)
- } catch {
- setParseError('Enter a valid JSON value.')
- return
- }
- setParseError(null)
- setPending(true)
- try {
- const receipt = await invokeAgent(agent.id, body, crypto.randomUUID())
- // Do not retain the returned client token in component or query state.
- setSessionId(receipt.session.id)
- } catch (error) {
- notifyError("Couldn't invoke the agent.", error)
- } finally {
- setPending(false)
- }
- }
-
- return (
- <Panel>
- <PanelHeader>
- <div>
- <PanelTitle>Agent URL</PanelTitle>
- <p className="text-muted-foreground mt-1 text-xs">
- Root invocation requires an OpenComputer API key. Server-side only.
- </p>
- </div>
- <ApiHint
- method="POST"
- path="/"
- docs="https://docs.opencomputer.dev/agent-sessions/agent-urls"
- />
- </PanelHeader>
- <PanelContent className="space-y-4">
- <CopyRow value={agent.invoke_url} />
- <pre className="bg-panel-2 text-muted-foreground overflow-x-auto rounded-md border p-3 font-mono text-[11px] leading-relaxed">{`curl "$AGENT_URL/" \\
- -H "Authorization: Bearer $OPENCOMPUTER_API_KEY" \\
- -H "Content-Type: application/json" \\
- -d '{"task":"Summarize the latest support request"}'`}</pre>
- <div className="space-y-2">
- <Textarea
- aria-label="Test JSON payload"
- value={payload}
- onChange={(event) => setPayload(event.target.value)}
- className="min-h-24 font-mono text-xs"
- />
- {parseError ? (
- <p className="text-status-error text-xs font-medium" role="alert">
- {parseError}
- </p>
- ) : null}
- <div className="flex flex-wrap items-center justify-between gap-2">
- <Button
- type="button"
- size="sm"
- variant="outline"
- disabled={pending}
- onClick={() => void run()}
- >
- <Play className="size-3.5" />
- {pending ? 'Starting…' : 'Run test'}
- </Button>
- <div className="flex flex-wrap items-center gap-3">
- <Link
- to={`/agents/${agent.id}/sessions`}
- className="text-muted-foreground text-xs font-medium underline underline-offset-4"
- >
- View sessions
- </Link>
- {sessionId ? (
- <Link
- to={`/sessions/${sessionId}`}
- className="text-foreground inline-flex items-center gap-1 text-xs font-medium underline underline-offset-4"
- >
- Session {sessionId}
- <ExternalLink className="size-3" aria-hidden />
- </Link>
- ) : null}
- </div>
- </div>
- </div>
- </PanelContent>
- </Panel>
- )
-}
diff --git a/web/src/components/managed-slack-workspace-claims.tsx b/web/src/components/managed-slack-workspace-claims.tsx
index f352daa5..1318e2c8 100644
--- a/web/src/components/managed-slack-workspace-claims.tsx
+++ b/web/src/components/managed-slack-workspace-claims.tsx
@@ -5,7 +5,7 @@ import {
type UseQueryResult,
} from '@tanstack/react-query'
import { Link } from 'react-router-dom'
-import { Unplug } from 'lucide-react'
+import { ArrowRightLeft, Unplug } from 'lucide-react'
import {
disconnectManagedSlack,
type ManagedSlackWorkspaceConnection,
@@ -30,11 +30,13 @@ export function ManagedSlackWorkspaceClaims({
currentAgentName,
query,
className,
+ onMoveHere,
}: {
currentAgentId: string
currentAgentName: string
query: ClaimsQuery
className?: string
+ onMoveHere?: () => void
}) {
const queryClient = useQueryClient()
const [disconnecting, setDisconnecting] =
@@ -65,9 +67,14 @@ export function ManagedSlackWorkspaceClaims({
connection.workspace?.id ||
'Slack workspace'
notifySuccess(
- `${workspace} disconnected from ${connection.agent.name}.`,
- `Connect Slack again to select it for ${currentAgentName}.`,
+ onMoveHere
+ ? `${workspace} is ready to move from ${connection.agent.name}.`
+ : `${workspace} disconnected from ${connection.agent.name}.`,
+ onMoveHere
+ ? `Finish authorizing it for ${currentAgentName} in Slack.`
+ : `Connect Slack again to select it for ${currentAgentName}.`,
)
+ onMoveHere?.()
},
onError: (error) =>
notifyError("Couldn't disconnect the Slack workspace.", error),
@@ -78,7 +85,7 @@ export function ManagedSlackWorkspaceClaims({
}
const copy = disconnecting
- ? managedSlackDisconnectCopy(disconnecting, currentAgentName)
+ ? managedSlackDisconnectCopy(disconnecting, currentAgentName, !!onMoveHere)
: null
const heading = query.isLoading
? 'Checking existing Slack workspaces'
@@ -89,7 +96,9 @@ export function ManagedSlackWorkspaceClaims({
? `Checking whether a workspace already sends messages to another agent before connecting ${currentAgentName}.`
: query.isError
? 'You can retry this check or continue. Slack will verify the workspace claim again before connecting.'
- : `Disconnect a workspace before selecting it for ${currentAgentName}. You can connect a different workspace without changing these.`
+ : onMoveHere
+ ? `Move a workspace here, or connect a different workspace without changing these.`
+ : `Disconnect a workspace before selecting it for ${currentAgentName}. You can connect a different workspace without changing these.`
return (
<>
@@ -144,13 +153,17 @@ export function ManagedSlackWorkspaceClaims({
</Link>
</Button>
<Button
- variant="ghost"
+ variant={onMoveHere ? 'outline' : 'ghost'}
size="sm"
disabled={disconnectMutation.isPending}
onClick={() => setDisconnecting(connection)}
>
- <Unplug className="size-4" aria-hidden />
- Disconnect
+ {onMoveHere ? (
+ <ArrowRightLeft className="size-4" aria-hidden />
+ ) : (
+ <Unplug className="size-4" aria-hidden />
+ )}
+ {onMoveHere ? 'Move here' : 'Disconnect'}
</Button>
</div>
</div>
@@ -167,8 +180,8 @@ export function ManagedSlackWorkspaceClaims({
}}
title={copy?.title ?? 'Disconnect Slack workspace?'}
description={copy?.description}
- confirmLabel="Disconnect workspace"
- destructive
+ confirmLabel={onMoveHere ? 'Continue in Slack' : 'Disconnect workspace'}
+ destructive={!onMoveHere}
pending={disconnectMutation.isPending}
onConfirm={() => {
if (disconnecting) disconnectMutation.mutate(disconnecting)
diff --git a/web/src/components/repository-access.test.tsx b/web/src/components/repository-access.test.tsx
index 3ae7b31b..6989b5f8 100644
--- a/web/src/components/repository-access.test.tsx
+++ b/web/src/components/repository-access.test.tsx
@@ -145,7 +145,7 @@ describe('repository access UI', () => {
it('summarizes access without duplicating the full editor', () => {
const html = renderAccess(selected, true)
expect(html).toContain('1 selected repository')
- expect(html).toContain('Manage access')
+ expect(html).toContain('Manage GitHub')
expect(html).not.toContain('Find a repository')
})
diff --git a/web/src/components/repository-access.tsx b/web/src/components/repository-access.tsx
index 5df03324..acbb23bb 100644
--- a/web/src/components/repository-access.tsx
+++ b/web/src/components/repository-access.tsx
@@ -548,7 +548,7 @@ export function RepositoryAccessSummary({
<Panel>
<PanelHeader className="border-b-0 pb-2">
<PanelTitle className="flex items-center gap-2">
- <GithubMark className="size-4" /> Repository access
+ <GithubMark className="size-4" /> GitHub
</PanelTitle>
</PanelHeader>
<PanelContent className="pt-1">
@@ -592,7 +592,7 @@ export function RepositoryAccessSummary({
onClick={onOpenSettings}
className="text-muted-foreground hover:text-foreground mt-3 inline-flex items-center gap-1 text-xs font-medium"
>
- Manage access <ChevronRight className="size-3" />
+ Manage GitHub <ChevronRight className="size-3" />
</button>
</PanelContent>
</Panel>
diff --git a/web/src/components/slack-connect.render.test.tsx b/web/src/components/slack-connect.render.test.tsx
index 347e7320..9e053cbf 100644
--- a/web/src/components/slack-connect.render.test.tsx
+++ b/web/src/components/slack-connect.render.test.tsx
@@ -2,7 +2,7 @@ import { QueryClient, QueryClientProvider } from '@tanstack/react-query'
import { renderToStaticMarkup } from 'react-dom/server'
import { MemoryRouter } from 'react-router-dom'
import { describe, expect, it } from 'vitest'
-import { SlackConnect } from './slack-connect'
+import { SlackConnect, SlackConnectionSummary } from './slack-connect'
import { managedSlackConnectionsQueryKey } from '@/lib/managed-slack-connections'
const agentId = 'agt_aaaaaaaaaaaaaaaaaaaaaaaa'
@@ -114,6 +114,45 @@ describe('SlackConnect managed states', () => {
expect(markup).toContain('Slack workspaces already in use')
expect(markup).toContain('Sends messages to Docs writer')
expect(markup).toContain(`href="/agents/${connectedAgentId}"`)
+ expect(markup).toContain('Move here')
expect(markup).toContain('Connect another workspace')
})
})
+
+describe('SlackConnectionSummary', () => {
+ it('keeps Overview compact for connected and disconnected agents', () => {
+ const renderSummary = (managed: Record<string, unknown> | null) => {
+ const queryClient = new QueryClient({
+ defaultOptions: { queries: { retry: false, staleTime: Infinity } },
+ })
+ queryClient.setQueryData(['slack', 'managed', agentId], managed)
+ queryClient.setQueryData(['slack', 'byo', agentId], null)
+ return renderToStaticMarkup(
+ <QueryClientProvider client={queryClient}>
+ <MemoryRouter>
+ <SlackConnectionSummary
+ agentId={agentId}
+ onOpenSettings={() => undefined}
+ />
+ </MemoryRouter>
+ </QueryClientProvider>,
+ )
+ }
+
+ const disconnected = renderSummary(null)
+ expect(disconnected).toContain('Not connected')
+ expect(disconnected).toContain('Connect Slack')
+ expect(disconnected).not.toContain('Use your own Slack app')
+
+ const connected = renderSummary({
+ mode: 'managed',
+ status: 'active',
+ workspace: { id: 'T1', name: 'Acme' },
+ app: { id: 'A1', handle: 'OpenComputer' },
+ connected_at: '2026-07-16T18:00:00Z',
+ })
+ expect(connected).toContain('OpenComputer app')
+ expect(connected).toContain('Acme')
+ expect(connected).toContain('Manage Slack')
+ })
+})
diff --git a/web/src/components/slack-connect.test.ts b/web/src/components/slack-connect.test.ts
index e95ca495..0cf3b02d 100644
--- a/web/src/components/slack-connect.test.ts
+++ b/web/src/components/slack-connect.test.ts
@@ -36,7 +36,7 @@ describe('managed Slack OAuth notices', () => {
),
).toMatchObject({
description:
- 'This workspace sends messages to Docs writer. Disconnect it below before connecting it to Support triage.',
+ 'This workspace sends messages to Docs writer. Move it below to connect it to Support triage.',
})
})
@@ -71,4 +71,28 @@ describe('managed Slack OAuth notices', () => {
'New Slack messages from Acme will stop going to Docs writer. The agent and its existing sessions stay available, and the OpenComputer app stays installed. After disconnecting, connect Slack again and select this workspace for Support triage.',
})
})
+
+ it('states the temporary unassigned state for a guided move', () => {
+ expect(
+ managedSlackDisconnectCopy(
+ {
+ mode: 'managed',
+ status: 'active',
+ workspace: { id: 'T1', name: 'Acme' },
+ app: { id: 'A1', handle: 'OpenComputer' },
+ connected_at: '2026-07-16T18:00:00Z',
+ agent: {
+ id: 'agt_bbbbbbbbbbbbbbbbbbbbbbbb',
+ name: 'Docs writer',
+ },
+ },
+ 'Support triage',
+ true,
+ ),
+ ).toEqual({
+ title: 'Move Acme to Support triage?',
+ description:
+ 'OpenComputer will disconnect Acme from Docs writer, then open Slack so you can authorize it for Support triage. If you stop before authorization completes, the app stays installed but does not send messages to an agent.',
+ })
+ })
})
diff --git a/web/src/components/slack-connect.tsx b/web/src/components/slack-connect.tsx
index 444f171c..17c689c3 100644
--- a/web/src/components/slack-connect.tsx
+++ b/web/src/components/slack-connect.tsx
@@ -1,7 +1,7 @@
-import { useEffect, useRef, useState } from 'react'
+import { useState } from 'react'
import { useMutation, useQuery, useQueryClient } from '@tanstack/react-query'
import { Link, useSearchParams } from 'react-router-dom'
-import { Check, Copy, ExternalLink, X } from 'lucide-react'
+import { Check, Copy, ExternalLink, MessageSquare, X } from 'lucide-react'
import { notifyError } from '@/lib/errors'
import {
authorizeManagedSlack,
@@ -14,7 +14,12 @@ import {
disconnectSlack,
} from '@/api/client'
import type { SlackManifestResponse } from '@/api/schemas'
-import { Panel, PanelContent } from '@/components/panel'
+import {
+ Panel,
+ PanelContent,
+ PanelHeader,
+ PanelTitle,
+} from '@/components/panel'
import { Button } from '@/components/ui/button'
import { Skeleton } from '@/components/ui/skeleton'
import {
@@ -106,15 +111,91 @@ function CompactSteps({ current }: { current: number }) {
)
}
+export function SlackConnectionSummary({
+ agentId,
+ onOpenSettings,
+}: {
+ agentId: string
+ onOpenSettings: () => void
+}) {
+ const managedQuery = useQuery({
+ queryKey: ['slack', 'managed', agentId],
+ queryFn: () => getManagedSlackConnection(agentId),
+ })
+ const byoQuery = useQuery({
+ queryKey: ['slack', 'byo', agentId],
+ queryFn: () => getSlackConnection(agentId),
+ })
+ const managed = managedQuery.data
+ const byo = byoQuery.data
+ const managedActive = managed?.status === 'active'
+ const byoActive = byo?.status === 'active'
+ const loading = managedQuery.isLoading || byoQuery.isLoading
+ const unavailable = managedQuery.isError && byoQuery.isError
+ const managedWorkspace = managed?.workspace?.name || managed?.workspace?.id
+ const byoWorkspace = byo?.account_login || byo?.team_id
+
+ let title = 'Not connected'
+ let detail = 'Connect the OpenComputer app or use your own Slack app.'
+ if (managedActive && byoActive) {
+ title = 'Two Slack apps connected'
+ detail = [managedWorkspace, byo?.handle ? `@${byo.handle}` : byoWorkspace]
+ .filter(Boolean)
+ .join(' · ')
+ } else if (managedActive) {
+ title = 'OpenComputer app'
+ detail = managedWorkspace || 'Connected workspace'
+ } else if (byoActive) {
+ title = byo?.handle ? `@${byo.handle}` : 'Your Slack app'
+ detail = byoWorkspace || 'Connected workspace'
+ } else if (managed?.status === 'error' || managed?.status === 'revoked') {
+ title = 'Authorization required'
+ detail = 'Reconnect the OpenComputer app in Settings.'
+ }
+
+ return (
+ <Panel>
+ <PanelHeader className="border-b-0 pb-2">
+ <PanelTitle className="flex items-center gap-2">
+ <MessageSquare className="size-4" /> Slack
+ </PanelTitle>
+ </PanelHeader>
+ <PanelContent className="pt-1">
+ {loading ? (
+ <Skeleton className="h-10 w-full" />
+ ) : unavailable ? (
+ <p className="text-muted-foreground text-sm">
+ Slack status is unavailable.
+ </p>
+ ) : (
+ <div className="min-w-0">
+ <p className="truncate text-sm font-medium">{title}</p>
+ <p className="text-muted-foreground mt-0.5 text-xs leading-relaxed">
+ {detail}
+ </p>
+ </div>
+ )}
+ <Button
+ type="button"
+ variant="ghost"
+ size="sm"
+ className="text-muted-foreground hover:text-foreground mt-2 -ml-3"
+ onClick={onOpenSettings}
+ >
+ {managedActive || byoActive ? 'Manage Slack' : 'Connect Slack'}
+ </Button>
+ </PanelContent>
+ </Panel>
+ )
+}
+
export function SlackConnect({
agentId,
agentName,
- autoOpen = false,
canOpenSlack = true,
}: {
agentId: string
agentName: string
- autoOpen?: boolean
canOpenSlack?: boolean
}) {
const queryClient = useQueryClient()
@@ -305,18 +386,6 @@ export function SlackConnect({
const stepIndex =
step === 'create' ? 0 : step === 'details' ? 1 : step === 'install' ? 2 : 3
- // Arrived via a setup CTA (?connect=slack) → open the wizard once, unless
- // already connected. Latched so a re-render / param-clear doesn't re-trigger.
- const autoOpenedRef = useRef(false)
- useEffect(() => {
- if (autoOpen && !autoOpenedRef.current && !isLoading && !isActive) {
- autoOpenedRef.current = true
- beginConnect()
- }
- // beginConnect is a stable-enough closure; the ref guards single-fire.
- // eslint-disable-next-line react-hooks/exhaustive-deps
- }, [autoOpen, isLoading, isActive])
-
return (
<Panel className="overflow-hidden">
<PanelContent className="space-y-4">
@@ -463,6 +532,7 @@ export function SlackConnect({
currentAgentId={agentId}
currentAgentName={agentName}
query={managedConnectionsQuery}
+ onMoveHere={() => authorizeManagedMutation.mutate()}
/>
<Button
size="sm"
diff --git a/web/src/lib/managed-slack-connections.ts b/web/src/lib/managed-slack-connections.ts
index d73b7105..51688636 100644
--- a/web/src/lib/managed-slack-connections.ts
+++ b/web/src/lib/managed-slack-connections.ts
@@ -22,9 +22,16 @@ export function useManagedSlackConnections(enabled = true) {
export function managedSlackDisconnectCopy(
connection: ManagedSlackWorkspaceConnection,
nextAgentName: string,
+ moveHere = false,
) {
const workspace = connection.workspace?.name || connection.workspace?.id
const workspaceLabel = workspace || 'this Slack workspace'
+ if (moveHere) {
+ return {
+ title: `Move ${workspaceLabel} to ${nextAgentName}?`,
+ description: `OpenComputer will disconnect ${workspaceLabel} from ${connection.agent.name}, then open Slack so you can authorize it for ${nextAgentName}. If you stop before authorization completes, the app stays installed but does not send messages to an agent.`,
+ }
+ }
return {
title: `Disconnect ${workspaceLabel} from ${connection.agent.name}?`,
description: `New Slack messages from ${workspaceLabel} will stop going to ${connection.agent.name}. The agent and its existing sessions stay available, and the OpenComputer app stays installed. After disconnecting, connect Slack again and select this workspace for ${nextAgentName}.`,
diff --git a/web/src/lib/managed-slack-notice.ts b/web/src/lib/managed-slack-notice.ts
index 2ba33bcf..d7a655c7 100644
--- a/web/src/lib/managed-slack-notice.ts
+++ b/web/src/lib/managed-slack-notice.ts
@@ -101,7 +101,7 @@ export function managedSlackNotice(
return {
title: 'This Slack workspace is already connected',
description: connectedAgentName
- ? `This workspace sends messages to ${connectedAgentName}. Disconnect it below before connecting it to ${agentName}.`
+ ? `This workspace sends messages to ${connectedAgentName}. Move it below to connect it to ${agentName}.`
: 'Connect a different workspace or use your own Slack app for this agent.',
destructive: true,
}
diff --git a/web/src/pages/AgentDetail.tsx b/web/src/pages/AgentDetail.tsx
index f1c600dc..5dbdf7c9 100644
--- a/web/src/pages/AgentDetail.tsx
+++ b/web/src/pages/AgentDetail.tsx
@@ -1,4 +1,4 @@
-import { useState } from 'react'
+import { useEffect, useState } from 'react'
import { useMutation, useQuery, useQueryClient } from '@tanstack/react-query'
import { Link, useLocation, useNavigate, useParams } from 'react-router-dom'
import {
@@ -7,6 +7,7 @@ import {
MessagesSquare,
Send,
GitBranch,
+ ExternalLink,
} from 'lucide-react'
import { notifyError } from '@/lib/errors'
import {
@@ -34,13 +35,18 @@ import { StatusBadge } from '@/components/status-badge'
import { EmptyState } from '@/components/empty-state'
import { ResourceTable, type Column } from '@/components/resource-table'
import { Skeleton } from '@/components/ui/skeleton'
-import { SlackConnect } from '@/components/slack-connect'
+import {
+ SlackConnect,
+ SlackConnectionSummary,
+} from '@/components/slack-connect'
import { AgentSkills } from '@/components/agent-skills'
-import { AgentDeploySource } from '@/components/agent-deploy-source'
+import {
+ AgentDeploySource,
+ DeploymentSourceSummary,
+} from '@/components/agent-deploy-source'
import { AgentSchedulesTab } from '@/components/agent-schedules'
import { AgentRevisions } from '@/components/agent-revisions'
import { AgentDeployments } from '@/components/agent-deployments'
-import { AgentUrlPanel } from '@/components/agent-url-panel'
import { AgentHooksPanel } from '@/components/agent-hooks-panel'
import {
RepositoryAccessPanel,
@@ -200,10 +206,36 @@ export default function AgentDetail() {
}`
}
- // ── Start a session (used by the Sessions tab composer) ────────────────────
+ // ── Start a session (used by the Overview playground) ─────────────────────
// Seed from a deferred action's prefill (agent_prefill lands here via router
// state). Doesn't survive refresh — fine; the agent already exists.
const location = useLocation()
+
+ // Public endpoint-guide and Overview summary links land on one exact
+ // Settings owner. Keep the query through authentication, then scroll and
+ // focus the rendered section without triggering a connector mutation.
+ useEffect(() => {
+ if (active === 'overview' && location.hash === '#playground') {
+ const frame = window.requestAnimationFrame(() => {
+ const target = document.getElementById('playground')
+ target?.scrollIntoView({ block: 'start' })
+ target?.focus({ preventScroll: true })
+ })
+ return () => window.cancelAnimationFrame(frame)
+ }
+ if (active !== 'settings') return
+ const section = new URLSearchParams(location.search).get('section')
+ if (section !== 'github' && section !== 'slack' && section !== 'hooks') {
+ return
+ }
+ const frame = window.requestAnimationFrame(() => {
+ const target = document.getElementById(section)
+ target?.scrollIntoView({ block: 'start' })
+ target?.focus({ preventScroll: true })
+ })
+ return () => window.cancelAnimationFrame(frame)
+ }, [active, location.hash, location.search])
+
const [task, setTask] = useState(
() =>
(location.state as { composerPrefill?: string } | null)
@@ -397,6 +429,20 @@ export default function AgentDetail() {
</h1>
<div className="text-muted-foreground flex flex-wrap items-center gap-x-3 gap-y-1 text-xs">
<span className="font-mono">{agent.id}</span>
+ {agent.invoke_url ? (
+ <a
+ href={agent.invoke_url}
+ target="_blank"
+ rel="noreferrer"
+ title={agent.invoke_url}
+ className="hover:text-foreground inline-flex max-w-64 items-center gap-1 truncate underline-offset-4 hover:underline"
+ >
+ <span className="truncate">
+ {agent.invoke_url.replace(/^https:\/\//, '')}
+ </span>
+ <ExternalLink className="size-3 shrink-0" aria-hidden />
+ </a>
+ ) : null}
<span className="capitalize">{agent.runtime}</span>
<span className="font-mono">
{activeRev ? `rev #${activeRev}` : 'Not deployed'}
@@ -420,7 +466,7 @@ export default function AgentDetail() {
</Button>
) : canStartNewSession ? (
<Button asChild size="sm" variant="outline">
- <Link to={`${base}/sessions`}>
+ <Link to={`${base}#playground`}>
<Send className="size-4" />
New session
</Link>
@@ -428,7 +474,7 @@ export default function AgentDetail() {
) : null}
{setupComplete ? (
<Button asChild size="sm">
- <Link to={`${base}/sessions`}>
+ <Link to={`${base}#playground`}>
<Send className="size-4" />
New session
</Link>
@@ -478,156 +524,237 @@ export default function AgentDetail() {
<ApiHint {...tabApi[active]} />
</div>
{active === 'overview' && (
- <div className="grid gap-6 lg:grid-cols-[2fr_1fr]">
- {/* Left: behavior (model/prompt) + skills — read-only when a repo drives the agent. */}
- <div className="space-y-6">
- <Panel>
- <PanelContent className="space-y-5">
- {source ? (
- <div className="space-y-4">
- <div className="border-border bg-panel-2 flex items-start gap-2 rounded-md border px-3 py-2.5 text-xs">
- <GitBranch className="text-muted-foreground mt-0.5 size-3.5 shrink-0" />
- <div className="space-y-0.5">
- <p className="text-foreground">
- Managed from a connected repo:{' '}
- <span className="font-mono">
- {source.full_name ?? source.path ?? 'repo'}
- {source.full_name && source.path
- ? `/${source.path}`
- : ''}
- @{source.production_ref}
- </span>
- </p>
- <p className="text-muted-foreground">
- The repo is the source of truth.{' '}
- {agent.runtime === 'flue' ? (
- <>
- Edit and push there, then{' '}
- <Link
- className="underline underline-offset-4"
- to={
- latestDeploymentId
- ? `${base}/deployments/${latestDeploymentId}`
- : `${base}/deployments`
- }
- >
- {latestDeploymentId
- ? 'open the latest deployment'
- : 'open Deployments'}
- </Link>{' '}
- and choose Deploy latest.
- </>
- ) : (
- <>
- Edit there and push, or{' '}
- <Link
- className="underline underline-offset-4"
- to={`${base}/revisions`}
- >
- browse revisions
- </Link>
- .
- </>
- )}
- </p>
- </div>
- </div>
- <ReadOnlyField label="Model" value={agent.model} mono />
- <ReadOnlyField
- label="System prompt"
- value={savedPrompt || '—'}
- pre
+ <div className="space-y-6">
+ <Panel
+ id="playground"
+ tabIndex={-1}
+ className="scroll-mt-36 overflow-hidden outline-none"
+ >
+ <PanelHeader>
+ <div>
+ <PanelTitle>Playground</PanelTitle>
+ <p className="text-muted-foreground mt-1 text-xs">
+ Every run starts a new durable session.
+ </p>
+ </div>
+ <Link
+ to={`${base}/sessions`}
+ className="text-muted-foreground hover:text-foreground text-xs underline-offset-4 hover:underline"
+ >
+ View sessions
+ </Link>
+ </PanelHeader>
+ <PanelContent>
+ {canStartNewSession ? (
+ <form
+ className="space-y-2"
+ onSubmit={(event) => {
+ event.preventDefault()
+ if (task.trim()) startMutation.mutate()
+ }}
+ >
+ <ChatTextarea
+ value={task}
+ onChange={(event) => setTask(event.target.value)}
+ onSend={() => {
+ if (task.trim() && !startMutation.isPending) {
+ startMutation.mutate()
+ }
+ }}
+ placeholder="Give this agent a task…"
+ className="min-h-20"
+ />
+ <div className="flex flex-wrap items-center justify-between gap-2">
+ <WorkingRepoField
+ agentId={agent.id}
+ runtime={agent.runtime}
+ value={workingRepo}
+ onChange={setWorkingRepo}
/>
+ <Button
+ type="submit"
+ size="sm"
+ title="Enter to start · Shift+Enter for newline"
+ disabled={startMutation.isPending || !task.trim()}
+ className="ml-auto"
+ >
+ <Send className="size-4" />
+ {startMutation.isPending
+ ? 'Starting…'
+ : 'Start session'}
+ </Button>
</div>
- ) : (
- <>
- <Field label="Model" htmlFor="agent-model">
- <div className="flex items-center gap-3">
- <Select
- id="agent-model"
- value={agent.model}
- onValueChange={(m) => modelMutation.mutate(m)}
- options={withModelGroups(modelOptions)}
- className="max-w-xs"
- />
- <Saving show={modelMutation.isPending} />
+ </form>
+ ) : (
+ <div className="flex flex-col gap-3 sm:flex-row sm:items-center sm:justify-between">
+ <div>
+ <p className="text-sm font-medium">
+ {activeRev
+ ? 'New sessions are paused until the live deployment is verified.'
+ : 'Deploy this agent before starting a session.'}
+ </p>
+ <p className="text-muted-foreground mt-1 text-xs">
+ Open deployment history to inspect progress and build
+ logs.
+ </p>
+ </div>
+ <Button variant="outline" size="sm" asChild>
+ <Link to={`${base}/deployments`}>View deployments</Link>
+ </Button>
+ </div>
+ )}
+ </PanelContent>
+ </Panel>
+
+ <div className="grid gap-6 lg:grid-cols-[2fr_1fr]">
+ {/* Left: behavior (model/prompt) + skills — read-only when a repo drives the agent. */}
+ <div className="space-y-6">
+ <Panel>
+ <PanelContent className="space-y-5">
+ {source ? (
+ <div className="space-y-4">
+ <div className="border-border bg-panel-2 flex items-start gap-2 rounded-md border px-3 py-2.5 text-xs">
+ <GitBranch className="text-muted-foreground mt-0.5 size-3.5 shrink-0" />
+ <div className="space-y-0.5">
+ <p className="text-foreground">
+ Managed from a connected repo:{' '}
+ <span className="font-mono">
+ {source.full_name ?? source.path ?? 'repo'}
+ {source.full_name && source.path
+ ? `/${source.path}`
+ : ''}
+ @{source.production_ref}
+ </span>
+ </p>
+ <p className="text-muted-foreground">
+ The repo is the source of truth.{' '}
+ {agent.runtime === 'flue' ? (
+ <>
+ Edit and push there, then{' '}
+ <Link
+ className="underline underline-offset-4"
+ to={
+ latestDeploymentId
+ ? `${base}/deployments/${latestDeploymentId}`
+ : `${base}/deployments`
+ }
+ >
+ {latestDeploymentId
+ ? 'open the latest deployment'
+ : 'open Deployments'}
+ </Link>{' '}
+ and choose Deploy latest.
+ </>
+ ) : (
+ <>
+ Edit there and push, or{' '}
+ <Link
+ className="underline underline-offset-4"
+ to={`${base}/revisions`}
+ >
+ browse revisions
+ </Link>
+ .
+ </>
+ )}
+ </p>
+ </div>
</div>
- </Field>
- <Field label="System prompt" htmlFor="agent-prompt">
- <Textarea
- id="agent-prompt"
- value={promptValue}
- onChange={(e) => setPromptDraft(e.target.value)}
- placeholder="You are a meticulous code reviewer…"
- className="min-h-32"
+ <ReadOnlyField label="Model" value={agent.model} mono />
+ <ReadOnlyField
+ label="System prompt"
+ value={savedPrompt || '—'}
+ pre
/>
- <div className="mt-2 flex items-center gap-3">
- <p className="text-muted-foreground text-xs">
- How the agent behaves. Saving bumps the agent's
- revision.
- </p>
- <div className="ml-auto flex items-center gap-2">
- <Saving show={promptMutation.isPending} />
- <Button
- type="button"
- variant="ghost"
- size="sm"
- disabled={
- !promptDirty || promptMutation.isPending
- }
- onClick={() => setPromptDraft(undefined)}
- >
- Discard
- </Button>
- <Button
- type="button"
- variant="outline"
- size="sm"
- disabled={
- !promptDirty ||
- promptMutation.isPending ||
- !promptValue.trim()
- }
- onClick={() =>
- promptMutation.mutate(promptValue.trim())
- }
- >
- Save prompt
- </Button>
+ </div>
+ ) : (
+ <>
+ <Field label="Model" htmlFor="agent-model">
+ <div className="flex items-center gap-3">
+ <Select
+ id="agent-model"
+ value={agent.model}
+ onValueChange={(m) => modelMutation.mutate(m)}
+ options={withModelGroups(modelOptions)}
+ className="max-w-xs"
+ />
+ <Saving show={modelMutation.isPending} />
</div>
- </div>
- </Field>
- </>
- )}
- </PanelContent>
- </Panel>
- <AgentSkills agentId={agent.id} />
- </div>
- {/* Right rail: invocation surfaces, deployment source, working-repo scope, and Slack. */}
- <div className="space-y-4">
- <AgentUrlPanel key={`url-${agent.id}`} agent={agent} />
- <AgentHooksPanel key={`hooks-${agent.id}`} agentId={agent.id} />
- <AgentDeploySource
- agentId={agent.id}
- profilePinned={agent.runtime === 'flue'}
- />
- {agent.runtime === 'flue' ? (
- <RepositoryAccessSummary
+ </Field>
+ <Field label="System prompt" htmlFor="agent-prompt">
+ <Textarea
+ id="agent-prompt"
+ value={promptValue}
+ onChange={(e) => setPromptDraft(e.target.value)}
+ placeholder="You are a meticulous code reviewer…"
+ className="min-h-32"
+ />
+ <div className="mt-2 flex items-center gap-3">
+ <p className="text-muted-foreground text-xs">
+ How the agent behaves. Saving bumps the agent's
+ revision.
+ </p>
+ <div className="ml-auto flex items-center gap-2">
+ <Saving show={promptMutation.isPending} />
+ <Button
+ type="button"
+ variant="ghost"
+ size="sm"
+ disabled={
+ !promptDirty || promptMutation.isPending
+ }
+ onClick={() => setPromptDraft(undefined)}
+ >
+ Discard
+ </Button>
+ <Button
+ type="button"
+ variant="outline"
+ size="sm"
+ disabled={
+ !promptDirty ||
+ promptMutation.isPending ||
+ !promptValue.trim()
+ }
+ onClick={() =>
+ promptMutation.mutate(promptValue.trim())
+ }
+ >
+ Save prompt
+ </Button>
+ </div>
+ </div>
+ </Field>
+ </>
+ )}
+ </PanelContent>
+ </Panel>
+ <AgentSkills agentId={agent.id} />
+ </div>
+ {/* Overview keeps integrations compact; Settings owns mutations. */}
+ <div className="space-y-4">
+ {agent.runtime === 'flue' ? (
+ <RepositoryAccessSummary
+ agentId={agent.id}
+ onOpenSettings={() => {
+ void navigate(`${base}/settings?section=github`)
+ }}
+ />
+ ) : (
+ <DeploymentSourceSummary
+ agentId={agent.id}
+ onOpenSettings={() => {
+ void navigate(`${base}/settings?section=github`)
+ }}
+ />
+ )}
+ <SlackConnectionSummary
agentId={agent.id}
onOpenSettings={() => {
- void navigate(`${base}/settings`)
+ void navigate(`${base}/settings?section=slack`)
}}
/>
- ) : null}
- <SlackConnect
- agentId={agent.id}
- agentName={agent.name}
- canOpenSlack={canStartNewSession}
- autoOpen={
- new URLSearchParams(location.search).get('connect') ===
- 'slack'
- }
- />
+ </div>
</div>
</div>
)}
@@ -640,70 +767,18 @@ export default function AgentDetail() {
<Panel className="overflow-hidden">
<PanelHeader>
<PanelTitle>Sessions</PanelTitle>
- <Link
- to="/sessions"
- className="text-muted-foreground hover:text-foreground text-xs underline-offset-4 hover:underline"
- >
- All sessions
- </Link>
- </PanelHeader>
- <PanelContent className="border-b">
- {canStartNewSession ? (
- <form
- className="space-y-2"
- onSubmit={(e) => {
- e.preventDefault()
- if (task.trim()) startMutation.mutate()
- }}
+ <div className="flex items-center gap-3">
+ <Link
+ to="/sessions"
+ className="text-muted-foreground hover:text-foreground text-xs underline-offset-4 hover:underline"
>
- <ChatTextarea
- value={task}
- onChange={(e) => setTask(e.target.value)}
- onSend={() => {
- if (task.trim() && !startMutation.isPending)
- startMutation.mutate()
- }}
- placeholder="Give this agent a task that runs durably as a new session…"
- className="min-h-20"
- />
- <div className="flex flex-wrap items-center justify-between gap-2">
- <WorkingRepoField
- agentId={agent.id}
- runtime={agent.runtime}
- value={workingRepo}
- onChange={setWorkingRepo}
- />
- <Button
- type="submit"
- size="sm"
- title="Enter to start · Shift+Enter for newline"
- disabled={startMutation.isPending || !task.trim()}
- className="ml-auto"
- >
- <Send className="size-4" />
- {startMutation.isPending ? 'Starting…' : 'Start session'}
- </Button>
- </div>
- </form>
- ) : (
- <div className="flex flex-col gap-3 sm:flex-row sm:items-center sm:justify-between">
- <div>
- <p className="text-sm font-medium">
- {activeRev
- ? 'New sessions are paused until the live deployment is verified.'
- : 'Deploy this agent before starting a session.'}
- </p>
- <p className="text-muted-foreground mt-1 text-xs">
- Open deployment history to inspect progress and build
- logs.
- </p>
- </div>
- <Button variant="outline" size="sm" asChild>
- <Link to={`${base}/deployments`}>View deployments</Link>
- </Button>
- </div>
- )}
- </PanelContent>
+ All sessions
+ </Link>
+ <Button asChild size="sm" variant="outline">
+ <Link to={`${base}#playground`}>Start a session</Link>
+ </Button>
+ </div>
+ </PanelHeader>
<ResourceTable
columns={sessionColumns}
rows={sessions}
@@ -713,7 +788,7 @@ export default function AgentDetail() {
<EmptyState
icon={MessagesSquare}
title="No sessions yet"
- description="Start a session above to give this agent a durable task."
+ description="Start one from the Overview playground to give this agent a durable task."
/>
}
/>
@@ -722,9 +797,31 @@ export default function AgentDetail() {
{active === 'settings' && (
<div className="space-y-6">
- {agent.runtime === 'flue' ? (
- <RepositoryAccessPanel agentId={agent.id} />
- ) : null}
+ <section
+ id="github"
+ tabIndex={-1}
+ className="scroll-mt-36 space-y-6 outline-none"
+ >
+ <AgentDeploySource
+ agentId={agent.id}
+ profilePinned={agent.runtime === 'flue'}
+ />
+ {agent.runtime === 'flue' ? (
+ <RepositoryAccessPanel agentId={agent.id} />
+ ) : null}
+ </section>
+ <section
+ id="slack"
+ tabIndex={-1}
+ className="scroll-mt-36 outline-none"
+ >
+ <SlackConnect
+ agentId={agent.id}
+ agentName={agent.name}
+ canOpenSlack={canStartNewSession}
+ />
+ </section>
+ <AgentHooksPanel key={`hooks-${agent.id}`} agentId={agent.id} />
{/* Credential — which key the agent runs on. */}
<Panel>
<PanelHeader>
diff --git a/web/src/pages/AgentSetup.tsx b/web/src/pages/AgentSetup.tsx
index bec22500..945256a6 100644
--- a/web/src/pages/AgentSetup.tsx
+++ b/web/src/pages/AgentSetup.tsx
@@ -489,7 +489,7 @@ export default function AgentSetup() {
this agent.{' '}
</span>
<Link
- to={`/agents/${agentId}?connect=slack`}
+ to={`/agents/${agentId}/settings?section=slack`}
className="text-foreground underline underline-offset-4"
>
Use your own Slack app