Skip to content

Preserve unread state beyond the recent list - #327

Open
dajiaohuang wants to merge 4 commits into
Anil-matcha:mainfrom
dajiaohuang:fix/unread-truncated-thread-list
Open

dajiaohuang wants to merge 4 commits into
Anil-matcha:mainfrom
dajiaohuang:fix/unread-truncated-thread-list

Conversation

@dajiaohuang

@dajiaohuang dajiaohuang commented Nov 14, 2026 •

Copy link
Copy Markdown

The sidebar requests only the 100 most recently active conversations. When a previously seen conversation falls outside that list, unread tracking currently drops its last-seen timestamp; if it later becomes active and returns, it is treated as read. Keep timestamps for absent conversations when the response fills the request limit, and prune absent entries when the response is shorter and therefore complete. Explicitly request the same limit used by unread tracking. When a bookmarked conversation outside that list is loaded, record its current activity as read too, without advancing it from an independently fetched list row before detail loads.

Validation: synthetic 100-conversation regressions verify that an evicted conversation becomes unread after later activity, that viewing an off-list conversation marks its current activity read, and that stale list rows and delayed detail do not advance or regress read state incorrectly. The unread and thread API Node suites passed 27 tests; focused ESLint had zero errors and four existing warnings. TypeScript passed with an isolated configuration excluding stale generated Next types; the default command failed on a stale generated reference to a removed temporary audit page. Browser, live backend and CI were not run.

@dajiaohuang
dajiaohuang marked this pull request as ready for review November 14, 2026 10:29
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