Skip to content

web: Group tool-result resource_links in a scrollable "Resource Links" box, styled like other list entry cards #1685

Description

@cliffhall

When a tool result contains resource_link content blocks, they render as a flat list of bordered cards directly in the Results panel (see ToolResultPanel). This issue tracks grouping them into a scrollable, Protocol-styled box and polishing the individual link cards.

Scope (as delivered)

  1. Grouped, full-height "Resource Links" box. Consecutive resource_link blocks are coalesced into one bordered, internally-scrollable Resource Links box with a pinned heading — mirroring the Messages box in the Protocol monitoring sidebar (ProtocolListPanel). When a result contains links, the result card fills the pane and the box grows into the available height and scrolls within; plain text/image/error results keep their content-sized card.

  2. Match the Protocol message colors. Each link card uses the same recessed inset surface as ProtocolEntry (--inspector-surface-inset) in both light and dark modes; nested read-result Code blocks read as raised via the inset cascade variable.

  3. Card layout & controls aligned with ProtocolEntry.

    • Name on the header row (left) with the MIME badge on the right; URI on the row below with a CopyButton, and the expand/collapse control at the end of that row.
    • Expand/collapse uses the same tooltip'd ExpandToggle as ProtocolEntry, and the read-result panel animates with Mantine's Collapse.
    • MIME badge sized to match the Protocol method/status badges; solid dark-blue + white text in dark mode, blue-light tint in light mode.
    • URI rendered like ProtocolEntry/NetworkEntry URLs (sm / fw: 500, sans-serif, default color) rather than a blue monospace link.
  4. Drop misleading metadata. The server-generated description (e.g. a blob served as text/plain described as a "plaintext resource") and the redundant green "Resource:" label are removed.

Acceptance

  • resource_link blocks render inside a bordered, scrollable "Resource Links" box that fills the result card and scrolls internally.
  • Each link card matches ProtocolEntry's inset colors, badge, toggle, and URL styling in light and dark modes.
  • Non-link content blocks continue to render as before, in order, in a content-sized card.
  • Tests + stories updated; per-file ≥90% coverage maintained.

Delivered in PR #1686.

Metadata

Metadata

Assignees

Labels

v2Issues and PRs for v2

Type

No type

Fields

No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions