Fetch initial diffs asynchronously in diff stream (#1376)

Move the blocking get_diffs call into a spawned task so the WebSocket
stream is returned immediately. This prevents timeouts when fetching
diffs for repositories with many changed files.

Also remove a duplicate useEffect in DiffsPanel.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-authored-by: Claude <noreply@anthropic.com>
This commit is contained in:
Ryosuke Hayashi
2025-11-26 19:21:14 +09:00
committed by GitHub
parent d430f37475
commit ae9425b96b
2 changed files with 66 additions and 42 deletions

View File

@@ -39,10 +39,6 @@ export function DiffsPanel({ selectedAttempt, gitOps }: DiffsPanelProps) {
setHasInitialized(false);
}, [selectedAttempt?.id]);
useEffect(() => {
setLoading(true);
}, [selectedAttempt?.id]);
useEffect(() => {
if (diffs.length > 0 && loading) {
setLoading(false);