An independent review of the tab work found that closing a tab did not end what the tab started, that what the viewer keeps was filed under the book id alone, and a few smaller things. All of it is the viewer's own state: nothing here writes the books. Threads: every thread a tab starts (loader, receipts' workers, export, owner job, the dock's start and its agent's reaper) is counted in one per-view registry (jobs.rs). Dropping the view tells them to stop and the registry says, on a condition, when the last has ended. An owner job that changes something (restore, format upgrade, new books, connect, close the books, check for updates, update) is never abandoned: its tab's close control is off with a hover text saying what runs, App::close refuses, and the window's close request is cancelled with a dialog that offers only to wait. Read-only jobs (an export, a backup, the restore's check) stop with the tab: an export checks at its phase boundaries and saves nothing (the save is one atomic write of a new file; one the stop reaches too late is removed). The dock's agent is hung up on and, if it ignores that for two seconds, killed and reaped; the window's drop waits for that. Release on close: the loader checks "gone" before every retry and between the phases of a load, its retry wait is woken by the drop, and the viewer presence is let go in the drop itself, not when a refresh in flight ends. A thumbnail for a closed tab is not written. Kept state: filed under a hash of the data root's canonical path and the id (books outside any root: under their folder), with the books' identity, the SHA-256 of the journal's first line, taken once they load. A stored state whose identity differs from the loaded books' is discarded with the remembered name. Old unkeyed keys are read without error and not used. A start that names a company never writes the list of open companies. The dock's height is the app's one layout in every tab (said in the spec block and tested); the sidebar, rail and top bar panels now take ids made from their view's, since egui keys a panel's size by the id as given. Every new test was seen to fail with its fix switched off. The four sidenav tests keep their BAR_H: at the owner's 519 they fail by 15 points (sidebar) and 11 (rail) without it. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
57 lines
2.0 KiB
TOML
57 lines
2.0 KiB
TOML
[package]
|
|
name = "ledger-gui"
|
|
version = "0.1.0"
|
|
edition.workspace = true
|
|
license.workspace = true
|
|
repository.workspace = true
|
|
publish.workspace = true
|
|
description = "Read-only, live desktop view of wanderbooks books."
|
|
|
|
[[bin]]
|
|
name = "ledger-gui"
|
|
path = "src/main.rs"
|
|
|
|
[dependencies]
|
|
ledger-core = { path = "../ledger-core" }
|
|
ledger-store = { path = "../ledger-store" }
|
|
ledger-config = { path = "../ledger-config" }
|
|
ledger-import = { path = "../ledger-import" }
|
|
ledger-vault = { path = "../ledger-vault" }
|
|
ledger-package = { path = "../ledger-package" }
|
|
# No `default_fonts`, on eframe or on egui: egui's own font set includes
|
|
# Ubuntu Light, under the Ubuntu Font Licence, which Debian and Fedora class
|
|
# as non-free. The viewer names every font it draws with (theme.rs,
|
|
# assets/fonts/README.md), and `just deny` refuses that licence.
|
|
eframe = { version = "0.36", default-features = false, features = ["wgpu", "wayland", "x11", "persistence"] }
|
|
egui = { version = "0.36", default-features = false }
|
|
egui_extras = { version = "0.36", features = ["image", "datepicker", "serde"] }
|
|
egui-phosphor = "0.14"
|
|
# Markdown documents, drawn as text. No image loading (no `load-images`,
|
|
# no `fetch`): a document never makes the viewer read a file or the network.
|
|
egui_commonmark = { version = "0.25", default-features = false, features = ["pulldown_cmark"] }
|
|
image = { version = "0.25", default-features = false, features = ["png", "jpeg", "webp"] }
|
|
notify = "8"
|
|
jiff = "0.2"
|
|
chrono = "0.4"
|
|
rust_decimal = "1"
|
|
serde = { version = "1", features = ["derive"] }
|
|
serde_json = "1"
|
|
zeroize = "1"
|
|
# The dock: a terminal emulator over a PTY (ConPTY on Windows), P11b
|
|
alacritty_terminal = "0.26"
|
|
|
|
[target.'cfg(unix)'.dependencies]
|
|
# The dock ends a dropped session's child that ignores the hang-up (dock.rs
|
|
# INVARIANT 8): a SIGKILL to the pid this crate's own PTY started.
|
|
libc = "0.2"
|
|
|
|
[dev-dependencies]
|
|
chrono = "0.4"
|
|
egui_kittest = { version = "0.36", features = ["wgpu", "snapshot", "eframe"] }
|
|
proptest = "1"
|
|
tempfile = "3"
|
|
zip = "9.0.1"
|
|
|
|
[lints]
|
|
workspace = true
|