feat(code-server): title the browser tab with the sandbox name - #164
Open
cmrigney wants to merge 1 commit into
Open
feat(code-server): title the browser tab with the sandbox name#164cmrigney wants to merge 1 commit into
cmrigney wants to merge 1 commit into
Conversation
Every code-server tab was titled "<workspace> - code-server", so a user
with several sandboxes open at once could not tell them apart. Pass the
sandbox name to --app-name in the startup wrapper: it replaces VS Code's
branding string, and the default window.title template ends in the app
name, so the tab becomes "<workspace> - <sandbox name>" with no
settings.json change.
The name is resolved at sandbox start from $SANDBOX_VM_ID, falling back
to the container hostname (same value) if the variable isn't in the
startup command's environment. Braces are omitted around the variable
because initFiles content may not contain any ${...} placeholder other
than ${WORKDIR} -- the validator scans the whole string, comments
included.
Also add a #!/bin/sh shebang: the single-line wrapper worked only via
glibc's execvp ENOEXEC-to-shell fallback, which is a thin reed now that
the script has more than one statement.
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Signed-off-by: Cody Rigney <cody.rigney@docker.com>
cmrigney
force-pushed
the
code-server-tab-title
branch
from
July 28, 2026 19:44
8eae178 to
72012b3
Compare
Member
|
Hi @cmrigney could you please rebase and resolve conflicts? 🙏 We can merge it as soon it's green again |
dvdksn
reviewed
Aug 21, 2026
Comment on lines
+50
to
+51
| # around SANDBOX_VM_ID: only WORKDIR may be brace-interpolated here. | ||
| name=$SANDBOX_VM_ID |
Contributor
There was a problem hiding this comment.
This variable was renamed in v0.39.0
Suggested change
| # around SANDBOX_VM_ID: only WORKDIR may be brace-interpolated here. | |
| name=$SANDBOX_VM_ID | |
| # around SANDBOX_NAME: only WORKDIR may be brace-interpolated here. | |
| name=$SANDBOX_NAME |
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.
Summary
Every code-server tab was titled
<workspace> - code-server, so a user withseveral code-server sandboxes open at once could not tell the tabs apart. The
startup wrapper now passes the sandbox name to
code-server --app-name, so thetab reads
<workspace> - <sandbox name>.--app-namereplaces VS Code's branding string (nameShort/nameLong) and thedefault
window.titletemplate ends in the app name, so nothing in the shippedsettings.jsonchanges.Origin
In-repo kit; no new upstream source.
Test plan
sbx kit validate ./code-server/./scripts/test-kit.sh code-serverpasses (the TCK)../scripts/test-kit-e2e.sh code-server🤖 Generated with Claude Code