Skip to content
Closed
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
6 changes: 5 additions & 1 deletion packages/cli/src/serve/server/session-list.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1586,7 +1586,11 @@ export async function searchWorkspaceSessionsForResponse(
for (const hit of hits) {
readOptions.signal?.throwIfAborted();
const item = await sessionService.getSessionListItem(hit.sessionId);
if (item?.sourceType !== MESH_HOST_SESSION_SOURCE_TYPE)
// Both conditions, and in this order. `item?.sourceType !== X` is true
// when the read found nothing, so folding the existence check into the
// optional chain lets a session that vanished between the search hit and
// this read through as an undefined summary.
if (item && item.sourceType !== MESH_HOST_SESSION_SOURCE_TYPE)
bySessionId.set(
hit.sessionId,
applyOrganization(
Expand Down
Loading