feat(books): add manual write-and-rename action in metadata editor

allow users to trigger file write-back and rename from the edit metadata tab as a single explicit action.

return write and rename outcomes with library setting flags so the UI can show clear result and warning states.

Closes #143
This commit is contained in:
neon
2026-05-30 05:16:33 +00:00
parent 9b50b0ebb7
commit 6ffce7d7c8
20 changed files with 828 additions and 26 deletions
+2
View File
@@ -53,6 +53,8 @@ export enum AuditAction {
BookBulkUpdateTags = "book.bulk.update_tags",
BookBulkSetMetadataLock = "book.bulk.set_metadata_lock",
BookWriteAndRename = "book.write_and_rename",
CollectionCreate = "collection.create",
CollectionUpdate = "collection.update",
CollectionDelete = "collection.delete",
+7
View File
@@ -28,6 +28,13 @@ export interface FileRenameResult {
durationMs: number;
}
export interface BookWriteAndRenameResult {
write: WriteResult;
rename: FileRenameResult;
libraryAutoWriteEnabled: boolean;
libraryAutoRenameEnabled: boolean;
}
// ── Bulk Rename ─────────────────────────────────────────────────────────────
export type BulkRenameStatus = "will_rename" | "unchanged" | "collision" | "no_pattern" | "error";