Commit
Fix pack batch rename not persisting visibly
Commit details
Commit notes
Batch "Find & Replace" inside a pack returned 200 but the rename never appeared. The shared BatchEditModal routed pack renames to PATCH /samples/batch/rename, which rewrites the underlying samples.name — yet the pack organizer displays and inline-edits the pack-specific pack_samples.display_name (packDisplayName ?? name). So when a display-name override existed the change was masked, and even the preview was computed from the wrong field.
Add a pack-scoped PATCH /sample-packs/:id/samples/batch-rename that applies find/replace to the display name (falling back to the sample name when no override is set), leaving samples.name untouched. The modal now calls this in the pack context and PackOrganizer previews against the displayed names.
Covered by a DB-backed integration test for both the override and fallback cases plus pack-ownership authorization.
- Files changed
- 7
- Lines added
- +393
- Lines removed
- −11