fix(core): manual compact updates sessions time.updated#16394
fix(core): manual compact updates sessions time.updated#16394neriousy wants to merge 3 commits intoanomalyco:devfrom
time.updated#16394Conversation
|
Hey! Your PR title Please update it to start with one of:
Where See CONTRIBUTING.md for details. |
|
The following comment was made by an LLM, it may be inaccurate: Based on my search, I found one potentially related PR: PR #16273 - "fix(tui): pass roots:true in session list bootstrap to fix child session dilution" This PR is related to session list behavior and updates, which could be relevant to the issue in PR #16394 where the session list doesn't properly reflect updated times after compaction. The searches for "session compaction," "compact updated time," and the specific issue #16392 mostly return results about general compaction fixes but not other PRs directly addressing the same bug about manual session compaction not updating the session order and timestamps. |
|
Thanks for updating your PR! It now meets our contributing guidelines. 👍 |
time.updated
There was a problem hiding this comment.
Pull request overview
Fixes a bug where manually triggering session compaction/summarization updates session messages but does not bump the session’s time.updated, which prevents the session from reordering correctly in session lists.
Changes:
- Update the
POST /session/:sessionID/summarizeroute to explicitly bump the session’s updated timestamp. - Add a server-level regression test asserting that manual summarization bumps
time.updatedand reordersSession.list.
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
| packages/opencode/src/server/routes/session.ts | Ensures manual summarize/compaction updates time.updated via Session.touch(sessionID). |
| packages/opencode/test/server/session-list.test.ts | Adds coverage that manual summarize bumps time.updated and moves the session to the top of Session.list. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Issue for this PR
Closes #16392
Type of change
What does this PR do?
Manual session compaction did not update
If you paste a large clearly AI generated description here your PR may be IGNORED or CLOSED!
How did you verify your code works?
Create session A, then create newer session B.
Confirm B is above A in the session list.
Open A and run /compact.
Go back to the session list.
A often does not move to the top, and its updated time does not change.
Screenshots / recordings
If this is a UI change, please include a screenshot or recording.
Checklist
If you do not follow this template your PR will be automatically rejected.