Skip to content

tsbb login: leave out a forum this member cannot post in - #45

Merged
ralyodio merged 1 commit into
mainfrom
worktree-login-canpost
Sep 8, 2026
Merged

tsbb login: leave out a forum this member cannot post in#45
ralyodio merged 1 commit into
mainfrom
worktree-login-canpost

Conversation

@ralyodio

@ralyodio ralyodio commented Sep 8, 2026

Copy link
Copy Markdown
Contributor

tsbb 0.5.1 (profullstack/tsbb#17) returns canPost per forum, so a feed-only forum no longer has to announce itself with a 403 on the first release post.

The subtlety: which caller is asking

canPost is resolved for whoever asks, and the forum list read before the device flow is a guest's. A guest may post nowhere, so every canPost is false there — reading that as a refusal would reject a login that works.

Verified against the live board, same URL, one with a token and one without:

                 guest          member
announcements    canPost=false  canPost=true
news             canPost=false  canPost=false   <- feed-only, the real case
app-showcase     canPost=false  canPost=true
community        canPost=false  canPost=false   <- category

So the list is read twice

Before the flow, as a guest — only the checks that hold for everybody: an unknown slug, and a category (which holds forums, not topics). Both cost no device approval to refuse.

After the token arrives, as the membercanPost. A refused forum is dropped with a line saying why; only a selection with nothing postable left fails the login.

An older board omits the field, and undefined means "cannot tell" rather than "no", so every board before 0.5.1 behaves exactly as it did.

Verified

  • bun x tsc --noEmit -p tsconfig.json clean; 320 tests pass, 0 fail (5 new).
  • The new tests stub a board that answers differently with and without a token, and assert the member list is the one consulted, that an older board keeps every forum, and that a category is refused before device/start is ever called.
  • Read live: bbs.hqtui.com says canPost=false for news and true for the other seven forums when asked with the connected member's token.

🤖 Generated with Claude Code

https://claude.ai/code/session_011XqFUXQkK6npCGxBtgizQg

tsbb 0.5.1 says whether the caller may start a topic in a forum, so a feed-only
one no longer has to announce itself with a 403 on the first release post.

The subtlety is which caller is asking. The forum list read before the device
flow is a guest's, and a guest may post nowhere: every canPost is false, so
reading that as a refusal would reject a login that works. Verified against
bbs.hqtui.com, where the same request without a token says false for all nine
forums and with the token says true for eight and false for `news`.

So the list is read twice. Before the flow, as a guest, for the checks that hold
for everybody: an unknown slug, and a category, which holds forums rather than
topics and costs no approval to refuse. After the token arrives, as the member,
for canPost: a refused forum is dropped with a line saying so, and only a
selection with nothing postable left in it fails the login.

An older board omits the field, and `undefined` means "cannot tell" rather than
"no", so every board before 0.5.1 behaves exactly as it did.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_011XqFUXQkK6npCGxBtgizQg
@ralyodio
ralyodio merged commit 22ebcd1 into main Sep 8, 2026
2 checks passed
@ralyodio ralyodio mentioned this pull request Sep 8, 2026
ralyodio added a commit that referenced this pull request Sep 8, 2026
`myna login tsbb` reads the board's canPost as the member and leaves out a
forum that takes replies only, instead of finding out from a 403 (#45).


Claude-Session: https://claude.ai/code/session_011XqFUXQkK6npCGxBtgizQg

Co-authored-by: Claude Opus 5 (1M context) <noreply@anthropic.com>
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