Skip to content

test(cli): guard the v2 loader keeping render settings - #1470

Merged
EtienneLescot merged 1 commit into
mainfrom
test/cli-v2-loader-render-settings
Nov 2, 2026
Merged

EtienneLescot merged 1 commit into
mainfrom
test/cli-v2-loader-render-settings

Conversation

@EtienneLescot

@EtienneLescot EtienneLescot commented Nov 2, 2026 •

Copy link
Copy Markdown
Member

Summary

Adds a test that loads a v2 project through loadCliProject and checks that render settings the normalizer does not know (cursorModel3d, cursorClickSound, audioGainDb) reach the exported document. The fix itself landed in #1469, and legacyProjectEditor has its own tests there. This one fails if the loader goes back to normalizeProjectEditor(project.editor), which I checked.

It replaces #1468, which can no longer be rebase-merged after #1469.

Related issue

Refs #1467

Type of change

  • Refactor / maintenance

Release impact

  • No release note needed

Desktop impact

  • Not platform-specific

Testing

  • npx vitest --run src/cli passes; npx tsc -p tsconfig.test.json --noEmit passes.
  • On the fixed build, the demo v2 project exports through the CLI with the 3D cursor and its shadow, and click hits at -7 dB. 2.2.0 exported it with a flat cursor and silence at -91 dB.

🤖 Generated with Claude Code

Summary by CodeRabbit

  • Tests
    • Added coverage confirming that projects loaded through the CLI retain their cursor and audio settings.

legacyProjectEditor (#1469) has its own tests; this one loads a v2
project through loadCliProject, so the export cannot drop the keys again
behind a green helper test.
@coderabbitai

coderabbitai Bot commented Nov 2, 2026 •

Copy link
Copy Markdown
Contributor

Review in Change Stack →

No actionable comments were generated in the recent review.

Recent review info
Run configuration
  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: defaults
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: 3fac47c1-f1ed-47cf-9c0c-76542fd53298
Commits

Reviewing files that changed from the base of the PR and between 2477d03 and e537662.

Files selected for processing: 1
  • src/cli/loadCliProject.test.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

This change adds a loadCliProject test. It checks that the returned document contains the project’s cursor and audio settings.

Changes: CLI project settings test

Layer / File(s) Summary
Verify loaded settings
src/cli/loadCliProject.test.ts
Adds a test that checks cursor.model3d, cursor.clickSound, and audioGainDb in the loaded document. The test restores stubbed globals.

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

Change: Other

Possibly related issues

Possibly related PRs

Suggested reviewers: beetix

Merge Risk: Minimal · up to e5376

The change adds regression coverage for cursor and audio settings without changing production behavior. No actionable merge-blocking risk is established.

Pre-merge checks: Passed 5
Check name Status Explanation
Title check Passed The title clearly identifies a CLI loader test that guards preservation of render settings. It is concise and related to the main change.
Description check Passed The description includes the summary, related issue, change type, release impact, desktop impact, and testing details. The Screenshots / video section is omitted, but it is not required for this non-v…
Docstring Coverage Passed No eligible functions found in the changed files. Skipping docstring coverage check. Docstring coverage is scoped to functions touched by this diff with cyclomatic complexity of at least 2. Documentat…
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 includes the summary, related issue, change type, release impact, desktop impact, and testing details. The Screenshots / video section is omitted, but it is not required for this non-visual CLI test.

Full details: Docstring Coverage

Explanation

No eligible functions found in the changed files. Skipping docstring coverage check. Docstring coverage is scoped to functions touched by this diff with cyclomatic complexity of at least 2. Documentation-only edits and deletions within surviving functions are included; unchanged diff context and fully deleted functions are excluded. Analyzed 0 functions across 1 files.

Finishing Touches
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

@EtienneLescot
EtienneLescot merged commit 5e87ff3 into main Nov 2, 2026
20 checks passed
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