Skip to content

Commit 3283c00

Browse files
committed
Prepare to publish.
0 parents  commit 3283c00

File tree

147 files changed

+33693
-0
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

147 files changed

+33693
-0
lines changed

.gitattributes

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
*.png binary
2+
*.webp binary
3+
*.mp4 binary

.github/workflows/chromatic.yml

Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
name: Chromatic
2+
3+
on:
4+
push:
5+
branches:
6+
- main
7+
paths:
8+
- 'lib/**'
9+
pull_request:
10+
paths:
11+
- 'lib/**'
12+
13+
jobs:
14+
chromatic:
15+
name: Visual Regression Tests
16+
runs-on: ubuntu-latest
17+
steps:
18+
- name: Checkout
19+
uses: actions/checkout@v4
20+
with:
21+
fetch-depth: 0
22+
23+
- name: Setup Node
24+
uses: actions/setup-node@v4
25+
with:
26+
node-version: 22
27+
28+
- name: Setup pnpm
29+
uses: pnpm/action-setup@v4
30+
with:
31+
version: 10
32+
33+
- name: Install dependencies
34+
run: pnpm install
35+
working-directory: lib
36+
37+
- name: Run Chromatic
38+
uses: chromaui/action@latest
39+
with:
40+
projectToken: ${{ secrets.CHROMATIC_PROJECT_TOKEN }}
41+
workingDir: lib
42+
buildScriptName: build-storybook
43+
exitZeroOnChanges: true
44+
onlyChanged: true

.github/workflows/ci.yml

Lines changed: 63 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,63 @@
1+
name: CI
2+
3+
on:
4+
push:
5+
branches: [main]
6+
pull_request:
7+
8+
jobs:
9+
build-and-test:
10+
name: Build & Test
11+
runs-on: ubuntu-latest
12+
steps:
13+
- uses: actions/checkout@v4
14+
15+
- uses: actions/setup-node@v4
16+
with:
17+
node-version: 22
18+
19+
- uses: pnpm/action-setup@v4
20+
with:
21+
version: 10
22+
23+
- name: Install dependencies
24+
run: pnpm install
25+
26+
- name: Test
27+
run: pnpm test
28+
29+
- name: Build
30+
run: pnpm build
31+
32+
standalone-smoketest:
33+
name: Standalone Smoketest
34+
runs-on: ubuntu-latest
35+
steps:
36+
- uses: actions/checkout@v4
37+
38+
- uses: actions/setup-node@v4
39+
with:
40+
node-version: 22
41+
42+
- uses: pnpm/action-setup@v4
43+
with:
44+
version: 10
45+
46+
- uses: dtolnay/rust-toolchain@stable
47+
48+
- name: Install system dependencies
49+
run: |
50+
sudo apt-get update -qq
51+
sudo apt-get install -y -qq libgtk-3-dev libwebkit2gtk-4.1-dev libappindicator3-dev librsvg2-dev
52+
53+
- name: Install npm dependencies
54+
run: pnpm install
55+
working-directory: standalone
56+
57+
- name: TypeScript check
58+
run: npx tsc --noEmit
59+
working-directory: standalone
60+
61+
- name: Cargo check
62+
run: cargo check
63+
working-directory: standalone/src-tauri
Lines changed: 57 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,57 @@
1+
name: Publish VSCode Extension
2+
3+
on:
4+
push:
5+
tags:
6+
- 'vscode-ext/v*'
7+
8+
jobs:
9+
publish:
10+
runs-on: macos-latest
11+
steps:
12+
- uses: actions/checkout@v4
13+
14+
- uses: pnpm/action-setup@v4
15+
with:
16+
version: 10
17+
18+
- uses: actions/setup-node@v4
19+
with:
20+
node-version: 20
21+
cache: pnpm
22+
cache-dependency-path: |
23+
lib/pnpm-lock.yaml
24+
vscode-ext/pnpm-lock.yaml
25+
26+
# Install and build frontend for VSCode
27+
- name: Install frontend dependencies
28+
run: cd lib && pnpm install
29+
30+
- name: Run tests
31+
run: cd lib && pnpm test
32+
33+
- name: Build frontend for VSCode
34+
run: cd vscode-ext && pnpm build:frontend
35+
36+
# Install and build extension
37+
- name: Install extension dependencies
38+
run: cd vscode-ext && pnpm install
39+
40+
- name: Build extension
41+
run: cd vscode-ext && pnpm build
42+
43+
# Package
44+
- name: Package extension
45+
run: cd vscode-ext && npx vsce package --no-dependencies
46+
47+
# Publish to VS Code Marketplace
48+
- name: Publish to VS Code Marketplace
49+
run: cd vscode-ext && npx vsce publish --no-dependencies
50+
env:
51+
VSCE_PAT: ${{ secrets.VSCE_PAT }}
52+
53+
# Publish to OpenVSX
54+
- name: Publish to OpenVSX
55+
run: cd vscode-ext && npx ovsx publish --no-dependencies
56+
env:
57+
OVSX_PAT: ${{ secrets.OVSX_PAT }}

