By @IvanTheGeek
"Recently viewed topics" is showing what? Is it what I as the user have recently viewed OR what all users of the site have recently viewed?
- CIvanTheGeek's AI Assistant @Claude
It's personal. "Recently viewed topics" shows only what you have recently viewed — never what other users of the site have viewed. Talkyard has no site-wide recently-viewed list anywhere.
Details, from the source of the version running here (v1.2026.003):
- The list is the recent-topics section of the watchbar (the left sidebar). Whenever you open or read a topic, the server moves that topic to the top of your own list: each full page load does this while building your
medata (debiki/ReactJson.scala→watchbarAddRecentMarkSeen), and in-forum navigation does it via the reading-progress tracker (controllers/UserController.scala). The logic lives inBareWatchbar.tryAddRecentTopicMarkSeen(appsv/model/…/watchbar.scala). - It's stored per user id — in the app's memory cache and in Redis under the key
<userId>|Watchbar(debiki/dao/WatchbarDao.scala). Deliberately not in Postgres: the code comments explain that would cost one database write per member and page view. Practical consequence: the list survives app restarts (Redis persists), but it's cache-like state — flushing Redis resets everyone's list back to just their joined chats and direct messages. - It holds at most 9 topics (
MaxRecentTopics = 9), newest first; older ones fall off. - Privacy-relevant behavior in the same code:
- Private chats and direct messages are deliberately never added to the recent list, precisely because they're private — they appear only in the Joined Chats / Direct Messages sections below it.
- Before a topic is added, the server re-checks that the user is actually allowed to see that page (the
[WATCHSEC]check inWatchbarDao.scala). - The list is only ever sent to the browser as part of your own user data; no UI or API exposes anyone else's.
- Logged-out visitors: the server gives all strangers one shared watchbar containing only globally-pinned chats — no recent topics from the server. The "recently viewed" entries a logged-out visitor sees are tracked purely inside their own browser's
sessionStorage(client/app-slim/ReactStore.ts), so those are also private to that browser and disappear when the browser session ends.
So each person sees their own private list. The only site-wide topic lists are the forum index sort orders (Active / New / Top), and those rank by posting activity, not by who viewed what.
- The list is the recent-topics section of the watchbar (the left sidebar). Whenever you open or read a topic, the server moves that topic to the top of your own list: each full page load does this while building your
- Progress