fix(chats): use a dedicated empty message

Show a localized Chats-specific empty state instead of reusing the project workspace session message.
This commit is contained in:
Bohdan Triapitsyn
2026-08-22 11:41:59 +03:00
parent 952e8d6463
commit 735a9463ca
15 changed files with 16 additions and 2 deletions
@@ -1790,10 +1790,11 @@ const SessionSidebarComponent: React.FC<SessionSidebarProps> = ({
folderScopeKey: chatsRoot,
folderScopes,
draftTarget: 'chat',
emptyMessage: t('sessions.sidebar.activity.chatsEmpty'),
sessions: items.map((item) => item.node),
};
return renderGroupSessions(group, 'managed-chats', null, true);
}, [homeDirectory, renderGroupSessions, renderSessionNode]);
}, [homeDirectory, renderGroupSessions, renderSessionNode, t]);
const topContent = React.useMemo(
() => (!isVSCode && !hasSessionSearchQuery && hasActivitySectionItems) ? (
@@ -16,6 +16,7 @@
- Root session menus can quickly create a worktree from the session directory's current branch and move the full session subtree there while idle.
- Managed Chats never offer the worktree-move action in either the sidebar row menu or the active-session header menu because their directories are not project repositories.
- Managed Chats use the shared Chats root as their folder scope. Their activity section renders the normal folder tree, and sessions created from a Chats folder are assigned back to that root-scoped folder after their date/session directory materializes. Per-session folder scopes created by older builds remain visible for compatibility.
- An empty Chats section says that there are no chats yet; it never reuses the project/workspace empty message.
- The New session keyboard command inherits the active materialized session directory. Explicit sidebar entry points, including the top New session row and the Chats `+`, open a fresh managed Chat draft instead.
- The new-worktree keyboard command is a silent no-op while a managed Chat draft is open. It must not retarget that draft to the active project or show a Git/worktree error because Chats never participate in worktrees.
- Directory loading is demand-driven: the sidebar publishes one complete priority plan for all known project/worktree directories, while the sync layer owns bounded execution.
@@ -1056,7 +1056,7 @@ function SessionGroupSectionBase(props: Props): React.ReactNode {
)
: bootstrapFailureNotice
? bootstrapFailureNotice
: t('sessions.sidebar.group.empty.noSessionsInWorkspace')}
: group.emptyMessage ?? t('sessions.sidebar.group.empty.noSessionsInWorkspace')}
</div>
) : null}
{totalSessions > 0 && bootstrapFailureNotice ? (
@@ -30,6 +30,7 @@ export type SessionGroup = {
*/
folderScopes?: SessionGroupFolderScope[];
draftTarget?: 'chat' | 'project';
emptyMessage?: string;
sessions: SessionNode[];
};