mirror of
https://github.com/leonvanzyl/autocoder.git
synced 2026-01-30 22:32:06 +00:00
fix: address second round of code review feedback
Backend improvements: - Create shared validation utility for project name validation - Add asyncio.Lock to prevent concurrent _query_claude calls - Fix _create_features_bulk: use flush() for IDs, add rollback on error - Use unique temp settings file instead of overwriting .claude_settings.json - Remove exception details from error messages (security) Frontend improvements: - Memoize onError callback in ExpandProjectChat for stable dependencies - Add timeout to start() checkAndSend loop to prevent infinite retries - Add manuallyDisconnectedRef to prevent reconnection after explicit disconnect - Clear pending reconnect timeout in disconnect() Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
@@ -34,6 +34,9 @@ export function ExpandProjectChat({
|
||||
const inputRef = useRef<HTMLInputElement>(null)
|
||||
const fileInputRef = useRef<HTMLInputElement>(null)
|
||||
|
||||
// Memoize error handler to keep hook dependencies stable
|
||||
const handleError = useCallback((err: string) => setError(err), [])
|
||||
|
||||
const {
|
||||
messages,
|
||||
isLoading,
|
||||
@@ -46,7 +49,7 @@ export function ExpandProjectChat({
|
||||
} = useExpandChat({
|
||||
projectName,
|
||||
onComplete,
|
||||
onError: (err) => setError(err),
|
||||
onError: handleError,
|
||||
})
|
||||
|
||||
// Start the chat session when component mounts
|
||||
|
||||
Reference in New Issue
Block a user