VooDisss 2c27fc53ad perf(ui): fix O(n²) in liveSegmentChars and selectedTokenTotal, add i18n + SSR guard
Addresses bot review feedback on commit 224cab6.

## Performance: liveSegmentChars O(n²) → O(n)

The memo had three inner loops scanning all props.segments per unique
messageId. Added a single O(n) pre-pass building a
segmentsByMessageId Map, then replaced all three inner loops with
map lookups. Total complexity: O(n) instead of O(m×n).

File: packages/ui/src/components/message-timeline.tsx

## Performance: selectedTokenTotal O(n²) → O(n)

For each selected messageId, the memo scanned all segments to sum
chars. On "Select all" this was O(selected × segments). Now builds a
charsByMessageId map in one O(n) pass and does O(1) lookups per
selected message. Same pattern as aggregateTokensByMessageId.

File: packages/ui/src/components/message-section.tsx

## SSR guard: resize listener

window.addEventListener("resize", computeBadgeLayout) lacked a
typeof window !== "undefined" guard. Other window usage in the file
was guarded. Wrapped the addEventListener, requestAnimationFrame, and
onCleanup block in the guard.

File: packages/ui/src/components/message-timeline.tsx

## i18n: mirror selectionHint key in 5 locale files

messageSection.bulkDelete.selectionHint was only defined in
en/messaging.ts. Added the key (English string, since Ctrl/Shift/Esc
are universal keyboard labels) to es, fr, ja, ru, and zh-Hans.

Files: packages/ui/src/lib/i18n/messages/{es,fr,ja,ru,zh-Hans}/messaging.ts

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-02 17:46:51 +02:00
2026-01-24 19:21:56 +00:00
2025-12-02 19:23:05 +00:00
2025-11-21 21:59:58 +00:00
2026-02-17 18:47:21 +00:00
2026-02-02 11:22:49 +00:00
2026-02-23 23:55:52 +00:00
2026-02-23 23:55:52 +00:00
2026-02-17 18:43:02 +00:00

CodeNomad

A fast, multi-instance workspace for running OpenCode sessions.

CodeNomad is built for people who live inside OpenCode for hours on end and need a cockpit, not a kiosk. It delivers a premium, low-latency workspace that favors speed, clarity, and direct control.

Multi-instance workspace Manage multiple OpenCode sessions side-by-side.

📸 More Screenshots

Command palette overlay Global command palette for keyboard-first control.

Image Previews Rich media previews for images and assets.

Browser Support Browser support via CodeNomad Server.

Getting Started

Choose the way that fits your workflow:

The best experience. A native application (Electron-based) with global shortcuts, deeper system integration, and a dedicated window.

  • Download: Grab the latest installer for macOS, Windows, or Linux from the Releases Page.
  • Run: Install and launch like any other app.

🦀 Tauri App (Experimental)

We are also working on a lightweight, high-performance version built with Tauri. It is currently in active development.

  • Download: Experimental builds are available on the Releases Page.
  • Source: Check out packages/tauri-app if you're interested in contributing.

💻 CodeNomad Server

Run CodeNomad as a local server and access it via your web browser. Perfect for remote development (SSH/VPN) or running as a service.

npx @neuralnomads/codenomad --launch

Full server/CLI documentation (flags + env vars, TLS, auth, remote access):

To see all available options:

npx @neuralnomads/codenomad --help

🧪 Dev Releases

Bleeding-edge builds are published as GitHub pre-releases and are generated automatically from the dev branch.

npx @neuralnomads/codenomad-dev --launch

Highlights

  • Multi-Instance: Juggle several OpenCode sessions side-by-side with tabs.
  • Long-Session Native: Scroll through massive transcripts without hitches.
  • Command Palette: A single global palette to jump tabs, launch tools, and control everything.
  • Deep Task Awareness: Monitor background tasks and child sessions without losing flow.

Requirements

  • OpenCode CLI: Must be installed and available in your PATH.
  • Node.js 18+: Required if running the CLI server or building from source.

Troubleshooting

macOS says the app is damaged

If macOS reports that "CodeNomad.app is damaged and can't be opened," Gatekeeper flagged the download because the app is not yet notarized. You can clear the quarantine flag after moving CodeNomad into /Applications:

xattr -l /Applications/CodeNomad.app
xattr -dr com.apple.quarantine /Applications/CodeNomad.app

After removing the quarantine attribute, launch the app normally. On Intel Macs you may also need to approve CodeNomad from System Settings → Privacy & Security the first time you run it.

Linux (Wayland + NVIDIA): Tauri AppImage closes immediately

On some Wayland compositor + NVIDIA driver setups, WebKitGTK can fail to initialize its DMA-BUF/GBM path and the Tauri build may exit right away.

Try running with one of these environment variables:

# Most reliable workaround (can reduce rendering performance)
WEBKIT_DISABLE_DMABUF_RENDERER=1 codenomad

# Alternative for some Wayland setups
__NV_DISABLE_EXPLICIT_SYNC=1 codenomad

If you're running the Tauri AppImage and want the workaround applied every time, create a tiny wrapper script on your PATH:

#!/bin/bash
export WEBKIT_DISABLE_DMABUF_RENDERER=1
exec ~/.local/share/bauh/appimage/installed/codenomad/CodeNomad-Tauri-0.4.0-linux-x64.AppImage "$@"

Upstream tracking: https://github.com/tauri-apps/tauri/issues/10702

Architecture & Development

CodeNomad is a monorepo split into specialized packages. If you want to contribute or build from source, check out the individual package documentation:

Package Description
packages/electron-app The native desktop application shell. Wraps the UI and Server.
packages/server The core logic and CLI. Manages workspaces, proxies OpenCode, and serves the API.
packages/ui The SolidJS-based frontend. Fast, reactive, and beautiful.

Quick Build

To build the Desktop App from source:

  1. Clone the repo.
  2. Run npm install (requires pnpm or npm 7+ for workspaces).
  3. Run npm run build --workspace @neuralnomads/codenomad-electron-app.

Star History Chart

Description
CodeNomad: The command center that puts AI coding on steroids.
Readme MIT 109 MiB
Languages
TypeScript 88.4%
CSS 6.7%
Rust 3.2%
JavaScript 1.5%
HTML 0.2%