feat(web): add IwoooS focus deck
All checks were successful
CD Pipeline / tests (push) Successful in 1m32s
Code Review / ai-code-review (push) Successful in 12s
CD Pipeline / build-and-deploy (push) Successful in 4m51s
CD Pipeline / post-deploy-checks (push) Successful in 2m11s

This commit is contained in:
Your Name
2026-06-01 00:51:28 +08:00
parent ba22e70266
commit 21f5142d08
7 changed files with 634 additions and 39 deletions

View File

@@ -609,6 +609,7 @@ def validate(root: Path) -> None:
"s2_142_iwooos_first_unlock_path_first_layer",
"s2_143_iwooos_command_map_first_layer",
"s2_144_iwooos_command_palette_security_entry_unified",
"s2_145_iwooos_first_layer_focus_deck",
]
assert_equal(
"progress_delta_ledger.delta_ids",
@@ -1136,13 +1137,14 @@ def validate(root: Path) -> None:
]:
assert_text_not_contains("web_messages.zh-TW.awooop.runs_wording", zh_awooop_runs_text, forbidden)
zh_awooop_run_detail_text = json.dumps(
{
"incidentEvidence": web_messages_zh["awooop"]["incidentEvidence"],
"runDetail": web_messages_zh["awooop"]["runDetail"],
"approvalDecision": web_messages_zh["awooop"]["approvalDecision"],
},
ensure_ascii=False,
zh_awooop_run_detail_text = "\n".join(
collect_string_values(
{
"incidentEvidence": web_messages_zh["awooop"]["incidentEvidence"],
"runDetail": web_messages_zh["awooop"]["runDetail"],
"approvalDecision": web_messages_zh["awooop"]["approvalDecision"],
}
)
)
for forbidden in [
"Trace ID",
@@ -1512,6 +1514,32 @@ def validate(root: Path) -> None:
iwooos_projection["summary"]["command_map_runtime_gate_count"],
0,
)
assert_true(
"iwooos_projection.summary.focus_deck_first_layer",
iwooos_projection["summary"]["focus_deck_first_layer"],
)
assert_equal(
"iwooos_projection.summary.focus_deck_item_count",
iwooos_projection["summary"]["focus_deck_item_count"],
5,
)
assert_true(
"iwooos_projection.summary.focus_deck_anchor_navigation_allowed",
iwooos_projection["summary"]["focus_deck_anchor_navigation_allowed"],
)
assert_false(
"iwooos_projection.summary.focus_deck_execution_action_buttons_allowed",
iwooos_projection["summary"]["focus_deck_execution_action_buttons_allowed"],
)
assert_equal(
"iwooos_projection.summary.focus_deck_runtime_gate_count",
iwooos_projection["summary"]["focus_deck_runtime_gate_count"],
0,
)
assert_true(
"iwooos_projection.summary.focus_deck_above_command_map",
iwooos_projection["summary"]["focus_deck_above_command_map"],
)
assert_true(
"iwooos_projection.summary.all_product_coverage_snapshot_detail_ledger_collapsed",
iwooos_projection["summary"]["all_product_coverage_snapshot_detail_ledger_collapsed"],
@@ -11785,6 +11813,50 @@ def validate(root: Path) -> None:
f"iwooos_projection.first_progress_unlock_path_steps.{item['step_id']}.not_authorization",
item["not_authorization"],
)
assert_text_contains(
"iwooos_page.focus_deck_testid",
iwooos_projection_page,
'data-testid="iwooos-focus-deck-board"',
)
assert_text_contains(
"iwooos_page.focus_deck_component",
iwooos_projection_page,
"IwoooSFocusDeckBoard",
)
assert_text_before(
"iwooos_page.focus_deck_before_command_map",
iwooos_projection_page,
"<IwoooSFocusDeckBoard />",
"<IwoooSCommandMapBoard />",
)
assert_text_contains(
"iwooos_page.focus_deck_boundaries",
iwooos_projection_page,
'data-testid="iwooos-focus-deck-boundaries"',
)
for text in [
"href: '#iwooos-command-map-board'",
"href: '#iwooos-first-progress-unlock-path-board'",
"href: '#iwooos-global-security-mesh-matrix-board'",
"href: '#iwooos-host-tool-evidence-chain-board'",
"href: '#iwooos-command-map-source-control'",
"iwooos-command-map-source-control",
"iwooos_focus_deck_first_layer=true",
"iwooos_focus_deck_item_count=5",
"iwooos_focus_deck_anchor_navigation_allowed=true",
"iwooos_focus_deck_execution_action_buttons_allowed=false",
"iwooos_focus_deck_runtime_gate_count=0",
"iwooos_focus_deck_above_command_map=true",
"runtime_execution_authorized=false",
"active_runtime_gate_count=0",
"action_buttons_allowed=false",
"not_authorization=true",
]:
assert_text_contains(
"iwooos_page.focus_deck_boundary",
iwooos_projection_page,
text,
)
assert_text_contains(
"iwooos_page.command_map_testid",
iwooos_projection_page,
@@ -11896,6 +11968,59 @@ def validate(root: Path) -> None:
"iwooos_projection.command_map_items.boundary.host_mutation_authorized",
boundary_item["host_mutation_authorized"],
)
expected_focus_deck_item_ids = [
"workMap",
"unlockPath",
"productScope",
"hostTools",
"sourceControl",
]
focus_deck_items = iwooos_projection["focus_deck_items"]
assert_equal(
"iwooos_projection.focus_deck_items.ids",
[item["item_id"] for item in focus_deck_items],
expected_focus_deck_item_ids,
)
assert_equal(
"iwooos_projection.focus_deck_items.display_order",
[item["display_order"] for item in focus_deck_items],
list(range(1, len(expected_focus_deck_item_ids) + 1)),
)
for item in focus_deck_items:
assert_equal(
f"iwooos_projection.focus_deck_items.{item['item_id']}.display_mode",
item["display_mode"],
"first_layer_focus_deck",
)
assert_true(
f"iwooos_projection.focus_deck_items.{item['item_id']}.anchor_navigation_allowed",
item["anchor_navigation_allowed"],
)
assert_false(
f"iwooos_projection.focus_deck_items.{item['item_id']}.execution_action_button_allowed",
item["execution_action_button_allowed"],
)
assert_false(
f"iwooos_projection.focus_deck_items.{item['item_id']}.runtime_gate_opened",
item["runtime_gate_opened"],
)
assert_false(
f"iwooos_projection.focus_deck_items.{item['item_id']}.runtime_execution_authorized",
item["runtime_execution_authorized"],
)
assert_true(
f"iwooos_projection.focus_deck_items.{item['item_id']}.not_authorization",
item["not_authorization"],
)
source_control_focus = next(item for item in focus_deck_items if item["item_id"] == "sourceControl")
assert_false(
"iwooos_projection.focus_deck_items.sourceControl.source_control_mutation_authorized",
source_control_focus["source_control_mutation_authorized"],
)
assert_false(
"iwooos_projection.focus_deck_items.sourceControl.github_primary_switch_authorized",
source_control_focus["github_primary_switch_authorized"],
)
for text in [
"iwooos_first_unlock_path_step_count=5",
"iwooos_first_unlock_path_current_focus=s4_9_owner_response",
@@ -12024,6 +12149,60 @@ def validate(root: Path) -> None:
list(web_messages_en["iwooos"]["commandMap"]["items"][key].keys()),
field,
)
assert_contains(
"web_messages.zh-TW.iwooos.focusDeck",
list(web_messages_zh["iwooos"].keys()),
"focusDeck",
)
assert_contains(
"web_messages.en.iwooos.focusDeck",
list(web_messages_en["iwooos"].keys()),
"focusDeck",
)
for key in ["eyebrow", "title", "subtitle", "summary", "items", "boundaryTitle"]:
assert_contains(
"web_messages.zh-TW.iwooos.focusDeck.keys",
list(web_messages_zh["iwooos"]["focusDeck"].keys()),
key,
)
assert_contains(
"web_messages.en.iwooos.focusDeck.keys",
list(web_messages_en["iwooos"]["focusDeck"].keys()),
key,
)
for key in ["items", "runtime", "mode"]:
assert_contains(
"web_messages.zh-TW.iwooos.focusDeck.summary",
list(web_messages_zh["iwooos"]["focusDeck"]["summary"].keys()),
key,
)
assert_contains(
"web_messages.en.iwooos.focusDeck.summary",
list(web_messages_en["iwooos"]["focusDeck"]["summary"].keys()),
key,
)
for key in expected_focus_deck_item_ids:
assert_contains(
"web_messages.zh-TW.iwooos.focusDeck.items",
list(web_messages_zh["iwooos"]["focusDeck"]["items"].keys()),
key,
)
assert_contains(
"web_messages.en.iwooos.focusDeck.items",
list(web_messages_en["iwooos"]["focusDeck"]["items"].keys()),
key,
)
for field in ["label", "title", "body"]:
assert_contains(
f"web_messages.zh-TW.iwooos.focusDeck.items.{key}",
list(web_messages_zh["iwooos"]["focusDeck"]["items"][key].keys()),
field,
)
assert_contains(
f"web_messages.en.iwooos.focusDeck.items.{key}",
list(web_messages_en["iwooos"]["focusDeck"]["items"][key].keys()),
field,
)
assert_text_contains(
"iwooos_page.first_unlock_evidence_packet_testid",
iwooos_projection_page,