diff --git a/frontend/js/pane-manager.js b/frontend/js/pane-manager.js index 8c6d052..c152de0 100644 --- a/frontend/js/pane-manager.js +++ b/frontend/js/pane-manager.js @@ -613,17 +613,7 @@ const PaneManager = { setActivePane(paneId) { if (this.activePaneId === paneId) return; - // Hide previous active pane content (lazy rendering) - if (this.panes[this.activePaneId] && this.panes[this.activePaneId].element) { - const oldContent = this.panes[this.activePaneId].element.querySelector('.content-area'); - if (oldContent) oldContent.style.display = 'none'; - } this.activePaneId = paneId; - // Show new active pane content - if (this.panes[paneId] && this.panes[paneId].element) { - const newContent = this.panes[paneId].element.querySelector('.content-area'); - if (newContent) newContent.style.display = ''; - } this._highlightActive(); // Sync global state from this pane's active tab const tm = this.tabManagers[paneId]; diff --git a/tests/test_pane_manager.py b/tests/test_pane_manager.py index 2e96249..a21a707 100644 --- a/tests/test_pane_manager.py +++ b/tests/test_pane_manager.py @@ -176,14 +176,17 @@ class TestPaneManagerDOMFlow: content = path.read_text() assert "id === 0" in content or "i === 0" in content - def test_lazy_rendering_hides_inactive(self): - """setActivePane hides old pane content with display:none.""" + def test_panes_remain_visible_when_inactive(self): + """Split view keeps all panes visible — no display:none hiding. + Lazy rendering optimization removed because it broke split visibility.""" path = PROJECT_ROOT / "frontend" / "js" / "pane-manager.js" content = path.read_text() active_section = content.split("setActivePane(paneId)")[1].split(" },")[0] \ if "setActivePane(paneId)" in content else "" - assert "display" in active_section.lower(), \ - "setActivePane must toggle display for lazy rendering" + # setActivePane should NOT hide inactive panes (they must stay visible) + assert "display" not in active_section.lower() or \ + "display:" not in active_section.lower(), \ + "setActivePane must NOT hide inactive panes — split view requires both visible" def test_collapse_restores_original_dom(self): """_collapseToSingle restores #tab-bar and #content-area IDs."""