fix: Model::add_formula auto-adds target item; fix formula panel display

Model::add_formula now ensures the formula target exists as an item in
the target category (same fix as AddFormula effect, but at the model
level — covers file loading and headless paths).

Formula panel now shows raw formula text instead of debug-formatted
string with redundant target name and quotes.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
Edward Langley
2026-04-09 01:56:34 -07:00
parent 4686f47026
commit 24c59fbf40
2 changed files with 30 additions and 1 deletions

View File

@ -50,7 +50,7 @@ impl PanelContent for FormulaContent<'_> {
} else {
Style::default().fg(Color::Green)
};
let text = format!(" {} = {:?}", formula.target, formula.raw);
let text = format!(" {}", formula.raw);
let truncated = if text.len() > inner.width as usize {
format!("{}", &text[..inner.width as usize - 1])
} else {