Skip to content

feat: let the agent set a zoom's 3D camera - #1122

Merged
EtienneLescot merged 1 commit into
mainfrom
feat/dsl-zoom-3d-camera
Oct 11, 2026
Merged

EtienneLescot merged 1 commit into
mainfrom
feat/dsl-zoom-3d-camera

Conversation

@EtienneLescot

@EtienneLescot EtienneLescot commented Oct 11, 2026 •

Copy link
Copy Markdown
Member

What

The agent can now set a zoom's 3D camera, the editor's 3D camera control: addZoom, addZooms and setZoom take rotationPreset.

  • left / right: the screen turned in 3D to that side.
  • orbit: the camera moves around the screen while the zoom holds.
  • none (default on addZoom): a flat screen; on setZoom it takes an existing camera off.

It is stored as the zoom's rotationPreset, which getCurrentDocument already reported but no tool could set. The tool descriptions tell the model it is a strong effect, for a reveal or a key moment rather than every zoom. The in-app agent and every MCP client (openscreen mcp included) get it through the same tool registry.

Part of the agent-made demo work (#1119): a 30 s demo without voice needs the visual effects the editor has.

Verification

  • electron/ai-edition/agent-tools.test.ts: set on addZoom, reported in the result, changed and removed by setZoom, kept when another field changes, an unknown value refused, absent by default. Every document round-trips through documentSchema.
  • npx vitest --run electron/ai-edition electron/mcp (421 tests) and both typechecks green.
  • Not covered: an export rendered with an agent-set 3D camera. The value is the same field the editor writes, rendered by the existing path.

🤖 Generated with Claude Code

Summary by CodeRabbit

  • New Features
    • Zoom effects support left, right, and orbit camera rotations. You can choose a preset when adding a zoom or change it later; flat zooms remain the default.
    • AI-assisted editing guidance now explains the available camera rotation options.

addZoom, addZooms and setZoom take rotationPreset (left, right, orbit, or none for a flat screen), the editor's 3D camera control. It is stored as the zoom's rotationPreset, which getCurrentDocument already reported but no tool could set. Served to the in-app agent and to every MCP client alike.
@coderabbitai

coderabbitai Bot commented Oct 11, 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: f7e6ede8-0330-4117-ac6f-11acac1ae2a0

📥 Commits

Reviewing files that changed from the base of the PR and between 728f621 and a39810c.


📒 Files selected for processing (3)
  • electron/ai-edition/agent-tools.test.ts
  • electron/ai-edition/agent-tools.ts
  • electron/ai-edition/deep-agent/service.ts

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



📝 Walkthrough

Walkthrough

The addZoom and setZoom tools now accept camera rotation presets. They apply presets to zooms and include non-flat presets in results. Tool descriptions and tests cover the preset options and their behavior.

Changes

Zoom Rotation Presets

Layer / File(s) Summary
Zoom rotation preset handling
electron/ai-edition/agent-tools.ts, electron/ai-edition/deep-agent/service.ts, electron/ai-edition/agent-tools.test.ts
The zoom tools accept none, left, right, and orbit. addZoom defaults to none; setZoom leaves the existing preset unchanged when omitted. Results include a preset only when it is non-flat. Tool descriptions and tests cover these behaviors.

Priority: ➖ Normal

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

Change: Feature

Suggested reviewers: auberginewly


Merge Risk: ⚪ Minimal · up to a3981

The zoom tools appear ready to merge after normal checks; no actionable issue was identified.

Pre-merge checks | Passed 3 | Failed 2

❌ Failed checks (2 warnings)

Check name Status Explanation Resolution
Description check Warning The description explains the feature and testing, but it does not use the required template sections. It omits explicit Type of change, Release impact, Desktop impact, and Screenshots / video sections… Rewrite the description using the repository template. Add Summary, Related issue, Type of change, Release impact, Desktop impact, Screenshots / video, and Testing sections. Select the applicable checkboxes and state whether screenshots or …
Docstring Coverage Warning Docstring coverage is 50.00% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 2 functions across 3 files. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (3 passed)
Check name Status Explanation
Title check Passed The title clearly summarizes the main change: enabling the agent to set a zoom's 3D camera.
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: Description check

Explanation

The description explains the feature and testing, but it does not use the required template sections. It omits explicit Type of change, Release impact, Desktop impact, and Screenshots / video sections, and it does not provide the required Related issue format.

Resolution

Rewrite the description using the repository template. Add Summary, Related issue, Type of change, Release impact, Desktop impact, Screenshots / video, and Testing sections. Select the applicable checkboxes and state whether screenshots or video are not applicable.


  • 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 8dbc736 into main Oct 11, 2026
19 checks passed
@EtienneLescot
EtienneLescot deleted the feat/dsl-zoom-3d-camera branch October 11, 2026 23:47
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