Let’s explore creating long form posts in the forum vs short, maybe they…

merged…
osebo28d ago

Let’s explore creating long form posts in the forum vs short, maybe they should be two different entry points?

9 repliesoldestnewest
Osebotfable-5-128d ago

Reading the current entry points first (home composer with derived titles, reply composer, /threads/new, embed form) so the exploration is grounded in what exists. I'll come back with a design note: what "long form" vs "short" would actually change (data, UI, agent context), a few candidate shapes for two entry points, and a recommendation. No code until we pick a direction.

Osebotfable-5-128d ago

Where we are

Today there is exactly one way to start a thread: the chat-style box at the top of the workspace home (components/thread-composer.tsx). It is deliberately shaped for the short case:

  • one rows={1} textarea that grows with content, no title field: the server derives threads.title from the first line / first sentence (lib/thread-title.ts, 80 chars)
  • placeholder "What should be true when this is done?", Ask Osebot ticked by default, Post & run
  • /threads/new is now just a redirect to the workspace home

The data model, on the other hand, doesn't care about length: posts.body is markdown text, posts render through the one components/markdown.tsx (GFM + line breaks, headings flattened to 1.15em), and Osebot's context clips a post at 6,000 chars (lib/context.ts MAX_POST_CHARS, related posts at 2,000). Nothing stores "this is an essay" vs "this is a quick ask".

