Start terminal in the selected project, use the login shell, and polish rendering#13
Open
LonestoneBot wants to merge 2 commits into
Open
Conversation
Two related backend fixes for the pty spawn: - Working directory: accept an `init` message carrying the CloudCLI project path and start the shell there (validated with statSync). Spawning is deferred until the client sends `init`; a short fallback timer starts the shell in $HOME if no `init` arrives (older clients), so behavior is unchanged when the path is absent or invalid. - Login shell: when SHELL is absent from the server's environment (common when the plugin server is launched from a GUI context), fall back to the user's login shell from /etc/passwd via os.userInfo().shell instead of a bare /bin/bash. This restores the user's prompt, colors and rc configuration. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
- Send an `init` message with the selected project path (api.context.project) when each session's socket opens, kept in sync via onContextChange. Existing tabs keep their original directory. - Rendering polish (no new dependencies, keeps the WebGL renderer): roomier lineHeight, small letterSpacing, bar cursor, bolder bold weight, mild minimumContrastRatio, and a font stack that leads with Menlo / SF Mono on macOS while keeping the cross-platform and CJK/emoji fallbacks. Co-Authored-By: Claude Opus 4.8 (1M context) <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.
Three terminal UX improvements, split into two commits (backend / frontend).
1. Start the shell in the selected project directory
New shells opened in the home directory regardless of the active CloudCLI
project. The client now sends an
initmessage withapi.context.project.pathon connect; the server validates it (
statSync) and starts the shell there,falling back to
$HOMEwhen absent/invalid. Spawning is deferred untilinitarrives, with a short fallback timer so older clients still work. Existing tabs
keep their original directory; new tabs follow project switches via
onContextChange.2. Use the user's login shell
When
SHELLis absent from the server's environment (common when the pluginserver is launched from a GUI context) the shell fell back to a bare
/bin/bash— no prompt, no colors, no rc. It now falls back to the login shellfrom
/etc/passwdviaos.userInfo().shell, restoring the user's prompt,colors and configuration.
3. Rendering polish (no new deps, keeps WebGL)
Roomier
lineHeight, smallletterSpacing, bar cursor, bolder bold weight,mild
minimumContrastRatio, and a font stack that leads with Menlo / SF Mono onmacOS while keeping the cross-platform and CJK/emoji fallbacks.
Testing
initvalid → shell starts in theproject dir (verified via
pwd); invalid →$HOME; noinit→ fallbacktimer +
ready; shell resolves to the login shell.tscbuild passes. Onlysrc/changes (dist/is gitignored).prompt and colored output.
🤖 Generated with Claude Code