Skip to content

fix(web): pass ChatView key directly instead of spreading it - #64

Merged
yordis merged 1 commit into
mainfrom
yordis/fix-chat-view-key-spread
Sep 28, 2026
Merged

yordis merged 1 commit into
mainfrom
yordis/fix-chat-view-key-spread

Conversation

@yordis

@yordis yordis commented Sep 28, 2026 •

Copy link
Copy Markdown
Member
  • React warns in dev whenever a `key` arrives through a props spread on the thread route, which adds console noise on every thread render.

View with [code]smith Autofix with [code]smith
Need help on this PR? Tag @codesmith-bot with what you need. Autofix is disabled.

Summary by CodeRabbit

  • Bug Fixes
    • Improved consistency in how chats are displayed on server-thread routes, whether or not a promoted draft is present. This makes the rendering behavior consistent across both cases without changing the visible chat features.

Signed-off-by: Yordis Prieto <yordis.prieto@gmail.com>
@cursor

cursor Bot commented Sep 28, 2026 •

Copy link
Copy Markdown

PR Summary

Low Risk
Single-line JSX change with no logic or behavior change beyond silencing a dev warning.

Overview
Fixes a React dev warning on the server thread route by passing ChatView's key as a normal JSX attribute (key={nextChatViewKey?.key}) instead of conditionally spreading { key: ... } into props.

Remount/keying behavior is unchanged: promoted drafts still key by draft id when applicable, and plain server threads stay unkeyed when nextChatViewKey is null.

Reviewed by Cursor Bugbot for commit 069b9c7. Bugbot is set up for automated code reviews on this repo. Configure here.

@github-actions github-actions Bot added vouch:trusted PR author is trusted by repo permissions or the VOUCHED list. size:XS labels Sep 28, 2026
@coderabbitai

coderabbitai Bot commented Sep 28, 2026

Copy link
Copy Markdown

Review in Change Stack →

Navigate logical layers of code changes, visualize relationships, and explore their blast radius.

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Repository: TrogonStack/t3code/.coderabbit.yaml

Review profile: CHILL

Plan: Advanced

Run ID: 49935126-1011-4a7a-81d3-ad6c8df87717

📥 Commits

Reviewing files that changed from the base of the PR and between f7bbc6c and 069b9c7.

📒 Files selected for processing (1)
  • apps/web/src/components/ThreadRouteView.tsx

Included review availability: This review used your included allowance. Your plan provides up to 1 included review per hour; 0 remain after this review.


📝 Walkthrough

Walkthrough

The server-thread ChatView now always receives a key prop. The prop uses the promoted draft key when available and is undefined otherwise.

Changes

Server-thread ChatView

Layer / File(s) Summary
Pass the ChatView key prop
apps/web/src/components/ThreadRouteView.tsx
The server-thread ChatView receives key={nextChatViewKey?.key} whether or not a promoted draft key exists.

Priority: ⬇️ Low

Estimated code review effort: 2 (Simple) | ~5 minutes

Change: Bug fix

Suggested reviewers: juliusmarminge

Merge Risk: ⚪ Minimal · up to 069b9

This change preserves existing thread identity behavior and removes the reported development warning. No actionable merge risk remains.

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Description check ⚠️ Warning The description explains the React warning but does not follow the required template. It omits the What Changed section, the Why section heading, the UI Changes applicability statement, and the Checkl… Rewrite the description using the repository template. Include What Changed, explain Why, state whether UI Changes apply, and complete the Checklist. Remove unrelated automation footer content if the repository does not require it.
✅ Passed checks (4 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly identifies the main change: passing the ChatView key directly instead of through a props spread.
Docstring Coverage ✅ Passed Docstring coverage is 100.00% which is sufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 1 functions across 1 files.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
Full details: Description check

Explanation

The description explains the React warning but does not follow the required template. It omits the What Changed section, the Why section heading, the UI Changes applicability statement, and the Checklist.

  • Fix all pre-merge checks with AI
✨ Finishing Touches
📝 Generate docstrings
  • Commit to this branch
  • Create a new PR
🧪 Generate unit tests (beta)
  • Commit to this branch
  • Create a new PR

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@github-actions

Copy link
Copy Markdown

Thread transfer impact

✅ Thread transfer remains within every enforced ceiling.

ℹ️ The exact PR base did not have a successful artifact. Baseline uses the latest successful main measurement shown below.

Provider Metric Main baseline This PR Impact PR ceiling
Codex Total thread wire 13.5 KiB 13.5 KiB +22 B (+0.2%) 15.1 KiB ✅
Codex Thread snapshot wire 7.1 KiB 7.1 KiB −2 B (−0.0%) 7.3 KiB ✅
Codex Live turn WebSocket wire 6.4 KiB 6.5 KiB +24 B (+0.4%) 7.8 KiB ✅
Codex Live turn WebSocket decoded 56.2 KiB 56.3 KiB +44 B (+0.1%) 66.4 KiB ✅
Codex Live turn messages 9 10 +1 (+11.1%) 21 ✅
Claude Total thread wire 13.5 KiB 13.5 KiB −7 B (−0.1%) 15.1 KiB ✅
Claude Thread snapshot wire 7.1 KiB 7.1 KiB −8 B (−0.1%) 7.3 KiB ✅
Claude Live turn WebSocket wire 6.4 KiB 6.4 KiB +1 B (+0.0%) 7.8 KiB ✅
Claude Live turn WebSocket decoded 57.0 KiB 57.0 KiB 0 B (0.0%) 66.4 KiB ✅
Claude Live turn messages 9 9 0 (0.0%) 21 ✅

Baseline: 6fb9f79 · PR result: 069b9c7 · Source CI: failure

Scenario and decoded snapshot size

10 historical turns, 5 command tools per turn, 878.9 KiB retained MCP result per historical turn, and a 1.05 MiB retained result in the measured turn.

  • Codex decoded thread snapshot: 114.0 KiB
  • Claude decoded thread snapshot: 114.7 KiB

Updated in place by a trusted workflow. PR artifacts are strictly validated and never executed.

@yordis
yordis merged commit 85d6c46 into main Sep 28, 2026
21 of 23 checks passed
@yordis
yordis deleted the yordis/fix-chat-view-key-spread branch September 28, 2026 13:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

size:XS vouch:trusted PR author is trusted by repo permissions or the VOUCHED list.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant