Improve Android app UI and controller flows

This commit is contained in:
2026-10-09 16:43:58 +08:00
parent c0e26b97fe
commit 608229a497
90 changed files with 8103 additions and 1133 deletions
@@ -270,7 +270,7 @@ def test_template_preserves_multilingual_text(tmp_path):
assert created.status_code == 201
stored = client.get(f"/api/templates/{created.json()['id']}")
assert stored.status_code == 200
assert stored.json()["scene"]["elements"][0]["text"] == multilingual
assert stored.json()["scene"]["layers"][1]["elements"][0]["text"] == multilingual
def test_template_mutations_require_current_revision(tmp_path):
@@ -294,7 +294,7 @@ def test_template_mutations_require_current_revision(tmp_path):
assert client.delete(path, headers=stale_headers).status_code == 409
preserved = client.get(path).json()
assert preserved["name"] == "shared"
assert preserved["scene"]["elements"][0]["text"] == "first"
assert preserved["scene"]["layers"][1]["elements"][0]["text"] == "first"
assert preserved["revision"] == current["revision"]
@@ -467,7 +467,7 @@ def test_template_migration_write_failure_rolls_back_every_record(tmp_path, monk
[
(("scene", "version"), True),
(("scene", "width"), 64.0),
(("scene", "elements", 0, "size"), True),
(("scene", "layers", 1, "elements", 0, "size"), True),
],
)
def test_current_template_schema_rejects_noncanonical_json_types(
@@ -492,7 +492,7 @@ def test_current_template_schema_rejects_noncanonical_json_types(
original = (json.dumps(document, separators=(",", ":")) + "\n").encode("utf-8")
record_path.write_bytes(original)
with pytest.raises(TemplateValidationError, match="must be an integer"):
with pytest.raises(TemplateValidationError, match="integer|fields or dimensions"):
TemplateStore(data_dir)
assert record_path.read_bytes() == original