US04-05: Operate Rename Plans in the Browser (#69)

This commit was merged in pull request #69.
This commit is contained in:
2026-08-16 11:52:10 +02:00
parent 7103cb84bf
commit 8d96acd067
12 changed files with 809 additions and 9 deletions

View File

@@ -418,8 +418,17 @@ def _plan_dict(plan: RenamePlan, operations: list[RenameOperation]) -> dict:
"asset_count": operation.asset_count,
"same_filesystem": operation.same_filesystem,
"case_only": operation.case_only,
"issues": json.loads(operation.issues or "[]"),
# Severity is decided here, not in the browser: a client that has to
# keep its own copy of BLOCKING_CODES will eventually disagree with
# the validator about whether a plan can run.
"issues": [
{**issue, "blocking": issue["code"] in BLOCKING_CODES}
for issue in json.loads(operation.issues or "[]")
],
"journal_state": operation.journal_state,
"verified_at": operation.verified_at.isoformat() if operation.verified_at else None,
"error_code": operation.error_code,
"error_message": operation.error_message,
}
for operation in operations
],