Skip to content
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

Persist repl command history in browser local storage #223

Merged
merged 1 commit into from
Aug 2, 2023

Conversation

Dewb
Copy link
Contributor

@Dewb Dewb commented Jul 26, 2023

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
Copy link
Member

tehn commented Jul 26, 2023

this is a wonderful feature addition!

@ngwese
Copy link
Member

ngwese commented Jul 27, 2023

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

@ngwese
Copy link
Member

ngwese commented Jul 31, 2023

@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
Copy link
Contributor Author

Dewb commented Jul 31, 2023

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
Copy link
Contributor Author

Dewb commented Jul 31, 2023

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.

@Dewb Dewb changed the title Persist repl history in browser local storage Persist repl command history in browser local storage Jul 31, 2023
@ngwese
Copy link
Member

ngwese commented Jul 31, 2023

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.

Copy link
Member

@ngwese ngwese left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm

@ngwese ngwese merged commit 5587f24 into monome:main Aug 2, 2023
1 check passed
@Dewb
Copy link
Contributor Author

Dewb commented Dec 11, 2023

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
Copy link
Member

ngwese commented Dec 12, 2023

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
Copy link
Member

tehn commented Dec 12, 2023

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
Copy link
Contributor Author

Dewb commented Dec 13, 2023

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!

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.

3 participants