chore: fmt#605
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
|
Caution Review failedThe pull request is closed. ℹ️ Recent review info⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Run ID: ⛔ Files ignored due to path filters (1)
📒 Files selected for processing (1)
WalkthroughA wide code-formatting and minor control-flow normalization pass across grida-canvas and related crates. Changes are mostly whitespace/signature formatting and call-site reflow; wasm_text_edit.rs adds explicit multiline early-return branches for null/pointer checks in several extern "C" entrypoints. No API or behavioral semantics were changed. Changes
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~25 minutes Possibly related PRs
🚥 Pre-merge checks | ✅ 3✅ Passed checks (3 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
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. Comment |
There was a problem hiding this comment.
Caution
Some comments are outside the diff and can’t be posted inline due to platform limitations.
⚠️ Outside diff range comments (1)
crates/grida-canvas/examples/golden_type_attributed.rs (1)
959-964:⚠️ Potential issue | 🟠 MajorResolve the
alignementtypo flagged by CI.The struct field
ImagePaint::alignementis misspelled. Line 963 uses the field correctly according to the struct definition, but the struct itself uses non-standard English. Either rename the field toalignmentthroughout the codebase (struct definition + all call sites), or add an exception in.typos.tomlif the current spelling is intentional.🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@crates/grida-canvas/examples/golden_type_attributed.rs` around lines 959 - 964, The field name ImagePaint::alignement is misspelled; update the ImagePaint struct definition to use alignment (replace alignement with alignment) and update every usage site (e.g., the instance construction in golden_type_attributed.rs and any other references to ImagePaint::alignement) to the new name; alternatively, if the misspelling is intentional, add an entry to .typos.toml to whitelist "alignement" so CI stops flagging it—ensure changes are applied consistently across all modules and tests that reference the field.
🧹 Nitpick comments (1)
crates/grida-canvas/benches/bench_viewport_culling.rs (1)
103-108: Unconventional but valid method formatting.The multi-line method access pattern (splitting
renderer.camera.set_center(...)across 3 lines) is unusual compared to typical Rust formatting, which would keep the entire call on one line. However, this appears to be intentional formatting from oxfmt and doesn't affect functionality.🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@crates/grida-canvas/benches/bench_viewport_culling.rs` around lines 103 - 108, This is a stylistic formatting note: the chained method calls for renderer.camera.set_center(...) and renderer.camera.set_zoom(...) are split across multiple lines by oxfmt but are functionally correct; if you prefer conventional Rust formatting, collapse each chained call into a single line (e.g., call renderer.camera.set_center(...) and renderer.camera.set_zoom(...)) for clarity, otherwise no code change is required since behavior is unaffected.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Outside diff comments:
In `@crates/grida-canvas/examples/golden_type_attributed.rs`:
- Around line 959-964: The field name ImagePaint::alignement is misspelled;
update the ImagePaint struct definition to use alignment (replace alignement
with alignment) and update every usage site (e.g., the instance construction in
golden_type_attributed.rs and any other references to ImagePaint::alignement) to
the new name; alternatively, if the misspelling is intentional, add an entry to
.typos.toml to whitelist "alignement" so CI stops flagging it—ensure changes are
applied consistently across all modules and tests that reference the field.
---
Nitpick comments:
In `@crates/grida-canvas/benches/bench_viewport_culling.rs`:
- Around line 103-108: This is a stylistic formatting note: the chained method
calls for renderer.camera.set_center(...) and renderer.camera.set_zoom(...) are
split across multiple lines by oxfmt but are functionally correct; if you prefer
conventional Rust formatting, collapse each chained call into a single line
(e.g., call renderer.camera.set_center(...) and renderer.camera.set_zoom(...))
for clarity, otherwise no code change is required since behavior is unaffected.
ℹ️ Review info
⚙️ Run configuration
Configuration used: Organization UI
Review profile: CHILL
Plan: Pro
Run ID: 73ed2cda-78cc-44b8-afd4-92d3942f0501
⛔ Files ignored due to path filters (1)
crates/grida-canvas/src/io/generated/grida.rsis excluded by!**/generated/**
📒 Files selected for processing (74)
crates/grida-canvas-wasm/src/wasm_text_edit.rscrates/grida-canvas/benches/bench_camera.rscrates/grida-canvas/benches/bench_viewport_culling.rscrates/grida-canvas/examples/fixtures/l0_type_attributed.rscrates/grida-canvas/examples/golden_corner_radius_backends.rscrates/grida-canvas/examples/golden_curve_decoration.rscrates/grida-canvas/examples/golden_stroke_decoration.rscrates/grida-canvas/examples/golden_stroke_decoration_presets.rscrates/grida-canvas/examples/golden_type_attributed.rscrates/grida-canvas/examples/headless_gpu.rscrates/grida-canvas/examples/skia_bench/skia_bench_atlas.rscrates/grida-canvas/examples/skia_bench/skia_bench_downscale.rscrates/grida-canvas/examples/skia_bench/skia_bench_effects.rscrates/grida-canvas/examples/skia_bench/skia_bench_opacity.rscrates/grida-canvas/examples/skia_bench/skia_bench_primitives.rscrates/grida-canvas/examples/tool_gen_bench_fixture.rscrates/grida-canvas/examples/tool_gen_fixtures.rscrates/grida-canvas/examples/tool_io_grida.rscrates/grida-canvas/examples/tool_svg_batch.rscrates/grida-canvas/src/cache/atlas/atlas.rscrates/grida-canvas/src/cache/atlas/atlas_set.rscrates/grida-canvas/src/cache/compositor/cache.rscrates/grida-canvas/src/cache/compositor/invalidation.rscrates/grida-canvas/src/cache/paragraph.rscrates/grida-canvas/src/cache/scene.rscrates/grida-canvas/src/cg/svg.rscrates/grida-canvas/src/devtools/surface_overlay.rscrates/grida-canvas/src/devtools/text_edit_decoration_overlay.rscrates/grida-canvas/src/hittest/hit_tester.rscrates/grida-canvas/src/io/io_grida.rscrates/grida-canvas/src/io/io_grida_fbs.rscrates/grida-canvas/src/io/io_grida_file.rscrates/grida-canvas/src/io/io_svg.rscrates/grida-canvas/src/layout/engine.rscrates/grida-canvas/src/lib.rscrates/grida-canvas/src/painter/layer.rscrates/grida-canvas/src/painter/painter.rscrates/grida-canvas/src/query.rscrates/grida-canvas/src/runtime/camera.rscrates/grida-canvas/src/runtime/image_repository.rscrates/grida-canvas/src/runtime/pixel_preview.rscrates/grida-canvas/src/runtime/render_policy.rscrates/grida-canvas/src/shape/marker.rscrates/grida-canvas/src/shape/rrect.rscrates/grida-canvas/src/surface/event.rscrates/grida-canvas/src/surface/state.rscrates/grida-canvas/src/surface/ui/render.rscrates/grida-canvas/src/svg/pack.rscrates/grida-canvas/src/svg/sanitize.rscrates/grida-canvas/src/text/attributed_paragraph.rscrates/grida-canvas/src/text/paragraph_cache_layout.rscrates/grida-canvas/src/text_edit/attributed_text/conv.rscrates/grida-canvas/src/text_edit/attributed_text/html.rscrates/grida-canvas/src/text_edit/attributed_text/mod.rscrates/grida-canvas/src/text_edit/history.rscrates/grida-canvas/src/text_edit/layout.rscrates/grida-canvas/src/text_edit/mod.rscrates/grida-canvas/src/text_edit/selection_rects.rscrates/grida-canvas/src/text_edit/session.rscrates/grida-canvas/src/text_edit/session_tests.rscrates/grida-canvas/src/text_edit/simple_layout.rscrates/grida-canvas/src/text_edit/skia_layout.rscrates/grida-canvas/src/text_edit/tests.rscrates/grida-canvas/tests/camera_change_kind.rscrates/grida-canvas/tests/compositor_effects.rscrates/grida-canvas/tests/fbs_roundtrip.rscrates/grida-canvas/tests/flatten_rendiff.rscrates/grida-canvas/tests/shape_to_vector_network.rscrates/grida-canvas/tests/svg_pack.rscrates/grida-canvas/tests/translate_fold_accuracy.rscrates/grida-canvas/tests/viewport_culling.rscrates/grida-dev/examples/bench_cache_picture.rscrates/grida-dev/src/bench/load_bench.rscrates/grida-dev/src/main.rs
… on it Regenerate committed bindings from format/grida.fbs. Add #[rustfmt::skip] on the generated module so stable rustfmt does not rewrite flatc output, keeping the check-generated-fbs CI diff clean.
Summary by CodeRabbit
No end-user visible changes or API/behavioral regressions introduced.