Add an AI-friendly classification round-trip alongside the By-tracking grid:
- "⬇ Export paths" (filetree header): downloads the filtered file list as a
1-column CSV of full (root-relative) paths — the same keys the importer
matches on. Hand it to an LLM to classify into
<party>/<direction>/<transmittal>/<file>.ext.
- "Import paths…" (above the target list): loads a 2-column CSV (old path,
new path). Each new path drives both axes — the trailing filename sets the
tracking number (rename, via parseFilename → tracking tree) and the leading
<party>/<direction>/<transmittal> segments route a transmittal (via
parseFolder → transmittal tree). MERGE semantics: only files named in the
CSV are touched; others keep their classification.
- Per-row problems (unknown old path, unparseable filename/transmittal, bad
direction) are collected and offered as a downloadable errors CSV, with a
summary toast — scales to thousands of rows. Either axis can apply
independently, so a filename-only new path is a rename with no error.
This replaces the JSON "Export for editing" / "Import edits" pair (the CSV
path form is fully expressive for this model and simpler to round-trip); the
TSV "Export list" clipboard→Excel button is kept. Buttons can grow into a
modal later if more options are needed.
Includes a Playwright test driving the real file-input import (rename+route,
filename-only, merge-preserves-unlisted, CSV-quoted comma in title, error row).
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>