Skip to content

Add ParticleSystem value formats - #54

Merged
ViTeXFTW merged 2 commits into
devfrom
t3code/particle-system-schema-fields
Jul 18, 2026
Merged

Add ParticleSystem value formats#54
ViTeXFTW merged 2 commits into
devfrom
t3code/particle-system-schema-fields

Conversation

@ViTeXFTW

Copy link
Copy Markdown
Owner

What changed

  • model ParticleSystem random variables, alpha keyframes, and color keyframes with concrete schema types
  • add the engine's random-distribution value set
  • enable snippets, distribution completions, diagnostics, and semantic classification
  • cover the behavior with a focused spec

Why

ParticleSystem fields using custom engine parsers were stored as Unknown, so value completions and diagnostics were disabled.

Impact

ParticleSystem values now receive engine-faithful validation and completion support, including optional distribution names.

Validation

  • cargo fmt --all -- --check
  • cargo test

@greptile-apps

greptile-apps Bot commented Jul 18, 2026

Copy link
Copy Markdown

Greptile Summary

This PR adds concrete ParticleSystem value formats to the schema and analysis layers. The main changes are:

  • New schema types for random variables, alpha keyframes, and color keyframes.
  • Random distribution values added as a named value set.
  • Completion snippets and distribution-name completions for the new formats.
  • Diagnostics and semantic classification for ParticleSystem structured values.
  • Focused spec coverage for completions and invalid value diagnostics.

Confidence Score: 5/5

Safe to merge with minimal risk.

The change is scoped to schema modeling and analyzer support for new ParticleSystem value types. The completion, diagnostic, semantic, and spec updates are aligned, and no blocking issues were identified.

No files require special attention.

T-Rex T-Rex Logs

What T-Rex did

  • I attempted to format the codebase with cargo-fmt, but the command failed because cargo-fmt is not installed on the stable toolchain.
  • The dev profile for changed crates finished with exit code 0, indicating changes built and were tested successfully.
  • I ran the focused spec test set, which reported that specs_hold passed with exit code 0.
  • A full workspace cargo test completed with exit code 0, with semantic::tests::classifies_particle_keyframe_values_as_numbers and tests::structured_particle_values_type_every_raw_token passing.

View all artifacts

T-Rex Ran code and verified through T-Rex

Important Files Changed

Filename Overview
crates/analysis/src/completion.rs Adds snippets and distribution-member completions for structured ParticleSystem random variables and keyframes.
crates/analysis/src/diagnostics.rs Adds validation for random-variable bounds, distributions, and ParticleSystem alpha/color keyframes.
crates/analysis/src/semantic.rs Classifies ParticleSystem structured values as numbers or enum members.
crates/schema/schema.json Converts ParticleSystem parser-backed unknown values to concrete random-variable and keyframe schema types.
crates/schema/src/lib.rs Introduces schema enum variants for ParticleSystem structured values and updates token-position helpers.
crates/analysis/tests/spec/ParticleSystemValues.ini Adds a focused fixture for ParticleSystem value completion and diagnostic behavior.
crates/analysis/tests/spec/ParticleSystemValues.spec.toml Asserts distribution completions and invalid value diagnostics for the new ParticleSystem value handling.

Reviews (2): Last reviewed commit: "Fix ParticleSystem keyframe semantic tok..." | Re-trigger Greptile

@ViTeXFTW

Copy link
Copy Markdown
Owner Author

@greptileai

@ViTeXFTW
ViTeXFTW marked this pull request as ready for review July 18, 2026 13:03
@ViTeXFTW
ViTeXFTW merged commit 1caf6f3 into dev Jul 18, 2026
5 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