Skip to content

fix(desktop): rewrite remaining map_or defaults as match arms (clippy + MSRV 1.77) - #660

Closed
devin-ai-integration[bot] wants to merge 1 commit into
devfrom
devin/1790481900-desktop-mapor-heal
Closed

devin-ai-integration[bot] wants to merge 1 commit into
devfrom
devin/1790481900-desktop-mapor-heal

Conversation

@devin-ai-integration

@devin-ai-integration devin-ai-integration Bot commented Sep 27, 2026 •

Copy link
Copy Markdown

Summary

  • Rewrites the three remaining Option::map_or(default, ...) call sites in native_tray_accounts.rs (account list is_active fallback) and widget.rs (should_reload display-change/rate-limit gates) as match arms.
  • The desktop shell CI job compiles the crate with -D warnings; current stable clippy flags unnecessary_map_or on these sites, so every desktop-touching PR fails that lane until they are gone (seen on chore(deps): bump transitive serde_with and time out of vulnerable ranges #631's desktop shell job).
  • match is behavior-identical and, unlike is_none_or, works under the pinned rust-version = "1.77" (clippy's suggested is_none_or needs rustc 1.82+).

Verification

  • git grep -n "map_or(" desktop/src-tauri/ → 0 remaining call sites after the change.
  • Sites verified line-by-line against origin/dev (d8b85adc9); rewrites preserve the exact None defaults (row["active"].as_bool() == Some(true), true) and the Some predicates.
  • Local cargo clippy not runnable on this Windows box (no MSVC toolchain); the desktop shell CI job is the gate and compiles with -D warnings.

Checklist

  • Scope stays focused and avoids unrelated cleanup.
  • Docs or release notes were updated when needed.
  • Security-sensitive changes were reviewed for secrets, auth, and unsafe defaults.

Link to Devin session: https://app.devin.ai/sessions/18173a51bcf04824a2e66ca1d2e42ccf
Open in Devin Desktop: https://app.devin.ai/desktop/session/18173a51bcf04824a2e66ca1d2e42ccf?variant=devin
Requested by: @luvs01

Review readiness checklist

This PR stays in draft until every box below is ticked. Tick all four boxes once the requirements are met:

  • Required local validation passed; commands, results, and any full-suite exception are documented.

  • I pushed my PR to a recent dev commit (at most 10 behind; a maintainer may still ask for the exact tip before merge).

  • I resolved all correct Codex and CodeRabbit findings.

  • My PR is ready for review.

@devin-ai-integration

Copy link
Copy Markdown
Author

I'll fix CI failures and address comments from users with write access. I'll skip comments containing "(aside)".

  • Disable automatic comment, CI, and merge conflict monitoring

@coderabbitai

coderabbitai Bot commented Sep 27, 2026 •

Copy link
Copy Markdown

Important

Review skipped

Bot user detected.

To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: Repository: luvs01/opencodex/.coderabbit.yaml

Review profile: ASSERTIVE

Plan: Advanced

Run ID: ccbad1d0-6351-4bd4-ae7a-dec4e9c9d630

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@github-actions

Copy link
Copy Markdown

✅ Deterministic PR hygiene checks passed.

@github-actions github-actions Bot added the bug Something isn't working label Sep 27, 2026
@github-actions

github-actions Bot commented Sep 27, 2026 •

Copy link
Copy Markdown

⏳ DRAFT

  • review readiness checklist open (0/4 boxes ticked).

What to do

  • Tick all four boxes in the PR description once you're done (currently 0/4).
  • New commits were pushed after the checklist was completed on 4d508c3; the current head is 5fa700f.
  • The checklist has been reset: re-test against the latest code and tick all four boxes again.

Review readiness checklist

  • ⬜ Required local validation passed; commands, results, and any full-suite exception are documented.
  • ⬜ I pushed my PR to a recent dev commit (at most 10 behind; a maintainer may still ask for the exact tip before merge).
  • ⬜ I resolved all correct Codex and CodeRabbit findings.
  • ⬜ My PR is ready for review.

0/4 boxes ticked.

New commits were pushed after the checklist was completed on 4d508c3; the current head is 5fa700f.
The checklist has been reset: re-test against the latest code and tick all four boxes again.
UI screenshot waived by a maintainer comment.
Automatic draft conversion failed. Please convert this pull request to a draft manually until every box above is ticked.

@github-actions
github-actions Bot marked this pull request as draft September 27, 2026 04:07
@github-actions
github-actions Bot marked this pull request as ready for review September 27, 2026 04:12
@github-actions
github-actions Bot marked this pull request as draft September 27, 2026 04:14
@github-actions
github-actions Bot marked this pull request as ready for review September 27, 2026 04:15
@github-actions
github-actions Bot marked this pull request as draft September 27, 2026 04:23
@luvs01

luvs01 commented Sep 27, 2026

Copy link
Copy Markdown
Owner

This PR does not change the gui — the only gui/ path touched is a test file (providers-deep-link.test.tsx, a happy-dom flake drain); the rest is desktop Rust. No UI surface changes.

@devin-ai-integration

Copy link
Copy Markdown
Author

Dropped gui/tests/providers-deep-link.test.tsx from this PR in 4d508c3: the happy-dom hashchange drain fix is unrelated to the desktop map_or scope, and having a gui/ path in the diff arms the enforce-target screenshot gate, which bot authors cannot self-waive.

The fix is preserved on codex/propose-fix-for-tunnel-port-vulnerability (commit 6fb256b) and in this branch's history (b7f06f7) — landing it on dev needs a maintainer vehicle or a gui-screenshot-waived label, since a test-only gui change can't satisfy the screenshot gate.

@github-actions
github-actions Bot marked this pull request as ready for review September 27, 2026 04:58
… + MSRV 1.77)

Co-Authored-By: Epinephrine <luvs01@hanmail.net>
@luvs01
luvs01 force-pushed the devin/1790481900-desktop-mapor-heal branch from 4d508c3 to 5fa700f Compare September 27, 2026 12:32
@luvs01

luvs01 commented Sep 27, 2026

Copy link
Copy Markdown
Owner

이관됨: lidge-jun#6086

@luvs01

luvs01 commented Sep 27, 2026

Copy link
Copy Markdown
Owner

현재 dev 기준 리베이스 후 상류 제출 완료. 포크 PR 목적 달성으로 종료.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant