feat: add Go/Bubble Tea TUI rewrite (apps/tui-go)

Reimplement the TUI in Go using Bubble Tea, replacing the Kotlin/Tamboui
app. Same WebSocket protocol, soft-rounded layout with blue accent theme.
This commit is contained in:
2026-05-30 00:00:35 +04:00
parent 1f6680f774
commit f922b855eb
14 changed files with 2878 additions and 1 deletions
+31
View File
@@ -0,0 +1,31 @@
// Command tui is the correx terminal UI: a Bubble Tea client that speaks the
// correx WebSocket protocol to apps/server.
package main
import (
"context"
"flag"
"fmt"
"os"
tea "github.com/charmbracelet/bubbletea"
"github.com/correx/tui-go/internal/app"
"github.com/correx/tui-go/internal/ws"
)
func main() {
host := flag.String("host", "localhost", "server host")
port := flag.Int("port", 8080, "server port")
flag.Parse()
client := ws.New(*host, *port)
ctx, cancel := context.WithCancel(context.Background())
defer cancel()
go client.Run(ctx)
p := tea.NewProgram(app.NewModel(client), tea.WithAltScreen())
if _, err := p.Run(); err != nil {
fmt.Fprintln(os.Stderr, "correx tui error:", err)
os.Exit(1)
}
}