viewer: journal text for asset.acquisition_linked; a test that every event type the store writes has plain-language journal text
check / check (push) Canceled after 0s
check / check (push) Canceled after 0s
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:
1 parent
ee7e205f5c
commit
2e14c702c0
3 files changed
+55
-9
No files matched your search
@@ -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!(
|
||||
|
||||
Reference in new issue
Block a user