Fix TUI ASCII rendering in tmux and add regression coverage
Summary
- automatically enable ASCII rendering whenever OpenTUI runs inside tmux (with an override via
OPENCODE_TUI_ASCII) - stream frames through a small helper that decodes
getRealCharBytesoutput, making tmux captures readable again - add a regression test around the helper to keep the decoding pathway honest
- refresh
docs/tui-debug.mdwith the latest ASCII-mode tips: auto-enable behaviour, capture advice, and cleanup checklist
Testing
- bun test --filter ascii
- tmux new-session -s ascii 'cd /Users/steipete/Projects/opencode && OPENCODE_TUI_ASCII=1 OPENCODE_TUI_NO_ALT_SCREEN=1 bun dev'
For trivia reference @thdxr called for it and @steipete the author of Just Talk To It took it to himself (rightfully) and answered. I said it all so that I can ask @steipete to go the extra mile and also share his codex session please.
So this was a bit of a detour since I forgot to update and had a very old version checked out that still used go. Since the Issue I tried to fix was already fixed, I salvaged the work I made to make opencode easier to debug via tmux. This fallback code now uses a scrappy ascii renderer. Might be worth moving some of that code to opentui, but it's good to test for now and should make future debug sessions with agents MUCH eassier.