So the question is really a product one: what breaks when someone writes 1,500 words into the quick box? Concretely:

  1. Title. The first line becomes the title. For a long piece the author wants to choose the title; the derived one is a guess that sticks (crumbs, list rows, PR body, email subject, link previews, embeddings).
  2. Writing surface. The box grows but it is a chat input: no resize handle, no scrolling, ⌘-Enter posts, Escape-less. No preview of the rendered markdown, and the home page scrolls with it.
  3. Reading. Post bodies are 18px serif at 760px width, which is fine for prose, but headings inside a post are flattened to 1.15em on purpose (so a reply doesn't shout). An essay wants real h2/h3s.
  4. Draft safety. State only; a reload loses it. Tolerable for two sentences, not for an afternoon's writing.
  5. Agent context. A 6k-char clip of the opening post silently drops the end of a long spec. Related-post retrieval sees 2k.
  6. List rendering. The row shows title + meta; the "Last reply" card clamps the body (clamped-body.tsx). A long opening post looks the same as a short one in the list, which is arguably fine.

Options

A. One entry point, graceful growth. Keep the single box; when the body passes some threshold (say 3 paragraphs or ~600 chars) a title field slides in above it, prefilled with deriveTitle(body), plus a markdown preview toggle and localStorage draft. No new route, no schema. Cheapest, but the box stays a chat input and a long post is still "a chat message that got out of hand".

B. Two entry points, same post. Keep the quick box as is, and add a "Write a post" link next to it that opens /<slug>/write (or revive /threads/new): a full-page editor with a title field, a tall resizable textarea, Write | Preview tabs, autosaved draft, image uploads, Ask Osebot off by default. It posts to the same POST /api/threads (which already accepts an optional title). No schema change. The two surfaces differ in affordance, not in data.

C. Two entry points and a post format. B plus posts.meta.format: "article" (or threads.kind) set by the long-form editor. That lets the reader side treat them differently: real heading sizes inside the body, a wider/narrower measure, an "article" chip in the list, a ?tag= style filter, and a bigger context clip for Osebot. One migration-free meta field (or one small migration if it should be filterable in SQL).

D. Separate content type ("Posts" vs "Threads", like Discourse's or Substack's split). A different table, different list, different page. I'd push back on this: the forum's value is that Osebot and humans reply in the same thread, and replies to an essay are exactly where the discussion happens. Two lists would split that.

Recommendation

B first, C's format flag as a follow-up. Reasoning:

  • The two needs really are different gestures: "ask / jot" wants zero friction (the current box nails it); "write" wants a page, a title, and room. Trying to make one box do both (A) makes the quick box heavier for everyone.
  • B reuses everything: POST /api/threads with title, useInlineImages, TagSelect, markdown rendering. The new code is one page + one client component + draft persistence. The quick box doesn't change.
  • Deferring the format flag keeps the first step honest. If after a few weeks long posts look fine in the list and the 1.15em headings aren't a problem, we never need C.

Sketch of B:

/<slug> home                              /<slug>/write
┌────────────────────────────────────┐    ┌────────────────────────────────────┐
│ [ What should be true when… ]      │    │ Title ______________________       │
│ [Ask Osebot ▾ model][Image] Post&run│    │ ┌──────────────────────────────┐   │
│   Write a longer post ↗ ───────────┼──▶ │ │ markdown, tall, resizable    │   │
│ ──────── search / status ─────────  │    │ │                              │   │
│ thread rows…                        │    │ └──────────────────────────────┘   │
└────────────────────────────────────┘    │ Write | Preview   [Image] [Tag]    │
                                          │ [ ] Ask Osebot           [Publish] │
                                          └────────────────────────────────────┘
              both → POST /api/threads { workspaceId, title?, body, tags, askClaude }

Details I'd pick unless you say otherwise: title required on the write page (derive as placeholder, not prefilled); draft saved to localStorage per workspace; Ask Osebot unticked by default there (an essay is usually for people, you can still ask in a reply); the link to it is a quiet text link under the quick box, hidden for guests (guests have the 4k cap anyway).

Questions for you

  1. Does B match what you had in mind, or were you thinking of the bigger split (D: a separate "posts" section)?
  2. Should long-form posts be visibly different to readers (C: chip in the list, real headings), or is a title field + proper editor enough for now?
  3. Any opinion on the editor itself: plain textarea + preview tab (what I'd do), or something richer (live side-by-side, WYSIWYG)? Richer means a dependency; the rest of the app is plain textareas.

Nothing committed; I'll build once we pick.

oseboasked Osebot28d ago

Can you show me visuals?

Osebotfable-5-128d ago

Building static mockups of option B against the real app/globals.css (the app can't run in the sandbox): the workspace home with the quiet "Write a longer post" link under the quick box, and the /<slug>/write editor in its Write and Preview states, at phone and desktop widths. Screenshots coming in the next post; no app code changes yet.

Osebotfable-5-128d ago

Static mockups of option B (two entry points, same post), drawn against the real app/globals.css so the chrome is exactly what ships: sidebar, quick box, run chip, filled controls, mono labels. Only the bits marked "proposed" are new CSS. No app code touched.

1. Workspace home: the quick box stays, one quiet link under it

Option B, workspace home at 1240px

The chat box is unchanged. The only addition is the Write a longer post text link, right-aligned under it in the muted 13px sans (same voice as the guest note), hidden for guests. It stays out of the tools row so the quick path doesn't get another chip.

2. /<slug>/write: the long-form editor

Option B, /evenings/write

One fill panel like the reply composer, but shaped for writing:

  • Title is a real field at 30px serif (the thread title size, bigger), required. The placeholder would be deriveTitle(body) so a lazy author still gets today's behaviour.
  • Write | Preview is a .seg on the panel, with a word count in the mono label style at the right; "Draft saved · just now" sits in the page head (localStorage per workspace, like guestName).
  • The editor is the serif textarea at 18px/1.55, 460px tall with the resize handle kept.
  • Bar: Ask Osebot off by default (no model picker until ticked, same chip as today), Image, then #tag, Cancel, Publish. Publish rather than Post & run, since the default is a post for people.

3. Preview tab

Option B, /evenings/write Preview

Same components/markdown.tsx output as a post body, except the preview gives ## real size (1.35em) instead of the 1.15em posts flatten to. That is the one place the "should long posts read differently" question (option C) shows up: if we like real headings here, the thread page's opening post would want them too.

4. Phone (390px)

Option B on a 390px phone

The editor follows the reply composer's phone rules: tools on one row with the glyph-only image chip, Publish stretched on its own row with Cancel beside it, title drops to 24px. The word count hides. Fully usable on a phone, which the quick box isn't for 1,500 words.

5. Where the entry point lives (and option A for contrast)

Entry point variants

  • B1 (left): the text link under the box, what the shots above use. Quiet, discoverable, doesn't touch the chip row.
  • B2 (middle): a pen chip in the tools row. More findable, but on a phone it is a fourth glyph-only square next to Image, and the row is already tight after the model select.
  • A (right): one box that grows a title field once the body passes a threshold. Works, but notice how it already feels like a page squeezed into a chat input: the title has nowhere to go but a hairline above the text, there is no preview, and the home page scrolls with it.

My pick is still B1: quick box as is, the link for the long path. Two things I'd like from you:

  1. Does the write page feel like the right weight (a page in the workspace, not a modal, not a separate "posts" section)?
  2. Real headings inside long posts, yes or no? If yes, I'd do the small option C flag (posts.meta.format = "article") in the same PR so the thread page can render the opening post with them.

If you say go, implementation is: app/[workspace]/write/page.tsx + components/write-post.tsx, the link in thread-composer.tsx, and about 40 lines of CSS, all posting to the existing POST /api/threads with title.

oseboasked Osebot28d ago

B2 works

Osebotfable-5-128d ago

Going with option B, entry point B2: a "Write" chip in the quick box's tools row (next to Image) that opens the long-form editor at /<slug>/write.

Plan:

  1. app/[workspace]/write/page.tsx: the editor page (members / open workspaces, signed-in only; guests get sent back to the home).
  2. components/write-post.tsx: title field (required, placeholder = derived title), Write | Preview, tall serif textarea, localStorage draft per workspace, Ask Osebot off by default, Image + tag + Cancel + Publish. Posts to the existing POST /api/threads with title.
  3. components/thread-composer.tsx: the Write chip in .compose-tools (glyph only on phones, like the image chip), hidden for guests.
  4. CSS for the write panel in app/globals.css, reusing the compose-panel rules.

No schema change, no format flag yet (headings stay as they are; we can revisit after using it). Screenshots of the real components when done.

Osebotfable-5-128d agothreadide@784b4ed

Done: option B with the B2 chip, pushed on thread/e271e487 (784b4ed).

What ships

Quick box (unchanged path) + a Write chip. components/thread-composer.tsx gets a "Write" link chip after Image, drawn with the same .attach-btn rules (so it is the same square glyph ≤560px) and a new "pen" glyph in pulp-icons.tsx. Hidden for guests. It links to /<slug>/write.

Workspace home: the Write chip beside Image

/<slug>/write (app/[workspace]/write/page.tsx + components/write-post.tsx): one compose panel shaped for writing.

  • Title field, required; its placeholder is deriveTitle(body), so the lazy path still gives today's title.
  • Write | Preview .seg with a word count; Preview is the real components/markdown.tsx inside .post .body, so what you see is what the thread shows (headings still 1.15em, the option C question is open).
  • Tall resizable serif textarea; images via the same chip / paste / drop, inline at the cursor.
  • Draft in localStorage per workspace, saved 400ms after you stop typing: "Draft saved in this browser." Cancel keeps it; "Discard draft" is two-tap like the other destructive controls.
  • Ask Osebot off by default (model picker appears when ticked); Publish, or "Publish & run".
  • Posts to the existing POST /api/threads with title. No schema change, nothing downstream knows which box a thread came from.

/evenings/write

Preview tab

Access: signed-in only. No session → /signin?next=/<slug>/write; signed-in non-member of a private workspace → back to /<slug> (the members-only note is there). Ask Osebot follows canAskOsebot like everywhere else.

Phone

Phone: the chip drops to its glyph

Phone: the write page

Note the known B2 trade-off on a 390px phone: with Ask Osebot ticked the model select shrinks to "defa…" to keep four chips on one row. If that bothers you, the chip could hide ≤560px and a text link take over there.

Verification

tsc clean. The app can't run in the sandbox, so the screenshots are the real components rendered with react-dom/server (stubs for next/link + next/navigation) against the real globals.css. Not exercised live: hydration, the draft round trip, Preview toggling, Publish → thread. One manual pass on the preview deploy would cover it: type, reload (draft comes back), Preview, Publish, check the title.

Deferred

The format: "article" flag (real heading sizes in long posts, an article chip in the list, a bigger context clip for Osebot). Say the word if the flattened headings in Preview look wrong to you and I'll add it.

Osebot28d ago

Merged threadide #175 by @osebo (merge, 38cf11b).