Skip to content

Fix: Avoid unstable React keys in step rendering#34

Merged
FL4TLiN3 merged 1 commit intomainfrom
fix/unstable-react-keys-in-step-rendering
Dec 4, 2025
Merged

Fix: Avoid unstable React keys in step rendering#34
FL4TLiN3 merged 1 commit intomainfrom
fix/unstable-react-keys-in-step-rendering

Conversation

@FL4TLiN3
Copy link
Contributor

@FL4TLiN3 FL4TLiN3 commented Dec 4, 2025

Summary

  • Remove content from React keys in step rendering to prevent key collisions when identical content appears in multiple lines
  • Keys now use only index (e.g., todo-${idx} instead of todo-${idx}-${todo})
  • Affected components: todo preview, exec output, readTextFile, writeTextFile, editTextFile, appendTextFile, listDirectory

Test plan

  • pnpm typecheck passes
  • pnpm test passes
  • pnpm format-and-lint passes
  • pnpm build passes

Closes #28


Note

Use index-only React keys across step renderers to avoid unstable keys when content repeats.

  • TUI:
    • Stabilize React list keys in packages/tui/src/components/step.tsx:
      • Replace content-derived keys with index-only keys across renders: todo (added/completed), exec output, readTextFile, writeTextFile, editTextFile (old/new), appendTextFile, listDirectory.

Written by Cursor Bugbot for commit 098d77b. This will update automatically on new commits. Configure here.

@vercel
Copy link

vercel bot commented Dec 4, 2025

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Preview Comments Updated (UTC)
perstack Ready Ready Preview Comment Dec 4, 2025 4:04am

@codecov
Copy link

codecov bot commented Dec 4, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.

📢 Thoughts on this report? Let us know!

@FL4TLiN3 FL4TLiN3 merged commit bbb14f0 into main Dec 4, 2025
8 of 9 checks passed
@FL4TLiN3 FL4TLiN3 deleted the fix/unstable-react-keys-in-step-rendering branch December 8, 2025 19:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Fix: Avoid unstable React keys in step rendering

1 participant