Repository navigation
Embedded terminal T2: panel, title-bar toggle and ⌃`, e2e on a real shell - #26
Merged
Merged
Conversation
Contributor
There was a problem hiding this comment.
Copilot review overview
🟡 Changes recommended
Terminal input remains active after PTY exit, and the resize control is missing aria-valuemax.
Review effort: Lite
Findings: 1
Open (2)
What changed in this PR
Adds an embedded per-thread PTY terminal with lazy xterm UI, toggles, resizing, lifecycle controls, and real-shell test coverage.
Changes:
- Adds terminal panel, title-bar toggle, and keyboard shortcut.
- Supports replay, restart, close, resizing, and per-thread visibility.
- Adds shell configuration, icons, styling, dependencies, and unit/e2e tests.
| File | Reviewed changes |
|---|---|
package-lock.json |
Locked terminal dependencies |
apps/desktop/test/terminal.test.ts |
Shell selection tests |
apps/desktop/src/renderer/styles.css |
Terminal panel styling |
apps/desktop/src/renderer/components/ui/Icon.tsx |
Terminal and restart icons |
apps/desktop/src/renderer/components/TitleBar.tsx |
Title-bar terminal toggle |
apps/desktop/src/renderer/components/TerminalPanel.tsx |
Terminal UI and PTY lifecycle handling; exit input handling and aria-valuemax remain to be addressed |
apps/desktop/src/renderer/App.tsx |
Per-thread state and shortcut integration |
apps/desktop/src/main/index.ts |
E2E shell configuration and cleanup |
apps/desktop/src/main/engine/terminal.ts |
Configurable shell startup |
apps/desktop/package.json |
Terminal dependencies |
apps/desktop/e2e/terminal.spec.ts |
Real-shell terminal coverage |
apps/desktop/e2e/layout.spec.ts |
Terminal layout assertions |
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
Contributor
This was referenced Sep 27, 2026
…hell Stacked on T1 (#25). The thread's shell, from the T1 engine, now has UI. - TerminalPanel: a bottom panel in the main pane on the design tokens and IconButton (new terminal/restart glyphs): folder or worktree branch, "Exited (n)", Restart, Close, drag or arrow-key resize. xterm 6 + fit addon load lazily on first open. The native viewport scrollbar is hidden (xterm 6 draws its own; wheel scrolling measured identical). - Title-bar Terminal toggle one 34 px step left of ⋯ (⋯ and Changes do not move), and ⌃` from anywhere, including inside the shell. Visibility is per thread; hiding keeps the shell running and reopening replays its output. - Under MODEX_E2E the shell is /bin/bash --noprofile --norc: a user's rc files (zsh + nvm here) raced the test's typing. Real use still starts the login shell; a unit test covers both paths. Tests: e2e/terminal.spec.ts (6: real TTY in the thread folder, hide keeps state, ⌃C/⌃J reach the shell, per-thread shells, taller panel = more rows, exit/Restart/Close, worktree delete ends the shell) and a layout gate for the toggle and panel. Mutation-checked: dropping the delete cleanup, the output replay, or the panel's placement each fail a test. Co-Authored-By: Claude Opus 5.5 <[email protected]>
Update exit code handling in TerminalPanel component. Co-authored-by: Copilot Autofix powered by AI <[email protected]>
Co-authored-by: Copilot Autofix powered by AI <[email protected]>
BunsDev
force-pushed
the
term-engine
branch
from
September 28, 2026 08:53
b8c834f to
ff3292b
Compare
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.


Stacked on #25 (T1). Base is
term-engine; once #25 merges, this PR retargets tomain(GitHub does that when the base branch is deleted), or I'll rebase it with-S.The thread's shell from T1 now has UI.
Changes
TerminalPanel.tsx): a bottom panel in the main pane, on the design tokens andIconButton(newterminal/restartglyphs). Header shows the folder or worktree branch and "Exited (n)"; Restart, Close; drag or ↑/↓ to resize. xterm 6 + fit addon load lazily on first open. The native viewport scrollbar is hidden: xterm 6 draws its own, and wheel scrolling measured identical.MODEX_E2Ethe terminal starts/bin/bash --noprofile --norc(and silences bash's zsh notice). A user's rc files (zsh + nvm locally) redrew slower than the test typed after ⌃C. Real use still starts the login shell; a new unit test covers both paths.Tests
e2e/terminal.spec.ts, 6 tests on a real PTY: TTY in the thread's folder; ⌃` hides/shows and keeps env; ⌃C and ⌃J reach the shell (Changes unchanged); per-thread shells; taller panel = moresttyrows; exit code, Restart, Close kills the pid; deleting a worktree thread with its terminal open ends the shell and removes the folder.app.specfailures that did not reproduce (includingapp.specalone); CI is the clean check.