monome / maiden

web based editor and repl for norns
GNU General Public License v3.0
47 stars 34 forks source link

Persist repl command history in browser local storage #223

Closed Dewb closed 1 year ago

Dewb commented 1 year ago

Store (up to 100) command history items for the matron and supercollider REPLs in browser local storage, allowing the history to survive browser reloads or norns restarts.

tehn commented 1 year ago

this is a wonderful feature addition!

ngwese commented 1 year ago

thanks for this. will check it out hopefully in the next few days (likely sunday)

ngwese commented 1 year ago

@Dewb - pulled this down and tested out on device and i can't seem to get it to work. i tested in Brave, Firefox, and Safari on macOS 13. running ;restart in the matron REPL appeared to behave the same as it has (at least visually). if i closed and opened a new tab or fully restarting the browser the REPLs came up blank.

what platforms/browsers are you testing with? are there any browser level settings which need to be changed in order for this to work?

Dewb commented 1 year ago

Odd! I have tested with Firefox 115.0.2 and Chrome 115.0.5790.110 on Windows 10, and Safari 16.5.1 and Chrome 114.0.5735.198 on macOS 13.4.1, and in all cases history is preserved with either SYSTEM > RESTART, a page reload, or ;restart.

Dewb commented 1 year ago

I should clarify that I mean the REPL command history, not the output history. The output window will indeed come up blank but you can click into the REPL prompt and use the up/down keys to select previously used commands. Apologies for the imprecision! Updated title and description accordingly.

ngwese commented 1 year ago

i looked at the code in more detail earlier and realized that was likely the case but it was pre-caffeine and i hadn’t looked at that code in ages.

Dewb commented 11 months ago

I noticed yesterday that this change wasn’t in the 231114 norns update; are there additional steps that need to be done to get this deployed in a future update (e.g. tag a release, update something in norns-image?)

ngwese commented 11 months ago

the typical flow was @tehn or someone mentioning that a norns update was going to happen and i would manually tag/build and pass the latest maiden.zip on to be included in the update.

writing the process out like that reminds me how ad hoc it has been. in the past it’s never been a problem but external factors have lessened my involvement. i’ll tag this current version so that it can go out with the next update (or sooner if there is a call for it).

sorry for letting than enhancement fall through the cracks.

tehn commented 11 months ago

apologies--- i totally forgot there were some updates to maiden

i think a minor end-of-year update is forthcoming, given some fixes and small additions. we can include it shortly.

Dewb commented 11 months ago

no worries at all! as a process nerd, I was just curious about the process. thanks for all the effort that goes into said process!