Problem
When the web viewer is embedded (e.g. arkit), the host page calls override_panel_state() to hide panels for a clean initial look in the context of web. This correctly hides the panels, but also disables the toggle buttons — making it impossible for users to open them without entering fullscreen first.
The override API conflates two concerns:
- Setting the panel's visible state (intended)
- Disabling user interaction with the toggle button (unintended)
Root cause
In top_panel.rs, the panel toggle buttons use *_overridden() as a disable condition (for all three panels):
ui.add_enabled_ui(
route.has_selection_panel() && !app_blueprint.selection_panel_overridden(),
...
);
When an override exists, the button is grayed out, the toggle action is also blocked through hot keys.
Proposed fix after chatting to claude
top_panel.rs: Remove !app_blueprint.*_panel_overridden() from the three add_enabled_ui conditions
app_blueprint.rs: Remove the early returns in toggle_*_panel() so clicking the button works, and toggle from the effective state (self.*_panel_state()) rather than the blueprint store value (self.panel_states.*)
- Clear the override for that panel on toggle so it doesn't fight back on the next frame (?)
Problem
When the web viewer is embedded (e.g. arkit), the host page calls
override_panel_state()to hide panels for a clean initial look in the context of web. This correctly hides the panels, but also disables the toggle buttons — making it impossible for users to open them without entering fullscreen first.The override API conflates two concerns:
Root cause
In
top_panel.rs, the panel toggle buttons use*_overridden()as a disable condition (for all three panels):When an override exists, the button is grayed out, the toggle action is also blocked through hot keys.
Proposed fix after chatting to claude
top_panel.rs: Remove!app_blueprint.*_panel_overridden()from the threeadd_enabled_uiconditionsapp_blueprint.rs: Remove the early returns intoggle_*_panel()so clicking the button works, and toggle from the effective state (self.*_panel_state()) rather than the blueprint store value (self.panel_states.*)