Skip to content

Commit 57445fb

Browse files
fix(connect): align session alerts with standard agent alerts
The Connect session alerts were the only alerts using `fullWidth`, whose modifier drops the border radius and side borders, so the banner looked detached inside the padded card. Rebuild them like the existing agent alerts: the idle info nudge mirrors AgentRunningAlert (centered info alert), and the launch-error states mirror AgentLowBalanceAlert (title, body and a small button inside the message). Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
1 parent 9c7f511 commit 57445fb

1 file changed

Lines changed: 32 additions & 25 deletions

File tree

  • frontend/components/MainPage/Home/Overview/AgentInfo/ConnectSessionAlert

frontend/components/MainPage/Home/Overview/AgentInfo/ConnectSessionAlert/index.tsx

Lines changed: 32 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
import { InfoCircleOutlined } from '@ant-design/icons';
21
import { Button, Flex, Typography } from 'antd';
32

43
import { Alert } from '@/components/ui';
@@ -7,15 +6,14 @@ import { useConnectSession } from '@/hooks';
76

87
const { Text } = Typography;
98

10-
// Sized to match the other agent alerts ("Complete Agent Setup",
11-
// "phased out"), whose copy renders at text-sm.
9+
// Built the same way as AgentRunningAlert — centered info alert, default icon,
10+
// copy at text-sm.
1211
const SessionInfoAlert = ({ message }: { message: string }) => (
1312
<Alert
14-
type="info"
1513
showIcon
16-
fullWidth
17-
customIcon={<InfoCircleOutlined className="text-sm" />}
14+
centered
1815
className="mt-16"
16+
type="info"
1917
message={<Text className="text-sm">{message}</Text>}
2018
/>
2119
);
@@ -53,51 +51,60 @@ export const ConnectSessionAlert = () => {
5351
if (errorKind === 'not-installed') {
5452
return (
5553
<Alert
56-
type="error"
5754
showIcon
58-
fullWidth
5955
closable
6056
onClose={dismiss}
6157
className="mt-16"
58+
type="error"
6259
message={
63-
<Text className="font-weight-600">
64-
Claude isn&apos;t installed on this machine.
65-
</Text>
66-
}
67-
description={
68-
<Flex vertical gap={12} align="flex-start">
69-
{/* Prefer the server's message — it explains which case this is
70-
(no Claude vs. the wrong harness selected). */}
71-
<Text>
60+
<>
61+
<Text className="text-sm">
62+
<span className="font-weight-600">
63+
Claude isn&apos;t installed on this machine.
64+
</span>
65+
<br />
66+
{/* Prefer the server's message — it explains which case this is
67+
(no Claude vs. the wrong harness selected). */}
7268
{errorMessage ??
7369
'Connect works with the Claude Desktop app or the Claude Code CLI. Install one, then start the agent again.'}
7470
</Text>
71+
<br />
7572
<Button
73+
size="small"
74+
className="mt-8"
7675
href={CLAUDE_DOWNLOAD_URL}
7776
target="_blank"
7877
rel="noopener noreferrer"
7978
>
8079
Download Claude
8180
</Button>
82-
</Flex>
81+
</>
8382
}
8483
/>
8584
);
8685
}
8786

8887
return (
8988
<Alert
90-
type="error"
9189
showIcon
92-
fullWidth
9390
closable
9491
onClose={dismiss}
9592
className="mt-16"
96-
message={errorMessage ?? "Pearl couldn't launch Claude Code session."}
97-
action={
98-
<Button size="small" onClick={retry} loading={isLaunching}>
99-
Retry
100-
</Button>
93+
type="error"
94+
message={
95+
<Flex justify="space-between" gap={4}>
96+
<Text className="text-sm">
97+
{errorMessage ?? "Pearl couldn't launch Claude Code session."}
98+
</Text>
99+
<Button
100+
size="small"
101+
className="mr-6"
102+
onClick={retry}
103+
loading={isLaunching}
104+
>
105+
Retry
106+
</Button>
107+
</Flex>
101108
}
102109
/>
103110
);

0 commit comments

Comments
 (0)