From 501de4374a5c27d5c5432edabcadb962f39c45dd Mon Sep 17 00:00:00 2001 From: Benjamin Admin Date: Sun, 12 Apr 2026 08:27:44 +0200 Subject: [PATCH] Keep page references as visible column cells Step 5g was extracting page refs (p.55, p.70) as zone metadata and removing them from the cell table. Users want to see them as a separate column. Now keeps cells in place while still extracting metadata for the frontend header display. Co-Authored-By: Claude Opus 4.6 (1M context) --- klausur-service/backend/grid_editor_api.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/klausur-service/backend/grid_editor_api.py b/klausur-service/backend/grid_editor_api.py index 7ee1694..3f39caa 100644 --- a/klausur-service/backend/grid_editor_api.py +++ b/klausur-service/backend/grid_editor_api.py @@ -1176,10 +1176,10 @@ async def _build_grid_core( }) page_ref_cell_ids.add(cell.get("cell_id")) - # Remove page_ref cells from the table (but keep their rows) - if page_ref_cell_ids: - z["cells"] = [c for c in z["cells"] - if c.get("cell_id") not in page_ref_cell_ids] + # Keep page_ref cells in the table as a visible column. + # Previously these were removed, but users want to see them. + # The metadata extraction above still populates zone["page_refs"] + # for the frontend header display. # Detect footer: last non-header row if it has only 1 cell # with short, non-content text (page numbers like "233" or