Skip to content

Add bubbletea TUI with bubbles and lipgloss v1#4

Merged
bscott merged 2 commits intomainfrom
v0.2.2
Mar 1, 2026
Merged

Add bubbletea TUI with bubbles and lipgloss v1#4
bscott merged 2 commits intomainfrom
v0.2.2

Conversation

@bscott
Copy link
Owner

@bscott bscott commented Feb 25, 2026

Summary

  • Replace raw ANSI I/O with a bubbletea-driven TUI for TCP connections featuring a scrollable viewport, interactive text input, and colored status bar
  • Upgrade lipgloss v0.9.1 → v1.1.0, add bubbletea v1.3.10 and bubbles v1.0.0
  • Add telnet IAC filtering for reliable character-at-a-time mode over telnet clients
  • Preserve --plain-text mode as legacy fallback for Windows telnet

What's new

  • Nickname screen: ASCII art banner, text input with validation, placeholder text
  • Chat screen: scrollable viewport (PgUp/PgDown), status bar with room name + online count, bordered input field
  • Telnet compatibility: IAC sequence filtering, negotiation drain on connect
  • Broadcast via program.Send(): room messages delivered through bubbletea's message system in TUI mode

Test plan

  • make test passes
  • make build compiles cleanly
  • TUI mode tested via telnet — nickname entry, chat, commands all work
  • Plain-text mode (--plain-text) still works as before
  • Server starts and shuts down cleanly

Replace raw ANSI I/O with a full bubbletea-driven TUI for TCP
connections. Clients now get a scrollable viewport for messages,
interactive text input with placeholder text, and a colored status
bar showing room name and online count.

- Add bubbletea v1.3.10, bubbles v1.0.0, upgrade lipgloss to v1.1.0
- New ChatModel with two states: nickname entry and chat
- Viewport auto-scrolls on new messages, PgUp/PgDown to scroll history
- Text input with command autocomplete (/who, /me, /help, /quit)
- Telnet IAC negotiation for character-at-a-time mode
- Room broadcasts via program.Send() in TUI mode
- Plain-text mode (--plain-text) preserved as legacy fallback
- Display Chat Tails ASCII art banner on the nickname entry screen
- Strip telnet IAC sequences from input to prevent bubbletea crashes
- Drain IAC negotiation responses before starting bubbletea
- Remove alt screen mode for better telnet client support
@bscott bscott merged commit 8a2c664 into main Mar 1, 2026
1 check passed
@bscott bscott deleted the v0.2.2 branch March 1, 2026 21:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant