Discord: Forums #329

Closed
opened 2026-10-08 23:19:40 -04:00 by Salastil · 4 comments
Owner

image.png

Discord has a new feature called Forums that we cannot render. This would require a new pane since they are not chat buffers.

![image.png](/attachments/f12d5653-6730-49dd-bfb5-e4e4981114f4) Discord has a new feature called Forums that we cannot render. This would require a new pane since they are not chat buffers.
195 KiB
Salastil added this to the v1.0 milestone 2026-10-08 23:19:40 -04:00
Author
Owner

Built: dd0c25e. Left open until it has been tried against a real forum - the daemon half talks to an endpoint I have only the shape of, and the Discord account is receive-only for testing.

What it is. A forum is a channel whose content is a list of posts, each a thread - not a log - so it opens in a pane of its own and has no message box.

  • In the list: forums and media channels are entries now (they were only headings for their posts), with a forum glyph, in their category. Posts opened from one appear under it as before.
  • The pane: a search box, "Recently active" / "Date posted" sorting, and a card per post - title, tags, the first message's words, reply count, top reaction, age (">30d ago"), and its picture (an attached image or a link's thumbnail). Pinned posts stay first; archived posts sit under "Older posts"; "Show more posts" pages on. The last page is remembered for a minute, so coming back is instant.
  • Opening a post opens it as the conversation it is (joining it if need be), in the list under the forum, with its history and composer - the existing thread path.
  • New Post: title, message and the forum's tags, posted in one request that makes the thread and its first message; the new post opens when it is made. Mentions in it resolve as in a message.
  • Daemon (nobilis d02bba0): Buffer.forum; listForumPosts reads Discord's thread-search endpoint (the one its own client uses: each post comes with its first message, so one request draws a page), falling back to the plain lists of live and archived threads with no first messages if it is refused; createForumPost. Tests: the post card from a thread and first message, the snowflake time, the teaser, and the client-side search.
  • To try: restart moho and open a forum channel (e.g. Retro AI Development's n64-tools). If the pane shows an error or no posts, the line it prints is the thing to send me.

Left (right) is Discord's own, from the report; moho's, staged, on the right:

forum

Built: [dd0c25e](https://git.salastil.com/Salastil/moho/commit/dd0c25e05419eae31120275b17fa0e0da2d1aea7). **Left open until it has been tried against a real forum** - the daemon half talks to an endpoint I have only the shape of, and the Discord account is receive-only for testing. **What it is.** A forum is a channel whose content is a list of posts, each a thread - not a log - so it opens in a pane of its own and has no message box. - **In the list:** forums and media channels are entries now (they were only headings for their posts), with a forum glyph, in their category. Posts opened from one appear under it as before. - **The pane:** a search box, "Recently active" / "Date posted" sorting, and a card per post - title, tags, the first message's words, reply count, top reaction, age (">30d ago"), and its picture (an attached image or a link's thumbnail). Pinned posts stay first; archived posts sit under "Older posts"; "Show more posts" pages on. The last page is remembered for a minute, so coming back is instant. - **Opening a post** opens it as the conversation it is (joining it if need be), in the list under the forum, with its history and composer - the existing thread path. - **New Post:** title, message and the forum's tags, posted in one request that makes the thread and its first message; the new post opens when it is made. Mentions in it resolve as in a message. - **Daemon (nobilis d02bba0):** `Buffer.forum`; `listForumPosts` reads Discord's thread-search endpoint (the one its own client uses: each post comes with its first message, so one request draws a page), falling back to the plain lists of live and archived threads with no first messages if it is refused; `createForumPost`. Tests: the post card from a thread and first message, the snowflake time, the teaser, and the client-side search. - **To try:** restart moho and open a forum channel (e.g. Retro AI Development's n64-tools). If the pane shows an error or no posts, the line it prints is the thing to send me. Left (right) is Discord's own, from the report; moho's, staged, on the right: ![forum](https://git.salastil.com/attachments/22146a6d-5baa-4609-84e1-c93f1464f399)
1.7 MiB
Author
Owner

image.pngimage.png

Not all forum posts are rendering. In the cast of n64-projects there is a single item but we do not have it visible on moho.

![image.png](/attachments/73eaec39-71cf-4fd3-81a8-ece3b38d72c6)![image.png](/attachments/f65a5b5b-1ab5-4119-b802-0483b6e64fc7) Not all forum posts are rendering. In the cast of n64-projects there is a single item but we do not have it visible on moho.
206 KiB
206 KiB
Author
Owner

Re the missing post in n64-projects: nobilis 8363003.

I asked your running daemon for that forum's posts: Discord answered the search with a success status and no posts (0 total), though the tags came through - so the forum was recognised and the search came back empty. A search that quietly finds nothing for a forum that has a post is, as far as I can tell, Discord's search index not being built yet (it answers "not available, retry after N seconds" with a success code), which my first version read as an empty forum.

Fixed three ways:

  • an answer that says the index is not ready is waited for (the delay it names, up to three tries);
  • if the search still finds nothing on the first page, the plain lists of live and archived threads are read as well, so a post that exists is not missed - and for the top ten the first message is read so the card has its words, author and picture rather than only a title and a count;
  • what an empty search actually said is written to the log ("the search of forum … found no posts"), so if this is something else I can see what.

Needs a restart to take effect. Please open n64-projects again; if Pokemon Stadium (2) is still missing, the log line above is what to send.

Re the missing post in n64-projects: [nobilis 8363003](https://git.salastil.com/Salastil/nobilis/commit/8363003af444bebcc9ac19fd9cf71e2d9415b02d). I asked your running daemon for that forum's posts: Discord answered the search with a success status and **no posts** (0 total), though the tags came through - so the forum was recognised and the search came back empty. A search that quietly finds nothing for a forum that has a post is, as far as I can tell, Discord's search index not being built yet (it answers "not available, retry after N seconds" with a success code), which my first version read as an empty forum. Fixed three ways: - an answer that says the index is not ready is **waited for** (the delay it names, up to three tries); - if the search still finds nothing on the first page, the **plain lists of live and archived threads** are read as well, so a post that exists is not missed - and for the top ten the **first message is read** so the card has its words, author and picture rather than only a title and a count; - what an empty search actually said is **written to the log** ("the search of forum … found no posts"), so if this is something else I can see what. Needs a restart to take effect. Please open n64-projects again; if Pokemon Stadium (2) is still missing, the log line above is what to send.
Author
Owner

Finished: nobilis 6abcb8e.

The log from your restart showed what was wrong, and it was bigger than the one post: Discord's thread search answers only for the archive when it is asked with archived=true, and only for the live posts when it is not. The first version asked the first way, so every forum showed its archived posts and none of its live ones (n64-projects had nothing but one live post, so it was empty; n64-tools was showing only its six archived posts). The extra variant I added last time happened to ask the second way, which is why the post appeared.

Now both are asked and merged: the first page is all the live posts (up to a hundred) followed by the first page of the archive, and "Show more posts" reads further into the archive. Live posts sit above "Older posts", pinned ones first. Confirmed against your running daemon before the change: n64-projects gave its one live post and n64-tools only its archived six, which is the split that was missing.

Not yet looked at after this last change: n64-tools should now show its live posts (n64 test suite, Recompilator, …) above its older ones. Reopen if it does not.

Finished: [nobilis 6abcb8e](https://git.salastil.com/Salastil/nobilis/commit/6abcb8e85269c268cbb7781831adcb90307eeb8c). The log from your restart showed what was wrong, and it was bigger than the one post: Discord's thread search answers **only for the archive** when it is asked with `archived=true`, and **only for the live posts** when it is not. The first version asked the first way, so every forum showed its archived posts and none of its live ones (n64-projects had nothing but one live post, so it was empty; n64-tools was showing only its six archived posts). The extra variant I added last time happened to ask the second way, which is why the post appeared. Now both are asked and merged: the first page is all the live posts (up to a hundred) followed by the first page of the archive, and "Show more posts" reads further into the archive. Live posts sit above "Older posts", pinned ones first. Confirmed against your running daemon before the change: n64-projects gave its one live post and n64-tools only its archived six, which is the split that was missing. Not yet looked at after this last change: n64-tools should now show its live posts (n64 test suite, Recompilator, …) above its older ones. Reopen if it does not.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: Salastil/moho#329