Skip to content

feat(chat): mark where a returning member stopped reading - #128

Merged
m1ngsama merged 1 commit into
mainfrom
feat/read-marker
Nov 17, 2026
Merged

m1ngsama merged 1 commit into
mainfrom
feat/read-marker

Conversation

@m1ngsama

Copy link
Copy Markdown
Owner

Fixes #127.

When a signed-in member connects again, a "new since you left" divider sits above the first message that arrived after their last departure. It only appears when somebody spoke in the meantime, and anonymous nicknames never get one, because anyone can reuse them.

The position comes from the member's own "left the room" line in the room's in-memory history, the last 100 messages, so nothing new is stored. Handles are bound to SSH keys, so nobody else can leave that line. A departure older than the in-memory history gives no divider.

The divider costs a row in the newest-screen layout only when both messages around it are on screen, the same rule the renderer uses. Documented in tnt-chat(7). Covered by tests/test_read_marker.sh and new unit tests.

A signed-in member who connects again sees a "new since you left"
divider above the first message that arrived after their last
"left the room" line still in memory. It appears only when somebody
spoke in the meantime. Handles are bound to keys, so the leave line
is the member's own and no new state is stored.
@m1ngsama
m1ngsama merged commit 084663f into main Nov 17, 2026
4 checks passed
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.

Returning members cannot see where they stopped reading

1 participant