CodeNomad/packages/ui
Pascal André 4c702cdf36
fix(ui): bound retained shell output
Keep only the newest four MiB in the shell output dialog and skip ANSI reparsing when a poll returns no new bytes. The native output file remains unchanged and the existing truncation notice is shown when the display cap is reached.

This prevents long-running verbose shells from growing renderer memory without bound or repeatedly reparsing unchanged output.

Validated with the shell store test and UI TypeScript check.
2026-08-21 17:21:12 +02:00
..
scripts refactor(build): share Monaco public asset copy helper 2026-02-10 10:49:05 +00:00
src fix(ui): bound retained shell output 2026-08-21 17:21:12 +02:00
.gitignore feat(ui): add Monaco changes/files right drawer viewers 2026-02-09 21:00:40 +00:00
package.json fix(v2): align with current OpenCode client contract 2026-08-19 01:50:39 +02:00
postcss.config.js Split workspace into electron and ui packages 2025-11-17 12:06:58 +00:00
README.md Expose UI logger controls globally 2025-12-06 12:17:33 +00:00
tailwind.config.js Split workspace into electron and ui packages 2025-11-17 12:06:58 +00:00
tsconfig.json Split workspace into electron and ui packages 2025-11-17 12:06:58 +00:00
vite.config.ts perf(ui): lazy-load markdown and defer diff rendering (#215) 2026-03-22 11:54:05 +00:00

CodeNomad UI

This package contains the frontend user interface for CodeNomad, built with SolidJS and Tailwind CSS.

Overview

The UI is designed to be a high-performance, low-latency cockpit for managing OpenCode sessions. It connects to the CodeNomad server (either running locally via CLI or embedded in the Electron app).

Features

  • SolidJS: Fine-grained reactivity for high performance.
  • Tailwind CSS: Utility-first styling for rapid development.
  • Vite: Fast build tool and dev server.

Development

To run the UI in standalone mode (connected to a running server):

npm run dev

This starts the Vite dev server at http://localhost:3000.

Building

To build the production assets:

npm run build

The output will be generated in the dist directory, which is then consumed by the Server or Electron app.

Debug Logging

The UI now routes all logging through a lightweight wrapper around debug. The logger exposes four namespaces that can be toggled at runtime:

  • sse Server-sent event transport and handlers
  • api HTTP/API calls and workspace lifecycle
  • session Session/model state, prompt handling, tool calls
  • actions User-driven interactions in UI components

You can enable or disable namespaces from DevTools (in dev or production builds) via the global window.codenomadLogger helpers:

window.codenomadLogger?.listLoggerNamespaces() // => [{ name: "sse", enabled: false }, ...]
window.codenomadLogger?.enableLogger("sse") // turn on SSE logs
window.codenomadLogger?.disableLogger("sse") // turn them off again
window.codenomadLogger?.enableAllLoggers() // optional helper

Enabled namespaces are persisted in localStorage under opencode:logger:namespaces, so your preference survives reloads.