Skip to content

fix(effects): address the review of the shader effects integration - #1223

Merged
EtienneLescot merged 1 commit into
integration/shader-effectsfrom
fix/shader-effects-review
Oct 14, 2026
Merged

EtienneLescot merged 1 commit into
integration/shader-effectsfrom
fix/shader-effects-review

Conversation

@EtienneLescot

@EtienneLescot EtienneLescot commented Oct 14, 2026 •

Copy link
Copy Markdown
Member

Summary

CodeRabbit's eight comments on #1210, all on the shader effects rows.

  • Loop counting (Major). A counter now starts from its value at that loop: the last store before it in its block, else its initialiser. Any other write to the counter (another block, after the loop, through a pointer, a second loop on the same counter) is refused. The comment's example only showed a false refusal; the same gap let if (…) { i = -100000; } for (; i < 4; i++) count 4 trips for 100 004, under the 4096 safety ceiling.
  • Cache eviction. The compiled-effect cache never evicts an effect the current scene shows (shader_fx::eviction_victim, Windows and Linux). set_scene stores the scene before warming the cache so eviction can see it. feat(compositor): the macOS shader effects pass (Metal) #1206 (macOS) will want the same.
  • setEffect clamps a moved pill against its own lane only, the one the overlap check used.
  • checkShaderEffect returns null ("not checked") when the addon throws.
  • Workbench. shaderEffect is an EditFamily; the ripple scenario counts only ranges of an effect that reads ctx.clicks.
  • Docs. checkShaderEffect in the spec (E.6 now says the in-app agent has the checker); effects in ai-agent.md's removeModifier row and time-base note.

Related issue

None.

Type of change

  • Bug fix
  • Documentation

Release impact

  • No release note needed

Desktop impact

  • Windows
  • Linux
  • macOS: shared code only

Testing

  • Rust: new the_counter_starts_from_its_value_at_the_loop and eviction_spares_the_effects_the_scene_shows. Windows cargo test -p openscreen-compositor -p compositor-view-napi --lib: 448 + 1 passed. Linux on lavapipe under WSL: see the comment below.
  • TS: new moves a region against its own lane only, which fails on the old code (start clamped to 6 s instead of 4 s). agent-tools.test.ts and electron/mcp: 318 passed.
  • npx tsc --noEmit, -p tsconfig.test.json, -p tsconfig.workbench.json, Biome on the touched files.

🤖 Generated with Claude Code

- A loop's counter starts from its value at THAT loop: the last store before it in its block, else its initialiser. Any other write to the counter (another block, after the loop, through a pointer) is refused, so the safety ceiling can never under-count trips.
- The compiled-effect cache never evicts an effect the current scene shows (Windows and Linux).
- setEffect clamps a moved pill against its own lane only, the one the overlap check used.
- checkShaderEffect returns null (not checked) when the addon throws.
- Workbench: shaderEffect is an EditFamily, and the ripple scenario only counts ranges of an effect that reads ctx.clicks.
- Docs: checkShaderEffect in the spec, effects in ai-agent.md's removeModifier and time-base lines.
@EtienneLescot

Copy link
Copy Markdown
Member Author

Linux, on lavapipe under WSL, at ee5e02e: cargo test -p openscreen-compositor --lib --tests, 483 passed plus the integration tests.

@coderabbitai

coderabbitai Bot commented Oct 14, 2026

Copy link
Copy Markdown
Contributor

Important

Review skipped

Auto reviews are disabled on base/target branches other than the default branch.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration
  • Configuration used: defaults
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: 4d0bc40f-bc09-4e3c-b1a7-19871e6394e7

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
  • 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 54beed1 into integration/shader-effects Oct 14, 2026
3 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