Skip to content

Client and server: TUI status UI, read receipts, reconnect, commands, rate limit, unread#89

Open
Cod-e-Codes wants to merge 3 commits intomainfrom
feat/tui-footer-banner-read-receipts-reconnect
Open

Client and server: TUI status UI, read receipts, reconnect, commands, rate limit, unread#89
Cod-e-Codes wants to merge 3 commits intomainfrom
feat/tui-footer-banner-read-receipts-reconnect

Conversation

@Cod-e-Codes
Copy link
Copy Markdown
Owner

@Cod-e-Codes Cod-e-Codes commented Apr 14, 2026

Summary

Client: contextual status footer, full-width banner strips (error/warn/info), debounced read receipts at transcript tail, #channel in the footer when not in general, transcript cleared on each successful WebSocket connect so handshake replay does not duplicate lines. After every successful WebSocket write for normal chat (text / dm / E2E path) and for admin_command, clear m.sending so [Sending...] does not depend on a later shared.Message (covers server rate drops and other silent paths).

Server: unknown admin : command (after plugin and built-in handling) returns System text (Unknown command: plus first token). When per-connection message rate burst is exceeded, send one System text notice then cooldown (see PROTOCOL.md).

Client unread: increment footer unread only for other users' new text, dm, or file while the viewport is not at the bottom; exclude typing, reactions, read receipts, edits, deletes, pin/search/admin wire types, channel control types, and your own sender.

Footer vs banner

  • Footer: Stable, low-noise line (connected state, optional unread count, E2E when enabled, #channel when the current room is not general, help hint when disconnected or help overlay open). Not used for transient command success text that belongs above the input.
  • Banner strip: Full-width colored strip for actionable feedback, warnings, and errors (including [OK] connection line as info-tier strip). Long text truncates to one line.

Read receipts

Reference client sends read_receipt debounced when the user is scrolled to the newest messages (tail), including after paging to bottom. Flush scheduling is cleared when the WebSocket closes.

Reconnect and transcript

On wsConnected, the client clears messages, reactions, typingUsers, receivedFiles, and unreadCount, then re-renders the viewport. Scrollback is rebuilt from the server handshake replay (documented cap in PROTOCOL.md). Wire protocol is unchanged.

Rendering and themes

System transcript lines use severity-based styling instead of reusing the timestamp color for all system text. Built-in themes adjust banner strip colors where needed. Custom themes.json may set optional banner_error_bg, banner_error_fg, banner_warn_bg, banner_warn_fg, banner_info_bg, banner_info_fg (see THEMES.md and themes.example.json). Custom themes do not add new JSON keys for system-line colors; those styles are derived in code from existing message, banner, and mention colors (and footer colors for the info strip fallback).

Files

New: client/chrome.go, client/chrome_test.go, client/render_test.go. Modified: client/main.go, client/websocket.go, client/render.go, client/theme_loader.go, client/commands.go, client/main_test.go, client/theme_loader_test.go, client/code_snippet_test.go, server/client.go, server/client_test.go, themes.example.json, ARCHITECTURE.md, PROTOCOL.md, README.md, TESTING.md, THEMES.md.

Breaking changes

  • None for client-server JSON or handshake. Third-party clients are unaffected on the wire.
  • None for themes.json parsing. Old theme files still load. New keys are optional.
  • Reference client behavior: After every successful WebSocket connect (including reconnect), in-memory chat lines and related UI state are discarded and replaced by server replay. Lines not included in that replay window no longer appear in that session unless the user had exported them earlier (:export). Cached received-file metadata for :savefile is cleared on connect; files must be received again or saved before disconnect if the user relied only on the in-memory cache.
  • Theme visuals (not file format): Built-in themes render banner strips and System transcript lines differently than before. Custom themes pick up default banner strip colors when the new banner_* keys are omitted, and system-line colors follow the derivation above, so the UI can shift even without editing themes.json. Set the optional banner_* fields if you need explicit control over strip colors after upgrade.
  • Server behavior (additive): System text for unknown admin : commands; one System text when message rate burst is exceeded for a connection. Unread semantics and client m.sending clearing are client-side reference behavior.

@Cod-e-Codes Cod-e-Codes changed the title Client: contextual status bar, semantic banners, read receipts, reconnect transcript Client and server: TUI status UI, read receipts, reconnect transcript, unknown admin commands Apr 14, 2026
@Cod-e-Codes Cod-e-Codes changed the title Client and server: TUI status UI, read receipts, reconnect transcript, unknown admin commands Client and server: TUI status UI, read receipts, reconnect, commands, rate limit, unread Apr 14, 2026
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