Skip to content

feat: bootstrap — working web terminal (ghostty-web port) - #2

Merged
jesse23 merged 38 commits into
mainfrom
jesse_dev
Mar 21, 2026
Merged

feat: bootstrap — working web terminal (ghostty-web port)#2
jesse23 merged 38 commits into
mainfrom
jesse_dev

Conversation

@jesse23

@jesse23 jesse23 commented Mar 21, 2026

Copy link
Copy Markdown
Owner

Summary

Port the ghostty-web demo into wtty as the first working slice — a full-screen terminal running in a browser tab backed by a real PTY.

What's included

  • Server — single HTTP + WebSocket server (src/server.ts) serving the terminal HTML inline, ghostty-web assets, and PTY sessions on port 2346
  • Dual PTY adapterBun.Terminal when running under Bun (native, no addon), @lydell/node-pty under Node.js; runtime detected automatically via process.versions.bun
  • Full-screen terminal — Dracula theme, FiraMono Nerd Font, no chrome, fills the entire browser tab
  • SPEC + ADRdocs/specs/wtty.md and docs/adrs/001.wtty.bootstrap.md documenting the architecture and decisions

Dev scripts

```
bun run dev # Bun.Terminal (recommended)
npm run dev:node # node-pty via tsx
bun run preview # run built dist/
```

jesse23 added 30 commits March 21, 2026 11:00
feat: apply full-viewport layout, Dracula theme and FiraMono font

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Ports the ghostty-web demo into wtty to establish the first functional end-to-end slice: a browser-rendered full-screen terminal backed by a real host PTY, served from a single HTTP + WebSocket server.

Changes:

  • Add a single src/server.ts HTTP/WebSocket server that serves inline HTML, ghostty-web assets, and PTY-backed sessions.
  • Introduce a dual PTY adapter layer (Bun vs @lydell/node-pty) with runtime detection.
  • Reshape build/lint/tooling and add initial SPEC/ADR documentation for the bootstrap architecture.

Reviewed changes

Copilot reviewed 19 out of 21 changed files in this pull request and generated 8 comments.

Show a summary per file
File Description
tsconfig.lint.json Adjusts lint TS config for Node-style module resolution.
tsconfig.json Switches TS config to noEmit (build handled by Bun).
tsconfig.dts.json Removes DTS-only build config.
src/server.ts Adds the single-port HTTP + WebSocket + PTY server and inline terminal client.
src/pty/types.ts Defines a shared PtyProcess interface across adapters.
src/pty/node.ts Implements PTY spawn/resize/write/kill using @lydell/node-pty.
src/pty/index.ts Runtime-detects Bun vs Node and selects the appropriate PTY adapter.
src/pty/bun.ts Implements PTY-like adapter using Bun’s terminal integration.
src/index.ts Removes prior placeholder API.
src/index.test.ts Removes prior placeholder test.
scripts/build.ts Simplifies build to a single Bun build entrypoint (src/server.ts).
package.json Adds runtime deps and dev scripts; switches project to ESM.
docs/specs/wtty.md Adds initial wtty SPEC describing architecture and roadmap.
docs/specs/ui.md Adds initial UI SPEC for terminal + future session manager.
docs/specs/cli.md Adds initial CLI SPEC describing intended control surface.
docs/development.md Updates ADR naming/layout conventions (flat docs/adrs/).
docs/adrs/001.wtty.bootstrap.md Adds bootstrap ADR documenting the port and key decisions.
bun.lock Locks new dependencies (ghostty-web, ws, @lydell/node-pty, tsx, etc.).
biome.json Updates Biome schema version reference.
.github/workflows/ci.yml Updates CI test step to run the test script.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread src/server.ts
Comment thread src/server.ts
Comment thread src/server.ts
Comment thread src/server.ts
Comment thread src/server.ts
Comment thread src/server.ts
Comment thread package.json Outdated
Comment thread docs/adrs/001.wtty.bootstrap.md
@jesse23
jesse23 merged commit e5f2873 into main Mar 21, 2026
3 of 4 checks passed
jesse23 added a commit that referenced this pull request Mar 23, 2026
feat: bootstrap — working web terminal (ghostty-web port)
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.

2 participants