# Fix terminal stability bugs: remove autoFocus from effect deps, stabilize memo, remove dead export · pingdotgg/t3code

[View on GitCafe](https://git.cafe/pingdotgg/t3code/commit/0e73dc15275f24b7ba94a7c200939907690f70b2)

Repository: [pingdotgg/t3code](https://git.cafe/pingdotgg/t3code)

Visibility: public

Requested revision: 0e73dc15275f24b7ba94a7c200939907690f70b2

Requested commit: 0e73dc15275f24b7ba94a7c200939907690f70b2

Commit: 0e73dc15275f24b7ba94a7c200939907690f70b2

Tree: d67c879a2ce203d563614febc43c940538459a37

Author: Cursor Agent

Committer: Julius Marminge

## Message

```
Fix terminal stability bugs: remove autoFocus from effect deps, stabilize memo, remove dead export

- Remove autoFocus from the main terminal setup effect dependency array to
  prevent full terminal teardown/recreation when switching tabs in split view.
  Focus is already handled by a dedicated effect.
- Change threadTerminalRuntimeEnv memo dependency from activeProject to
  activeProject?.cwd so unrelated project state changes (e.g. saving scripts)
  don't trigger terminal re-initialization.
- Unexport injectEnvIntoShellCommand which is never imported by production
  code (env injection is handled server-side), and remove its tests.

Applied via @cursor push command
```

## Parents

- [1a94fcbd294ab69709a3895b30941537d415764a](https://git.cafe/pingdotgg/t3code/commit/1a94fcbd294ab69709a3895b30941537d415764a?format=markdown)

[Source at this commit](https://git.cafe/pingdotgg/t3code/tree/0e73dc15275f24b7ba94a7c200939907690f70b2?format=markdown)