.gitignore

Lines changed: 49 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,49 @@
1+
# Dependencies
2+
node_modules/
3+
4+
# Build output
5+
dist/
6+
lib/dist/
7+
*.tsbuildinfo
8+
9+
# Vite cache
10+
lib/.vite/
11+
12+
# VSCode extension
13+
vscode-ext/dist/
14+
vscode-ext/media/
15+
vscode-ext/node_modules/
16+
vscode-ext/*.vsix
17+
18+
# Tauri / Standalone
19+
standalone/src-tauri/target/
20+
standalone/src-tauri/binaries/
21+
standalone/dist/
22+
standalone/sidecar/node_modules/
23+
standalone/node_modules/
24+
25+
# Website
26+
website/dist/
27+
website/node_modules/
28+
29+
# OS
30+
.DS_Store
31+
32+
# Editor
33+
.vscode/*
34+
!.vscode/launch.json
35+
!.vscode/tasks.json
36+
.idea/
37+
38+
# Environment
39+
.env.local
40+
41+
# Storybook / Chromatic
42+
storybook-static/
43+
build-storybook.log
44+
chromatic.log
45+
chromatic-build-*.xml
46+
chromatic-diagnostics.json
47+
48+
# symlinked skill files
49+
.agents/skills/

.impeccable.md

Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
## Design Context
2+
3+
### Users
4+
Developers ranging from terminal beginners (non-developers using Claude Code for the first time) to tmux power users. They're multitasking across multiple terminal sessions and need to know when background tasks finish without watching idle screens. Context: working inside VSCode (primary) or a standalone terminal app (secondary).
5+
6+
### Brand Personality
7+
**Focused. Approachable. Capable.**
8+
9+
MouseTerm should feel like focused efficiency that cares about beginners and onboarding, without sacrificing anything that even the most extreme power user might want eventually. The interface should communicate: "everything is under control" — no clutter, no distraction, just the information you need when you need it.
10+
11+
### Aesthetic Direction
12+
13+
**Primary constraint: Feel native inside VSCode.** The current Catppuccin Mocha design is throwaway — built to get things running. The first design priority is making MouseTerm feel completely native within VSCode, respecting whatever theme the user has chosen. This means:
14+
- Use VSCode's CSS variables and theme tokens, not hardcoded colors
15+
- Match VSCode's spacing, typography, and interaction patterns
16+
- Light mode and dark mode support from the start (inherited from user's VSCode theme)
17+
- The webview should feel like a built-in VSCode feature, not a third-party panel
18+
19+
**After VSCode-native is achieved**, figure out the standalone terminal's visual identity separately.
20+
21+
**References:**
22+
- VSCode itself — the gold standard for how MouseTerm should feel as an extension
23+
- The tool should feel like a natural part of the editor, not a foreign embed
24+
25+
**Anti-references:**
26+
- Generic SaaS (rounded cards, gradients, startup illustrations)
27+
- Hacker aesthetic (green-on-black, Matrix vibes, intimidating to beginners)
28+
- Electron bloat (Slack — heavy, slow-feeling, too much chrome)
29+
- Overly playful (too many animations, emojis, mascots)
30+
31+
### Design Principles
32+
33+
1. **Native first** — Inside VSCode, MouseTerm should be indistinguishable from a built-in feature. Use the host's theme tokens, spacing, and conventions. Never fight the environment.
34+
35+
2. **Information density without intimidation** — Power users want dense layouts with many terminals visible. Beginners need to not feel overwhelmed. Solve this with progressive disclosure: simple by default, powerful when you explore.
36+
37+
3. **Status at a glance** — The core UX promise is "glance and know what's done." Status indicators must be scannable in under a second across many terminals. No reading required — use shape, color, and position.
38+
39+
4. **No chrome, all content** — Minimize UI chrome. Terminals are the content. Headers, tabs, and controls should be minimal and recede. Every pixel of chrome competes with terminal output.
40+
41+
5. **Theme-adaptive** — Never hardcode colors. Always derive from the host theme (VSCode variables, or a standalone theme system later). Support light and dark from day one.

.vscode/launch.json

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
{
2+
"version": "0.2.0",
3+
"configurations": [
4+
{
5+
"name": "MouseTerm Extension",
6+
"type": "extensionHost",
7+
"request": "launch",
8+
"args": ["--extensionDevelopmentPath=${workspaceFolder}/vscode-ext"],
9+
"outFiles": ["${workspaceFolder}/vscode-ext/dist/**/*.js"],
10+
"preLaunchTask": "build-mouseterm-vscode"
11+
}
12+
]
13+
}

.vscode/tasks.json

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
{
2+
"version": "2.0.0",
3+
"tasks": [
4+
{
5+
"label": "build-mouseterm-vscode",
6+
"type": "shell",
7+
"command": "pnpm build:vscode",
8+
"group": "build",
9+
"problemMatcher": []
10+
}
11+
]
12+
}

AGENTS.md

