Skip to content

Commit a48837f

Browse files
committed
Show login status checks and bump version to 0.5.11
1 parent 4c5a75c commit a48837f

4 files changed

Lines changed: 26 additions & 9 deletions

File tree

‎changelog.md‎

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,8 @@
11
# Changelog
22

3+
## [0.5.11] - 05/10/2026
4+
- `codeant login` shows every status check with the HTTP response, login status, or request error, while masking the token in request diagnostics
5+
36
## [0.5.10] - 03/10/2026
47
- MCP: parallel `codeant_scans_results` calls no longer swallow other tool responses, leak findings onto the protocol stream, or hang the server
58
- MCP: `codeant_login` returns the sign-in link right away and finishes in the background (call it again to confirm); a missing browser launcher no longer crashes the server

‎package-lock.json‎

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

‎package.json‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "codeant-cli",
3-
"version": "0.5.10",
3+
"version": "0.5.11",
44
"description": "Code review CLI tool",
55
"type": "module",
66
"repository": {

‎src/commands/login.js‎

Lines changed: 20 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@ export default function Login() {
1212
const [status, setStatus] = useState('opening');
1313
const [error, setError] = useState(null);
1414
const [loginUrl, setLoginUrl] = useState('');
15+
const [pollResults, setPollResults] = useState([]);
1516

1617
useEffect(() => {
1718
// Check if already logged in
@@ -25,9 +26,11 @@ export default function Login() {
2526
const token = `cli___${randomUUID()}`;
2627
const baseUrl = getBaseUrl();
2728
const pollUrl = `${baseUrl}/extension/login/status?apiKey=${token}`;
29+
const displayPollUrl = `${baseUrl}/extension/login/status?apiKey=[redacted]`;
2830

2931
let intervalId;
3032
let timeoutId;
33+
let pollCount = 0;
3134

3235
(async () => {
3336
let dashboardUrl;
@@ -54,11 +57,14 @@ export default function Login() {
5457

5558
// Poll for login status
5659
intervalId = setInterval(async () => {
60+
const attempt = ++pollCount;
61+
let response;
5762
try {
58-
const response = await fetch(pollUrl);
63+
response = await fetch(pollUrl);
5964
const data = await response.json();
65+
setPollResults((results) => [...results, `Check ${attempt}: GET ${displayPollUrl} → HTTP ${response.status}, status: ${data?.status ?? 'missing'}`]);
6066

61-
if (data.status === 'yes') {
67+
if (data?.status === 'yes') {
6268
clearInterval(intervalId);
6369
clearTimeout(timeoutId);
6470

@@ -69,7 +75,8 @@ export default function Login() {
6975
setTimeout(() => exit(), 100);
7076
}
7177
} catch (err) {
72-
// Silently continue polling
78+
const code = err.cause?.code || err.code || err.name;
79+
setPollResults((results) => [...results, `Check ${attempt}: GET ${displayPollUrl} → ${response ? `HTTP ${response.status}, ` : ''}error: ${code}`]);
7380
}
7481
}, POLL_INTERVAL);
7582

@@ -89,6 +96,10 @@ export default function Login() {
8996
};
9097
}, []);
9198

99+
const pollLines = pollResults.map((result, index) =>
100+
React.createElement(Text, { color: 'gray', key: index }, result)
101+
);
102+
92103
if (status === 'already_logged_in') {
93104
return React.createElement(
94105
Box,
@@ -112,23 +123,26 @@ export default function Login() {
112123
{ flexDirection: 'column', padding: 1 },
113124
React.createElement(Text, { color: 'cyan' }, `Waiting for login. Open this URL in your browser: ${loginUrl}`),
114125
React.createElement(Text, { color: 'gray' }, 'Complete the login in your browser.'),
115-
React.createElement(Text, { color: 'gray' }, 'Checking every 10 seconds. Timeout in 10 minutes.')
126+
React.createElement(Text, { color: 'gray' }, 'Checking every 10 seconds. Timeout in 10 minutes.'),
127+
...pollLines
116128
);
117129
}
118130

119131
if (status === 'success') {
120132
return React.createElement(
121133
Box,
122134
{ flexDirection: 'column', padding: 1 },
123-
React.createElement(Text, { color: 'green' }, '✓ Login successful!')
135+
React.createElement(Text, { color: 'green' }, '✓ Login successful!'),
136+
...pollLines
124137
);
125138
}
126139

127140
if (status === 'error') {
128141
return React.createElement(
129142
Box,
130143
{ flexDirection: 'column', padding: 1 },
131-
React.createElement(Text, { color: 'red' }, '✗ ', error)
144+
React.createElement(Text, { color: 'red' }, '✗ ', error),
145+
...pollLines
132146
);
133147
}
134148

0 commit comments

Comments
 (0)