viewer: journal text for asset.acquisition_linked; a test that every event type the store writes has plain-language journal text

The acquisition link was added after the viewer's asset work and showed its raw event name in recent activity. The new test reads the event types from the store's replay arms, so the next new event without text fails it (checked: it fails without this fix).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01GWVo7x3UHw5kwCUaWxiejX
This commit is contained in:
swaitsandClaude Opus 5.5 committed 2026-10-15 12:35:39 -06:00
1 parent cd085108c1
commit 7f199737ef
3 files changed
+55 -9

No files matched your search

+12
View File
@@ -267,6 +267,18 @@ pub fn describe(b: &Books, line: &JournalLine) -> Option<Event> {
};
ev(icon::BARCODE, text, asset_id.map(Route::Asset))
}
"asset.acquisition_linked" => {
let entry = p.get("entry_id").and_then(|v| v.as_u64()).unwrap_or(0);
Some(Event {
icon: icon::LINK,
text: format!(
"Linked {} to the entry that acquired it, #{entry}",
asset(asset_id)
),
route: asset_id.map(Route::Asset),
also: Some(Route::Entry(entry)),
})
}
"asset.depreciation_posted" => with_asset(
icon::TREND_DOWN,
format!(