-
Notifications
You must be signed in to change notification settings - Fork 4k
fix: Sentry triage — resolve 16 actionable issues across tauri-react, tauri-rust, core-rust #5171
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
5df19d9
f991500
0663e9a
899c162
b10dcec
ba285d5
82a1745
3702b92
e9f25f8
71747de
7ceadec
3fd13ad
408275a
346eafb
18f3542
f9d062a
33e8f5f
93ff178
1f480d0
6723a9b
5dc9f30
85d505f
98bfa20
663c396
f8eb3a1
8b91982
1b5a800
ea7bcb2
e0f7a3f
14a22e9
9886cd7
7f0aa1f
c4f71d4
11a8aa3
851bd0c
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1 +1 @@ | ||
| 11ef51edbeadcca4517b18a037fff858a5dfae0f | ||
| f09d7e746a44a5187d2abc116e8a4cd7a9f94a67 |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -92,14 +92,19 @@ export function useThreadGoal( | |
| } | ||
| }, [api, threadId]); | ||
|
|
||
| // Reset the editor + cached goal when the thread changes. Done during render | ||
| // (React's sanctioned "reset state on prop change" pattern) rather than in an | ||
| // effect, so it's synchronous and lint-clean. | ||
| if (activeThread.current !== threadId) { | ||
| activeThread.current = threadId; | ||
| setExpanded(false); | ||
| setGoal(null); | ||
| } | ||
| // Reset the editor + cached goal when the thread changes. Done in a useEffect | ||
| // rather than during render to avoid React's nested-update detection, which | ||
| // can cascade with concurrent state changes into a "Maximum update depth | ||
| // exceeded" error (TAURI-REACT-2G). | ||
| const prevThreadRef = useRef(threadId); | ||
| useEffect(() => { | ||
| if (prevThreadRef.current !== threadId) { | ||
| prevThreadRef.current = threadId; | ||
| activeThread.current = threadId; // keep the race guard in sync | ||
| setExpanded(false); | ||
| setGoal(null); | ||
|
Comment on lines
+101
to
+105
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
When the selected chat thread changes, this effect clears the cached goal but never updates Useful? React with 👍 / 👎.
Member
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Fixed in 1b5a800: updates |
||
| } | ||
| }, [threadId]); | ||
|
|
||
| // Fetch on mount/thread-change and poll lightly. `refresh` is async, so its | ||
| // setState lands in a later microtask (not a synchronous effect write). | ||
|
|
||
Uh oh!
There was an error while loading. Please reload this page.