← Whispering

fix: Reorder UI elements so sidebar can control output visibility

48feabe46f1c4538f23c82761538e45c1fbecfcc · Claude · Dec 1, 2025 20:39

Create output panels before sidebar so the sidebar can receive a reference
to the output container and toggle its visibility.

+3 −3 · 1 file changed

  • src/whispering_ui/main.py +3 −3
diff --git a/src/whispering_ui/main.py b/src/whispering_ui/main.py
index 49a65c2..bb6a11d 100644
--- a/src/whispering_ui/main.py
+++ b/src/whispering_ui/main.py
@@ -106,9 +106,6 @@ def main():
 
     # Create main container
     with ui.row().classes('w-full h-screen'):
-        # Sidebar (always visible)
-        create_sidebar(state, bridge)
-
         # Output panels (always created, visibility controlled by state)
         output_container = create_output_panels(state)
 
@@ -116,6 +113,9 @@ def main():
         if not state.text_visible:
             output_container.set_visibility(False)
 
+        # Sidebar (always visible) - created after output so it can control it
+        create_sidebar(state, bridge, output_container)
+
     # === SAVE SETTINGS ON EXIT ===
     def save_settings_on_exit():
         """Save settings before application closes."""