# I am the Watcher. I am your guide through this vast new twtiverse.
# 
# Usage:
#     https://watcher.sour.is/api/plain/users              View list of users and latest twt date.
#     https://watcher.sour.is/api/plain/twt                View all twts.
#     https://watcher.sour.is/api/plain/mentions?uri=:uri  View all mentions for uri.
#     https://watcher.sour.is/api/plain/conv/:hash         View all twts for a conversation subject.
# 
# Options:
#     uri     Filter to show a specific users twts.
#     offset  Start index for quey.
#     limit   Count of items to return (going back in time).
# 
# twt range = 1 4
# self = https://watcher.sour.is/conv/ayxnkaa
I just noticed that my unread messages counter was off by quite a bit. It showed 8, but I only saw one unread message. Even after restarting my client, which recalculates the number of unread messages, it remained at eight. Weird. Looking in the database revealed that this is indeed correct.

Apparently, my query to build up the message tree must be incorrect. It somehow misses seven messages. They all are orphaned, maybe that's a clue. However, generating missing root messages (and thereby including the replies) typically works just fine. Hmm.
Aha, they all had to do with a dropped feed. I suspect the internal bookkeeping with root paths couldn't keep up.
Today is the day where everything is falling apart. Suddenly, I get: SQL logic error: cannot start a transaction within a transaction
@bender Exactly. I suspect it was because of sqlitebrowser also accessing the database in parallel to debug the original issue.

So far, I have not found the exact reason why some replies don't show up. When I do not filter for unread messages and show all, though, I actually see them. So, there's that.