You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
## Problem
After compaction, workspaces would drop to the bottom of the sidebar
list. This happened because recency calculation only checked for user
messages, and compaction replaces chat history with a summary (assistant
message with `compacted: true`).
## Solution
Updated recency calculation to use a fallback:
1. **Prefer user messages** - avoids constant reordering during
concurrent streams
2. **Fall back to compacted messages** - prevents sinking to bottom
after compaction
3. **null if neither exists** - workspace has no activity
The compaction summary continues to use `Date.now()` as its timestamp,
so workspaces jump to the top after compaction (correct UX, since it's
active usage).
## Changes
- Renamed `WorkspaceState.lastUserMessageAt` → `recencyTimestamp` for
clearer semantics
- Added fallback logic to check compacted message timestamp when no user
messages exist
## Testing
- ✅ `make typecheck` passes
- ✅ `make test` passes (409 pass, 1 skip, 0 fail)
_Generated with `cmux`_
0 commit comments