Skip to content

fix(mcp): send no quality with a GIF export - #1192

Merged
EtienneLescot merged 1 commit into
mainfrom
fix/mcp-gif-export-quality
Oct 14, 2026
Merged

EtienneLescot merged 1 commit into
mainfrom
fix/mcp-gif-export-quality

Conversation

@EtienneLescot

@EtienneLescot EtienneLescot commented Oct 14, 2026 •

Copy link
Copy Markdown
Member

Summary

Every GIF export over MCP failed, on both the stdio and the in-app server, with "--quality is only supported for MP4 exports".

  • Cause: exportVideo always sent quality: "good", and the export runner refuses a quality on a GIF.
  • Fix: a GIF now goes out with quality: null; gifSize sizes it.
  • Test: the existing test now asserts quality: null on the GIF request. It checked the GIF options with toMatchObject and never looked at quality, which is how this got through.

Related issue

Found in the Windows MCP e2e pass on build run 38538195250 (#1191). Part of #1180.

Type of change

  • Bug fix

Release impact

  • Patch

Desktop impact

  • Not platform-specific

Testing

  • npx vitest --run electron/mcp/media-tools.test.ts: 39 pass.
  • Both typechecks and Biome pass.
  • To re-check on the next CI build in the e2e pass: exportVideo to a .gif.

🤖 Generated with Claude Code

Summary by CodeRabbit

  • Bug Fixes
    • Improved GIF export handling when GIF-specific options are selected.
    • Preserved requested quality settings for MP4 exports, with “good” used as the default when no quality is specified.

exportVideo always set quality to good, and the export runner refuses a quality
on a GIF, so every GIF export over MCP failed with "--quality is only supported
for MP4 exports". A GIF is sized by gifSize; leave quality null for it.
@coderabbitai

coderabbitai Bot commented Oct 14, 2026 •

Copy link
Copy Markdown
Contributor

Review in Change Stack →

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration
  • Configuration used: defaults
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: b143c782-93c6-40b6-9cf0-3f55061a5a8c
📥 Commits

Reviewing files that changed from the base of the PR and between b668b2c and e151dff.

📒 Files selected for processing: 2
  • electron/mcp/media-tools.test.ts
  • electron/mcp/media-tools.ts

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

📝 Walkthrough

GIF exports now pass quality: null to the export runner. MP4 exports continue to use the requested quality or default to "good". The GIF export test checks the null value.

Changes: GIF export quality

Layer / File(s) Summary
GIF quality routing and test
electron/mcp/media-tools.ts, electron/mcp/media-tools.test.ts
GIF exports pass quality: null to the runner. The test expectation includes this value. MP4 quality handling is unchanged.

Priority: ⬇️ Low

Estimated code review effort: 1 (Trivial) | ~5 minutes

Change: Bug fix

Merge Risk: ⚪ Minimal · up to e151d

GIF exports no longer pass the MP4-only quality setting, while MP4 quality behavior is retained. No actionable merge-blocking risk remains.

Pre-merge checks: Passed 4 · Failed 1

Failed Failed checks: 1 warning

Check name Status Explanation Resolution
Docstring Coverage Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 2 functions across 2 files. Write docstrings for the functions missing them to satisfy the coverage threshold.
Passed Passed checks: 4 passed
Check name Status Explanation
Title check Passed The title clearly and concisely describes the main change: GIF exports no longer send a quality value.
Description check Passed The description is complete and follows the repository template. It explains the cause and fix, identifies related issues, marks the change as a bug fix and patch release, specifies platform impact, a…
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.
  • Fix all pre-merge checks with AI
✨ Finishing Touches: 💡 1
📝 Generate docstrings: 💡
  • Commit to this branch
  • Create a new PR
🧪 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

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

@EtienneLescot
EtienneLescot merged commit 13a3e22 into main Oct 14, 2026
19 checks passed
@EtienneLescot
EtienneLescot deleted the fix/mcp-gif-export-quality branch October 14, 2026 10:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant