fix(chat): list quote-only user messages in the prompt navigator

Context parts are marked synthetic, so a message made only of quoted
fragments was skipped as an injected message and could not be navigated
to. Such turns now appear with the same caption the bubble shows.
This commit is contained in:
Bohdan Triapitsyn
2026-08-29 02:02:30 +03:00
parent e26f647404
commit fb9e13a3a7
7 changed files with 182 additions and 10 deletions
@@ -56,6 +56,7 @@ import { WorkStatusPanel } from './work-status/WorkStatusPanel';
import { useWorkStatusVisibility } from './work-status/useWorkStatusVisibility';
import { getEmbeddedSessionChatOriginSessionId } from '@/components/layout/contextPanelEmbeddedChat';
import { isFullySyntheticMessage } from '@/lib/messages/synthetic';
import { hasContextParts } from '@/lib/messages/contextParts';
import { normalizeUserDisplayParts } from './message/normalizeUserDisplayParts';
import { findShellCommandForMessage, isUserShellMarkerMessage } from './lib/shellBridge';
import { resolveChatPromptReadOnly } from './chatPromptReadOnly';
@@ -262,7 +263,10 @@ const ChatViewport = React.memo(({
// Other fully synthetic user messages (loop continuations,
// plan-mode injections) are not prompts the user typed — keep
// them out of the navigator entirely.
if (isFullySyntheticMessage(message.parts)) {
// Attached context (a quoted message, a terminal selection) is
// synthetic transport-wise but is a turn the user sent, so a
// context-only message stays navigable.
if (isFullySyntheticMessage(message.parts) && !hasContextParts(message.parts)) {
continue;
}
let displayParts = normalizedPromptPartsCache.current.get(message.parts);