This repository has been archived on 2026-07-17. You can view files and clone it. You cannot open issues or pull requests or push a commit.
Files
codespace/web
tao.chen 0122b8bb07 fix(web): break infinite loop in TerminalTabs when shell list is empty
TerminalTabs's hydrate effect set activeShellId to "" whenever the
list was empty or the current active was missing. "" is falsy, so
on the next render the same branch fired again with currentActive
still "" and ids still [] — setActiveShell(ws, "") in a tight
loop, every render triggering a Zustand store update which
re-rendered the component. Maximum update depth exceeded.

Fix: only set the active shell when ids has at least one entry. The
auto-start effect above already creates a shell when the list is
empty, so the next list refetch will populate ids and this branch
will pick a real candidate naturally.
2026-07-06 17:37:05 +08:00
..
2026-07-02 16:57:37 +08:00
2026-07-02 16:48:19 +08:00
2026-07-02 16:48:19 +08:00
2026-07-02 16:48:19 +08:00
2026-07-02 16:48:19 +08:00
2026-07-02 16:48:19 +08:00

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/react editor wrapper
  • @xterm/xterm + @xterm/addon-fit terminal wrapper
  • react-resizable-panels for layout splits
  • lucide-react for icons

Non-goals

  • Authentication
  • i18n
  • Tests (no test framework until business logic is added)