Repository navigation
Show the quiet terminal notice when a task's sandbox is gone - #383
Closed
minutechreview wants to merge 1 commit into
Closed
minutechreview wants to merge 1 commit into
minutechreview wants to merge 1 commit into
Conversation
Signed-off-by: minutechreview <141821420+minutechreview@users.noreply.github.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 subscribe to this conversation on GitHub.
Already have an account?
Sign in.
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.
terminalFailureNoticeonly treated a missing sandbox as idle when the message matchednot found. Providers now throwSandboxNotFoundError, whose message is "The sandbox does not exist", so an expired sandbox printed a red[UseAgent] The sandbox does not existline in the terminal pane.backend/src/runs/terminal.ts: check forSandboxNotFoundError(byinstanceof, or byerror.namein case the error crosses a package copy) before the text check, and return the "no live sandbox yet" notice.backend/src/runs/terminal.test.ts: replace the hand-writtennew Error("Sandbox abc not found")input withnew SandboxNotFoundError(), and assert the notice is not the red error line. The existing "connection timed out" case still prints as an error.Testing:
bun test src/runs/terminal.test.ts: 2 pass. Withterminal.tsfrommain, the updated case fails withReceived: "\r\n\u001B[31m[UseAgent] The sandbox does not exist\u001B[0m\r\n".tsc --noEmit(TypeScript 5.9.3) is clean.Fixes #313
Need help on this PR? Tag
@codesmith-botwith what you need.