TNT/include
m1ngsama 87d6572156 chat: whisper inbox with :inbox view + ✉ unread chip (UX-12)
Whispers used to flash on the recipient's terminal and disappear with
the next redraw.  No history, no record, no signal if you weren't
looking.

Now whispers are stored per-recipient in a bounded inbox (16 slots,
FIFO eviction):

  typedef struct { time_t timestamp; char from[]; char content[]; } whisper_t;
  whisper_t whisper_inbox[16];
  int       whisper_inbox_count;
  _Atomic int unread_whispers;

Sender side (:msg / :w):
  - resolves target as before
  - pushes the whisper into target->whisper_inbox under target->io_lock
    (so two simultaneous senders to the same recipient don't tear the
    ring)
  - bumps target->unread_whispers atomically
  - sends a single \a bell + triggers redraw_pending
  - no longer writes whisper text directly to the channel (which used
    to get clobbered by the next redraw)

Recipient side:
  - new :inbox command in COMMAND mode prints the snapshot under
    io_lock, in M7 chat-list style:

      悄悄话 · whispers  · 3
        05-17 13:42  alice: 一会儿要不要喝咖啡
        ...

  - viewing :inbox resets unread_whispers to 0

Title bar (extends UX-11):
  - bright magenta "✉ N" chip alongside the yellow "★ N" mention chip
  - same priority / degradation rules as ★

Whispers remain private — they're never broadcast to the room and
never persisted to messages.log.  The inbox lives only in client_t,
so disconnecting drops it.
2026-05-17 14:35:16 +08:00
..
.gitkeep Initial commit 2025-07-01 09:00:00 +08:00
bootstrap.h refactor: extract input module (PR2-M5) 2026-05-17 10:01:48 +08:00
chat_room.h feat: consolidated improvements, manpage, and deployment prep 2026-04-19 17:49:06 +08:00
client.h refactor: extract client module (PR2-M6) 2026-05-17 10:16:27 +08:00
commands.h refactor: extract commands module (PR2-M3) 2026-05-17 09:26:48 +08:00
common.h refactor: extract bootstrap module (PR2-M4) 2026-05-17 09:47:28 +08:00
exec.h refactor: extract exec module (PR2-M2) 2026-05-17 08:49:58 +08:00
input.h refactor: extract input module (PR2-M5) 2026-05-17 10:01:48 +08:00
message.h feat: add :last, :search, :mute-joins commands and MOTD support 2026-04-23 12:03:27 +08:00
ratelimit.h refactor: extract ratelimit module (PR2-M1) 2026-05-16 23:06:56 +08:00
ssh_server.h chat: whisper inbox with :inbox view + ✉ unread chip (UX-12) 2026-05-17 14:35:16 +08:00
tui.h tui: dedicated MOTD renderer (M7-5) 2026-05-17 13:16:37 +08:00
utf8.h refactor: stabilize SSH runtime and add exec interface 2026-03-10 18:52:20 +08:00