Skip to content

fix: TallyTrigger hydration mismatch causing production crash - #4399

Merged
jpr5 merged 1 commit into
mainfrom
fix/tally-trigger-hydration
Apr 29, 2026
Merged

jpr5 merged 1 commit into
mainfrom
fix/tally-trigger-hydration

Conversation

@jpr5

@jpr5 jpr5 commented Apr 29, 2026

Copy link
Copy Markdown
Contributor

Summary

  • Remove conditional early return in TallyTrigger that rendered different DOM structures on server vs client (bare <>{children}</> vs <div><button>{children}</button></div>)
  • All hooks now run unconditionally; interaction is disabled via guards when items array is empty
  • Fixes React errors Support for custom props and middleware #418 (hydration mismatch) and Support for Sveltekit #310 (fewer hooks rendered) that crash the dashboard on load

Test plan

  • 10 existing tally-breakdown tests pass (updated for always-wrapper behavior)
  • Dashboard loads without crash at #matrix:depth,health
  • Tally breakdown tooltips work on hover/click for non-empty buckets

Remove conditional early return that rendered different DOM structures
on server vs client (bare fragment vs div>button wrapper). All hooks
now run unconditionally; interaction is disabled via guards when items
array is empty. Fixes React errors #418 and #310.
@vercel

vercel Bot commented Apr 29, 2026 •

Copy link
Copy Markdown
Contributor

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

Project Deployment Actions Updated (UTC)
chat-with-your-data Building Building Preview, Comment Apr 29, 2026 0:56am
docs Building Building Preview, Comment Apr 29, 2026 0:56am
form-filling Building Building Preview, Comment Apr 29, 2026 0:56am
research-canvas Building Building Preview, Comment Apr 29, 2026 0:56am
travel Ready Ready Preview, Comment Apr 29, 2026 0:56am

Request Review

@jpr5
jpr5 requested a review from mme as a code owner April 29, 2026 00:53
@jpr5
jpr5 merged commit 05d2c3d into main Apr 29, 2026
10 of 11 checks passed
@jpr5
jpr5 deleted the fix/tally-trigger-hydration branch April 29, 2026 00:53
@github-actions

Copy link
Copy Markdown
Contributor

📣 Social Copy Generator

Generate social media copies (Twitter/X, LinkedIn, Blog Post) for this PR using Claude.

  • Generate social media copies

zeekay pushed a commit to Dream-AI-4444/CopilotKit that referenced this pull request Sep 11, 2026
…tKit#4399)

## Summary
- Remove conditional early return in `TallyTrigger` that rendered
different DOM structures on server vs client (bare `<>{children}</>` vs
`<div><button>{children}</button></div>`)
- All hooks now run unconditionally; interaction is disabled via guards
when items array is empty
- Fixes React errors CopilotKit#418 (hydration mismatch) and CopilotKit#310 (fewer hooks
rendered) that crash the dashboard on load

## Test plan
- [x] 10 existing tally-breakdown tests pass (updated for always-wrapper
behavior)
- [ ] Dashboard loads without crash at `#matrix:depth,health`
- [ ] Tally breakdown tooltips work on hover/click for non-empty buckets

This branch was successfully deployed

5 active deployments
Preview – travel — b6e58e74 Deployed Apr 29, 2026 by vercel[bot]
Preview – research-canvas — b6e58e74 Deployed Apr 29, 2026 by vercel[bot]
Preview – chat-with-your-data — b6e58e74 Deployed Apr 29, 2026 by vercel[bot]
Preview – docs — b6e58e74 Deployed Apr 29, 2026 by vercel[bot]
Preview – form-filling — b6e58e74 Deployed Apr 29, 2026 by vercel[bot]
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.

1 participant