I want to make it so anyone can post to any thread whether they are signed in…

merged…
osebo32d ago

I want to make it so anyone can post to any thread whether they are signed in or not, but people who are signed in don't get access to claude

18 repliesoldestnewest
Osebot32d ago

Run stopped by @osebo.

oseboasked Osebot32d ago

I want to make it so anyone can post to any thread whether they are signed in or not, but people who are signed out don't get access to claude

Osebotfable-5-132d ago

Plan: make guest posting the default on every thread and remove guest access to Claude.

  1. Server: requireThreadGuestWriter stops checking threads.anyone_can_reply; any thread (that exists) takes a reply with no session. Guest askClaude is refused (403) instead of rate-limited, so guestRunBudget and GUEST_RUNS_PER_HOUR go. Signed-in posting stays as is (member or open workspace), Claude stays members-only.
  2. Thread page: canPost is true for visitors; canAskClaude is members only. The "anyone can reply" badge and the Manage-menu "Let anyone reply" switch go away (the flag is now meaningless). The column stays in the schema like public did, no migration.
  3. Composer: guest copy no longer mentions Ask Claude; guest name field stays.
  4. Update comments / context tagging, run tsc + lint, push.
Osebotfable-5-132d agothreadide@9936489

Done on thread/c9013b60 (threadide 9936489).

What changed

  • Every thread now takes a reply from a visitor with no session. requireThreadGuestWriter (lib/session.ts) only checks the thread exists; the threads.anyone_can_reply test is gone.
  • Guests never get Claude: POST /api/threads/[id]/posts answers 403 to a guest askClaude, and addHumanPost throws if one slips through. The old per-thread guest run budget (guestRunBudget, GUEST_RUNS_PER_HOUR) is deleted.
  • The per-thread "Let anyone reply" switch is removed end to end: PATCH /api/threads/[id], setGuestReplies, the Manage-menu item (menu is now Delete only), the "anyone can reply" badge and its .badge.public CSS.
  • Thread page: canPost is true for visitors; canAskClaude and the per-post Ask Claude / Fork buttons are workspace members only. The guest note under the composer now reads "You're posting as a guest; sign in to post under your account and ask Claude."
  • threads.anyone_can_reply stays in the schema as a legacy column (same treatment public got on thread 2cd58ad1), so no migration. Existing true rows are ignored.

Left as is, say if you want it changed

  • Starting a new thread still needs a sign-in and membership (or an open workspace). The ask said "post to any thread", which I read as replies.
  • Signed-in non-members of a private workspace still can't reply under their account (they could sign out and reply as a guest, which is a bit odd; happy to let any signed-in user reply anywhere if you prefer).

npx tsc --noEmit passes. The app can't run in the sandbox, so no screenshot; the only visible UI changes are a removed badge, a removed menu item and the note copy.

oseboasked Osebot32d ago

can you show me images of what people see?

Osebotfable-5-132d ago

The app can't run here (needs Postgres + GitHub OAuth), so I'll render the real reply composer and thread-header components with react-dom/server into mockup pages that link the live app/globals.css, then screenshot them with Playwright at phone width. Three views: signed-out visitor, signed-in workspace member, signed-in non-member. No code changes.

Osebotfable-5-132d agothreadide@9936489

Here is what each kind of visitor sees on a thread page with the change from 9936489. The app can't run in the sandbox, so these are the real components (PostView, StatusBadge, header, ThreadMenu, AttachImages) rendered with react-dom/server against the live app/globals.css; only the reply box's open state is a markup copy of components/composer.tsx, since it starts collapsed. No code changed in this step.

Signed out (shots 1 to 3)

  • Every thread shows the composer. The note reads "You're posting as a guest; sign in to post under your account and ask Claude."
  • The reply box has a Name field and a "Post as guest" button. No Ask Claude chip, no model picker, no Image chip, and the posts carry no "ask Claude" / Fork buttons.
  • A guest's reply shows the dashed guest badge next to the name (shot 3, ravi's post).

Signed-in workspace member (shots 4 and 5)

  • Unchanged: Ask Claude + model picker, Image, "Post & run", per-post "ask Claude" / Fork, and the Manage menu (now Delete only; the "Let anyone reply" item is gone, as is the "anyone can reply" badge that used to sit in the status row).

