Skip to content

Added feature flag for opening vscode in a new tab #8917

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

Merged
merged 1 commit into from
Jun 5, 2025

Conversation

tofarr
Copy link
Collaborator

@tofarr tofarr commented Jun 5, 2025

  • This change is worth documenting at https://docs.all-hands.dev/
  • Include this change in the Release Notes. If checked, you must provide an end-user friendly description for your change below

End-user friendly description of the problem this fixes or functionality this introduces.

Adds a feature flag that allows users to control whether VS Code should always open in a new tab rather than within an iframe. This provides a better user experience for users who encounter cross-protocol issues or prefer working with VS Code in a separate browser tab.


Summarize what the PR does, explaining any non-trivial design decisions.

When debugging, the VSCode plugin produces a lot of noise in the network tab, and sometimes a full window is preferable to an iframe.

This PR adds a new feature flag VSCODE_IN_NEW_TAB that, when enabled, forces VS Code to always open in a new browser tab instead of trying to embed it in an iframe. The implementation:

  1. Adds a new feature flag constant in feature-flags.ts
  2. Modifies the VS Code tab component to check this flag when determining whether to show the iframe or the "Open in new tab" button
  3. When the flag is enabled, the VS Code interface will always show the "Open in new tab" button, regardless of protocol matching

This provides a simple way for users to control their preferred VS Code viewing experience without requiring code changes.


Link of any specific issues this addresses:

No specific issue linked, but addresses common user requests for better VS Code integration options.


To run this PR locally, use the following command:

docker run -it --rm   -p 3000:3000   -v /var/run/docker.sock:/var/run/docker.sock   --add-host host.docker.internal:host-gateway   -e SANDBOX_RUNTIME_CONTAINER_IMAGE=docker.all-hands.dev/all-hands-ai/runtime:e04e13f-nikolaik   --name openhands-app-e04e13f   docker.all-hands.dev/all-hands-ai/openhands:e04e13f

@tofarr tofarr marked this pull request as ready for review June 5, 2025 16:29
@tofarr tofarr requested review from rbren and amanape as code owners June 5, 2025 16:29
@tofarr tofarr merged commit b765531 into main Jun 5, 2025
21 checks passed
@tofarr tofarr deleted the feat-flag-vscode-tab branch June 5, 2025 16:32
shabbir-shakudo pushed a commit to devsentient/OpenHands that referenced this pull request Jul 15, 2025
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.

2 participants