Skip to content

Add in-session preview panel: browser, files, and interactive terminal#1761

Open
Douglasymlai wants to merge 7 commits into
mainfrom
feat/in-session-terminal-panel
Open

Add in-session preview panel: browser, files, and interactive terminal#1761
Douglasymlai wants to merge 7 commits into
mainfrom
feat/in-session-terminal-panel

Conversation

@Douglasymlai

@Douglasymlai Douglasymlai commented Jul 13, 2026

Copy link
Copy Markdown
Contributor

Related Issue

Relates to #1319 (terminal window + browser URL textbox portions of that request). The human-in-the-loop confirmation flow described in #1319 is out of scope for this PR.

Description

Adds a unified preview panel to the session page, with support for three tab kinds: Browser, Files, and Terminal.

  • Preview panel shell: a tab strip (add/select/close, keyboard navigation) plus a content router, opening onto a chooser tab that lets the user pick which kind of view to open.
  • Browser tab: embedded <webview>-based browsing with an address bar (back/forward/reload/open-externally), backed by an always-mounted layer so guests (and their navigation history) survive panel close and project switches.
  • File tab: reuses the existing file preview surface inside the panel.
  • Terminal tab: opening a new terminal tab starts a real, interactive local shell (via node-pty in the main process) — it behaves like the desktop terminal, with the user's actual login shell, prompt, PATH, and full program support (vim, htop, etc.), not a simulated console. The shell keeps running across tab switches and is torn down when its tab closes or the app quits.
    • Any terminal streams already generated by agents (developer agent commands, single-agent script runs, background/long-running processes) are listed as their own section in the chooser, below the three view types, so the user can jump straight to a specific agent's live or historical output instead of only getting a blank shell.
    • Terminal text rendering is aligned with the design system: same code font stack as markdown code blocks (ui-monospace → SF Mono/Menlo/Consolas/Liberation Mono fallbacks), scoped to override the app's global Inter rule that was otherwise stretching/misaligning glyphs on xterm's monospace grid.

Testing Evidence (REQUIRED)

Screenshot 2026-07-14 at 00 49 22
  • I have included human-verified testing evidence in this PR.
  • This PR includes frontend/UI changes, and I attached screenshot(s) or screen recording(s).
  • No frontend/UI changes in this PR.

npm run type-check, npm run lint, npx prettier --check, and the full unit test suite (including new suites for the preview panel, terminal tab, and browser URL handling) all pass locally.

Note: This PR includes frontend/UI changes but does not yet have an attached screenshot/recording — please add one (or confirm the reviewer should pull the branch to verify visually) before merge.

What is the purpose of this pull request?

  • Bug fix
  • New Feature
  • Documentation update
  • Other

Contribution Guidelines Acknowledgement

Douglasymlai and others added 7 commits July 10, 2026 17:17
…to chooser

A plain terminal tab now opens an interactive login shell (main-process
node-pty) starting in the project folder, with scrollback replay across
tab switches and PTY disposal on tab close. Agent terminal streams
(started servers, background scripts) are listed in the chooser under a
"From this project" section and open as read-only terminal tabs.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
The global `* { font-family: 'Inter' }` rule matched xterm's glyph spans
directly, rendering them proportionally on the monospace cell grid xterm
measured — text drifted and overlapped. Scope the design system's
`font-mono` stack (SFMono-Regular, Menlo) onto the terminal screen with
higher specificity, neutralize the legacy `.xterm span` letter-spacing
hack, and share font size/line-height constants between both surfaces.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Use the same code stack as `.markdown-body code` — ui-monospace (the
system default code font) first, then SF Mono / Menlo / Consolas /
Liberation Mono fallbacks — in both the xterm measurement option and the
scoped CSS that shields glyphs from the global Inter rule.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant