Repository navigation
feat(app): say why when a Flatpak permission is refused (plan 0008, G5) - #107
Conversation
…the Flatpak builds the crate without packaging/
|
Cross-review: reviewer |
…the Flatpak builds the crate without packaging/
|
Cross-review: reviewer |
Plan 0008, gap G5: with no Flatpak portal the window says only that it is reconnecting, and a vault outside a narrowed
--filesystemfails with a plain file error. Now both show their cause and the fix in the window.Case 1: no Flatpak portal
frostnotes: notesd did not start through the Flatpak portal (flatpak-spawn); see …/notesd.logtonotesd.log. This PR does not change the launcher (feat(flatpak): a new window replaces a notesd of an older build (plan 0008, G3) #106 rewrites it and keeps that line).notesd_log(app/src-tauri/src/notesd_log.rs), in the Flatpak only: a bounded read (8 KiB) of the log's end; the log path, its last line, and whether it is the launcher's portal line. A Go test (internal/packagecheck,TestPortalFailureLineMatchesTheApp) pins the Rust constant to the launcher's line; it is not a Rustinclude_str!test, because the Flatpak builds and tests the crate fromapp/alone.ConnectingshowsNotesdCauseonce the connection is lost: for the portal case, the cause and the checks (flatpak override --user --show,--reset,systemctl --user status flatpak-portal.service); otherwise the log's last line; both with the log's path. Outside the Flatpak and in lodge's web build nothing changes.Case 2: a vault outside the Flatpak's file access
internal/sandbox: parses[Context] filesystems=of/.flatpak-info(host,home,~/…, absolute paths,xdg-*with subpaths,:ro/:rw/:create,!negations) and explains a file error (ENOENT, EACCES, EPERM, EROFS) on a path the grants do not cover, or cover read-only.vault.add(open and create) answersinvalidParamswith: Frostnotes cannot reach PATH because the Flatpak's file access does not include it; grant it with: flatpak override --user --filesystem=PATH org.frostyard.Frostnotes, then log out and in (notesd keeps its sandbox until then). For a vault to create, PATH is the folder that holds it (Flatpak mounts only paths that exist). A covered path keeps its plain error.~/.var/app/<ID>,/app,/usr,/etc,/tmp,/runexcept/run/media, …), the plain error stays.Limits
notesd.log.host-osare not followed.Checks
make checkpasses (umask 022).notesd_log.rs,paths.rs), Vitest and Biome run in CI only: no nsl machine on this host.Docs:
design/app.md,specs/ui.md("Connecting", the vault manager), plan 0008 G5 status, AGENTS.md map line.