Skip to content

[codex] Reuse main TUI surface for BTW#5276

Draft
taibai233 wants to merge 4 commits into
esengine:main-v2from
taibai233:feature/btw
Draft

[codex] Reuse main TUI surface for BTW#5276
taibai233 wants to merge 4 commits into
esengine:main-v2from
taibai233:feature/btw

Conversation

@taibai233

@taibai233 taibai233 commented Jun 25, 2026

Copy link
Copy Markdown
Contributor

Summary

  • Replace BTW's side-only TUI renderer with the shared conversation surface used by the main session.
  • Route BTW text, reasoning, tool output, usage, notices, compaction, and turn completion through the same event renderer.
  • Keep main-only UI affordances behind surface capability flags, and update tests around BTW input, side events, and completion behavior.

Why

BTW had a separate transcript and renderer path, which made it behave very differently from the native main session. Reusing the main surface keeps the UI behavior consistent and removes the duplicate side renderer.

Cache impact

Cache-impact: low - touches agent/boot wiring for BTW side-session rendering, but does not change model cache key construction, prompt text, tool schema generation, history serialization, or cache persistence.
Cache-guard: GOCACHE=/tmp/go-cache GOMODCACHE=/tmp/go-mod-cache go test -count=1 ./internal/boot -run 'TestBuildWiresSideFactoryAndSink|TestBuildSideAgentHasNoBackgroundJobs' plus ./internal/agent focused tests cover the affected wiring boundaries.
System-prompt-review: Codex/taibai233 reviewed boot prompt-sensitive wiring in this PR; the change adds side factory/sink plumbing and tests, with no intended system prompt wording change.

Validation

  • GOCACHE=/tmp/go-cache GOMODCACHE=/tmp/go-mod-cache make build
  • GOCACHE=/tmp/go-cache GOMODCACHE=/tmp/go-mod-cache go test -count=1 ./internal/cli
  • GOCACHE=/tmp/go-cache GOMODCACHE=/tmp/go-mod-cache go test -count=1 ./internal/control
  • GOCACHE=/tmp/go-cache GOMODCACHE=/tmp/go-mod-cache go test -count=1 ./internal/agent -run 'TestPlanMode|TestSideReadOnly'
  • GOCACHE=/tmp/go-cache GOMODCACHE=/tmp/go-mod-cache go test -count=1 ./internal/boot -run 'TestBuildWiresSideFactoryAndSink|TestBuildSideAgentHasNoBackgroundJobs'
  • GOCACHE=/tmp/go-cache GOMODCACHE=/tmp/go-mod-cache go run github.com/golangci/golangci-lint/v2/cmd/golangci-lint@v2.12.2 run --timeout=5m
  • git --no-optional-locks diff --check

@github-actions github-actions Bot added tui Terminal UI / CLI (internal/cli, internal/control) agent Core agent loop (internal/agent, internal/control) config Configuration & setup (internal/config) v2 Go rewrite (1.x) — main-v2 branch, active development labels Jun 25, 2026
taibai added 3 commits June 29, 2026 09:52
# Conflicts:
#	internal/boot/boot.go
#	internal/cli/chat_tui.go
#	internal/cli/chat_tui_test.go
#	internal/control/controller.go
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

agent Core agent loop (internal/agent, internal/control) config Configuration & setup (internal/config) tui Terminal UI / CLI (internal/cli, internal/control) v2 Go rewrite (1.x) — main-v2 branch, active development

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant