useWorkspaceUiStore((s) => s.shellsByWorkspace[workspaceId] ?? []) returned a fresh [] on every render when the workspace had no shells yet, so useSyncExternalStore saw a new snapshot each render and re-rendered, which ran the selector again, ad infinitum. "The result of getSnapshot should be cached to avoid an infinite loop" TerminalTabs @ WorkspaceShell.tsx:75 Fix: hoist a module-level EMPTY_SHELLS constant. The selector now returns a stable reference for the empty case. The non-empty case already returns the array stored in the Zustand store, whose reference is set once per setShellsForWorkspace call.
codespace-web
Frontend IDE shell for the codespace Go backend.
Scope
This package is the codespace web IDE. It connects to the Go backend:
the file explorer and editor call the file APIs, the toolbar drives the
process start/stop/restart endpoints, and the terminal streams the
running OpenCode process over the WebSocket endpoint
/api/workspaces/:id/process/ws.
Commands
| Command | Purpose |
|---|---|
pnpm install |
Install dependencies |
pnpm dev |
Start the Vite dev server (proxies /api and /healthz to http://localhost:8080) |
pnpm lint |
Run ESLint |
pnpm build |
Type-check and build for production |
Stack
- Vite + React 19 + TypeScript
- Tailwind CSS v4
- react-router v7
- Zustand for local UI state
- TanStack Query for API state
@monaco-editor/reacteditor wrapper@xterm/xterm+@xterm/addon-fitterminal wrapperreact-resizable-panelsfor layout splitslucide-reactfor icons
Non-goals
- Authentication
- i18n
- Tests (no test framework until business logic is added)