Skip to content

fix(seer-explorer): Key tool-call rows by id, not function+index#117365

Merged
trevor-e merged 2 commits into
masterfrom
telkins/seer-explorer-toolcall-key
Jun 10, 2026
Merged

fix(seer-explorer): Key tool-call rows by id, not function+index#117365
trevor-e merged 2 commits into
masterfrom
telkins/seer-explorer-toolcall-key

Conversation

@trevor-e

Copy link
Copy Markdown
Member

The React key for tool-call rows was ${toolCall.function}-${idx} — index-based (the classic anti-pattern) and not unique when a block makes two calls to the same tool, which produces duplicate keys and can mis-reconcile renders.

Key on toolCall.id instead. Tool-call ids are now non-null and stable across polls over the wire — getsentry/seer#6887 synthesizes a deterministic seer:{block_id}:{index} id when the provider (e.g. Gemini) omits one — so the id is safe to use as the key.

Best landed after/with getsentry/seer#6887, which guarantees the non-null stable id.

The React key was `${toolCall.function}-${idx}` — index-based and not unique
when a block has two calls to the same tool (duplicate keys). Tool-call ids are
now non-null and stable over the wire (getsentry/seer#6887 synthesizes one when
the provider omits it), so key on the id directly.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@github-actions github-actions Bot added the Scope: Frontend Automatically applied to PRs that change frontend components label Jun 10, 2026
@trevor-e trevor-e marked this pull request as ready for review June 10, 2026 20:32
@trevor-e trevor-e requested a review from a team as a code owner June 10, 2026 20:32
Comment thread static/app/views/seerExplorer/components/chat/toolUse.tsx Outdated
…null

ToolCall.id is typed nullable on the frontend, and the non-null guarantee only
holds once getsentry/seer#6887 is deployed. Fall back to the prior key so the
list is safe regardless of deploy order; when id is present it's unchanged.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@trevor-e trevor-e merged commit cec91a2 into master Jun 10, 2026
76 checks passed
@trevor-e trevor-e deleted the telkins/seer-explorer-toolcall-key branch June 10, 2026 20:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Scope: Frontend Automatically applied to PRs that change frontend components

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants