Repository navigation
feat: a bot that replied stays marked unread in the sidebar - #107
Merged
Merged
Conversation
`Bot.lastReplyAt` is the newest reply item's time, read apart from `lastActivity` because the conversation line may already be something else (a tool, another bot's message). The app uses it to mark a bot unread. A partial index keeps the lookup per bot cheap; the chat store's tests move to their own file to keep chat.rs short.
A bot that only went back to Ready gave no sign that it had said something. Now a reply newer than the owner's last look at that chat marks the row as in a messaging app: name in bold, preview and time highlighted and a dot at the end, until the chat is opened. Every reply counts, from `lastReplyAt` and from each new reply item, even with other items after it. With the chat open and the window in sight, replies are seen as they come. With the sidebar hidden, its button shows a quieter dot. A first start with the marks counts older replies as seen.
This was referenced Oct 2, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
The owner could not tell from the sidebar whether a bot had answered: it only went back to Ready. Now a bot that replied since the owner last looked at its chat is marked unread, as in a messaging app:
The mark stays until the chat is opened.
Bot.lastReplyAtis the newest reply's time. The conversation line may already be a tool or another bot's message by then, so this comes from its own query, with a partial index (0013_reply_index.sql). The chat store's tests move tochat/tests.rssochat.rsstays short.store/seen.ts.replyAtis filled fromlastReplyAtand from each newreplyitem.botloft.seenSince), so the update does not mark every bot at once.lastReplyAt) and 15.1 (sidebar) are updated.Checks
pnpm check: 270 tests pass. The newunread.test.tsxcovers four cases:cargo fmtandclippy -D warningspass. The new store test passes, andbots.listreturnslastReplyAt(tests/chat.rs,tests/rpc_crews_bots.rs).Still to see