feat(agent): Unselect session when archiving currently selected session

When a session is archived and it was the currently selected session,
it is now automatically deselected and the empty state placeholder is
shown in the right panel.

- Updated SessionManagerProps to allow null for onSelectSession callback
- Added logic to deselect session on archive if it was selected
- Added data-testid attributes for testing
This commit is contained in:
Cody Seibert
2025-12-09 01:48:51 -05:00
parent 0af7938798
commit 010e6e139f
3 changed files with 10 additions and 5 deletions

View File

@@ -471,7 +471,7 @@ export function AgentView() {
{/* Messages */}
{!currentSessionId ? (
<div className="flex-1 flex items-center justify-center">
<div className="flex-1 flex items-center justify-center" data-testid="no-session-placeholder">
<div className="text-center">
<Bot className="w-12 h-12 text-muted-foreground mx-auto mb-4 opacity-50" />
<h2 className="text-lg font-semibold mb-2">