feat(canvas): show last_sample_error + EC2 console output on failed workspaces - #1178
Merged
Merged
Conversation
…orkspaces Part 3 of 3 for the "fail fast + comprehensive logs" UX. Platform PR #1168 and controlplane #181 ship the server-side; this PR surfaces the data in the canvas. Two changes: 1. DetailsTab renders `last_sample_error` in a dedicated Error section when the workspace is failed (or degraded with an error). Before, the only trace of why a workspace failed was a generic banner — users had to click "View Logs", which opened the terminal tab (the post-boot log, empty on a runtime crash). Now the actual Python traceback is inline. A "View console output" button in the same section opens the full serial console in a modal. 2. New ConsoleModal component. Fetches GET /workspaces/:id/console (platform → CP → ec2:GetConsoleOutput). Portal-rendered above the canvas with Copy / Close / Esc handlers. Renders a friendly message on 501 (self-hosted deploys without CP) and 404 (instance terminated). 3. ProvisioningTimeout's "View Logs" button now opens the console modal instead of the (usually empty) terminal tab — when a workspace is stuck in provisioning, the cloud-init + user-data trace is what the user actually needs. Tests cover the closed-state no-fetch, happy-path fetch, 501/404 messaging, and Close/Escape wiring. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
HongmingWang-Rabbit
added a commit
that referenced
this pull request
Apr 21, 2026
staging → main: canvas error logs + console modal (PR #1178)
molecule-ai Bot
pushed a commit
that referenced
this pull request
Apr 21, 2026
…-logs feat(canvas): show last_sample_error + EC2 console output on failed workspaces
molecule-ai Bot
pushed a commit
that referenced
this pull request
Apr 21, 2026
staging → main: canvas error logs + console modal (PR #1178)
molecule-ai Bot
pushed a commit
that referenced
this pull request
Apr 21, 2026
Post-review cleanup for the #1178 / #1189 bootstrap-watcher flow: - ConsoleModal status-code matching uses \b regex anchors instead of raw substrings. Before, any error message containing "501" inside a longer digit run ("15012") would false-match into the self-hosted branch. Unlikely in practice but cheap to tighten. - Peers empty-state copy now explains WHY the list is empty on offline / failed / provisioning workspaces instead of rendering the same "No reachable peers" text used for healthy workspaces with zero siblings. Online workspaces unchanged. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
molecule-ai Bot
added a commit
that referenced
this pull request
Apr 21, 2026
Marketing Lead drafted based on PR #1178 + EC2 Console demo storyboard. All 5 days of social queue now approved. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
molecule-ai Bot
added a commit
that referenced
this pull request
Apr 22, 2026
Marketing Lead drafted based on PR #1178 + EC2 Console demo storyboard. All 5 days of social queue now approved. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Part 3 of 3 for the 'fail fast + comprehensive logs' UX. Paired with platform PR #1168 and controlplane PR #181.
What
DetailsTab shows a dedicated Error section when the workspace is
failed(ordegradedwith an error). Renderslast_sample_errorinline in a scrolling<pre>. Previously the only trace was a generic banner; now the actual Python traceback is right there.ConsoleModal — new component. Fetches
GET /workspaces/:id/consoleand renders the EC2 serial console output in a portal-rendered modal with Copy / Close / Esc. Friendly messages on 501 (non-CP deploy) and 404 (instance terminated).ProvisioningTimeout banner's "View Logs" button now opens the console modal instead of the (usually empty) terminal tab. A stuck-provisioning workspace doesn't have a terminal — it has a crashed cloud-init script, which is exactly what the console shows.
Tests
6 new ConsoleModal tests: closed-no-fetch, happy-path fetch, 501 messaging, 404 messaging, Close button, Escape key.
All existing tests still pass. Pre-existing TS errors in
__tests__/unrelated to this PR.Deploy order
Without parts 1 and 2, the View console output button returns 501 gracefully (we tested this).