Skip to content

feat(Workspace): show message dialog when error occupied#1219

Open
gastoner wants to merge 1 commit intokortex-hub:mainfrom
gastoner:starting_stopping_workspace_dialog
Open

feat(Workspace): show message dialog when error occupied#1219
gastoner wants to merge 1 commit intokortex-hub:mainfrom
gastoner:starting_stopping_workspace_dialog

Conversation

@gastoner
Copy link
Copy Markdown
Contributor

@gastoner gastoner commented Apr 1, 2026

Adds message dialog when error occupies when starting/stopping a workspace

Closes #1215

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Signed-off-by: Evzen Gasta <evzen.ml@seznam.cz>
@gastoner gastoner requested a review from jeffmaury April 1, 2026 18:58
@gastoner gastoner requested a review from a team as a code owner April 1, 2026 18:58
@gastoner gastoner requested review from fbricon and removed request for a team April 1, 2026 18:58
@coderabbitai
Copy link
Copy Markdown

coderabbitai bot commented Apr 1, 2026

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: 0d2e9f39-55ea-431c-b109-feec964f1b21

📥 Commits

Reviewing files that changed from the base of the PR and between 1c59e7b and 0b8d031.

📒 Files selected for processing (6)
  • packages/renderer/src/lib/agent-workspaces/AgentWorkspaceCard.spec.ts
  • packages/renderer/src/lib/agent-workspaces/AgentWorkspaceCard.svelte
  • packages/renderer/src/lib/agent-workspaces/AgentWorkspaceDetails.spec.ts
  • packages/renderer/src/lib/agent-workspaces/AgentWorkspaceDetails.svelte
  • packages/renderer/src/stores/agent-workspaces.svelte.spec.ts
  • packages/renderer/src/stores/agent-workspaces.svelte.ts

📝 Walkthrough

Walkthrough

This change enhances error reporting for workspace start/stop operations. Previously, errors were silently logged via .catch(console.error). Now, the store functions rethrow errors after status cleanup, and UI components catch them to display user-facing error dialogs showing operation context and failure details.

Changes

Cohort / File(s) Summary
Component Async Error Handling
packages/renderer/src/lib/agent-workspaces/AgentWorkspaceCard.svelte, packages/renderer/src/lib/agent-workspaces/AgentWorkspaceDetails.svelte
Converted handleStartStop from fire-and-forget to async with try/catch. Now awaits workspace operations and shows error dialog via window.showMessageBox on failure, including action context ("starting"/"stopping") and workspace name.
Component Error Tests
packages/renderer/src/lib/agent-workspaces/AgentWorkspaceCard.spec.ts, packages/renderer/src/lib/agent-workspaces/AgentWorkspaceDetails.spec.ts
Added 6 new test cases validating error dialog display when startAgentWorkspace and stopAgentWorkspace reject. Tests verify error message content, dialog type, and workspace status preservation after failure.
Store Error Propagation
packages/renderer/src/stores/agent-workspaces.svelte.ts
Both startAgentWorkspace and stopAgentWorkspace now rethrow caught errors after updating status and logging, enabling callers to handle failures.
Store Error Rethrow Tests
packages/renderer/src/stores/agent-workspaces.svelte.spec.ts
Updated 2 test cases to assert that failed operations reject by using await expect(...).rejects.toThrow(...) pattern.

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~22 minutes

Possibly related PRs

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
Title check ✅ Passed The title accurately describes the main change: adding a message dialog to display errors when workspace start/stop operations fail, which aligns with the primary objective of the changeset.
Description check ✅ Passed The description clearly states the purpose and references the linked issue #1215, which addresses error reporting during workspace operations.
Linked Issues check ✅ Passed The PR successfully implements error reporting for workspace start failures [#1215] by adding try/catch blocks, error dialogs via window.showMessageBox, and comprehensive test coverage for both start and stop failure scenarios.
Out of Scope Changes check ✅ Passed All changes are directly scoped to implementing error reporting for workspace start/stop operations through error dialogs and tests, with no unrelated modifications.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.


Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@codecov
Copy link
Copy Markdown

codecov bot commented Apr 1, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.

📢 Thoughts on this report? Let us know!

Copy link
Copy Markdown
Contributor

@bmahabirbu bmahabirbu left a comment

Choose a reason for hiding this comment

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

Looks good!

Copy link
Copy Markdown
Contributor

@jeffmaury jeffmaury left a comment

Choose a reason for hiding this comment

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

Tested it on Windows but it did not report an error while the CLI does

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.

Error while starting a workspace is not reported

3 participants