Repository navigation
Inbox: every section of the list reads newest first - #1800
Merged
Merged
Conversation
The owner saw Pi's older question above OpenCode's newer one in Waiting on you. Every section now sorts by the thread's latest message (last_at, the time the row shows), newest first; the section order and the held "N new" rule stay. Proof: tests/e2e/inbox-order.spec.ts in the inbox-e2e job.
1 task
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.
Story
The owner saw Pi's older question above OpenCode's newer one in "Waiting on you" and asked twice why the newer one was not on top. Every section of the Inbox list now reads newest first, by the thread's latest message. The section order and the held "N new" rule (PR 1772) do not change.
What changed
packages/shared/inbox/list.ts: one order for every section,last_atdescending (the time the row shows), ties on the thread id. The old per-section orders are gone: "oldest waiting first" for Stopped and Waiting, "most held up first, then oldest" for Holding.packages/server/inbox-threads.test.ts: the existing sections test now expects Waiting as["Flag name", "Header"]. Updated, not deleted.tests/e2e/inbox-order.spec.ts(new, inplaywright.config.tsand named ininbox-e2e.yml): Playwright against the compiled binary.AGENTS.mdInbox section: the sort line and the spec list.apps/ios) needs no change.PlannotatorKitdecodes the sections and drawslist.sectionsin the order the server sends (InboxList.swift). Nothing in the app sorts rows.What it makes real
The 2026-10-08 ruling: newest first in every section (Stopped on you, Holding up work, Waiting on you, Sent, New since you looked, Quiet). The window record's addendum comes from the overseer.
Proofs
bun run test:e2e:inbox(inbox-order.spec.ts). Three MCP SDK agents ask a question in the order Pi (A), OpenCode (B), Claude Code (C). Waiting on you reads C, B, A. A pick plus Send on A moves A to Sent ("Saved for Pi"), and Waiting reads C, B. A newer OpenCode message in B's thread waits behind "1 new in ledger" with the order on screen unchanged. After Show, B is first in Waiting. The page logs no errors. On the unfixedlist.ts, test 1 fails (it receives A, B, C).research/operational/mobile-proofs/INBOX-ORDER-2026-10-08/(1-waiting-newest-first, 2-reply-moves-a-to-sent, 3-newer-message-first).PLANNOTATOR_E2E_TAILNET).Gates
bun run typecheckgreen.bun test packages apps/hook tests scriptsunder a temp data dir: 5866 pass, 0 fail.bun run check:release-versiongreen. Nopackages/uiorpackages/corechange, so no smoke:package.Deviation, with the reason
last_at) in every section. That is the time each row shows, so the time column reads down in order, which is what the owner complained about. A per-section key (for example, the latest open question's time in Waiting) would need a new wire field, and rows could then look out of order against their own times. Consequence: a plain reply that leaves a question open moves its row to the top of its section, because the reply is the thread's newest message.waiting_sincestays on the wire row. Nothing sorts by it now. Removing it would change the contract the phone decodes, so it is left for a cleanup.Leaves out
The window record addendum (the overseer writes it). No change to which section a row is in.