Lagrange v1.18: TUI and Misfin

Development of version 1.18 has been a slow burn. Over the past year, I've been putting finishing touches on the Curses-based TUI variant and adding support for new Gemini-adjacent protocols. A number of bugs were fixed as well, and I've made several minor improvements in the user interface.

Curses-based TUI

In version 1.18, the TUI has been polished up a bit and there are now official prebuilt "clagrange" binaries.

To get started with the TUI:

Additional tips:

Over the past two years the TUI has received some attention as new features have been added to the GUI. However, the major shortcomings like proper keyboard navigation and on-screen display of the basic browsing actions have remained unaddressed. Also some UI layouts, like the one in the Preferences panel, were not working too well in the minimum 80x25 resolution. I've taken care of all of these in v1.18. As a bonus, UI keyboard navigation with arrow keys is fully available in the GUI as well.

When it comes to terminal window size, you can run the app in windows smaller than 80x25, too, but some dialogs may not be fully visible horizontally. Large windows are naturally not a problem because everything scales up without issue.

The final missing step was packaging the prebuilt TUI binaries. The CMake project was improved for building both the GUI and TUI variants at the same time, or just building either one. These are separate because the TUI works by emulating SDL2 APIs on a text canvas, so it is a compile-time choice. On Linux, I went with an AppImage because that makes it easier to distribute the "resources.lgr" file. For macOS, clagrange is a statically linked executable that installs to "/usr/local/bin/clagrange" via a .pkg. The installer and the executable have both been signed and notarized as expected.

There is no prebuilt binary for Windows, though! If you really really want clagrange on Windows, I recommend looking into WSL and running it inside a Linux VM. In theory, clagrange should work under the MSYS2 environment, or Cygwin for that matter, however I did not consider this a high-priority item. The build environment is easier to set up in Linux than in MSYS2/Cygwin. I'm planning on switching the Windows binary to be MinGW-compiled in the future so it would run as a native Windows executable; I want to minimize time investment into the non-native MSYS2. There's PDCurses that will likely be of use here, but it will require some effort to get it working with my SEALCurses that powers the text-based UI.

All in all, the TUI is in a usable shape now, although it would still benefit from further adoption of typical terminal UI patterns to make it feel more at home in the terminal. I've probably also missed a few UI strings that reference GUI-specific features, and things like drag-and-drop may be expected here and there. The TUI will keep evolving over time, much like the mobile ports.

New features and improvements

Documents:

User interface:

The above is a summary of the full release notes. You can find the complete list in-app by visiting "about:version":

Smol protocols

Misfin

Misfin is a messaging protocol that has been in the works since May 2023. Like Gemini, it relies on TLS and simple text-based requests, with 'text/gemini' as the content format.

Lagrange v1.18 adds support for importing Misfin identity certificates and sending messages. While there are already both client and server implementations, I feel that it is beneficial to have a convenient way to send messages to addresses found in Geminispace. You will still need a Misfin mailbox where you can receive messages β€” servers are expected to verify the identity of unknown senders by checking if the sender's certificate matches the one provided by their server.

A Misfin identity certificate is a TLS client certificate where the UID field specifies the mailbox name, subject alternative name(s) specify the domain name(s), and the Common Name is the human-readable name. You will need to import one or more of these before sending any messages.

When sending a message, the Upload dialog opens in Misfin mode with "To" and "From" fields. As usual, the text editor in the dialog has basic Gemtext syntax highlighting, but otherwise the editor has nothing Misfin-specific. A toggle is provided if you want to send a copy of the message to yourself. Lagrange does not keep copies of sent messages, because it does not maintain a local Misfin mailbox.

When you click on a link with a "misfin://" URI, the dialog opens automatically with the recipient address prefilled.

If you have any questions getting started with Misfin, perhaps the best place to visit is s/Misfin on BBS.

Titan

Along with fixes to a few Titan bugs, v1.18 adds support for the proposed Titan edit links. Their purpose is to streamline the user experience of editing resources. Summarizing, when requesting a Titan URL with ";edit" included, the client will receive the latest version of the resource in a format suitable for editing. After the user is finished editing the content, it can be submitted back to the server via the same URL, sans the ";edit".

Guppy

Support for the Guppy Protocol was contributed by the protocol's author, Dima Krasner. Thanks for being patient with me as I sat on the PR for the better part of a year!

Guppy is a UDP-based non-encrypted transmission protocol that aims to be very light-weight. The Raspberry Pi Pico W server hosting the Guppy capsule certainly responds much faster over Guppy than Gemini.

Guppy is a simple protocol for quick transfer of small documents, inspired by Gemini, Spartan, Gopher and TFTP. In a nutshell, it's Gemini without TLS and some status codes, over UDP.

Gopher

Road ahead

There has not been much time to do in-depth testing of the .0 release, so I am more or less crossing my fingers and hoping there aren't any horrible bugs left. There will again undoubtedly be a series of quick patches as any remaining or newly discovered issues are fixed.

If something seems off or blows up, please file a bug report:

Next, I'll shift focus toward the mobile ports to get them on par with the desktop v1.18. Maybe I'll even add a dark mode icon for iOS 18!

πŸ“… 2024-09-20

🏷 Lagrange

CC-BY-SA 4.0

The original Gemtext version of this page can be accessed with a Gemini client: gemini://skyjake.fi/gemlog/2024-09_lagrange-1.18.gmi