SWE-agent icon indicating copy to clipboard operation
SWE-agent copied to clipboard

Web UI: Reset the user-entered source value after changing the problem source dropdown.

Open kwight opened this issue 8 months ago • 4 comments

Reference Issues/PRs

Fixes https://github.com/princeton-nlp/SWE-agent/issues/362

What does this implement/fix? Explain your changes.

Use useEffect to monitor the problem source dropdown, and when it changes, reset the user value to empty (so that the default text appears for that field).

The textarea corresponding to the "Write" dropdown doesn't need changes since the actual markup is updated on switch (between inputs and textarea).

after

Testing Instructions

  1. On a fresh page load, enter something into the "GitHub issue URL" field.
  2. Switch the dropdown above it to "Local file", and verify the "Path to local .MD..." field is empty (displaying the placeholder text).
  3. Enter data in that field again, and switch the dropdown back to its original value. Verify the "GitHub issue URL" field is empty again.

kwight avatar Jun 02 '24 18:06 kwight