fix: align archive all action in VS Code header

Moves the archive all sessions action to the right side of the header
Keeps the sessions title focused on text only
This commit is contained in:
Bohdan Triapitsyn
2026-06-10 15:28:24 +03:00
parent 12c8cbf544
commit 2c0749ef1d
2 changed files with 5 additions and 9 deletions
@@ -10,6 +10,7 @@ import { useConfigStore } from '@/stores/useConfigStore';
import { resolveGlobalSessionDirectory, useGlobalSessionsStore } from '@/stores/useGlobalSessionsStore';
import { ContextUsageDisplay } from '@/components/ui/ContextUsageDisplay';
import { McpDropdown } from '@/components/mcp/McpDropdown';
import { ArchiveAllDropdown } from '@/components/session/ArchiveAllDropdown';
import { SessionSwitcherDropdown } from '@/components/session/SessionSwitcherDropdown';
import { SessionsTabTitle } from '@/components/session/SessionsTabTitle';
import { useProjectsStore } from '@/stores/useProjectsStore';
@@ -813,9 +814,10 @@ const VSCodeHeader: React.FC<VSCodeHeaderProps> = ({ title, showBack, onBack, on
</button>
</SessionSwitcherDropdown>
) : (
<SessionsTabTitle title={title} onArchiveAll={onArchiveAll} />
<SessionsTabTitle title={title} />
)}
<div className="min-w-0 flex-1" />
{onArchiveAll && <ArchiveAllDropdown onArchiveAll={onArchiveAll} />}
{onNewSession && (
<button
onClick={onNewSession}
@@ -1,16 +1,10 @@
import React from 'react';
import { ArchiveAllDropdown } from '@/components/session/ArchiveAllDropdown';
interface SessionsTabTitleProps {
title: string;
onArchiveAll?: () => void;
}
const SessionsTabTitle: React.FC<SessionsTabTitleProps> = ({ title, onArchiveAll }) => (
<>
<h1 className="text-sm font-medium truncate flex-1" title={title}>{title}</h1>
{onArchiveAll && <ArchiveAllDropdown onArchiveAll={onArchiveAll} />}
</>
const SessionsTabTitle: React.FC<SessionsTabTitleProps> = ({ title }) => (
<h1 className="text-sm font-medium truncate" title={title}>{title}</h1>
);
export { SessionsTabTitle };