Skip to content

Fix zoom and missing View menu items after plugin rebuild#66

Merged
an0nn30 merged 2 commits intomainfrom
fix/zoom-webview-api
Mar 20, 2026
Merged

Fix zoom and missing View menu items after plugin rebuild#66
an0nn30 merged 2 commits intomainfrom
fix/zoom-webview-api

Conversation

@an0nn30
Copy link
Copy Markdown
Owner

@an0nn30 an0nn30 commented Mar 20, 2026

Summary

  • Root cause fix: build_app_menu_with_plugins reconstructed the View menu from scratch when plugins added menu items, but dropped zoom in/out/reset, zen mode, and toggle bottom panel — causing those items and their keyboard accelerators to vanish once any plugin loaded.
  • Zoom improvement: Switched from CSS document.body.style.zoom (unreliable in WKWebView) to Tauri's native WebviewWindow::set_zoom() API. Zoom level is now persisted to state.toml and restored on app launch and new window creation.

Test plan

  • Launch app with a plugin enabled, verify View menu contains Zoom In/Out/Reset, Zen Mode, and Toggle Bottom Panel
  • Press Cmd+= and Cmd+- to zoom in/out — verify the whole UI scales
  • Press Cmd+0 to reset zoom
  • Restart the app — verify zoom level is preserved
  • Open a new window (Cmd+Shift+N) — verify it inherits the persisted zoom level

an0nn30 added 2 commits March 20, 2026 10:40
CSS document.body.style.zoom does not work reliably in WebKit/WKWebView.
Replace with Tauri's WebviewWindow::set_zoom() which uses native webview
scaling. Zoom level is now persisted to state.toml via the existing
zoom_factor field and restored on app launch and new window creation.
build_app_menu_with_plugins reconstructed the View menu from scratch
when plugins added menu items, but only included toggle_left,
toggle_right, and focus_sessions — dropping toggle_bottom, zen_mode,
zoom_in, zoom_out, and zoom_reset. This caused those menu items and
their keyboard accelerators to vanish once any plugin was loaded.
@an0nn30 an0nn30 merged commit 0e67df2 into main Mar 20, 2026
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant