Repository navigation
Conversation
Add an Oldest/Newest toggle to the stream view. Posts stay stored in createdAt order; Newest reverses the rendering only. Auto-follow and the new-post pill track whichever edge new posts land on. Timeline view is unaffected.
noczero
force-pushed
the
feat/stream-post-order
branch
from
November 11, 2026 02:48
03a86db to
700c2a8
Compare
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Oldest / Newest toggle in the session header, so the latest post can come first. Posts stay stored in
createdAtorder; Newest only reverses the stream rendering. No server, wire, or store changes.<SessionView> (viewer/src/App.tsx) <div.session-head> <SessionTitle> + <OrderToggle> # stream view only; postOrder() persisted in localStorage <ViewToggle> <div#stream> - <For each={posts}> + <For each={newestOnTop() ? [...posts].reverse() : posts}> <Card>Auto-follow and the new-post pill follow the edge where new posts land:
Timeline view is untouched: it is chronological by design (trace steps interleave by time) and the toggle hides there.
Evidence
New spec
e2e/viewer.spec.ts› "the stream can order posts newest first, and remembers it":Before (


main): posts oldest-first only, no order toggle.After, "Newest" selected: latest post on top.
Before (viewer from
main): new spec ✘locator.click: Test timeout of 30000ms exceeded, no "Newest" button.After: ✓ 1 passed.
Full suites:
npm test,npm run coverage,npm run test:worker,npm run typecheck,npm run lint,npm run test:e2e -- --project=chromium(92 passed). WebKit not run locally (missing host libraries).npm run security:auditfails on existing dependency advisories (e.g. zod); this PR doesn't touch dependencies.Merge Danger
Door: two-way
Viewer-only. Default stays "Oldest", so behaviour is unchanged until someone opts in. Revert drops the toggle; a leftover
sideshow-post-orderlocalStorage key is harmless.Blast Radius: viewer-header
The session header gains a second
.view-togglegroup. Selectors that assume one.view-togglewill match two:e2e/embed-slots.spec.tsnow targets the View mode group by role, and embedders styling or querying.view-toggleshould check theirs. Adds width to the header on narrow screens.