I want a view that shows the last response with the link to a PR and merge button if it's available on the home page
Post view
Plan: add a "Last reply" view to the home page, toggled next to the existing Everyone | Yours / status filters (?view=replies, so it's shareable and survives a no-JS submit).
In that view each thread renders as a card instead of a title row:
- title + the usual meta line (status, author, workspace, age)
- the latest post in the thread (author avatar/name, kind, age) with its markdown body rendered like on the thread page, clipped to a max height with a fade and an "Open thread" link
- the thread's PR pills + Merge button, reusing the existing
MergePrspanel from the thread page (live state from/api/threads/[id]/prs, Merge = two-tap, members only, disabled while running). It loads lazily when the card scrolls into view so a long home page doesn't fan out into dozens of GitHub calls at once.
Data: listThreads gains a lastPost extra (one correlated subquery) and GET /api/threads returns lastPost + prs so the live filter/search path keeps working in the new view. The title-only view is unchanged and stays the default.
Code is in and typechecks (commit bb1d03b, not pushed yet). What landed:
- Home page toggle
Titles | Last reply(right end of the filter row,?view=replies). Switching never refetches — both views render the same rows. - Reply card = title + meta line, the thread's newest post rendered as markdown (clamped to 240px with a fade; "Show more" appears only when it actually overflows; "Open thread" deep-links to
#post-<id>), then the Pull requests panel. - The panel is the existing
MergePrsfrom the thread page, so behaviour is identical: live state badge (CI passing / conflicts / draft / blocked / merged…), two-tap Merge for members, disabled while running. Newlazyprop fetches/api/threads/[id]/prsonly when the card scrolls near the viewport; threads alreadymergedskip GitHub entirely. - Data:
listThreadshas alastPostextra (one correlated subquery, body clipped to 2000 chars server-side),lib/merge.ts threadsPullRequests()batches the PR lookup for a whole list, andGET /api/threadsreturns both.
Taking mockup screenshots now (the app can't run in the sandbox — no DB/OAuth), then pushing.
threadide@bb1d03bDone — pushed to thread/c1836fcc (bb1d03b).
What you get: on the home page, a Titles | Last reply switch at the right end of the filter row (/?view=replies). In "Last reply" each thread is a card: title + the usual meta line, the newest post rendered as markdown (clamped with a fade; "Show more" only when it really overflows; "Open thread" deep-links to that post), then the Pull requests panel — same MergePrs as the thread page, so same badges (CI passing / conflicts / draft / blocked / merged) and the same two-tap Merge for workspace members, disabled while Claude is running. Threads already marked merged show their PR links with a static "merged" pill and skip GitHub.
How it's wired (for whoever touches this next)
lib/data.ts listThreads→lastPostextra (one correlated subquery; body clipped to 2000 chars server-side,truncatedflag).lib/merge.ts threadsPullRequests(ids)batches the PR-meta lookup for the whole list;withPullRequests(rows)attachesprs.threadPullRequests(id)is now a thin wrapper.GET /api/threadsreturnslastPost+prs, so live search/filters keep working in the new view. Switching views never refetches (view is excluded from the browser's fetch key).MergePrsgotlazy(IntersectionObserver, fetches/prsonly when a card scrolls near) andonMerged(client-filtered lists refetch after a merge).- Shared
components/markdown.tsx(extracted from post.tsx) andcomponents/clamped-body.tsx.
Interpretation calls — shout if you want these flipped:
- "Last response" = the newest post by anyone (labelled with author + kind), not "Claude's last post". Easy to change to agent-only if you'd rather always see Claude's summary.
- Opt-in view; Titles stays the default. Could default to Last reply or remember the choice in localStorage.
- Home page only; the workspace page keeps the title list.
Verified: tsc --noEmit clean; layout checked via mockup on the real stylesheet at 900px and 390px (attached). Not run against a live DB/GitHub here (sandbox can't run the app) — worth loading /?view=replies once on the preview.
Merged threadide #75 by @osebo (merge, 1dfd95f).

