Fix corrupted embed stats fragment causing 500 and broken period tabs.

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
dekun
2026-07-10 13:57:09 +08:00
parent 40dbafe851
commit c97cc2823c
5 changed files with 15 additions and 27 deletions
+3 -1
View File
@@ -24,7 +24,9 @@ def main() -> None:
macro_body = lines[macro_start : macro_end + 1]
grid_start = _find_line(lines, lambda l: l == GRID_START)
panel_start = _find_line(lines, lambda l: "{% if page == 'env_config' %}" in l)
panel_start = _find_line(
lines, lambda l: l.strip() == "{% if page == 'env_config' %}"
)
stats_card_line = _find_line(lines, lambda l: 'id="stats-card"' in l)
stats_start = stats_card_line
while stats_start > 0 and lines[stats_start].strip() != "{% if page == 'stats' %}":