-- Leo's gemini proxy
-- Connecting to josipantolis.from.hr:1965...
-- Sending request
-- Meta line: 20 text/gemini
Published on: 2021-06-12
I've made good progress! As mentioned in my previous devlog¹, my first order of business was refactoring original code and adding test coverage. I completely rewrote my URI handling and solved the issue with streaming based rendering. Special thanks to Ecmel² for sharing his Moonlander³⁴ client code with me! As for new features I implemented browsing history, GSettings state persistence, (very basic!) image rendering and integrated with elementary OS' dark mode. Lastly, I published the code over on GitHub⁵. There are no releases or built packages there yet, but you can look at the code and compile it yourself if you wish.
For URI parsing I initially tried to "home-brew" a regex parser and "just wing" the handling of relative URIs. Suffice it to say final product was not ideal. So I went back to the RFC 3986¹ spec referenced in the Gemini protocol itself. To my surprise this document was actually relatively easy to read and contained some really cool resources! Namely proper regex for URI parsing and a bunch of corner case examples that I could use for my tests.
Plus I found a pod² by Chris Vittal which hosts all IETF RFCs right here on Gemini space! Cool stuff.
I have a feeling my tests are crap 💩️, but I guess that's ok 😅️. All I did was take the stuff from a test sample page¹ on Vala documentation and hooked it up to meson. I wrote the actual tests for core logic classes (like URI and Gemtext parsing). UI stuff is as of yet untested.
Oh, and I created a little section² on this Gempod with some pages that I can use for manual testing. It has some large gemtext files, some images, other file types, that sort of thing. It let me play around with some features, like checking that streaming actually works or that it can be stopped mid-load.
One of the core goals of the Starfish app is for it to feel native on the elementary OS platform. That informed the choice of GTK framework and Vala as a language. It also means I have the elementary developer docs¹ to help me along!
In particular I've hooked up Starfish to GSettings for storing the app state between runs. I may have gone overboard with this a bit, as I'm currently saving browsing history there too. More on this later. I also integrated with elementary's system wide dark mode and have exposed a font size setting to users to configure. All in all, I'm pretty pleased with how the app looks²³.
Biggest usability improvement was introduction of browsing history (back + forward). I implemented this through a session abstraction. I tried to make it so that multiple sessions could be open in parallel so that when I add tabs in the future each will keep its own session. We'll see how successful I was at this. For now there are no tabs, and there's only the default session. In addition to back and forward it also handles stuff like canceling a Gemini request partway through.
Lastly, I added some smaller features such as delegating non gemini URI links to the OS, very basic image rendering, Gemini user input, etc. Some of these will definitely need to be improved in the future, and there are still some missing stuff that I believe would be relatively easy to add but I haven't come around to.
For the next week or two I'd like to focus on wrapping up the initial beta release version and submitting it to the AppCenter. This will probably coincide with release of the second beta version of the elementary OS itself. (It might be a good idea to re-test the app against that version!) I've already created a GitHub repo¹ for the project, but there are still some things I'd like to do:
Improve the error / welcome pages inside the app
Polish the app's Flatpak metadata
Create actual app icon (I've been using the rocket emoji 🚀️ for now 🙃️)
Set up automated Travis build
I need to be careful not to get carried away by longer term planning. (I find myself particularly susceptible to that.) But I have a bunch of features I'd like to add after the initial beta is published but before the 1.0 release:
Tab & multi-window support
Client certificates support
Bookmarks and Gemini subscriptions
Hierarchical navigation (header based on Gemtext level, URI path based on pod level)
Smarter URI bar (history, search, favicons, etc.)
Support for loading gemtext form local files
More flexible user theming
"Small" stuff (text search, download option for unhanded mime types, better image page, etc.)
Plus all the unforeseen issues I'll encounter along the way! 😁️
-- Response ended
-- Page fetched on Sun Aug 1 00:58:34 2021