Signed in, not a member (shots 6 and 7)

  • Open workspace: can reply under their account (with images), no Ask Claude; note says only members can ask Claude. Unchanged.
  • Private workspace: read-only, "Replying is for members of Evenings. Ask one of them for its invite link." Unchanged. This is the odd case I flagged earlier: such a person could sign out and reply as a guest. Say the word if you'd rather let any signed-in user reply anywhere.
1. Signed-out visitor, reply box open: Name field, "Post as guest", no Ask Claude, no per-post buttons
1. Signed-out visitor, reply box open: Name field, "Post as guest", no Ask Claude, no per-post buttons
2. Signed-out visitor before tapping Reply: the guest note and the Reply button
2. Signed-out visitor before tapping Reply: the guest note and the Reply button
3. Signed-out visitor on desktop; an earlier guest reply shows the dashed "guest" badge
3. Signed-out visitor on desktop; an earlier guest reply shows the dashed "guest" badge
4. Signed-in workspace member: Ask Claude + model, Image, Post & run, Fork, Manage
4. Signed-in workspace member: Ask Claude + model, Image, Post & run, Fork, Manage
5. Signed-in member on desktop, with per-post "ask Claude" / Fork
5. Signed-in member on desktop, with per-post "ask Claude" / Fork
6. Signed in, not a member, OPEN workspace: can reply (Image allowed), no Ask Claude
6. Signed in, not a member, OPEN workspace: can reply (Image allowed), no Ask Claude
7. Signed in, not a member, PRIVATE workspace: read-only note, no composer (unchanged)
7. Signed in, not a member, PRIVATE workspace: read-only note, no composer (unchanged)
oseboasked Osebot32d ago

don't mention claude here:

image.png
image.png
Osebotfable-5-132d ago

Small copy fix: the signed-out guest note on the thread page (app/threads/[id]/page.tsx) will read "You're posting as a guest; sign in to post under your account." with the "and ask Claude" tail dropped. Nothing else in the guest view mentions Claude (the composer placeholder is "Reply as a guest.", and the Ask Claude chip is already hidden for guests), so this is the only line.

Osebotfable-5-132d agothreadide@46ba3fe

Done, threadide 46ba3fe on thread/c9013b60.

The guest note under the reply box (app/threads/[id]/page.tsx) now reads:

You're posting as a guest; sign in to post under your account.

The " and ask Claude" tail is gone. That was the only Claude mention a signed-out visitor could see: the guest composer placeholder is "Reply as a guest." and the Ask Claude chip / model picker / per-post buttons are already hidden for guests. The signed-in notes (open-workspace non-member: "Only members can ask Claude.") are unchanged, since those people can sign in and become members.

npx tsc --noEmit passes. No screenshot this time: it is a one-line text change and Playwright isn't set up in this sandbox.

Osebot32d ago

Merged threadide #134 by @osebo (merge, 384d9e4).

oseboasked Osebot32d ago

People who are not signed in should also be able to start a thread

Osebotfable-5-132d ago

Plan: let a signed-out visitor start a thread on any workspace home, same rules as guest replies.

  1. API: POST /api/threads stops requiring a session. No session → the workspace must exist, askClaude is refused (403), no attachments, 4k body cap, author = {guest, name} from an optional guestName; the thread gets created_by NULL (the column is already nullable) and its opening post carries meta.guest, so it shows the dashed "guest" badge and Claude's context tags it. Signed-in rules are unchanged (member or open workspace; Claude members-only).
  2. Workspace home (app/[workspace]/page.tsx): render the start-a-thread composer for visitors too, with the same "You're posting as a guest; sign in to post under your account." note as the thread page (no Claude mention).
  3. Composer (components/thread-composer.tsx): a guest mode with the Name field (shared guestName localStorage key), no Ask Claude chip, no Image chip, "Post as guest" button, guest body cap message.
  4. Update the access-model comment in lib/session.ts and the README, run tsc, push, and mock up a screenshot of the guest workspace home.
Osebotfable-5-132d agothreadide@4cfe696

Pushed threadide 4cfe696 on thread/c9013b60; tsc --noEmit passes.

  • POST /api/threads no longer requires a session. A guest request needs only an existing workspace (requireWorkspaceGuestWriter), gets 403 on askClaude or attachments, and a 4k body cap; guestName is optional (same normalisation as replies).
  • createThread takes a PostAuthor: guest → created_by NULL, opening post with author_user_id NULL + meta.guest, so it shows the dashed "guest" badge and Claude's context tags it. Throws if a guest askClaude slips through.
  • Workspace home: a signed-out visitor sees the note "You're posting as a guest; sign in to post under your account." and the start-a-thread composer in guest mode (Name field, "Post as guest", no Ask Claude / Image). Signed-in rules are unchanged.

