feat(web): show owner response validation approval detail

This commit is contained in:
Your Name
2026-05-21 14:49:25 +08:00
parent ee44185322
commit 5af90d1367
8 changed files with 415 additions and 3 deletions

View File

@@ -97,6 +97,18 @@ def validate(root: Path) -> None:
awooop_approvals_page = (
root / "apps" / "web" / "src" / "app" / "[locale]" / "awooop" / "approvals" / "page.tsx"
).read_text(encoding="utf-8")
awooop_approval_detail_page = (
root
/ "apps"
/ "web"
/ "src"
/ "app"
/ "[locale]"
/ "awooop"
/ "approvals"
/ "[run_id]"
/ "page.tsx"
).read_text(encoding="utf-8")
awooop_contracts_page = (
root / "apps" / "web" / "src" / "app" / "[locale]" / "awooop" / "contracts" / "page.tsx"
).read_text(encoding="utf-8")
@@ -315,6 +327,7 @@ def validate(root: Path) -> None:
"s2_76_awooop_tenants_owner_response_validation_scope",
"s2_77_awooop_runs_owner_response_validation_boundary",
"s2_78_awooop_run_detail_owner_response_validation_boundary",
"s2_79_awooop_approval_detail_owner_response_validation_boundary",
]
assert_equal(
"progress_delta_ledger.delta_ids",
@@ -464,6 +477,11 @@ def validate(root: Path) -> None:
[item["action_id"] for item in rollup["next_safe_actions"] if isinstance(item, dict)],
"show_awooop_run_detail_owner_response_validation_boundary",
)
assert_contains(
"rollup.next_safe_actions.action_ids",
[item["action_id"] for item in rollup["next_safe_actions"] if isinstance(item, dict)],
"show_awooop_approval_detail_owner_response_validation_boundary",
)
assert_contains(
"rollup.next_safe_actions.action_ids",
[item["action_id"] for item in rollup["next_safe_actions"] if isinstance(item, dict)],
@@ -6054,6 +6072,96 @@ def validate(root: Path) -> None:
key,
)
assert_text_contains(
"awooop_approval_detail_page.owner_response_validation_decision_panel",
awooop_approval_detail_page,
"OwnerResponseValidationDecisionBoundaryPanel",
)
assert_text_contains(
"awooop_approval_detail_page.owner_response_validation_decision_refs",
awooop_approval_detail_page,
"ownerResponseValidationDecisionRefs",
)
assert_text_contains(
"awooop_approval_detail_page.owner_response_validation_decision_iwooos_link",
awooop_approval_detail_page,
'href="/iwooos"',
)
for text in [
"source_control_owner_response_validation_rollup_v1",
"gitea_inventory_owner_attestation_response_v1",
"github_target_owner_decision_response_v1",
"source_control_ref_truth_owner_response_v1",
"source_control_workflow_secret_name_owner_response_v1",
"owner_response_validation_received_count=0",
"owner_response_validation_accepted_count=0",
"owner_response_validation_rejected_count=0",
"approval_decision_owner_response_linked=false",
"owner_response_acceptance_authorized=false",
"security_approval_record_created=false",
"platform_run_creation_authorized=false",
"execution_router_linked=false",
"repo_creation_authorized=false",
"refs_sync_authorized=false",
"workflow_modification_authorized=false",
"secret_value_collection_allowed=false",
"github_primary_switch_authorized=false",
"runtime_execution_authorized=false",
"action_buttons_allowed=false",
]:
assert_text_contains(
"awooop_approval_detail_page.owner_response_validation_decision_boundary",
awooop_approval_detail_page,
text,
)
for key in [
"title",
"subtitle",
"badge",
"openIwooos",
"decisionRefsTitle",
"boundaryLabel",
"boundaryTitle",
"boundaryDetail",
"metrics",
"decisionRefs",
]:
assert_contains(
"web_messages.zh-TW.awooop.approvalDecision.ownerResponseValidationDecisionBoundary",
list(web_messages_zh["awooop"]["approvalDecision"]["ownerResponseValidationDecisionBoundary"].keys()),
key,
)
assert_contains(
"web_messages.en.awooop.approvalDecision.ownerResponseValidationDecisionBoundary",
list(web_messages_en["awooop"]["approvalDecision"]["ownerResponseValidationDecisionBoundary"].keys()),
key,
)
for key in [
"validationRollup",
"giteaAttestation",
"githubTarget",
"refsTruth",
"workflowSecret",
]:
assert_contains(
"web_messages.zh-TW.awooop.approvalDecision.ownerResponseValidationDecisionBoundary.decisionRefs",
list(
web_messages_zh["awooop"]["approvalDecision"]["ownerResponseValidationDecisionBoundary"][
"decisionRefs"
].keys()
),
key,
)
assert_contains(
"web_messages.en.awooop.approvalDecision.ownerResponseValidationDecisionBoundary.decisionRefs",
list(
web_messages_en["awooop"]["approvalDecision"]["ownerResponseValidationDecisionBoundary"][
"decisionRefs"
].keys()
),
key,
)
assert_text_contains("awooop_approvals_page.security_owner_response_panel", awooop_approvals_page, "SecurityOwnerResponseGatePanel")
assert_text_contains("awooop_approvals_page.iwooos_link", awooop_approvals_page, 'href="/iwooos"')
for text in [