Public: anyone can read this; the crew can change it.
Talk on a phone, still wrong after #16552 landed: conversation history loads… #16561
I could not reproduce the reversal in a browser, and I did not run any of the new Chromium tests. This sandbox refuses Chromium, so the four #16552 tests and my two new ones all skip here. I also could not get a signed-in 360 px session on production.
stopped closed without shipping deploy 8cfea60
2 earlier comments
I could not reproduce the reversal in a browser, and I did not run any of the new Chromium tests. This sandbox refuses Chromium, so the four #16552 tests and my two new ones all skip here. I also could not get a signed-in 360 px session on production. I did check the code and the server's HTML, and I fixed the one thing that behaves like a reversal.
What I found
- Server order is correct.
listTurnstakes the newest 50 and reverses them, so a page reads oldest to newest. The chat list isORDER BY pinned_at IS NULL, updated_at DESC, so newest first. Nothing in the markup, CSS or client script reverses either one. - "Earlier" was the likely culprit for reading 1. It was a plain link to
?before=<id>. That opens a separate page holding the older 50, and the page then scrolls to its own end, so you land on the newest of the older messages and read upward. Each further "Earlier" repeats that, so the history seems to arrive backwards and you lose your place. This is my best explanation, not something I saw happen. - Reading 2 (chat list) is unconfirmed. Nothing in the code points to a cause, and only a browser run would tell.
- #16552's phone tests probably never ran in the check.
test/talk-phone.test.tswas a plain.test.tsfile, which the gate runs but where no Chromium starts, so its browser tests skip. The check's looks lane only picks up*.looks.test.ts. I could not read the check's own log from here, so confirm the lane ran with a Chromium on the first push. - The push check may not run tests at all. forge.json's
check.runis onlygate.tsplustsc; onlyfast,fullandverifyrun tests. The check never ran those four tests, so green meant nothing for #16552's fixes.
What changed
src/web/pages/talk.tsandsrc/web/pages/talk_client.ts: "Earlier" now fetches the older page and puts its turns above the log, oldest first. It keeps the message you were reading where it is, using that message's position before and after the insert. It shows "Latest" through the existing jump button and does not touch the live stream. Without the script, or if the fetch fails, the link still opens the older page. I reuseddecorate,sc,drawand the existingstuckflag.test/talk-phone.test.tsis renamedtest/talk-phone.looks.test.tsso the looks lane runs it, and thescripts/phone-persona/brief.mdreference is updated. I added two phone-width browser tests in it. Both use a 120-message chat. One checks oldest-to-newest order and that the chat opens at the newest. The other checks that "Earlier" prepends in order and the reading position holds to within 2 px.- New
test/talk-history-order.test.tsruns in the gate with no browser. It checks that the latest page is 70..119 in order, "Earlier" is 20..69 in order, the link carriesdata-earlier, and the chat list is newest first. The old no-browser test moved here, because the looks lane is outside the gate. gate.ts,tscanddesign-lintare clean.test/talk-history-order.test.ts,talk-page,talk-layoutandclient-sizepass. The fast tier named too many test files to run here.
Not done
- No second-guessing of the chat list ordering or its scroll-to-top without browser evidence.
- I did not change forge.json's
check.run; making the push check run tests is a separate call for a person. - Nothing for the owner's further mobile notes; those belong in separate issues under #16442.
How to try it Open a chat with more than 50 messages on a phone. It opens at the newest message. Scroll to the top and tap "Earlier": older messages appear above, in order, and the view stays on the message you were reading.
[{"go":"/talk","look":"a chat with more than 50 messages at 360px; it opens at the newest, oldest above","expect":"newest message at the bottom, in view"},{"go":"/talk","look":"scroll to the top and tap Earlier","expect":"older messages appear above in order; the message you were reading has not moved; Latest shows"},{"go":"/talk?chats=1","look":"the chat list at 360px","expect":"newest chat first, page at the top"}]
🤖 Generated with Claude Code
<!-- look-pages 8cfea60e4ad7 --> Look pages for 8cfea60, from the gate:
look pages (inferred): this pull changes src/web/pages/talk.ts, src/web/pages/talk_client.ts; the forge pictures /talk (src/web/pages/talk.ts), the pages whose routes import it. A "Looks: <path>" or "No look: <why>" line in a commit message overrides
I could not reproduce the reversal in a browser, and I did not run any of the new Chromium tests. This sandbox refuses Chromium, so the four #16552 tests and my two new ones all skip here. I also could not get a signed-in 360 px session on production. I did check the code and the server's HTML, and I fixed the one thing that behaves like a reversal.
What I found
listTurnstakes the newest 50 and reverses them, so a page reads oldest to newest. The chat list isORDER BY pinned_at IS NULL, updated_at DESC, so newest first. Nothing in the markup, CSS or client script reverses either one.?before=<id>. That opens a separate page holding the older 50, and the page then scrolls to its own end, so you land on the newest of the older messages and read upward. Each further "Earlier" repeats that, so the history seems to arrive backwards and you lose your place. This is my best explanation, not something I saw happen.test/talk-phone.test.tswas a plain.test.tsfile, which the gate runs but where no Chromium starts, so its browser tests skip. The check's looks lane only picks up*.looks.test.ts. I could not read the check's own log from here, so confirm the lane ran with a Chromium on the first push.check.runis onlygate.tsplustsc; onlyfast,fullandverifyrun tests. The check never ran those four tests, so green meant nothing for #16552's fixes.What changed
src/web/pages/talk.tsandsrc/web/pages/talk_client.ts: "Earlier" now fetches the older page and puts its turns above the log, oldest first. It keeps the message you were reading where it is, using that message's position before and after the insert. It shows "Latest" through the existing jump button and does not touch the live stream. Without the script, or if the fetch fails, the link still opens the older page. I reuseddecorate,sc,drawand the existingstuckflag.test/talk-phone.test.tsis renamedtest/talk-phone.looks.test.tsso the looks lane runs it, and thescripts/phone-persona/brief.mdreference is updated. I added two phone-width browser tests in it. Both use a 120-message chat. One checks oldest-to-newest order and that the chat opens at the newest. The other checks that "Earlier" prepends in order and the reading position holds to within 2 px.test/talk-history-order.test.tsruns in the gate with no browser. It checks that the latest page is 70..119 in order, "Earlier" is 20..69 in order, the link carriesdata-earlier, and the chat list is newest first. The old no-browser test moved here, because the looks lane is outside the gate.gate.ts,tscanddesign-lintare clean.test/talk-history-order.test.ts,talk-page,talk-layoutandclient-sizepass. The fast tier named too many test files to run here.Not done
check.run; making the push check run tests is a separate call for a person.How to try it Open a chat with more than 50 messages on a phone. It opens at the newest message. Scroll to the top and tap "Earlier": older messages appear above, in order, and the view stays on the message you were reading.
🤖 Generated with Claude Code
Closes #16560