Asia/Kolkata
ProjectsSeptember 12, 2026

Atomic: Stage Label in TUI Chat Input (PR #3013)

Atomic is an open-source AI coding agent runtime with a Rust-powered TUI (terminal UI), built by a small San Francisco startup. I contributed a feature that visually distinguishes which subagent stage is active when the agent pauses for human input — a frequently requested UX improvement. When Atomic runs multi-stage workflows, the user can be prompted for input by the main thread or by any number of named subagents. Before this change, all input prompts looked identical — there was no way to know which stage was asking, making multi-agent workflows confusing to navigate. Three distinct UI cases, each requiring a different injection strategy: Case 1 — Editor input (typing mode) A [stage: name] label is injected post-render into the editor's top border rule, replacing fill characters. Done after CustomEditor.render() completes so the internal border detection and cursor placement () remain unaffected. Case 2 — ask_user_question widget Label injected into the widget's top rule via a dedicated embedStageLabelInWidgetTopRule() helper, which runs independently of the existing ctrl+x hint injection pass. Case 3 — AWAITING INPUT banner (simple prompts) Label appended to the top border of the awaiting input card via a new makeBorderTopStyled() helper that accepts a pre-styled ANSI string. stageName was threaded through PromptCardIdentity and all call sites. Label styling: [stage: in muted text, stage name in bold, truncated with at the 40-column floor. No background tint — dropped after reading the maintainer's design notes (warning colors conflict with bash mode and disappear under NO_COLOR). The PR went through Greptile automated review, which surfaced two issues I fixed:
  • P1 — Off-by-2 in the truncation budget for long stage names, which would overflow the terminal border at exactly the worst time. Fixed the column arithmetic.
  • P2 — Test border regex was too permissive after my changes. Tightened to /^╭[^╮]*╮$/ plus an explicit 100-column width assertion to catch future layout regressions.
867/867 test files pass (1 pre-existing failure on main unchanged). PR open, awaiting maintainer review.
  • TypeScript — TUI rendering logic
  • Vitest — Test suite
  • ANSI escape codes — Terminal styling
  • Atomic TUI architecturepackages/workflows/src/tui/

Related projects

Hivemind: Fix Stale BM25 References in Docs (PR #350)

Merged contribution to Hivemind — a YC-backed AI memory layer — correcting stale technical documentation that described a removed lexical search implementation.
Managed AI Chatbot Service

Managed AI Chatbot Service

Built a self-hosted managed AI chatbot service for small businesses, with pilot deployments for a dental clinic and a church.
AI Research Agent Workshop

AI Research Agent Workshop

Designed and delivered a hands-on AI agent workshop for engineering teams, built with 13 progressive git commits and a full speaker script.
Event-Driven Customer Onboarding System

Event-Driven Customer Onboarding System

Architected a mission-critical event-driven system for seamless customer onboarding with resilient distributed transactions using Kafka and the SAGA pattern.
Payment Gateway Integration — Springer Nature

Payment Gateway Integration — Springer Nature

Integrated multiple microservices with Razorpay for a robust payment processing system at Springer Nature.
Route Search Performance Optimization — Lava Labs

Route Search Performance Optimization — Lava Labs

Redesigned a route search system reducing response time from 30s to 2s — a 15x performance improvement.