Add Dock reopen regression coverage
Facebook Messenger on your desktop, without the Facebook clutter
Brought to you by:
kristoffer-r
Originally created by: kristofferR
Ref [#29]
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**: `44dea4d9-85f8-4802-b664-0bf541ff7a29`π₯ Commits
Reviewing files that changed from the base of the PR and between [d7bd1b] and 0fe372b77897ce2d27229699388ad6a76ede4b9a.π Files selected for processing (1)
* `src-tauri/src/lib.rs`π Walkthrough
## Walkthrough Refactors macOS Dock reopen logic by extracting the reopen condition into a new helper function `should_reopen_main`, used by `reopen_main_if_needed`. Adds macOS-only unit tests covering three condition combinations for the extracted helper. ### Changes **Dock Reopen Refactor** |Layer / File(s)|Summary| |---|---| |**Extract reopen condition and add tests**`src-tauri/src/lib.rs`|Extracts reopen boolean logic into `should_reopen_main(has_visible_windows, has_visible_messenger_window)`, updates `reopen_main_if_needed` to use it, and adds macOS-only unit tests for the three key visibility combinations.| **Estimated code review effort:** 1 (Trivial) | ~5 minutes **Possibly related PRs** - [[kristofferR/Carrier#36](https://github.com/kristofferR/Carrier/issues/36)](https://github.com/kristofferR/Carrier/pull/36): Adds `RunEvent::Reopen` handling based on visible windows in the same file, related to the reopen condition refactored here.
π₯ 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 accurately summarizes the main change: added regression coverage for macOS Dock reopen behavior. | | 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 `codex/issue-29-dock-reopen`Comment
@coderabbitai helpto get the list of available commands.Ticket changed by: kristofferR