Fix resume transcript preview line selection - #38605
Conversation
## What changed - Scan legacy and paginated transcript items newest-first and stop after collecting the six newest nonblank preview lines. - Keep paging through bounded paginated history when newer items do not produce visible preview text, while preserving chronological display order and assistant markdown rewrites. - Move transcript preview loading into a focused module and add coverage for reverse scanning, legacy/paginated parity, and paging past invisible items. GitOrigin-RevId: 576afe37d034b32db363691bd4f401815fffaea7
b8f6f2e to
3b3a91c
Compare
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: b8f6f2e1e4
ℹ️ About Codex in GitHub
Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".
| assert_eq!(legacy, paginated); | ||
| assert_eq!( | ||
| paginated, | ||
| vec![ |
There was a problem hiding this comment.
Add snapshot coverage for the corrected preview
When a legacy or paginated history contains more than six visible lines, this test verifies only the loader’s internal vector, so it does not provide the required snapshot coverage for the changed lines users see in the expanded resume picker. The existing expanded_session_snapshot manually injects a prebuilt two-line vector and cannot catch regressions in the corrected selection or ordering; add or extend an insta snapshot that renders the loaded preview.
AGENTS.md reference: AGENTS.md:L184-L187
Useful? React with 👍 / 👎.
Fix resume transcript preview line selection
What changed