Repository navigation
[Chore] Show the Zoo Code panel in the Solheim smoke video and bound the apt step #2195
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Draft
zoomote2
wants to merge
1
commit into
main
Choose a base branch
from
feature/solheim-smoke-sidebar-video-1nik3xur3t4nr
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Draft
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
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
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
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
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
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
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
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
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
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
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
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
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
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,39 @@ | ||
| "use strict" | ||
|
|
||
| // Runs inside the extension host through --extensionTestsPath so the smoke | ||
| // recording shows the Zoo Code chat panel. VS Code exits once the run() | ||
| // export settles, so run() must never settle: it focuses the sidebar, waits | ||
| // for the webview, then stays pending until the driver tears the host down. | ||
| // The IPC start path keeps focusSidebar: false; this module owns focus instead. | ||
|
|
||
| const vscode = require("vscode") | ||
|
|
||
| const EXTENSION_ID = "ZooCodeOrganization.zoo-code" | ||
| const FOCUS_COMMAND = "zoo-code.SidebarProvider.focus" | ||
| const POLL_INTERVAL_MS = 100 | ||
| const READY_TIMEOUT_MS = 120_000 | ||
|
|
||
| const delay = (ms) => new Promise((resolve) => setTimeout(resolve, ms)) | ||
|
|
||
| async function focusSidebarWhenReady() { | ||
| const extension = vscode.extensions.getExtension(EXTENSION_ID) | ||
| if (!extension) throw new Error("Zoo Code extension not found") | ||
| const api = extension.isActive ? extension.exports : await extension.activate() | ||
| await vscode.commands.executeCommand(FOCUS_COMMAND) | ||
| const deadline = Date.now() + READY_TIMEOUT_MS | ||
| while (!api.isReady()) { | ||
| if (Date.now() >= deadline) throw new Error("Zoo Code webview did not launch in time") | ||
| await delay(POLL_INTERVAL_MS) | ||
| } | ||
| } | ||
|
|
||
| exports.run = async () => { | ||
| try { | ||
| await focusSidebarWhenReady() | ||
| } catch (error) { | ||
| // Focus is best effort for the recording. A rejected run() would end | ||
| // the test host and cut the smoke short, so log and stay pending. | ||
| console.warn("[solheim-smoke] sidebar focus failed:", error && error.message ? error.message : error) | ||
| } | ||
| await new Promise(() => {}) | ||
| } | ||
Oops, something went wrong.
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This
console.warnis never visible anywhere the driver runs:createHostRuntimespawns the host withstdio: "ignore"(scripts/agent-evals/launcher.ts:98), and the isolated child environment strips everything except the display/PATH allowlist, so the module cannot reachSOLHEIM_SMOKE_OUT_DIReither. A focus failure therefore leaves no diagnostic anywhere — the verdict, trace, and uploaded artifacts never record it, and the only symptom would be an empty panel in the video again, which is exactly the failure mode this PR exists to fix. Consider writing a small failure marker the driver can check into the artifacts (for example a file under the inheritedTMPDIRthatrunSmokecopies intoverdict.json/the trace), or capturing child stderr into the artifacts dir, so a future focus regression is diagnosable from the uploaded evidence.