Setting up Playwright now for a screenshot of the guest view.

Osebotfable-5-132d agothreadide@4cfe696

Done, threadide 4cfe696 on thread/c9013b60 (pushed; the PR description is updated to cover the whole branch).

What a signed-out visitor gets now

  • Every workspace home (/<slug>) shows the start-a-thread box, under the same note as the thread page: "You're posting as a guest; sign in to post under your account." The box has a Name field (remembered per browser, same key as the reply box), a plain textarea and a "Post as guest" button. No Ask Claude, no model picker, no Image chip, 4k character cap. Screenshots attached (phone, desktop, and the unchanged member view for comparison).
  • The thread is created with no creator (created_by NULL) and its opening post is a guest post, so it carries the dashed "guest" badge and shows up in the list under the typed name. Delete on such a thread is for the workspace owner only.

Server

  • POST /api/threads accepts a request with no session: the workspace must exist (requireWorkspaceGuestWriter, lib/session.ts), askClaude → 403, attachments → 403, body > 4000 → 400, guestName optional. Signed-in rules are unchanged (member or open workspace; Claude for members only).
  • createThread (lib/data.ts) takes a PostAuthor and throws if a guest askClaude ever reaches it, the same belt-and-braces as addHumanPost.
  • No migration: created_by was already nullable. README and architecture.md describe the new model.

Unchanged, flagging again: a signed-in non-member of a private workspace still sees "Starting a thread in X is for its members", while the same person signed out could post as a guest. If you want signed-in users to be able to post anywhere too, say so and I'll relax requireWriter.

npx tsc --noEmit passes. The app can't run in the sandbox, so the shots are the real components (ThreadBrowser, ThreadComposer, header) rendered against the live globals.css; the flows weren't exercised end to end. Also worth knowing: there is no rate limit on guest posting (threads or replies).

Signed-out visitor on a workspace home (phone): guest note, start-a-thread box with Name field and "Post as guest", no Ask Claude or Image
Signed-out visitor on a workspace home (phone): guest note, start-a-thread box with Name field and "Post as guest", no Ask Claude or Image
Same guest view on desktop; the third row is a guest-started thread (no creator, "ravi" from the participants)
Same guest view on desktop; the third row is a guest-started thread (no creator, "ravi" from the participants)
Signed-in member for comparison: unchanged (Ask Claude + model, Image, Post & run)
Signed-in member for comparison: unchanged (Ask Claude + model, Image, Post & run)
oseboasked Osebot32d ago

there seems to be merge conflicts now

Osebotfable-5-132d ago

PR #136 (guest threads, 4cfe696) conflicts with main because PR #135 (the Claude → Osebot rename, 8960efd) merged in between and touched the same files (lib/session.ts, lib/data.ts, app/api/threads/route.ts, app/[workspace]/page.tsx, components/thread-composer.tsx, README, architecture.md). I'll merge main into thread/c9013b60, resolve the conflicts keeping both the guest-thread logic and the Osebot wording, re-run tsc, and push.

Osebotfable-5-132d agothreadide@ffb42b2

Conflicts resolved: threadide ffb42b2 on thread/c9013b60 (pushed).

Why they happened: PR #135 (the Claude → Osebot rename, 8960efd) merged into main between my first PR (#134) and the guest-threads commit 4cfe696, and both touched the same lines in lib/session.ts, lib/data.ts, lib/guest.ts, app/api/threads/route.ts, app/[workspace]/page.tsx, components/thread-composer.tsx, README and architecture.md.

What I did: merged origin/main into the branch and resolved each hunk by keeping the guest-threads side with the Osebot wording (so the behaviour is from this branch, the copy from #135). Also swept the comments I added in 4cfe696 for "Claude" and changed the guest 403 message in the posts route to "sign in to ask Osebot; guests can start threads and post replies only", since guests can now start threads. npx tsc --noEmit passes.

One thing to watch: a minute after the push, GitHub's API still reported PR #136 at head 4cfe696 / "dirty". The remote branch is definitely at ffb42b2 (git ls-remote), so this looks like GitHub lagging on recomputing the PR; refresh the PR page and it should show mergeable. If it still shows conflicts, tell me and I'll look again.

Side note for teammates: the sandbox had the branch checked out at main's tip rather than at 4cfe696, so I had to reset to the remote sha before merging. Saved as a gotcha note.