feat(import): give each merged file a view filtered to it (improvise-lpzu)

A CSV merge now records each file's columns, and the build adds one view
per file: File on Filter at that file's item, its own categories seated
as a fresh import seats them, the rest on None, and other files'
measures hidden. The merged Default view stays the initial view. The
headless and wizard paths both carry the sources.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01VdfEGXA7aJ6ftMsCc9PJze
This commit is contained in:
Claude (agent-lpzu)
2026-09-24 20:48:16 -07:00
committed by Edward Langley
parent e65d87fda9
commit bb505f8faf
7 changed files with 322 additions and 55 deletions
+12
View File
@@ -653,6 +653,18 @@ fn a_headless_import_of_a_folder_merges_its_csv_files_and_repeats_byte_for_byte(
assert!(doc.lines().any(|l| l == line), "{line} missing from\n{doc}");
}
assert!(!doc.contains("README"), "{doc}");
let views: Vec<&str> = doc.lines().filter(|l| l.starts_with("## View: ")).collect();
assert_eq!(
views,
[
"## View: Default",
"## View: abs-churn",
"## View: age",
"## View: coupling"
]
);
assert!(doc.lines().any(|l| l == "File: filter, coupling"), "{doc}");
assert!(doc.contains("Initial View: Default"), "{doc}");
// The output now sits in the folder; a second run must not read it.
let second = run_import(&dir, &out_path, &[]);