-
Notifications
You must be signed in to change notification settings - Fork 36
Error handling improvements (DRAFT - needs fixes) #580
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
Draft
jchris
wants to merge
19
commits into
main
Choose a base branch
from
jchris/minimal-iframe-protocol-rebased
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Simplifies iframe-template.ts by removing ~200 lines of error handling code: **Removed:** - Global error handlers (window.onerror, unhandledrejection) - JSX/Babel error detection and console.error patching - Screenshot error handlers - Execution error reporting and error UI - execution-success message type **Retained:** - Streaming state tracking (streaming message) - Core protocol messages: execute-code, command, preview-ready, screenshot Errors still appear in browser DevTools but are no longer communicated to parent. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
✅ Deploy Preview for fireproof-ai-builder ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
Remove problematic auto-repair behaviors that caused infinite error loops: 1. Remove auto-submit functionality (useImmediateErrorAutoSend.ts) - Delete button polling and auto-clicking code - Users must manually click "Code" button to submit repairs - Prevents race conditions and concurrent repair streams 2. Add streaming guard (SessionView.tsx) - Only process Monaco syntax errors when NOT streaming - Prevents intermediate code states from triggering repairs - Avoids false errors during AI streaming 3. Remove pre-validation (IframeContent.tsx) - Allow code to reach iframe even with syntax errors - Let iframe handle its own runtime errors - Continuous Monaco validation still provides UI feedback These changes fix the storm of errors and flickering between multiple code versions that occurred when PR #575 was merged. Related: PR #580 🤖 Generated with [Claude Code](https://claude.com/claude-code)
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.

Error Handling Improvements
This PR was reverted from main (was PR #575) due to cascading error loops. It needs fixes before it can be merged.
What This PR Does
Problems That Need Fixing
1. Cascading Error Loop
The current implementation creates an infinite loop:
Result: Storm of errors, multiple concurrent streams, flickering code versions
2. Auto-Submit Is Too Aggressive
3. Syntax Errors During Streaming Are Normal
4. No Separation of Concerns
Required Fixes Before Merge
Good Changes to Keep
Testing Checklist
🤖 Generated with Claude Code