Skip to content

Add toggle to control buggy code and fixer usage #34

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

Merged

Conversation

juancastano
Copy link
Contributor

@juancastano juancastano commented Jun 16, 2025

TL;DR

Added debugging options to enable buggy code generation and code fixing capabilities.

What changed?

  • Removed the hardcoded debug flag and replaced it with user-configurable options
  • Added two new parameters to the component schema: useBuggyCode and useFixer
  • Implemented the Benchify fixer functionality that was previously commented out
  • Added UI toggles in the prompt form for users to enable/disable these features
  • Added session storage to persist these settings across page navigation
  • Passed these settings through all API calls (new generation and edits)
  • Added detailed logging for the fixer process
  • Removed the "Common Solutions" section from the error display component
  • Auto-populates the description field with sample text when buggy code is enabled

How to test?

  1. Navigate to the prompt form and toggle "Use Buggy Code" on
  2. Notice how the description field auto-populates with sample text
  3. Toggle "Use Fixer" on to test the code repair functionality
  4. Submit the form and observe the generated code
  5. Check the console logs to verify the fixer is being called when enabled
  6. Verify that these settings persist when navigating between pages

Why make this change?

This change provides developers with better debugging tools to test the application's error handling and code fixing capabilities. The toggles make it easy to generate intentionally buggy code for testing purposes and to evaluate the effectiveness of the Benchify fixer. This will help in development, testing, and demonstrating the application's resilience to code errors.

@juancastano juancastano marked this pull request as ready for review June 16, 2025 23:17
@juancastano juancastano mentioned this pull request Jun 19, 2025
Copy link
Contributor Author

juancastano commented Jul 9, 2025

Merge activity

  • Jul 9, 8:49 PM UTC: A user started a stack merge that includes this pull request via Graphite.
  • Jul 9, 8:54 PM UTC: Graphite rebased this pull request as part of a merge.
  • Jul 9, 8:56 PM UTC: @juancastano merged this pull request with Graphite.

@juancastano juancastano mentioned this pull request Jul 9, 2025
@juancastano juancastano changed the base branch from 06-16-fixed_a_few_errors to graphite-base/34 July 9, 2025 20:51
@juancastano juancastano changed the base branch from graphite-base/34 to main July 9, 2025 20:53
@juancastano juancastano force-pushed the 06-16-add_toggle_to_control_buggy_code_and_fixer_usage branch from b84248f to a193e27 Compare July 9, 2025 20:54
@juancastano juancastano merged commit 00e6d31 into main Jul 9, 2025
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant