Skip to content

Fix main: JMAP changes pass typed arguments to one_call - #1264

Merged
benandez merged 1 commit into
mainfrom
fix/jmap-changes-typed-args
Nov 13, 2026
Merged

benandez merged 1 commit into
mainfrom
fix/jmap-changes-typed-args

Conversation

@benandez

@benandez benandez commented Nov 13, 2026 •

Copy link
Copy Markdown
Member

main does not compile since #1245 merged: #1110 (merged earlier) calls one_call with a Value, #1245 changed it to take a Map<String, Value>.

-self.one_call(\"Email/set\", Value::Object(set_arguments(..)), ..)
+self.one_call(\"Email/set\", set_arguments(..), ..)
-self.one_call(\"Email/get\", json!({\"accountId\": .., \"ids\": ids, \"properties\": [\"id\"]}), ..)
+self.one_call(\"Email/get\", arguments(&get(account, Some(&ids), &[\"id\"]))?, ..)

Same request JSON (the stand-in server checks argument names strictly).

  • cargo xtask ci passes locally (13/13); jmap 308/308
  • A crash or data-loss fix has its regression test (n/a)
  • "Allow edits by maintainers" is ticked
  • I have signed the CLA

Human-reviewed, AI-assisted, nobody's mailbox harmed.

Summary by CodeRabbit

  • Refactor
    • Simplified how email updates and follow-up lookups are prepared. The lookup continues to request only email IDs.

#1245 made `one_call` take a JSON object map; #1110's Email/set and
Email/get calls in mail/changes.rs, merged meanwhile, still passed a
Value, so main stopped compiling. The Email/get look now uses the
shared `get` builder; the request JSON is unchanged.

Human-reviewed, AI-assisted, nobody's mailbox harmed.
@benandez benandez added the needs-review Sync, store, sign-in or secrets: a maintainer reviews line by line label Nov 13, 2026
@coderabbitai

coderabbitai Bot commented Nov 13, 2026 •

Copy link
Copy Markdown

Explain Change →

No actionable comments were generated in the recent review.

Walkthrough

The mail changes module now passes Email/set arguments directly to one_call. It builds the silent-outcome Email/get arguments with shared helpers and continues to request only the id property.

Changes: Mail change request arguments

Layer / File(s) Summary
Build and pass typed request arguments
crates/jmap/src/mail/changes.rs
The module imports arguments and get, passes the Email/set argument map directly, and builds the silent-outcome Email/get arguments with those helpers. The lookup still requests only id.

Estimated code review effort: 2 (Simple) | ~5 minutes

Change: Bug fix

Possibly related PRs

Suggested reviewers: nextxch

Merge Risk: Minimal · up to 3736b

This change fixes a compile failure in the JMAP mail change requests and is reported to leave the request JSON unchanged. No actionable merge-blocking risk remains.

Pre-merge checks: Passed 4

Check name Status Explanation
Title check Passed The title names the change: JMAP changes in mail/changes.rs now pass typed arguments to one_call, which fixes the compile failure on main after #1245. It matches the diff and the PR objectives, and it…
Description check Passed The description states the cause (main does not compile after #1245 merged), shows the before-and-after code change, and explains that the request JSON is unchanged. It fills in the checklist: CI pass…
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.
Full details: Title check

Explanation

The title names the change: JMAP changes in mail/changes.rs now pass typed arguments to one_call, which fixes the compile failure on main after #1245. It matches the diff and the PR objectives, and it is specific enough for a reader scanning history.

Full details: Description check

Explanation

The description states the cause (main does not compile after #1245 merged), shows the before-and-after code change, and explains that the request JSON is unchanged. It fills in the checklist: CI passes locally (13/13, jmap 308/308), the regression-test item is marked n/a, maintainer edits are allowed, and the CLA is signed. The template's 'What changes for the person using MailCraft' section is empty, and 'Closes #' has no issue number. The description also omits the 'Builds on' note, which is optional and not needed here. The missing user-facing note and issue link are minor gaps for an internal compile fix.

Finishing Touches

Generate unit tests (beta)

  • Commit to this branch
  • Create a new PR
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

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

Recent review info

Run configuration

Commits

Reviewing files that changed from the base of the PR and between 44f63b8 and 3736b18.

Files selected for processing: 1

  • crates/jmap/src/mail/changes.rs

Included review availability: This review used your included allowance. Your plan provides up to 4 included reviews per hour; 1 remain after this review.

@sonarqubecloud

Copy link
Copy Markdown

@Musiker15

Copy link
Copy Markdown
Contributor

Ran the full cargo xtask ci on this branch (3736b18) on Windows: all 13 steps pass (cargo-deny isn't installed here, so xtask skipped that one). I'd fixed it the same way locally while rebasing #1210, so I'm dropping mine.

@benandez

Copy link
Copy Markdown
Member Author

Review (reviewing-prs): Verdict: Approve at 3736b18. CI: 44 pass, 1 skipping. The request JSON is unchanged: get() serialises accountId, ids and properties, and leaves out None. The stand-in server's strict argument check passes, and jmap's 308 tests pass. Merged with the latest main (b5cbc3c): clippy passes on the whole workspace. Without this fix main does not compile.

@benandez
benandez merged commit e5761ad into main Nov 13, 2026
45 checks passed
@benandez
benandez deleted the fix/jmap-changes-typed-args branch November 13, 2026 09:05
nextxch added a commit to nextxch/mailcraft-ucs that referenced this pull request Nov 13, 2026
@nextxch nextxch mentioned this pull request Nov 13, 2026
3 tasks done
thekk1 added a commit to thekk1/mailcraft that referenced this pull request Nov 13, 2026
Brings in UCSLabs#1264, which fixes the JMAP build that UCSLabs#1245 left broken on main and that failed this pull request's checks.

Human-reviewed, AI-assisted, nobody's mailbox harmed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

needs-review Sync, store, sign-in or secrets: a maintainer reviews line by line

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants