Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions src/components/HistoryPanel.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -237,8 +237,8 @@ export function HistoryPanel({

return (
<div className="history-panel flex flex-col w-full">
{/* Search input — hidden when only showing the new-conversation confirmation */}
{!pendingNewConversation && (
{/* Search input — hidden when showing any confirmation prompt */}
{pendingId === null && !pendingNewConversation && (
<div className="px-3 pt-3 pb-2 border-b border-surface-border">
<input
type="text"
Expand Down
3 changes: 2 additions & 1 deletion src/components/__tests__/HistoryPanel.test.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -147,7 +147,7 @@ describe('HistoryPanel', () => {
expect(props.onLoadConversation).toHaveBeenCalledWith('c1');
});

it('shows SwitchConfirmation when hasCurrentMessages is true and item clicked', async () => {
it('shows SwitchConfirmation and hides search when hasCurrentMessages is true and item clicked', async () => {
const props = makeProps({ hasCurrentMessages: true });
render(<HistoryPanel {...props} />);

Expand All @@ -156,6 +156,7 @@ describe('HistoryPanel', () => {
fireEvent.click(screen.getByRole('button', { name: /react basics/i }));

expect(screen.getByText(/switch conversations/i)).toBeInTheDocument();
expect(screen.queryByPlaceholderText(/search/i)).toBeNull();
expect(props.onLoadConversation).not.toHaveBeenCalled();
});

Expand Down
Loading