Repository navigation
fix(chat): name a terminal-started Codex's model from its live screen, not a scrolled view - #2163
Conversation
…, not a scrolled view A Codex that reported no session takes its model from the footer under its composer. That read used herdr's viewport, so a terminal scrolled up to an earlier Codex frame (on this device or another) made the chat name that frame's model. Both start-screen reads now use the detection read, the live screen whatever the scroll. Also covers the client half of #1374: a scrollback or not-begun answer forwards the model its screen states, and terminal output re-reads it. DESIGN.md drops the stale catalog-era sentence. Refs #1428
herdr's detection read of a short screen reaches up into the history above it (herdr 0.9.5: a 7-line Codex frame after a clear read as 34 lines with the earlier output), so anything said there denied a fresh Codex its greeting. The model still comes from the detection read; whether Codex has begun nothing is decided on the viewport, and only while herdr reports it at the bottom before and after the read. Scrolled up, nothing proves it, and the terminal stands in with the model. Refs #1428
…olled into history during the read Review follow-ups: compare max_offset_from_bottom before and after the read too, so a device scrolling up and back between the two checks cannot pass a history frame; DESIGN.md rewrapped, with the greeting sentence after the answer it explains. Refs #1428
|
Warning Review limit reachedYou've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository. Next included review available in 8 minutes. View limit details
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
|
CodeRabbit was rate-limited and did not review this head (0e361bf). The gate reviews that ran:
The change touches no auth, takeover, queued input, HTTP/WS contract or workflow. |
Review of #2163 (merge pass): the detection read of a short screen reaches up into the history above it, so an older Claude banner above a live trust prompt, or an older Codex footer above a cleared screen, still named the model. Every start-screen read (the model of a conversation not begun, the session-less Codex fallback and its greeting) now goes through one liveScreen read: herdr's viewport while it reports the bottom with the same history before and after the read, else nothing, so no model is named while a device has the terminal scrolled up. Refs #1428
|
Merge pass review of 0e361bf: the MEDIUM is fixed in 4345422, and 98228b0 and 9c0d8bb take the follow-ups from the delta reviews.
|
…hen the viewport is the live screen Merge pass review of 9c0d8bb: herdr's pane scroll is optional, and with none bottomViewport read nothing, so launched Claude, Codex and gjc and a terminal Codex lost the model main showed. With no scroll for either read, the viewport now counts when its whole text equals the live screen's (as viewportShowsLive does); a detection read reaching into history still never stands in, and a scroll known for one read only proves nothing. Refs #1428
Codex review of 29bc376 (reproduced): with no scroll, pane.get gives no geometry, and a viewport scrolled up into the blank rows under a short screen reads the same as the live one, so the text-comparison fallback named an older model. Per Dori's decision (option A), no scroll reported, or a lookup that fails, names no model rather than a guessed one. This drops main's text-comparison fallback for a herdr that omits scroll; no supported herdr is known to. Refs #1428
|
Final fix round on #2163, for the merge pass review of 9c0d8bb (no-scroll MEDIUM) and Dori's decision.
|
|
Merging 99ea037 after three merge-pass review rounds:
Both reviewers pass the final delta: Codex rejected 11 mutations, and omo found LOW notes only. The required checks are green, and CodeRabbit did not review this head. The remaining notes and lane fix-1428's |
Problem
Follow-ups left open in #1428 after #1374 (item 1 was done in #1739):
visible), which follows the pane's scroll. If the terminal was scrolled up to an earlier frame, on this device or another, the chat named that frame's model as the current one.Refs #1428
Fix
server/conversation.tsaddsbottomViewport(): the pane's viewport, read while herdr reports it at the bottom with the same history before and after the read, else nothing.viewportShowsLivekeeps it for its own use.pane.getgives no geometry. A viewport scrolled up into the blank rows under a short screen then reads the same as the live one, so that fallback could name an older model (Codex review, reproduced).screenMetadata: Claude, Codex, gjc);codexFreshSession).detectionread is deliberately not used. On herdr 0.9.5 a detection read of a short screen reaches up into the history above it (after a clear, a 7-line frame read as 34 lines). An earlier version of this PR used it and was caught by the reviews:DESIGN.md: documents the live-screen rule and restates the "no pill" rule without the removed catalog.Tests
server/start-screen.contract.test.ts(isolated herdr): draws an old Codex frame (GPT-6-Luna medium), pushes it into the history under a live frame (GPT-6.1-Sol low) and scrolls the pane to the top./api/pane/conversationnames no model, and the read leaves the scroll where it was.server/conversation.test.ts:scripts/chat-fallback-browser-qa.tswith its fixture: a real ChatView on a page whose clock is paused, with pushes on, so neither the 2s poll nor the 10s backstop stands in for the re-read.codex-transcriptanswer markedscreenforward their model and listen to the terminal. Terminal output re-reads each exactly once and forwards the new model.Validation
bun run check run bun test ./server/start-screen.contract.test.ts: fails on main, passes on this branch.bun run check run --build bun scripts/chat-fallback-browser-qa.ts: pass.bun run check fast: pass.bottomViewport, away from the oppositeliveScreeninserver/dialogs/live.ts.server/conversation.tsis in the remote PC bundle; per docs/development.md only the release PR raisesREMOTE_BUNDLE_VERSION(release guards check it), so this PR leaves it at 38.