From 3b0e96f318e9f9c31587b9be888f41fdac3508a5 Mon Sep 17 00:00:00 2001 From: Seongho Bae Date: Wed, 16 Sep 2026 00:53:23 +0900 Subject: [PATCH 1/4] test(reports): preserve localized comparison tick naming contract --- ..._grouping_comparison_graphic_tick_contract.py | 16 +++++----------- 1 file changed, 5 insertions(+), 11 deletions(-) diff --git a/tests/test_grouping_comparison_graphic_tick_contract.py b/tests/test_grouping_comparison_graphic_tick_contract.py index 92ddc2fbd..d0c3af61e 100644 --- a/tests/test_grouping_comparison_graphic_tick_contract.py +++ b/tests/test_grouping_comparison_graphic_tick_contract.py @@ -10,23 +10,17 @@ def test_comparison_graphic_names_ticks_with_distinct_accessible_copy() -> None: - """Comparison tick names must not reuse the report-graphic tick key.""" + """Comparison ticks compose existing localized comparison and tick copy.""" plot_source = PLOT_SOURCE.read_text(encoding="utf-8") - layout_source = LAYOUT_SOURCE.read_text(encoding="utf-8") - assert ( - 'export const LEFTOVER_MAP_COMPARE_PLOT_TICK =\n' - ' "leftover map comparison graphic leftover-map axis {axis} tick {value}";' - in layout_source - ) - assert "LEFTOVER_MAP_COMPARE_PLOT_TICK" in plot_source + assert "LEFTOVER_MAP_COMPARE_PLOT_LABEL" in plot_source + assert "LEFTOVER_MAP_PLOT_TICK" in plot_source assert re.search( - r'variant\s*===\s*"comparison"\s*\?\s*LEFTOVER_MAP_COMPARE_PLOT_TICK\s*:\s*LEFTOVER_MAP_PLOT_TICK', + r'variant\s*===\s*"comparison"\s*\?\s*`\$\{t\(LEFTOVER_MAP_COMPARE_PLOT_LABEL\)\}:\s*\$\{tf\(LEFTOVER_MAP_PLOT_TICK,\s*\{\s*axis:\s*tick\.axis,\s*value:\s*tick\.label,?\s*\}\)\}`\s*:\s*tf\(LEFTOVER_MAP_PLOT_TICK,\s*\{\s*axis:\s*tick\.axis,\s*value:\s*tick\.label,?\s*\}\)', plot_source, re.DOTALL, ) - assert "axis: tick.axis" in plot_source - assert "value: tick.label" in plot_source + assert "LEFTOVER_MAP_COMPARE_PLOT_TICK" not in plot_source def test_tick_positions_come_from_persisted_coordinates_not_distance() -> None: From 2084d534cef027aacf515a0907e36a3aa600fa62 Mon Sep 17 00:00:00 2001 From: Seongho Bae Date: Wed, 16 Sep 2026 00:54:18 +0900 Subject: [PATCH 2/4] fix(reports): localize comparison tick accessible names --- frontend/src/components/LeftoverMapPlot.tsx | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/frontend/src/components/LeftoverMapPlot.tsx b/frontend/src/components/LeftoverMapPlot.tsx index aa5440d58..8f904dd02 100644 --- a/frontend/src/components/LeftoverMapPlot.tsx +++ b/frontend/src/components/LeftoverMapPlot.tsx @@ -174,7 +174,8 @@ function leftoverMapPlotAxisText( * comparison-graphic and rank labels rather than adding SPA translation debt. * ADR 0319 captions leftover-map distance on that comparison graphic using * the same localized composition boundary rather than adding another static - * comparison-only translation key. + * comparison-only translation key. ADR 0320 names comparison coordinate ticks + * through the same composition boundary, preserving localized generic tick copy. * Never invent a leftover score. */ export function LeftoverMapPlot({ @@ -302,7 +303,14 @@ export function LeftoverMapPlot({ Date: Wed, 16 Sep 2026 00:55:32 +0900 Subject: [PATCH 3/4] chore(stack): adopt #860 comparison tick contract --- ..._grouping_comparison_graphic_tick_contract.py | 16 +++++----------- 1 file changed, 5 insertions(+), 11 deletions(-) diff --git a/tests/test_grouping_comparison_graphic_tick_contract.py b/tests/test_grouping_comparison_graphic_tick_contract.py index 92ddc2fbd..d0c3af61e 100644 --- a/tests/test_grouping_comparison_graphic_tick_contract.py +++ b/tests/test_grouping_comparison_graphic_tick_contract.py @@ -10,23 +10,17 @@ def test_comparison_graphic_names_ticks_with_distinct_accessible_copy() -> None: - """Comparison tick names must not reuse the report-graphic tick key.""" + """Comparison ticks compose existing localized comparison and tick copy.""" plot_source = PLOT_SOURCE.read_text(encoding="utf-8") - layout_source = LAYOUT_SOURCE.read_text(encoding="utf-8") - assert ( - 'export const LEFTOVER_MAP_COMPARE_PLOT_TICK =\n' - ' "leftover map comparison graphic leftover-map axis {axis} tick {value}";' - in layout_source - ) - assert "LEFTOVER_MAP_COMPARE_PLOT_TICK" in plot_source + assert "LEFTOVER_MAP_COMPARE_PLOT_LABEL" in plot_source + assert "LEFTOVER_MAP_PLOT_TICK" in plot_source assert re.search( - r'variant\s*===\s*"comparison"\s*\?\s*LEFTOVER_MAP_COMPARE_PLOT_TICK\s*:\s*LEFTOVER_MAP_PLOT_TICK', + r'variant\s*===\s*"comparison"\s*\?\s*`\$\{t\(LEFTOVER_MAP_COMPARE_PLOT_LABEL\)\}:\s*\$\{tf\(LEFTOVER_MAP_PLOT_TICK,\s*\{\s*axis:\s*tick\.axis,\s*value:\s*tick\.label,?\s*\}\)\}`\s*:\s*tf\(LEFTOVER_MAP_PLOT_TICK,\s*\{\s*axis:\s*tick\.axis,\s*value:\s*tick\.label,?\s*\}\)', plot_source, re.DOTALL, ) - assert "axis: tick.axis" in plot_source - assert "value: tick.label" in plot_source + assert "LEFTOVER_MAP_COMPARE_PLOT_TICK" not in plot_source def test_tick_positions_come_from_persisted_coordinates_not_distance() -> None: From 26f652baeeaa71c40877f3d0d673fb204bbef06c Mon Sep 17 00:00:00 2001 From: Seongho Bae Date: Wed, 16 Sep 2026 00:56:40 +0900 Subject: [PATCH 4/4] chore(stack): adopt #860 comparison tick accessibility repair --- frontend/src/components/LeftoverMapPlot.tsx | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-) diff --git a/frontend/src/components/LeftoverMapPlot.tsx b/frontend/src/components/LeftoverMapPlot.tsx index e68507c5b..e46d3b6bd 100644 --- a/frontend/src/components/LeftoverMapPlot.tsx +++ b/frontend/src/components/LeftoverMapPlot.tsx @@ -196,8 +196,10 @@ function leftoverMapPlotAxisText( * comparison-graphic and rank labels rather than adding SPA translation debt. * ADR 0319 captions leftover-map distance on that comparison graphic using * the same localized composition boundary rather than adding another static - * comparison-only translation key. ADR 0321 adds persisted comparison-axis - * singular evidence without deriving it from axis share. + * comparison-only translation key. ADR 0320 names comparison coordinate ticks + * through the same composition boundary, preserving localized generic tick copy. + * ADR 0321 adds persisted comparison-axis singular evidence without deriving it + * from axis share. * Never invent a leftover score. */ export function LeftoverMapPlot({ @@ -325,7 +327,14 @@ export function LeftoverMapPlot({