Commit 7cd2c1f
authored
🤖 fix: resolve console errors for ORPC iterator and HelpIndicator ref (#985)
## Summary
Fixes two console errors that appear during normal operation:
### 1. React ref warning for HelpIndicator
```
Warning: Function components cannot be given refs. Attempts to access this ref will fail.
Check the render method of `Primitive.button.SlotClone`.
```
**Cause:** `HelpIndicator` was a plain function component used inside
`TooltipTrigger` with `asChild`, which needs to forward refs.
**Fix:** Converted to `React.forwardRef`.
### 2. ORPC Event Iterator Validation Failed
```
[WorkspaceStore] Error in onChat subscription for xxx: ORPCError: Event iterator validation failed
Caused by: ErrorEvent: An error event was received
```
**Cause:** When the underlying transport (WebSocket/MessagePort) has an
error during workspace removal, ORPC throws
`EVENT_ITERATOR_VALIDATION_FAILED` because the transport's `ErrorEvent`
can't be validated against the chat message schema.
**Fix:** Suppress this specific error only when the workspace has been
removed (race condition between server error and client cleanup). If the
workspace still exists and we get this error, it's logged as before
since that would indicate a real problem.
---
_Generated with `mux`_1 parent 31c217f commit 7cd2c1f
File tree
2 files changed
+22
-11
lines changed- src/browser
- components/ui
- stores
2 files changed
+22
-11
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
46 | 46 | | |
47 | 47 | | |
48 | 48 | | |
49 | | - | |
50 | | - | |
51 | | - | |
52 | | - | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
53 | 53 | | |
| 54 | + | |
54 | 55 | | |
55 | 56 | | |
56 | 57 | | |
57 | 58 | | |
58 | | - | |
| 59 | + | |
| 60 | + | |
59 | 61 | | |
60 | 62 | | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
713 | 713 | | |
714 | 714 | | |
715 | 715 | | |
716 | | - | |
717 | | - | |
718 | | - | |
719 | | - | |
720 | | - | |
721 | | - | |
| 716 | + | |
| 717 | + | |
| 718 | + | |
| 719 | + | |
| 720 | + | |
| 721 | + | |
| 722 | + | |
| 723 | + | |
| 724 | + | |
| 725 | + | |
| 726 | + | |
| 727 | + | |
| 728 | + | |
| 729 | + | |
| 730 | + | |
722 | 731 | | |
723 | 732 | | |
724 | 733 | | |
| |||
0 commit comments