Skip to content

fix(core): manual compact updates sessions time.updated#16394

Open
neriousy wants to merge 3 commits intoanomalyco:devfrom
neriousy:opencode/hidden-mountain
Open

fix(core): manual compact updates sessions time.updated#16394
neriousy wants to merge 3 commits intoanomalyco:devfrom
neriousy:opencode/hidden-mountain

Conversation

@neriousy
Copy link
Contributor

@neriousy neriousy commented Mar 6, 2026

Issue for this PR

Closes #16392

Type of change

  • Bug fix
  • New feature
  • Refactor / code improvement
  • Documentation

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

  • I have tested my changes locally
  • I have not included unrelated changes in this PR

If you do not follow this template your PR will be automatically rejected.

Copilot AI review requested due to automatic review settings March 6, 2026 20:24
@github-actions github-actions bot added the needs:compliance This means the issue will auto-close after 2 hours. label Mar 6, 2026
@github-actions
Copy link
Contributor

github-actions bot commented Mar 6, 2026

Hey! Your PR title Opencode/hidden mountain doesn't follow conventional commit format.

Please update it to start with one of:

  • feat: or feat(scope): new feature
  • fix: or fix(scope): bug fix
  • docs: or docs(scope): documentation changes
  • chore: or chore(scope): maintenance tasks
  • refactor: or refactor(scope): code refactoring
  • test: or test(scope): adding or updating tests

Where scope is the package name (e.g., app, desktop, opencode).

See CONTRIBUTING.md for details.

@neriousy neriousy marked this pull request as draft March 6, 2026 20:25
@github-actions
Copy link
Contributor

github-actions bot commented Mar 6, 2026

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"
#16273

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.

@github-actions github-actions bot removed the needs:compliance This means the issue will auto-close after 2 hours. label Mar 6, 2026
@github-actions
Copy link
Contributor

github-actions bot commented Mar 6, 2026

Thanks for updating your PR! It now meets our contributing guidelines. 👍

@neriousy neriousy changed the title Opencode/hidden mountain fix(core): manual compact updates sessions time.updated Mar 6, 2026
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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/summarize route to explicitly bump the session’s updated timestamp.
  • Add a server-level regression test asserting that manual summarization bumps time.updated and reorders Session.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.

@neriousy neriousy marked this pull request as ready for review March 6, 2026 20:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Manual session compaction updates messages but does not bump the session's time.updated.

2 participants