breadboard icon indicating copy to clipboard operation
breadboard copied to clipboard

Visual Editor JS editor sometimes does not save changes

Open dglazkov opened this issue 1 year ago • 7 comments

I can't quite produce a repro yet, but it seems like it occasionally gets into a funky state: after accepting edits correctly for a little while, it starts to just ignore them. The current workaround is to go to the next field ("name") and edit it. Then the changes in the JS editor start saving again.

dglazkov avatar May 21 '24 20:05 dglazkov

That's really unusual 🤔 The only thing I can think of (which may not be right) is if there's something invalid entered and the state isn't properly cleared that allows it to submit again. But I'm not sure if there's anything to that idea.

paullewis avatar May 21 '24 21:05 paullewis

Has it happened in multiple fields, or is it always the same field (like LLM input)?

paullewis avatar May 21 '24 21:05 paullewis

it's only the JS editor (codemirror) field that seems to do that.

dglazkov avatar May 21 '24 21:05 dglazkov

Ah, I misunderstood, I thought it was that we weren't taking updates generally. Okay, I'll have a prod and a ponder.

paullewis avatar May 21 '24 21:05 paullewis

Okay, so it looks like CodeMirror swallows input events in some cases, so I've added a watcher to the editor for when stuff is removed. Can you see if this is better behaved now?

paullewis avatar May 22 '24 12:05 paullewis

🤞🏻

dglazkov avatar May 22 '24 23:05 dglazkov

Also - https://github.com/breadboard-ai/breadboard/issues/1929

I will add, it's not just code, in my issue raw doesn't save either.

PaulKinlan avatar May 23 '24 10:05 PaulKinlan

This is working now, I believe. Let me know if not, but for now I'll declare victory.

paullewis avatar May 30 '24 12:05 paullewis