fix(cmux-next): keep workspace chats stable during updates

Closed
TE
19d ago
+250-6

Summary

Keep workspace and chat rows stable while live snapshots update. Equal-time chats now use durable IDs as a tie-breaker, and workspace title arrival is instant by default so switching does not crossfade two titles in one slot.

Changelog

Fixed workspace and chat switching flicker when multiple rows report the same recent timestamp.

Validation

  • cd webviews && bun test test/new-tab-steady-chats.test.tsx
  • cd webviews && bun run typecheck
  • Swift default regression test added for instant workspace title arrival.

Supersedes the contested codex/workspace-hitch-fix head for a stable exact-head merge receipt.


View with [code]smith Autofix with [code]smith
Need help on this PR? Tag @codesmith-bot with what you need.


Summary by cubic

Keeps workspace and chat rows stable while live snapshots update, and adds a priority ordering that surfaces actionable workspaces first.

  • Chats that share a timestamp now tie-break on their durable session ID, so snapshot arrival order can't flip rows.
  • Workspace title arrival is instant by default, so switching no longer crossfades two titles in one slot.
  • SidebarPriority moves actionable workspaces (needs input, failed, working) ahead of finished and idle rows, preserving manual order for ties and leaving pinned sections untouched.