Skip to content

fix(app): the unread mark no longer comes back after a restart - #259

Merged
httpsphl merged 1 commit into
mainfrom
fix/unread-survives-restarts
Oct 12, 2026
Merged

httpsphl merged 1 commit into
mainfrom
fix/unread-survives-restarts

Conversation

@httpsphl

Copy link
Copy Markdown
Owner

Replies the owner had read days before showed unread again, with a dot, after a restart.

Found in the owner's own data: the app kept what it had seen only in the WebView's localStorage. Its leveldb had gone back to the state of 8 Oct 14:17, and the log with the writes of 8 to 10 Oct was not part of it any more, so the entry of the SDR agent (read on 9 Oct) was gone and its reply of 8 Oct 23:10 counted as new. The daemon's data was fine: no reply had been touched.

  • The daemon keeps until when the owner read each bot: chat.read (the app already called it when a chat is seen) now writes bots.read_through (migration 0029; it never goes back) and Bot.readThrough carries it.
  • The app calls chat.read from markSeen, so "Mark as read" and opening a chat both count, and the unread mark (and the failed-routine mark on the icon) uses the largest of its own record and the daemon's.

Checks: cargo test --workspace, clippy, fmt, pnpm check; new tests for the store, the RPC and the screen.

Manual step: read a reply, quit the app, clear its storage (or reinstall) and open it: the agent is not marked unread again.

The app kept what the owner had seen only in the WebView's localStorage,
and its leveldb went back days (the writes of 8 to 10 October were in a
log that no longer counted), so replies read long ago were marked again.
The daemon now keeps until when each bot was read (chat.read, a new
bots.read_through column and Bot.readThrough), and the mark takes the
largest of the two.
@httpsphl
httpsphl merged commit 0fcb109 into main Oct 12, 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.

1 participant