mirror of
https://oauth2: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@github.com/m1ngsama/TNT.git
synced 2026-06-26 05:34:39 +08:00
2.5 KiB
2.5 KiB
User Lifecycle
TNT solves one narrow problem: create a keyboard-first chat room that anyone with an SSH client can join without installing a custom client.
The product path should stay short:
- Operator installs
tnt, chooses a state directory, and starts the server. - User connects with
ssh -p 2222 host. - User picks a display name or presses Enter for
anonymous. - User lands in INSERT mode at the live tail and can type immediately.
- User presses Esc to browse history with Vim-style movement.
- User uses
:helpfor the concise manual or?for the full key reference. - User uses commands only when needed:
:users,:msg,:inbox,:last,:search,:nick,:mute-joins, and:q. - Scripts and operators use
tntctlor SSH exec commands forhealth,stats,users,tail, andpost.
TUI Experience Notes
- The first screen should make the product legible without reading external docs: this is an SSH chat room, not a shell.
- INSERT mode is the default because most users arrive to send a message.
- NORMAL mode opens at the latest messages, not the oldest history. Users can
move upward for older context and use
Gor End to return to live chat. :helpis a compact manual, while?is a full key reference. Do not add parallel support commands for the same task.- Command syntax stays ASCII even in localized UI text. Translations explain; they do not change the command language.
- Private messages are visible only in the recipient inbox and are not written
to
messages.log. :inboxis live enough for normal chat use: it can be refreshed withrand refreshes automatically when a new private message arrives while the inbox is open.- Long command output uses a small pager so
:lastand:searchare readable on small terminals.
Regression Coverage
make user-lifecycle-test runs a two-user SSH TUI journey:
- second user joins and is visible through
users --json - first user opens
?, checks:users, sends a public message, scrolls, uses:lastand:search - first user toggles
:mute-joins, sends:msg, changes nickname, sends/me, and exits - second user opens
:inboxbefore the private message arrives and sees it auto-refresh after delivery - exec
tailsees public messages messages.logcontains public history and excludes private-message content
This test is intentionally closer to a user story than a unit regression. Keep it focused on lifecycle guarantees, not every keybinding.