fix(macos): persist zoom level to DB so traffic lights use correct position on launch

Previously the welcome window (or any startup window) always used the
default CURRENT_ZOOM of 100, ignoring the user's saved zoom preference
stored in frontend localStorage. Now update_traffic_light_position also
writes the zoom value to the app_metadata DB, and setup() reads it back
before creating any window.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
xintaofei
2026-04-13 10:10:09 +08:00
parent 17bae372a1
commit e05ae76453
2 changed files with 47 additions and 5 deletions

View File

@@ -83,6 +83,10 @@ mod tauri_app {
}
}
// Load saved zoom level for traffic-light positioning before
// any window is created.
tauri::async_runtime::block_on(windows::load_saved_zoom(&db.conn));
// Install bundled expert skills into the central store
// (`~/.codeg/skills/`). Runs in the background and does
// not block startup; failures are logged but non-fatal.