Skip to content

Support for custom props and middleware - #418

Merged
mme merged 7 commits into
mainfrom
mme/custom-props
Jul 3, 2024
Merged

mme merged 7 commits into
mainfrom
mme/custom-props

Conversation

@mme

@mme mme commented Jul 3, 2024 •

Copy link
Copy Markdown
Contributor
  • Support custom props that are passed to the runtime.
  • Support before and after req middleware
  • Fix docs

@mme
mme enabled auto-merge (squash) July 3, 2024 09:19
@mme
mme merged commit 87e4e4c into main Jul 3, 2024
@mme
mme deleted the mme/custom-props branch July 3, 2024 09:20
johannhartmann pushed a commit to johannhartmann/CopilotKit that referenced this pull request Oct 31, 2025
* add custom properties

* add onBeforeRequest handler

* add after request middleware

* customProperties -> properties

* move hooks to middleware prop

* update API and fix docs
johannhartmann pushed a commit to johannhartmann/CopilotKit that referenced this pull request Oct 31, 2025
* add custom properties

* add onBeforeRequest handler

* add after request middleware

* customProperties -> properties

* move hooks to middleware prop

* update API and fix docs
jpr5 added a commit that referenced this pull request Apr 29, 2026
## 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 #418 (hydration mismatch) and #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
jpr5 added a commit that referenced this pull request Apr 29, 2026
…#4402)

## Summary
- `useOverlays` hook read URL hash + localStorage in `useState`
initializer, producing different DOM on server vs client → React #418
- `useCollapsible` hook read localStorage in `useState` initializer →
same issue
- Both now initialize with server-safe defaults and sync from client
state in `useEffect` after hydration

## Test plan
- [x] 338 tests pass
- [ ] Dashboard loads at `#matrix:depth,health` with zero console errors
- [ ] Overlay state persists correctly (URL hash + localStorage)
- [ ] Collapsible category state persists across reloads
pull Bot referenced this pull request in justinlietz93/CopilotKit Apr 29, 2026
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.
zeekay pushed a commit to Dream-AI-4444/CopilotKit that referenced this pull request Sep 11, 2026
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 CopilotKit#418 and CopilotKit#310.
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
zeekay pushed a commit to Dream-AI-4444/CopilotKit that referenced this pull request Sep 11, 2026
…CopilotKit#4402)

## Summary
- `useOverlays` hook read URL hash + localStorage in `useState`
initializer, producing different DOM on server vs client → React CopilotKit#418
- `useCollapsible` hook read localStorage in `useState` initializer →
same issue
- Both now initialize with server-safe defaults and sync from client
state in `useEffect` after hydration

## Test plan
- [x] 338 tests pass
- [ ] Dashboard loads at `#matrix:depth,health` with zero console errors
- [ ] Overlay state persists correctly (URL hash + localStorage)
- [ ] Collapsible category state persists across reloads
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