docs(platform): document loadGuild channel pick priority (v0.8.119)

Clarify _selectGuildChannelWithUnread order in README: unread/mention score,
then lastChannelByGuild, then first text. Reference smokes
test:guild-unread-over-last-channel and test:guild-unread-channel-jump.

Co-authored-by: Cursor <[email protected]>
This commit is contained in:
Raven Scott
2026-05-22 18:05:54 -04:00
co-authored by Cursor
parent 723627aa9a
commit 9629d1769b
+3 -1
View File
@@ -135,7 +135,9 @@ Primary consumer: `apps/pearcord/index.js` sidecar reading pear-pipe JSON.
**v0.8.115:** `loadGuild` / `_openGuild` clears stale `activeChannelId`, then `_selectGuildChannelWithUnread` picks mention-weighted unread channels before falling back to the first text channel. `setSearch` records `searchRecentByGuild` in user prefs. View: `searchRecentQueries`.
**v0.8.116:** After unread pick, `_selectGuildChannelWithUnread` restores `lastChannelByGuild[guildId]` when valid. `selectChannel` persists savable channel types via `_persistLastGuildChannel`. Smoke: `npm run test:guild-last-channel-prefs`.
**v0.8.119:** `_selectGuildChannelWithUnread` order: highest unread/mention score → `lastChannelByGuild` → first text. Smokes: `test:guild-unread-over-last-channel`, `test:guild-unread-channel-jump`.
**v0.8.116:** `selectChannel` persists savable channel types via `_persistLastGuildChannel`. Smoke: `npm run test:guild-last-channel-prefs`.
| platform → UI | `state`, `message`, `channel`, `notification`, `session-ready`, `user` |
See [IPC.md](../../docs/IPC.md) for the full message table. UI should not import guild/message modules directly in production builds.