Skip to content

Improve dashboard motion and server stop status - #76

Merged
leifiyoo merged 1 commit into
mainfrom
codex/ui-animation-status-fixes
Jun 11, 2026
Merged

Improve dashboard motion and server stop status#76
leifiyoo merged 1 commit into
mainfrom
codex/ui-animation-status-fixes

Conversation

@leifiyoo

Copy link
Copy Markdown
Owner

No description provided.

@leifiyoo
leifiyoo merged commit e018cb1 into main Jun 11, 2026
1 check passed
const finishStopped = async () => {
if (settled) return;
settled = true;
clearTimeout(timeout);

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

WARNING: timeout is read before TypeScript can prove it is assigned.

finishStopped reads timeout via clearTimeout(timeout), but the variable is declared without an initializer and assigned later in the same function. With strict definite assignment enabled, this can fail typechecking; defensively it should be nullable and cleared only when set.

// Clear the ngrok URL from server record when server stops
updateServerSettings(serverId, { ngrokUrl: undefined }).catch(() => {});
await updateServerSettings(serverId, { ngrokUrl: undefined }).catch(() => {});
await updateServerStatus(serverId, "Offline", "0/20");

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

CRITICAL: Missing error handling can leave stopServer unresolved.

finishStopped is async and is called without await. If updateServerStatus rejects, the async function rejects before reaching resolve, so the stopServer Promise can remain pending forever. Make persistence updates non-throwing before resolving, for example by catching them or using Promise.allSettled before calling resolve.

@kilo-code-bot

kilo-code-bot Bot commented Jun 11, 2026

Copy link
Copy Markdown
Contributor

Code Review Summary

Status: 2 Issues Found | Recommendation: Address before merge

Overview

Severity Count
CRITICAL 1
WARNING 1
SUGGESTION 0
Issue Details (click to expand)

CRITICAL

File Line Issue
src/main/lib/server-runner.ts 606 finishStopped is async and called without await; if updateServerStatus rejects, stopServer can remain pending forever.

WARNING

File Line Issue
src/main/lib/server-runner.ts 601 timeout is declared without an initializer and read before TypeScript can prove it is assigned.
Other Observations (not in diff)

Issues found in unchanged code that cannot receive inline comments:

File Line Issue
None - No additional observations outside diff hunks.
Files Reviewed (7 files)
  • README.md - 0 issues
  • package.json - 0 issues
  • src/main/lib/server-runner.ts - 2 issues
  • src/renderer/src/components/AnimatedOutlet.tsx - 0 issues
  • src/renderer/src/components/app-sidebar.tsx - 0 issues
  • src/renderer/src/components/ui/animated-number.tsx - 0 issues
  • src/renderer/src/pages/DashboardPage.tsx - 0 issues
  • src/renderer/src/pages/ServerDetailPage.tsx - 0 issues
  • src/renderer/src/stores/serverStore.ts - 0 issues

Fix these issues in Kilo Cloud


Reviewed by nex-n2-pro:free · 682,175 tokens

@leifiyoo
leifiyoo deleted the codex/ui-animation-status-fixes branch June 12, 2026 12:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant