Commit6b2696c6Recorded21 Jul 2026Repositorylantern
Release 0.1.2: app quit + close intercept + background services
Message
- app.quit: a page-invokable command to close the app cleanly. - intercept-close: opt-in page-driven window close, so an app can veto the window's close button and prompt (e.g. save unsaved work) before quitting. - services: background goroutines that run for the life of the app, the seam a resident host task (Slate's external-control socket) plugs into.
RELEASES.md updated.
Changed
RELEASES.md | 13 +++++++++++++
package.sgl | 2 +-
2 files changed, 14 insertions(+), 1 deletion(-)Diff
RELEASES.mdmodified
@@ -17,6 +17,19 @@ slug: releases
17
# Lantern Releases 18
19
+20
## 0.1.2+21
+22
A control release for apps that own their own shutdown and run work in the background. An app can now quit itself or intercept the window close button from the page, and declare background services that run alongside the UI for the life of the app. Existing projects build without changes.+23
+24
### An app can quit and intercept the window close button+25
+26
Two host controls let an app own its lifecycle from the page. `app.quit` closes the app cleanly, the same teardown as closing the window. And `intercept-close: #t` hands a window close request back to the page as an `app.close-requested` event and vetoes the immediate close, so the app can prompt (for example, to save unsaved work) and then call `app.quit` itself, instead of the window just vanishing. Slate uses both: C-x C-c and the window close button now run its save-then-quit flow.+27
+28
### Background services alongside the UI+29
+30
An app can now declare `services:` in its `lantern-app`, a list of background goroutines that run for the whole life of the app, started inside the loop's async scope so they can freely spawn and await. Each service is a procedure that receives the same context a command handler gets, so it can reach the page and emit events. This is how a resident host task runs without blocking the UI loop: Slate's external-control socket, the one the `slate` command line talks to, runs as one of these.+31
+32
33
## 0.1.1 34
35
Better file handling for local apps: a new `lantern://local/` route streams a real file's bytes straight to the page instead of inlining them as a base64 data URI, and large directory listings return about twice as fast. Existing projects build without changes.package.sglmodified
@@ -14,7 +14,7 @@
14
15
(workspace 16
name: "lantern"−17
version: "0.1.1"+17
version: "0.1.2" 18
description: "A Sigil-native desktop wrapper for web apps" 19
url: "https://codeberg.org/sigil/lantern" 20
license: "BSD-3-Clause"