Hi Tom,
This looks pretty great! It does the job, look good, and is properly granular for a Sandstorm app (want multiple notebooks? create multiple grains). I also love that the spk is tiny and starts up fast.
In testing this, I did find one pretty big bug: After POSTing a note, the server response with a 303 redirect that always uses HTTPS. Some Sandstorm servers are HTTP-only (especially local test servers), and on those the result is an error.
To fix this I recommend setting the Location header to be host-relative, i.e. omit the protocol and host and start with a /. Relative URLs in Location headers have been supported by all browsers for a long time and were recently standardized. Alternatively, you can determine which protocol to use by examining the X-Forwarded-Proto header or the X-Sandstorm-Base-Path header on the POST request.
I also have two very small nitpicks which you can feel free to ignore:
- Your action title is the default "New instance", which leads grains to be titled "Untitled Permanote instance" by default. I'd recommend "New notebook" instead.
- On the "create note" form, pressing tab while in the "title" field jumps to the "help" link rather than into the "content" field. I found this a bit annoying as I was trying to edit notes -- I would press tab and start typing, and it wouldn't work.
Longer-term, I'd love to see this app extended to support Sandstorm permissions so that I can give someone read-only access to my notebook.
But anyway, I think only the location header issue is a showstopper. Once that's fixed please re-submit to the app market; I'm eager to have this on there!
Also, I'm very interested to know what you had to do differently on Oasis. In theory it should be identical to regular Sandstorm.
-Kenton