Conversation
|
The following comment was made by an LLM, it may be inaccurate: I found a related PR, though it's in a different component: Related PR:
Note: This is listed in the PR description as a related issue (Related: #38787, #42589, #39806, #42461), so it's not a duplicate but rather a complementary fix to the same underlying problem. No duplicate PRs found |
b47e13a to
135d659
Compare
The ID format is unchanged in this PR (still wraps every ~795 days), this is tracked in #39806 |
Scope: fixes redo ("next user message after revert point") and child-session ordering, which previously relied on lexicographic message/session ID comparison — broken because the 48-bit time prefix in IDs wraps (~every 795 days), making fresh
|
|
Automated PR Cleanup Thank you for contributing to opencode. Due to the high volume of PRs from users and AI agents, we periodically close older PRs using automated criteria so maintainers can focus review time on the most active and community-supported contributions. This PR was closed because it matched the following cleanup criteria:
PRs created within the last month are not affected by this cleanup. If you believe this PR was closed incorrectly, or if you are still actively working on it, please leave a comment explaining why it should be reopened. A maintainer can review and reopen it if appropriate. Thanks again for taking the time to contribute. |
Issue for this PR
Closes #42583
Related: #38787, #42589, #39806, #42461
Type of change
What does this PR do?
Message and session IDs contain a time field that wraps around every ~795 days. After a wrap, comparing IDs as strings no longer matches their real order in time.
Two places in the TUI still compared IDs as strings:
Also added a test making sure
trimSessionskeeps its output ordered by ID, since the app looks sessions up in that list by ID.This follows up on #40991/#40990, which removed the same kind of ID comparison on the server.
How did you verify your code works?
bun test test/util/inpackages/tuibun typecheckclean in new codeScreenshots / recordings
None
Checklist