refactor: remove dead code, replace sum_matching tests with evaluate()

Removes unused methods (sum_matching, get_mut, item_by_name, item_index,
top_level_groups, is_group_collapsed, show_item) and unused constants
(LABEL_THRESHOLD, MIN_COL_WIDTH).

The sum_matching tests in model.rs were bypassing the formula evaluator
entirely. Replaced them with equivalent tests that call evaluate() against
the existing Total = SUM(Revenue) formula, exercising the real aggregation
code path.

Also fixes a compile error in view.rs prop_tests where View/Axis imports
and a doc comment were incorrectly commented out.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
Edward Langley
2026-03-30 22:56:04 -07:00
parent 15f7fbe799
commit a1b17dc9af
7 changed files with 102 additions and 140 deletions

View File

@ -33,7 +33,6 @@ impl FieldProposal {
}
const CATEGORY_THRESHOLD: usize = 20;
const LABEL_THRESHOLD: usize = 50;
pub fn analyze_records(records: &[Value]) -> Vec<FieldProposal> {
if records.is_empty() {