Appearance
Contributing
Development Setup
bash
git clone https://github.com/megasupersoft/Ghosted.git
cd Ghosted
npm install
npm rebuild # compile node-pty native moduleCommands
| Command | Purpose |
|---|---|
npm run dev | Vite dev server (renderer only, no Electron) |
npm run preview | Launch Electron with built dist |
npm run build | Full build (tsc + vite) |
npm run lint | ESLint |
Key Rules
- Never unmount panes. Use
display:none/visibility:hiddento hide them. This preserves terminal state and graph positions. - All filesystem access goes through IPC. The renderer never imports Node APIs directly.
- Always kill PTY on cleanup. Every terminal instance must call
pty:killin itsuseEffectreturn — node-pty leaks are real. - Touch IPC = touch three files. If you modify an IPC channel, update
electron/main.ts,electron/preload.ts, andsrc/types/electron.d.tstogether. - Rebuild after native changes. After any
npm installthat touches native modules, runnpm rebuild.
Project Structure
electron/ Electron main process + preload
src/
components/ Shared React components
panes/ One directory per pane
store/ Zustand store
styles/ Global CSS + design tokens
lib/ Utilities
types/ TypeScript declarations
build/ Icons and build assets
scripts/ Build and packaging scripts
site/ Documentation website (VitePress)Submitting Changes
- Fork the repo and create a branch
- Make your changes
- Run
npm run lintandnpm run build - Open a pull request against
main