nushell / demo

Experimental wasm-based Nu playground
https://www.nushell.sh/demo/
MIT License
23 stars 10 forks source link

Reset button? #26

Closed fdncred closed 4 years ago

fdncred commented 4 years ago

I seem to get it into a state where no command is interpreted any longer. I can click the top buttons and they put text in the window but if I hit run or ctrl/cmd-enter nothing happens. There are no errors visible. So, would it be possible to have some type of a reset button? I'm not sure what that would do since when this happens today I have to ctrl-c out and do npm start again.

jzaefferer commented 4 years ago

There's various errors that aren't handled properly, one category is covered by #12. I have no idea how to recover from those, since the wasm process or worker or whatever it is seems to kinda crash.

For me its enough to reload the page to get back to a working state.

So I think this needs to be addressed by improved error handling.

sophiajt commented 4 years ago

@jzaefferer - if the commands don't work, should we just not show them? I think you were saying you wanted to show them but just have them error when you use them

jzaefferer commented 4 years ago

Yes, I think "not supported in the browser (via WebAssembly)" is better in this demo than pretending that the command doesn't exist.

sophiajt commented 4 years ago

Maybe we can make the list, like you're doing, and register these commands to return that message. As we start to make them work in wasm, we can remove this shim error registration.

jzaefferer commented 4 years ago

That sounds good to me!

jzaefferer commented 4 years ago

I think the WIP notice and eventually dealing with #12 is going to take care of this.