[PR #5765] fix: sidebar updates for /undo and compacting #11576

Open
opened 2026-02-16 18:16:26 -05:00 by yindo · 0 comments
Owner

Original Pull Request: https://github.com/anomalyco/opencode/pull/5765

State: open
Merged: No


Adresses:
#5760 #4548

two very similar issues, so i batch fixed them. let me know if I should split it instead.

Issue:
compacting would not update the sidebar immediately after successful compaction and /undo does also not update Modified Files.

Cause:
Issue 1:
The /compact command triggers session.compacted event but session.compacted was NOT handled in
sync.tsx so the sidebar never updated

Issue 2:
/undo Command does not emit a session.diff event.
Only session.updated is published via Session.update causing the sidebar's Modified Files to never get updated.

Fix:
Issue 1:
Add handler for session.compacted

Issue 2:
After /revert emit a session.diff event with an empty diff array to clear the Modified Files list in the sidebar

**Original Pull Request:** https://github.com/anomalyco/opencode/pull/5765 **State:** open **Merged:** No --- Adresses: #5760 #4548 two very similar issues, so i batch fixed them. let me know if I should split it instead. **Issue:** compacting would not update the sidebar immediately after successful compaction and /undo does also not update Modified Files. **Cause:** _Issue 1:_ The /compact command triggers session.compacted event but session.compacted was NOT handled in sync.tsx so the sidebar never updated _Issue 2:_ /undo Command does not emit a session.diff event. Only session.updated is published via Session.update causing the sidebar's Modified Files to never get updated. **Fix:** _Issue 1:_ Add handler for session.compacted _Issue 2:_ After /revert emit a session.diff event with an empty diff array to clear the Modified Files list in the sidebar
yindo added the pull-request label 2026-02-16 18:16:26 -05:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: anomalyco/opencode#11576