Skip to content

Fix terminal spawning#3

Merged
nedtwigg merged 4 commits into
mainfrom
feat/terminal-spawning
Mar 28, 2026
Merged

Fix terminal spawning#3
nedtwigg merged 4 commits into
mainfrom
feat/terminal-spawning

Conversation

@nedtwigg

Copy link
Copy Markdown
Member

No description provided.

nedtwigg and others added 4 commits March 27, 2026 14:59
When spawning a new PTY via pty:spawn, default the cwd to the first
workspace folder if none is explicitly provided. Previously, new
terminals inherited the extension host's working directory (typically
home), while only restored sessions correctly used the saved cwd.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Standalone MouseTerm was spawning a non-login shell, so brew shellenv
(and anything else in ~/.zprofile) never ran—causing tools like asdf
to be missing from PATH. Pass a `-<shell>` argv[0] to node-pty so the
shell runs in login mode, matching Terminal.app, iTerm2, and VSCode.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
node-pty sets argv[0] to the shell path and passes args as argv[1..n],
so `-zsh` was being interpreted as CLI flags (`-z`, `s`, `h`), breaking
the shell. Use the standard `-l` flag which all POSIX shells support.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@cloudflare-workers-and-pages

Copy link
Copy Markdown

Deploying mouseterm with  Cloudflare Pages  Cloudflare Pages

Latest commit: 3aac0ee
Status:⚡️  Build in progress...

View logs

@nedtwigg nedtwigg merged commit 5c7f36f into main Mar 28, 2026
2 of 3 checks passed
@nedtwigg nedtwigg deleted the feat/terminal-spawning branch March 28, 2026 03:06
nedtwigg added a commit that referenced this pull request May 9, 2026
…alert

iTerm2.md had three unrelated concerns (iTerm2 identity, notification
machinery, and a registry of every OSC parsed). vscode.md mixed VS
Code-specific behavior with adapter-agnostic transport.

- OSC.md (new): every supported OSC plus iTerm2 identity and known-
  unimplemented sequences. Single source for parsing-location and
  pty:data strip semantics.
- transport.md (new): adapter-agnostic PTY lifecycle, message protocol,
  and persisted-session types shared across VS Code, standalone, and
  fake adapters.
- alert.md: absorbs notification machinery (OSC 9/9;4/99/777/BEL,
  ActivityNotification model, text handling, security, scenarios,
  verification checklist).
- vscode.md: trimmed to VS Code-specific layer (manifest, persistence
  flow, theme, CSP, build, dream-architecture commands).
- terminal-state.md: header cross-ref points at alert.md and OSC.md.
- iTerm2.md: deleted.

Also adds SPEC-CONFLICTS.md capturing a prior audit; this commit closes
items #3 (OSC 9 timing) and #4 (pty:data strip semantics) from it.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
nedtwigg added a commit that referenced this pull request May 9, 2026
The docs/specs reorganization in 096a3d5 closed:
- #3 (OSC 9 title-override timing stated three ways) — iTerm2.md is
  gone; terminal-state.md is the single canonical source.
- #4 (pty:data strip semantics vs "the same streaming parser") —
  OSC.md is the single source for parsing-location rules.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
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.

1 participant