Lines changed: 48 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,48 @@
1+
# MouseTerm
2+
3+
A mouse-friendly multitasking terminal built with pnpm, react, typescript, vite, tailwind, storybook, and xterm.js.
4+
5+
## Setup
6+
7+
```
8+
pnpm install # install deps
9+
pnpm build # build lib, vscode extension, and website
10+
```
11+
12+
## Architecture
13+
14+
- **lib/** — Shared React + TailwindCSS frontend library (components, platform abstraction, tests, Storybook)
15+
- **standalone/** — Tauri desktop app with Node.js sidecar for native PTY via node-pty
16+
- **vscode-ext/** — VS Code extension wrapping the lib in a webview with native PTY backend
17+
- **website/** — Marketing website bundling part of the lib as an interactive demo
18+
19+
## Project Structure
20+
21+
- `lib/` — Core UI library (pnpm) — Storybook, tests, shared components
22+
- `lib/src/lib/platform/` — Platform abstraction layer (`PlatformAdapter` interface, fake + VSCode adapters)
23+
- `standalone/` — Tauri app (Rust + Vite frontend)
24+
- `standalone/sidecar/` — Node.js PTY manager, bundled as Tauri sidecar
25+
- `standalone/src-tauri/` — Rust backend that bridges webview ↔ Node.js sidecar
26+
- `vscode-ext/` — VS Code extension (esbuild, node-pty via forked child process)
27+
- `website/` — Marketing site (Vite, uses FakePtyAdapter for demo)
28+
29+
## Specs
30+
31+
The primary job of a spec is to be an accurate reference for the current state of the code. Read the relevant spec before modifying a feature it covers — the spec describes invariants, edge cases, and design decisions that are not obvious from the code alone.
32+
33+
- **`docs/specs/layout.md`** — Tiling layout, pane/door containers, dockview configuration, modes (passthrough/command), keyboard shortcuts, selection overlay, spatial navigation, detach/reattach, inline rename, session lifecycle, session persistence, and theming. Read this when touching: `Pond.tsx`, `Baseboard.tsx`, `Door.tsx`, `TerminalPane.tsx`, `spatial-nav.ts`, `layout-snapshot.ts`, `terminal-registry.ts`, `session-save.ts`, `session-restore.ts`, `reconnect.ts`, `index.css`, `theme.css`, or any keyboard/navigation/mode behavior.
34+
- **`docs/specs/alarm.md`** — Activity monitoring state machine, alarm trigger/clearing rules, attention model, TODO lifecycle (soft/hard), bell button visual states and interaction, door alarm indicators, and hardening (a11y, motion, i18n, overflow). Read this when touching: `activity-monitor.ts`, `alarm-manager.ts`, the alarm bell or TODO pill in `Pond.tsx` (TerminalPaneHeader), alarm indicators in `Door.tsx`, or the `a`/`t` keyboard shortcuts. Layout.md defers to this spec for all alarm/TODO behavior.
35+
- **`docs/specs/vscode.md`** — VS Code extension architecture: hosting modes (WebviewView + WebviewPanel), PTY lifecycle and buffering, message protocol between webview and extension host, session persistence flow, reconnection protocol, theme integration, CSP, build pipeline, and invariants (save-before-kill ordering, PTY ownership, alarm state merging). Read this when touching: `extension.ts`, `webview-view-provider.ts`, `message-router.ts`, `message-types.ts`, `pty-manager.ts`, `pty-host.js`, `session-state.ts`, `webview-html.ts`, `vscode-adapter.ts`, or `pty-core.js`.
36+
- **`docs/specs/tutorial.md`** — Playground tutorial on the website: 3-pane initial layout, `tut` command and TutorialShell, 6-step progressive tutorial with detection logic, theme picker, FakePtyAdapter extensions, and Pond event hooks. Read this when touching: `website/src/pages/Playground.tsx`, `website/src/lib/tutorial-shell.ts`, `website/src/lib/tutorial-detection.ts`, `website/src/components/ThemePicker.tsx`, `website/src/lib/playground-themes.ts`, `lib/src/lib/platform/fake-scenarios.ts` (tutorial scenarios), or the `onApiReady`/`onEvent`/`initialPaneIds` props on Pond.
37+
38+
When updating code covered by a spec, update the spec to match. When the two specs overlap (e.g. pane header elements appear in both), layout.md documents placement and sizing while alarm.md documents behavior and visual states.
39+
40+
## Design
41+
42+
See [.impeccable.md](.impeccable.md) for full design context. Key principles:
43+
44+
1. **Native first** — Inside VSCode, feel indistinguishable from a built-in feature. Use the host's theme tokens.
45+
2. **Information density without intimidation** — Dense for power users, approachable for beginners. Progressive disclosure.
46+
3. **Status at a glance** — Scannable in under a second across many terminals.
47+
4. **No chrome, all content** — Minimize UI chrome. Terminals are the content.
48+
5. **Theme-adaptive** — Never hardcode colors. Support light and dark from day one.

0 commit comments

Comments
 (0)