Skip to content
Open
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
15 changes: 3 additions & 12 deletions src/components/features/conversation-panel/conversation-panel.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -265,16 +265,7 @@ export function ConversationPanel({
showOlderConversations,
]);

const compactVisibleConversations = React.useMemo(
() =>
sortConversationsByField(
recentScoped.filter((conversation) =>
isExecutionActive(conversation.execution_status),
),
conversationSort,
),
[conversationSort, recentScoped],
);
const compactVisibleConversations = sortedVisibleConversations;

const visibleFlatCount = sortedVisibleConversations.length;

Expand All @@ -300,8 +291,8 @@ export function ConversationPanel({
// pagination, which previously caused the panel to feel like it had stray
// scrollable space at the bottom.
const olderHidden = olderScoped.length > 0 && !showOlderConversations;
// Compact mode also hides "Load more" — paginating into archived
// conversations contradicts the "active only" intent of the icon rail.
// Compact mode also hides "Load more" — the icon rail should stay small
// and use the same currently visible conversation set as the expanded list.
// Do not show when the visible list is empty (e.g. filters hide every
// loaded conversation) — that state already shows "No conversations found".
const showLoadMore =
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,18 +23,14 @@ interface SidebarConversationListProps {
export function SidebarConversationList({
collapsed,
}: SidebarConversationListProps) {
if (collapsed) {
return null;
}

return (
<div className="flex flex-col flex-1 min-h-0">
{/* Avoid overflow-hidden here: ConversationPanel's header uses `-ml-2.5` +
`w-[calc(100%+0.625rem)]` to full-bleed the divider with `md:pr-0` on
the aside; clipping would inset the border. Scroll stays on the inner
list. */}
<div className="flex min-h-0 w-full flex-1 flex-col">
<ConversationPanel />
<ConversationPanel compact={collapsed} />
</div>
</div>
);
Expand Down
27 changes: 27 additions & 0 deletions tests/e2e/mock-llm/conversations/mock-llm-conversation.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -421,5 +421,32 @@ test.describe("mock-LLM agent-server conversation", () => {
const errorBanner = page.getByTestId("error-message-banner");
await expect(errorBanner).not.toBeVisible({ timeout: 2_000 });
});

await test.step("resume conversation from collapsed sidebar", async () => {
await page.goto("/", { waitUntil: "domcontentloaded" });
await dismissAnalyticsModal(page);

const expandedConversationLink = page.locator(
`a[href*="/conversations/${step3ConversationId}"]`,
);
await expect(expandedConversationLink.first()).toBeVisible({
timeout: 10_000,
});

const collapseToggle = page.getByTestId("sidebar-collapse-toggle").first();
await expect(collapseToggle).toBeVisible({ timeout: 5_000 });
if ((await collapseToggle.getAttribute("aria-pressed")) !== "true") {
await collapseToggle.click();
}

const compactConversationRow = page.locator(
`[data-testid="compact-conversation-row"][data-conversation-id="${step3ConversationId}"]`,
);
await expect(compactConversationRow).toBeVisible({ timeout: 10_000 });
await compactConversationRow.click();

await waitForPath(page, /\/conversations\/.+/, 15_000);
expect(page.url()).toContain(step3ConversationId);
});
});
});
Loading