refactor!: one way to serve books: the stdio server is gone (D-44)
check / check (push) Canceled after 0s
check / check (push) Canceled after 0s
The owner (2026-10-23): "We should probably just delete the stdio path altogether. THere's no point in that. And it sitting there unused will just lead to bitrot. Nuke it?" Books are served only by the books server (`wanderbooks server`), reached by agents through the bridge (`wanderbooks mcp --book ID`), which stays. Removed: `wanderbooks dev-stdio`, the `ledger-mcp` binary, and `ledger_mcp::run` (stdio and `--http` over a bare data dir), with all that only that mode had: - files the books make coming back inline: `HandedFile.content_base64` is gone, and `download` and `expires_at` are always there; - books with no access log or backups: `books.access_log`, `books.backup` and `books.back_up_now` are always offered, by scope; - the settings file read and reloaded (`legacy_files`), the vault key named by a file or `--vault-key-file`, and the books dir's key-inside-the-books and git checks (with `paths.rs`); - `wire.rs` (the bridge frames an agent's lines itself); - `books.settings`' file fields and `books.start`'s `settings_source`. `BooksServer` is built one way, from `Served` (a book as the books server serves it), in production and in the unit tests. An unknown tool is now a protocol error (mcp-tools.md). Inline file input is unchanged. Then the owner's three decisions (2026-10-23, the question tool): (a) `books.import_settings` is removed entirely (118 tools): old books come in whole by `wanderbooks books adopt`, which reads their settings file once; ledger-config keeps its settings-file parsing only as far as adoption uses it (`load` and the path-reading `effective_receipt_policy` are gone), and `books.chart_template` gives its settings as `books.set_setting` changes. (b) The viewer's loose-books-folder mode is removed (`--data-dir`, `--books-toml`, `--vault-key-file`, the settings file and config.json followed): it opens only books of the data root, reading settings from the journal and the vault from the book's own `vault/` and `keys/`. (c) `wanderbooks dev-stdio` has no stub: it is an unknown command like any other word. Also: an upload's expiry past the calendar is an error, never an empty string. Tests: every suite that drove the stdio server moved to crates/ledger-cli/tests/ and drives a real `wanderbooks server` on a data root of its own (tests/common), handed files by their download; mcp_stdio.rs is mcp_journeys.rs. Tests of what is gone are deleted and listed in docs/testing.md. Docs: plan D-44 (D-18 superseded), STATUS, testing, rules, mcp-interface, the handbook, README; justfile recipes. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01T3gXMVt7XJPi6ens1or9Dj
This commit is contained in:
87 files changed
+3477
-6476
No files matched your search
@@ -16,7 +16,7 @@ use ledger_store::{Attachment, JournalLine, Reconciliation, Snapshot, Statement,
|
||||
use rust_decimal::Decimal;
|
||||
use serde_json::Value;
|
||||
use std::collections::{BTreeMap, HashMap, HashSet};
|
||||
use std::path::{Path, PathBuf};
|
||||
use std::path::PathBuf;
|
||||
|
||||
use crate::nav::Route;
|
||||
|
||||
@@ -597,18 +597,8 @@ impl Books {
|
||||
let attachments = snap.attachments(None).map_err(|e| e.to_string())?;
|
||||
let journal = snap.journal().to_vec();
|
||||
// The server's own rule, so the viewer flags exactly what the
|
||||
// server would refuse: the books' settings; for an older books dir
|
||||
// that keeps none, its config.json, else its settings file.
|
||||
let policy = if ledger.settings().is_journaled()
|
||||
|| ledger_store::root::inside_a_root(snap.data_dir())
|
||||
{
|
||||
ledger_config::codec::receipt_policy(ledger.settings())
|
||||
} else {
|
||||
ledger_config::effective_receipt_policy(
|
||||
&snap.data_dir().join("config.json"),
|
||||
&settings,
|
||||
)?
|
||||
};
|
||||
// server would refuse: the books' settings.
|
||||
let policy = ledger_config::codec::receipt_policy(ledger.settings());
|
||||
let receipt_threshold = policy.threshold();
|
||||
let cash_accounts = cash_accounts(&ledger, &settings);
|
||||
let members = settings.company.party_members(&ledger);
|
||||
@@ -1658,15 +1648,6 @@ impl Books {
|
||||
ledger_core::parties::activity_with(&self.ledger, party, span, &self.money, &self.members)
|
||||
}
|
||||
|
||||
/// The books dir: the folder holding `books-data/` (and `vault/`).
|
||||
fn books_dir(&self) -> PathBuf {
|
||||
let d = self
|
||||
.data_dir
|
||||
.canonicalize()
|
||||
.unwrap_or_else(|_| self.data_dir.clone());
|
||||
d.parent().map(Path::to_path_buf).unwrap_or(d)
|
||||
}
|
||||
|
||||
/// A party's full TIN from the encrypted vault, formatted
|
||||
/// ("123-45-6789" for an SSN or ITIN, "12-3456789" for an EIN), for the
|
||||
/// clipboard only: never drawn on screen.
|
||||
@@ -1675,12 +1656,8 @@ impl Books {
|
||||
/// INVARIANT 1: read only on demand (a click), never on load or paint.
|
||||
/// INVARIANT 2: never creates a key file; a missing key is a locked
|
||||
/// vault ("restore it from your password manager").
|
||||
/// INVARIANT 3: the vault and key are the server's: for a book in the
|
||||
/// data root, its own `vault/` and `keys/legacy.key`; for older
|
||||
/// books, `vault/` beside `books-data/` and the key file the one
|
||||
/// given on the command line (--vault-key-file), else the settings'
|
||||
/// [vault] key_file, else ~/.config/wanderbooks/vault.key, one
|
||||
/// inside the books dir refused, as the server refuses it.
|
||||
/// INVARIANT 3: the vault and key are the server's: the book's own
|
||||
/// `vault/` and `keys/legacy.key` (a book of the data root, D-44).
|
||||
/// INVARIANT 4: an error never carries the digits (the vault's errors
|
||||
/// are redacted); a party with no record is "not in the vault".
|
||||
/// ```
|
||||
@@ -1694,26 +1671,13 @@ impl Books {
|
||||
}
|
||||
|
||||
/// Where the vault and its key are (INVARIANT 3 of [`Self::tin_from_vault`]).
|
||||
fn vault_place(&self) -> Result<(PathBuf, PathBuf), String> {
|
||||
if ledger_store::root::inside_a_root(&self.data_dir) {
|
||||
return Ok((
|
||||
self.data_dir.join(ledger_store::root::VAULT_DIR),
|
||||
self.data_dir
|
||||
.join(ledger_store::root::KEYS_DIR)
|
||||
.join(ledger_store::root::LEGACY_KEY_FILE),
|
||||
));
|
||||
}
|
||||
let key = crate::vault_key_file()
|
||||
.or_else(|| self.settings.vault_key_file.clone())
|
||||
.unwrap_or_else(ledger_vault::default_key_file);
|
||||
let books = self.books_dir();
|
||||
if resolved(&key).starts_with(resolved(&books)) {
|
||||
return Err(format!(
|
||||
"The vault key file {} is inside the books folder: move it out, and name its new place to the server and the viewer (--vault-key-file).",
|
||||
key.display()
|
||||
));
|
||||
}
|
||||
Ok((books.join("vault"), key))
|
||||
fn vault_place(&self) -> (PathBuf, PathBuf) {
|
||||
(
|
||||
self.data_dir.join(ledger_store::root::VAULT_DIR),
|
||||
self.data_dir
|
||||
.join(ledger_store::root::KEYS_DIR)
|
||||
.join(ledger_store::root::LEGACY_KEY_FILE),
|
||||
)
|
||||
}
|
||||
|
||||
/// A party's signed W-9 file from the vault, on demand (a click).
|
||||
@@ -1727,7 +1691,7 @@ impl Books {
|
||||
/// The vault, opened read-only, never making a key (a missing one is a
|
||||
/// locked vault).
|
||||
pub fn open_vault(&self) -> Result<ledger_vault::Vault, String> {
|
||||
let (dir, key) = self.vault_place()?;
|
||||
let (dir, key) = self.vault_place();
|
||||
ledger_vault::Vault::open(&dir, &key, false).map_err(
|
||||
|e| match e {
|
||||
ledger_vault::Error::NoKey(k) => format!(
|
||||
@@ -2287,28 +2251,3 @@ fn origin(events: &[usize], journal: &[JournalLine], closing: bool) -> &'static
|
||||
fn cash_accounts(ledger: &Ledger, settings: &BooksSettings) -> Vec<AccountId> {
|
||||
ledger_store::reconcilable::cash_accounts(ledger, &settings.cash_accounts)
|
||||
}
|
||||
|
||||
/// `path` made absolute through its nearest existing ancestor (symlinks
|
||||
/// resolved), so a path that doesn't exist yet can still be placed: the
|
||||
/// server's rule for where the vault key may live.
|
||||
fn resolved(path: &Path) -> PathBuf {
|
||||
let abs = if path.is_absolute() {
|
||||
path.to_path_buf()
|
||||
} else {
|
||||
std::env::current_dir().unwrap_or_default().join(path)
|
||||
};
|
||||
let mut base = abs.as_path();
|
||||
let mut rest = Vec::new();
|
||||
while !base.exists() {
|
||||
match (base.file_name(), base.parent()) {
|
||||
(Some(name), Some(up)) => {
|
||||
rest.push(name.to_os_string());
|
||||
base = up;
|
||||
}
|
||||
_ => return abs,
|
||||
}
|
||||
}
|
||||
let mut out = base.canonicalize().unwrap_or_else(|_| base.to_path_buf());
|
||||
out.extend(rest.into_iter().rev());
|
||||
out
|
||||
}
|
||||
@@ -16,11 +16,9 @@ use std::sync::Arc;
|
||||
use std::sync::mpsc::{Receiver, RecvTimeoutError, Sender, channel};
|
||||
use std::time::Duration;
|
||||
|
||||
/// Where the books come from: their folder (a book of the data root, or
|
||||
/// an older books dir's `books-data`). Their settings are their own, in
|
||||
/// their journal (plan 3.6); only an older books dir whose journal keeps
|
||||
/// none is read as its server reads it, from its settings file (see
|
||||
/// `settings`).
|
||||
/// Where the books come from: their folder, a book of the data root
|
||||
/// (`wanderbooks gui ID`; D-44). Their settings are their own, in their
|
||||
/// journal (plan 3.6), read as the server reads them.
|
||||
#[derive(Clone, Debug)]
|
||||
pub struct Source {
|
||||
/// The books' folder (journal and blobs).
|
||||
@@ -29,34 +27,6 @@ pub struct Source {
|
||||
pub today: Option<NaiveDate>,
|
||||
}
|
||||
|
||||
/// The settings file an older books dir's server reads when the books
|
||||
/// keep no settings of their own: `wanderbooks.toml` beside `books-data`,
|
||||
/// or the one named with `--books-toml`. Never for a book of the data
|
||||
/// root.
|
||||
pub fn legacy_toml(data_dir: &std::path::Path) -> Option<PathBuf> {
|
||||
legacy_toml_path(data_dir).filter(|p| p.is_file())
|
||||
}
|
||||
|
||||
/// Where an older books dir's settings file is, whether or not it is
|
||||
/// there yet (a file made later is followed, as the server follows it).
|
||||
fn legacy_toml_path(data_dir: &std::path::Path) -> Option<PathBuf> {
|
||||
if ledger_store::root::inside_a_root(data_dir) {
|
||||
return None;
|
||||
}
|
||||
if let Some(named) = LEGACY_TOML.get() {
|
||||
return Some(named.clone());
|
||||
}
|
||||
Some(data_dir.parent()?.join("wanderbooks.toml"))
|
||||
}
|
||||
|
||||
/// `--books-toml`, for an older books dir (once, at start).
|
||||
static LEGACY_TOML: std::sync::OnceLock<PathBuf> = std::sync::OnceLock::new();
|
||||
|
||||
/// Name an older books dir's settings file (`--books-toml`).
|
||||
pub fn set_legacy_toml(path: PathBuf) {
|
||||
let _ = LEGACY_TOML.set(path);
|
||||
}
|
||||
|
||||
pub enum Update {
|
||||
Books(Arc<Books>),
|
||||
Error(String),
|
||||
@@ -109,7 +79,7 @@ pub fn load_once(source: &Source) -> Result<Books, String> {
|
||||
})
|
||||
})?;
|
||||
let integrity = Integrity::check(&snap, &mut HashSet::new());
|
||||
let settings = settings(source, &snap)?;
|
||||
let settings = settings(&snap);
|
||||
let today = today(source, &settings);
|
||||
Books::build(&snap, settings, today, None, integrity)
|
||||
}
|
||||
@@ -139,26 +109,13 @@ fn today(source: &Source, settings: &BooksSettings) -> NaiveDate {
|
||||
.unwrap_or_else(|| ledger_core::settings::today_in(settings.timezone.as_deref()))
|
||||
}
|
||||
|
||||
/// The settings, as the server reads them: the books' own, from their
|
||||
/// journal; for an older books dir that keeps none, its settings file
|
||||
/// (else the defaults). A book of the data root reads no file.
|
||||
fn settings(source: &Source, snap: &Snapshot) -> Result<BooksSettings, String> {
|
||||
settings_of(&source.data_dir, snap)
|
||||
}
|
||||
|
||||
/// `settings` for the books in `data_dir`, as `snap` holds them.
|
||||
pub fn settings_of(data_dir: &std::path::Path, snap: &Snapshot) -> Result<BooksSettings, String> {
|
||||
let books = snap.ledger().settings();
|
||||
if !books.is_journaled()
|
||||
&& let Some(toml) = legacy_toml(data_dir)
|
||||
&& toml.is_file()
|
||||
{
|
||||
return ledger_config::load(&toml);
|
||||
}
|
||||
Ok(ledger_config::codec::books_settings(
|
||||
books,
|
||||
/// The settings: the books' own, from their journal, as the server reads
|
||||
/// them (the defaults until the first is set).
|
||||
pub fn settings(snap: &Snapshot) -> BooksSettings {
|
||||
ledger_config::codec::books_settings(
|
||||
snap.ledger().settings(),
|
||||
snap.ledger().base_currency().code(),
|
||||
))
|
||||
)
|
||||
}
|
||||
|
||||
fn run(
|
||||
@@ -191,30 +148,14 @@ fn run(
|
||||
let mut build = |snap: &Snapshot, prev: Option<u64>| -> (Update, ledger_store::DiskCheck) {
|
||||
let integrity = Integrity::check(snap, &mut verified);
|
||||
let disk = integrity.disk.clone();
|
||||
let update = match settings(&source, snap).and_then(|s| {
|
||||
let today = today(&source, &s);
|
||||
Books::build(snap, s, today, prev, integrity)
|
||||
}) {
|
||||
let s = settings(snap);
|
||||
let today = today(&source, &s);
|
||||
let update = match Books::build(snap, s, today, prev, integrity) {
|
||||
Ok(b) => Update::Books(Arc::new(b)),
|
||||
Err(e) => Update::Error(e),
|
||||
};
|
||||
(update, disk)
|
||||
};
|
||||
// An older books dir's settings file, followed as its server follows
|
||||
// it (only read while the books keep no settings of their own).
|
||||
// And its config.json, whose receipt rule the server reads too.
|
||||
let toml = legacy_toml_path(&source.data_dir);
|
||||
let config = (!ledger_store::root::inside_a_root(&source.data_dir))
|
||||
.then(|| source.data_dir.join("config.json"));
|
||||
let mtime = |t: &Option<PathBuf>| {
|
||||
t.as_ref()
|
||||
.and_then(|p| std::fs::metadata(p).ok())
|
||||
.and_then(|m| m.modified().ok())
|
||||
};
|
||||
let toml_mtime = |t: &Option<PathBuf>| (mtime(t), mtime(&config));
|
||||
// Taken before the first build, so a file written while it is being
|
||||
// built is a change, never part of the starting state.
|
||||
let mut toml_seen = toml_mtime(&toml);
|
||||
let (first, disk) = build(&snap, None);
|
||||
let mut last_disk = Some(disk);
|
||||
send(first);
|
||||
@@ -267,15 +208,8 @@ fn run(
|
||||
}
|
||||
};
|
||||
look_at_ops(&mut watcher);
|
||||
let day_now = |snap: &Snapshot| {
|
||||
settings(&source, snap)
|
||||
.map(|s| today(&source, &s))
|
||||
.unwrap_or_else(|_| today(&source, &BooksSettings::default()))
|
||||
};
|
||||
let day_now = |snap: &Snapshot| today(&source, &settings(snap));
|
||||
let mut day = day_now(&snap);
|
||||
if let (Some(w), Some(dir)) = (watcher.as_mut(), toml.as_ref().and_then(|t| t.parent())) {
|
||||
let _ = w.watch(dir, RecursiveMode::NonRecursive);
|
||||
}
|
||||
loop {
|
||||
if gone() {
|
||||
return;
|
||||
@@ -302,7 +236,6 @@ fn run(
|
||||
}
|
||||
};
|
||||
look_at_ops(&mut watcher);
|
||||
let toml_now = toml_mtime(&toml);
|
||||
let new_day = day_now(&snap);
|
||||
// The writer journals first and updates its database right after:
|
||||
// a "behind" database usually catches up a moment later, so look
|
||||
@@ -311,9 +244,8 @@ fn run(
|
||||
&& last_disk
|
||||
.as_ref()
|
||||
.is_some_and(|d| *d != ledger_store::DiskCheck::Matches && snap.check_disk() != *d);
|
||||
if grew || disk_changed || new_day != day || toml_now != toml_seen {
|
||||
if grew || disk_changed || new_day != day {
|
||||
day = new_day;
|
||||
toml_seen = toml_now;
|
||||
let (update, disk) = build(&snap, grew.then_some(before));
|
||||
last_disk = Some(disk);
|
||||
send(update);
|
||||
|
||||
@@ -29,21 +29,6 @@ pub use data::Source;
|
||||
|
||||
use std::path::PathBuf;
|
||||
|
||||
/// The vault key file named on the command line (`--vault-key-file`),
|
||||
/// which wins over a settings file's `[vault] key_file`, as it does for
|
||||
/// the server: books that keep their own settings never name it.
|
||||
static VAULT_KEY_FILE: std::sync::OnceLock<std::path::PathBuf> = std::sync::OnceLock::new();
|
||||
|
||||
/// Name the vault key file (once, at start).
|
||||
pub fn set_vault_key_file(path: std::path::PathBuf) {
|
||||
let _ = VAULT_KEY_FILE.set(path);
|
||||
}
|
||||
|
||||
/// The vault key file named on the command line, if one was.
|
||||
pub fn vault_key_file() -> Option<std::path::PathBuf> {
|
||||
VAULT_KEY_FILE.get().cloned()
|
||||
}
|
||||
|
||||
/// How [`run`] stops when it can't go on: the reason is already printed
|
||||
/// on stderr, and the number is the process's exit code (2: a bad argument; 1: the demo books couldn't be built). A
|
||||
/// library never ends the process itself, so the books it opened are
|
||||
@@ -64,14 +49,12 @@ impl std::error::Error for Exit {}
|
||||
/// `wanderbooks gui`). It opens the books read-only and returns when the
|
||||
/// window closes. An unknown argument returns [`Exit`] (code 2).
|
||||
///
|
||||
/// `ledger-gui [--root PATH] [--book ID] [--data-dir PATH [--books-toml PATH] [--vault-key-file PATH]] [--today YYYY-MM-DD] [--demo]`:
|
||||
/// a book of the data root (plan 3.6): `--root`, else the root `wanderbooks
|
||||
/// setup` made, never the current directory or a settings file; `--book`
|
||||
/// names one, else the root's only one (or the first, by id).
|
||||
/// `--data-dir` opens an older books dir's `books-data` instead (its
|
||||
/// settings file `--books-toml`, read while its journal keeps none, else
|
||||
/// the `wanderbooks.toml` beside it; its vault key `--vault-key-file`);
|
||||
/// `--demo` builds a demo company in a temp directory and opens that.
|
||||
/// `ledger-gui [--root PATH] [--book ID] [--today YYYY-MM-DD] [--demo]`:
|
||||
/// a book of the data root (plan 3.6), the only books it opens (D-44):
|
||||
/// `--root`, else the root `wanderbooks setup` made, never the current
|
||||
/// directory or a settings file; `--book` names one, else the root's only
|
||||
/// one (or the first, by id). `--demo` builds a demo company in a temp
|
||||
/// directory and opens that.
|
||||
pub fn run(
|
||||
prog: &str,
|
||||
args: impl IntoIterator<Item = String>,
|
||||
@@ -82,28 +65,11 @@ pub fn run(
|
||||
let mut today = None;
|
||||
let mut demo = false;
|
||||
let mut args = args.into_iter();
|
||||
let usage = || {
|
||||
format!(
|
||||
"usage: {prog} [--root PATH] [--book ID] [--data-dir PATH [--books-toml PATH] [--vault-key-file PATH]] [--today YYYY-MM-DD] [--demo]"
|
||||
)
|
||||
};
|
||||
let usage = || format!("usage: {prog} [--root PATH] [--book ID] [--today YYYY-MM-DD] [--demo]");
|
||||
while let Some(a) = args.next() {
|
||||
match a.as_str() {
|
||||
"--root" => root = args.next().map(PathBuf::from),
|
||||
"--book" => book = args.next(),
|
||||
"--data-dir" => data_dir = args.next().map(PathBuf::from),
|
||||
// An older books dir's settings file, read only while its
|
||||
// books keep no settings of their own (data::legacy_toml).
|
||||
"--books-toml" => {
|
||||
if let Some(t) = args.next() {
|
||||
crate::data::set_legacy_toml(PathBuf::from(t));
|
||||
}
|
||||
}
|
||||
"--vault-key-file" => {
|
||||
if let Some(k) = args.next() {
|
||||
crate::set_vault_key_file(PathBuf::from(k));
|
||||
}
|
||||
}
|
||||
"--today" => today = args.next().and_then(|d| d.parse().ok()),
|
||||
"--demo" => demo = true,
|
||||
"-h" | "--help" => {
|
||||
|
||||
@@ -151,9 +151,8 @@ impl Job {
|
||||
let snap = ledger_store::Snapshot::load(&books.data_dir).map_err(|e| e.to_string())?;
|
||||
let ledger = snap.ledger();
|
||||
// The settings the rest of the viewer shows, read as the server
|
||||
// reads them (data::settings: an older books dir that keeps none
|
||||
// in its journal reads its settings file).
|
||||
let st = &crate::data::settings_of(&books.data_dir, &snap)?;
|
||||
// reads them (data::settings).
|
||||
let st = &crate::data::settings(&snap);
|
||||
let settings = ledger_package::Settings {
|
||||
company: &st.company,
|
||||
cash_accounts: &st.cash_accounts,
|
||||
|
||||
@@ -21,8 +21,8 @@
|
||||
//! 2. Each runs off the UI thread; what came of it is shown, in words.
|
||||
//! 3. A restore is shown before it is done (the backup proven, what it
|
||||
//! would do), and done only for that backup, at that head.
|
||||
//! 4. Without an owner (the viewer on its own, older books dirs, the
|
||||
//! demo) the menu isn't there.
|
||||
//! 4. Without an owner (the viewer on its own, books outside a data
|
||||
//! root: the demo) the menu isn't there.
|
||||
//! 5. Books waiting for a format upgrade show a standing notice above
|
||||
//! every page, and the go-ahead is asked once each time the viewer
|
||||
//! opens them: the owner passphrase, typed here and handed to the
|
||||
@@ -109,7 +109,7 @@ fn owner() -> Option<Arc<dyn Owner>> {
|
||||
}
|
||||
|
||||
/// The id of books of the data root (their folder's name), or None for
|
||||
/// an older books dir (INVARIANT 4).
|
||||
/// books outside one, the demo's (INVARIANT 4).
|
||||
pub fn book_id(books: &Books) -> Option<String> {
|
||||
ledger_store::root::inside_a_root(&books.data_dir)
|
||||
.then(|| books.data_dir.file_name()?.to_str().map(str::to_string))
|
||||
|
||||
@@ -169,19 +169,12 @@ pub fn show(ui: &mut Ui, b: &Books, shell: &mut Shell<'_>) {
|
||||
|_| {},
|
||||
|ui| {
|
||||
let kept = b.ledger.settings();
|
||||
// Where the settings shown come from: a settings
|
||||
// file only for an older books dir that keeps none
|
||||
// in its journal and has one (data::settings).
|
||||
let from_file =
|
||||
!kept.is_journaled() && crate::data::legacy_toml(&b.data_dir).is_some();
|
||||
// The currency is always known: facts are the rest.
|
||||
if c.profile.iter().all(|(k, _)| k == "base_currency") {
|
||||
ui.label(
|
||||
RichText::new(if from_file {
|
||||
"No company facts in the settings file yet: the agent records them as you give them."
|
||||
} else {
|
||||
"No company facts set yet: the agent records them as you give them."
|
||||
})
|
||||
RichText::new(
|
||||
"No company facts set yet: the agent records them as you give them.",
|
||||
)
|
||||
.color(p.muted),
|
||||
);
|
||||
}
|
||||
@@ -204,11 +197,9 @@ pub fn show(ui: &mut Ui, b: &Books, shell: &mut Shell<'_>) {
|
||||
kv(ui, "Time zone", z);
|
||||
}
|
||||
ui.label(
|
||||
RichText::new(if from_file {
|
||||
"Read from the settings file: the agent can move it into the books."
|
||||
} else {
|
||||
"Kept in the books: the agent changes settings, with who decided and when."
|
||||
})
|
||||
RichText::new(
|
||||
"Kept in the books: the agent changes settings, with who decided and when.",
|
||||
)
|
||||
.font(theme::regular(12.0))
|
||||
.color(p.muted),
|
||||
);
|
||||
|
||||
Reference in new issue
Block a user