Originally created by: kristofferR
Adds a Page zoom select to the Settings window's General tab and makes the Settings struct the source of truth for the zoom level, with two-way sync to the page. Ref [#55] (part of epic [#59]).
Zoom already existed (Cmd/Ctrl +/-/0, 30–200% in 10% steps) but was invisible in Settings and persisted only in page-local localStorage — it wasn't even re-applied on page load.
Settings.zoom (integer percent, default 100) clamped to 30–200 on load, save, and event intake (Settings::sanitized / clamp_zoom).selectRow pattern (extended with an optional parse arg so the numeric value round-trips through set_settings).messenger.js applies __CARRIER_SETTINGS__.zoom at load and on every carrier:settings push; keyboard/View-menu zoom emits carrier:zoom via plugin:event|emit, which Rust persists without re-pushing settings (mirrors the carrier:unread handler) so the two directions can't feed back.cargo fmt / cargo clippy --all-targets -- -D warnings clean; cargo test --lib 47 passed (includes new tests for the default, clamping, and missing-key deserialization).node --check src-tauri/inject/messenger.js passes.Sibling feature PRs from the same epic touch the same Settings struct / settings.html field arrays, so trivial merge conflicts with them are expected.
https://claude.ai/code/session_01Pqw8xaJrGLhgSo2YR68ov5
Originally posted by: kristofferR
@coderabbitai review
Originally posted by: coderabbitai[bot]
✅ Action performed
Review finished. > Note: CodeRabbit is an incremental review system and does not re-review already reviewed commits. This command is applicable only when automatic reviews are paused.Originally posted by: coderabbitai[bot]
No actionable comments were generated in the recent review. 🎉
ℹ️ Recent review info
⚙️ Run configuration
**Configuration used**: Path: .coderabbit.yaml **Review profile**: ASSERTIVE **Plan**: Pro **Run ID**: `f6ce1ac3-6543-447f-bce5-edb503c6c0c8`📥 Commits
Reviewing files that changed from the base of the PR and between [67a34b] and 85e9420a021a7d8fd06f947f6838dd51cac6f10e.📒 Files selected for processing (2)
* `src-tauri/inject/messenger.js` * `src-tauri/src/lib.rs`📝 Walkthrough
## Walkthrough Adds a persistent page zoom setting across the backend settings model, injected page script, settings UI, and README, with zoom values clamped and synchronized through settings changes and runtime events. ### Changes **Page Zoom Feature** |Layer / File(s)|Summary| |---|---| |**Settings struct, clamping, and persistence**`src-tauri/src/lib.rs`|Adds `zoom` to `Settings`, clamps it through load/store paths, initializes defaults, wires `carrier:zoom`, and extends tests for clamping and missing values.| |**Injected messenger zoom tracking and sync**
`src-tauri/inject/messenger.js`|Tracks zoom in memory, updates page/localStorage/settings snapshots, and syncs with `window.__CARRIER_SETTINGS__` plus legacy stored values.| |**Settings UI zoom control**
`dist/settings.html`|Adds a General tab zoom field, numeric parsing for select persistence, and a zoom dropdown row.| |**README documentation update**
`README.md`|Updates the settings feature list and adds a note about zoom persistence across restarts.| **Estimated code review effort:** 3 (Moderate) | ~25 minutes ### Sequence Diagram(s) :::mermaid sequenceDiagram participant User participant SettingsUI participant Backend participant MessengerJS participant Disk User->>SettingsUI: choose page zoom SettingsUI->>Backend: persist zoom value Backend->>Disk: save sanitized settings Backend->>MessengerJS: carrier:settings event MessengerJS->>MessengerJS: syncZoomFromSettings() User->>MessengerJS: change zoom in page MessengerJS->>Backend: carrier:zoom event Backend->>Disk: save updated zoom **Possibly related issues** - [kristofferR/Carrier#55](https://github.com/kristofferR/Carrier/issues/55): Requests adding a zoom control under Settings and syncing it through `window.__CARRIER_SETTINGS__` / `carrier:settings`, which matches the page zoom feature in this PR.
🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
| Check name | Status | Explanation | | :------------------------: | :------- | :--------------------------------------------------------------------------------------------------------- | | Description Check | ✅ Passed | Check skipped - CodeRabbit’s high-level summary is enabled. | | Title check | ✅ Passed | The title clearly describes the main change: adding page zoom to the Settings window. | | Docstring Coverage | ✅ Passed | No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check. | | Linked Issues check | ✅ Passed | Check skipped because no linked issues were found for this pull request. | | Out of Scope Changes check | ✅ Passed | Check skipped because no linked issues were found for this pull request. |✨ Finishing Touches
📝 Generate docstrings
- [ ] Create stacked PR - [ ] Commit on current branch🧪 Generate unit tests (beta)
- [ ] Create PR with unit tests - [ ] Commit unit tests in branch `feature/zoom-setting`⚔️ Resolve merge conflicts
- [ ] Resolve merge conflict in branch `feature/zoom-setting`Comment
@coderabbitai helpto get the list of available commands.Originally posted by: kristofferR
@coderabbitai review
Originally posted by: coderabbitai[bot]
✅ Action performed
Review finished. > Note: CodeRabbit is an incremental review system and does not re-review already reviewed commits. This command is applicable only when automatic reviews are paused.Originally posted by: kristofferR
@coderabbitai review
Originally posted by: coderabbitai[bot]
✅ Action performed
Review finished. > Note: CodeRabbit is an incremental review system and does not re-review already reviewed commits. This command is applicable only when automatic reviews are paused.Originally posted by: kristofferR
@coderabbitai review
Originally posted by: coderabbitai[bot]
✅ Action performed
Review finished. > Note: CodeRabbit is an incremental review system and does not re-review already reviewed commits. This command is applicable only when automatic reviews are paused.Originally posted by: kristofferR
@coderabbitai review
Originally posted by: coderabbitai[bot]
✅ Action performed
Review finished. > Note: CodeRabbit is an incremental review system and does not re-review already reviewed commits. This command is applicable only when automatic reviews are paused.Originally posted by: kristofferR
@coderabbitai review
Originally posted by: coderabbitai[bot]
✅ Action performed
Review finished. > Note: CodeRabbit is an incremental review system and does not re-review already reviewed commits. This command is applicable only when automatic reviews are paused.Ticket changed by: kristofferR