Skip to content

feedback_check card renders nothing for summary-only results; legacy skill tokens leak absolute paths #25

Closed

Description

@superman2003

Summary

Two defects in conversation tool rendering.

1. A feedback_check result with only a summary renders nothing

FeedbackCheckResultCard.tsx builds its entries like this:

const envelope =
  Array.isArray(record.feedback) || typeof record.count === 'number'
    ? record
    : record.structuredContent && ... ? record.structuredContent : null;
if (!envelope || !Array.isArray(envelope.feedback)) return [];

and then:

if (entries.length === 0) return null;

So a result shaped { summary: 'No blocking issues' } — no feedback array,
no count, no structuredContent — yields [], and the component returns
null. The entire completed tool call disappears from the timeline: no
card, no label, no status, just a gap where the call was.

The card also never surfaces the check argument, so even when it does render
there is no indication of what was checked.

Covered by ToolCards.test.tsx > routes feedback check results to a feedback card, which fails on master with an empty <body><div /></body>.

2. Legacy skill: tokens expose absolute on-disk paths

slashInvocationValue in sessionComposerStructuredTokens.ts:

if (trimmed.startsWith('/skill:') || key.startsWith('skill:')) {
  return { type: '/', name: lastCommandSegment(key.startsWith('skill:') ? key : trimmed) };
}

lastCommandSegment splits on : and takes the last segment. That works for
skill:<dir>:<command>, but for a key with no second colon —
skill:/Users/mac/.codex/skills/drawio/drawio — the last segment is the whole
path, so the composer chip is labelled:

//Users/mac/.codex/skills/drawio/drawio

instead of /drawio. The user's home directory and local layout end up
rendered in the conversation.

Covered by UserMessageMarkdown.test.tsx > renders a legacy path-backed skill token with its short command label, which fails on master.

Reproduce

cd frontend
pnpm exec vitest run src/components/NormalizedConversation/tools/ToolCards.test.tsx
pnpm exec vitest run src/components/NormalizedConversation/UserMessageMarkdown.test.tsx

Both fixed in #20. Related: #21

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions