Skip to content

Conversation

@ItsEeleeya
Copy link
Contributor

@ItsEeleeya ItsEeleeya commented Dec 10, 2025

This PR removes the corner shapes and instead adds a smoothness level slider (with 0.6 as default, same as Apple's human interface guidelines).

The radius is normalized internally when any smoothness is set to keep the visual radius look similar to a normal rounded rectangle.

Summary by CodeRabbit

  • New Features

    • Added a Corner Smoothness slider (0–1) alongside a refined Rounding slider (step 0.1) for finer corner control across editors.
  • UI/UX Improvements

    • Replaced the prior corner style selector with two separate controls—Rounding and Smoothness—applied consistently to Background, Camera, and Screenshot editing.
  • Other

    • New square-round-corner icon available for UI use.

✏️ Tip: You can customize this high-level summary in your review settings.


Note

Replaces the corner style selector with a Corner Smoothness slider and switches rendering to superellipse-based rounding with normalized radius across editor and screenshot UIs, updating config/types and shaders accordingly.

  • Rendering/Engine:
    • Switch from roundingType to superellipse-based corners using corner_exponent; add smoothness_to_exponent and compute_adjusted_radius for consistent visual radius.
    • Update CompositeVideoFrameUniforms (rounding_typecorner_exponent), propagate through lib.rs, and modify WGSL shader to use exponent for SDF and borders.
  • Config/Types:
    • Replace roundingType with roundingSmoothness in BackgroundConfiguration and Camera; defaults set (0.6 background, 0.0 camera).
    • Remove TS editor-side CornerRoundingType/normalizers; adjust serialization/normalization.
    • Regenerate Tauri types to reflect new fields.
  • UI:
    • Add Corner Smoothness sliders alongside Rounded Corners for background and camera in ConfigSidebar.tsx.
    • Update screenshot editor RoundingPopover to include Rounding Smoothness; remove corner style select.
    • Add IconLucideSquareRoundCorner for smoothness control.
  • Misc:
    • Minor cleanup (comment formatting); remove unused corner style select component.

Written by Cursor Bugbot for commit be6d45b. This will update automatically on new commits. Configure here.

richiemcilroy and others added 2 commits December 7, 2025 20:20
…e-cursor-option-to-settings-claude-4.5-opus-high-thinking-64f7

Add circle cursor option to settings
@coderabbitai
Copy link
Contributor

coderabbitai bot commented Dec 10, 2025

Walkthrough

Replaces discrete corner-style enum with continuous smoothness parameter: introduces roundingSmoothness alongside rounding across UI, Tauri types, Rust project config, rendering uniforms, and WGSL shader; removes corner-style types/components and adds helpers to convert smoothness → exponent and adjusted radius.

Changes

Cohort / File(s) Summary
UI Configuration / Popovers
apps/desktop/src/routes/editor/ConfigSidebar.tsx, apps/desktop/src/routes/screenshot-editor/popovers/RoundingPopover.tsx
Removed CornerStyleSelect/CORNER_STYLE_OPTIONS and CornerRoundingType; replaced style picker with two sliders (rounding and roundingSmoothness), updated bindings, labels, icons, and DOM structure.
Editor Context & Tauri types
apps/desktop/src/routes/editor/context.ts, apps/desktop/src/utils/tauri.ts
Removed CornerRoundingType and WithCornerStyle; background/camera types no longer include roundingType wrapper—introduced/renamed roundingSmoothness?: number and preserved background/camera objects directly.
Rust Project Configuration
crates/project/src/configuration.rs
Replaced rounding_type: CornerStyle with rounding_smoothness: f32 on BackgroundConfiguration and Camera, updated defaults and removed serde aliasing for rounding_type.
Rendering Engine (Rust)
crates/rendering/src/lib.rs, crates/rendering/src/composite_frame.rs
Removed rounding_type usage and rounding_type_value(); added smoothness_to_exponent() and compute_adjusted_radius(); compute rounding_px and corner_exponent from rounding_smoothness; updated ProjectUniforms construction and CompositeVideoFrameUniforms field mapping.
Shader (WGSL)
crates/rendering/src/shaders/composite-video-frame.wgsl
Renamed uniform rounding_typecorner_exponent; updated rounded_corner_norm() and sdf_rounded_rect() signatures and call sites to use exponent semantics; added clamping/guards for exponent.
Auto-imports / Icons
packages/ui-solid/src/auto-imports.d.ts
Added global type declaration for IconLucideSquareRoundCorner.
Misc / Manifest
package.json
Manifest list updated per diff (packaging/metadata updates).

Sequence Diagram(s)

sequenceDiagram
    participant UI as Desktop UI
    participant Tauri as Tauri bridge
    participant Rust as Native backend
    participant Shader as WGSL shader

    UI->>Tauri: user adjusts "rounding" and "roundingSmoothness"
    Tauri->>Rust: serialize/send ProjectConfiguration (rounding, rounding_smoothness)
    Rust->>Rust: compute_adjusted_radius(rounding_px) using rounding and smoothness
    Rust->>Rust: smoothness_to_exponent(rounding_smoothness) => corner_exponent
    Rust->>Shader: upload CompositeVideoFrameUniforms { rounding_px, corner_exponent, ... }
    Shader->>Shader: apply rounded corners using corner_exponent & rounding_px
    Shader-->>Rust: rendered frame
    Rust-->>Tauri: frame buffer / display update
    Tauri-->>UI: display updated frame
Loading

Estimated code review effort

🎯 4 (Complex) | ⏱️ ~45 minutes

  • Pay extra attention to:
    • Cross-layer numeric mappings (UI slider scales → serialized values → Rust helpers → shader inputs).
    • Default values and serde compatibility in crates/project/src/configuration.rs.
    • Shader stability (clamping/minimum exponent) and consistency with previous visuals.
    • Removal of exported types/components that might affect external consumers.

Possibly related PRs

Poem

🐰 I nudge a slider, corners smooth and bright,
exponent hums while radii take flight,
pixels curl gentle where sharp edges were,
a rabbit's tweak makes rounded frames purr,
tiny hops, big glow — cozy edges tonight ✨

Pre-merge checks and finishing touches

❌ Failed checks (2 warnings)
Check name Status Explanation Resolution
Title check ⚠️ Warning The title 'Add customizable squircle option' is partially related to the changeset but does not capture the main change—the PR removes the previous corner style selection UI and replaces it with a smoothness slider, which is a more significant technical shift than merely 'adding customizable squircle'. Consider a more accurate title such as 'Replace corner style selector with smoothness slider' or 'Refactor corner rounding to use smoothness parameter instead of style types'.
Docstring Coverage ⚠️ Warning Docstring coverage is 8.33% which is insufficient. The required threshold is 80.00%. You can run @coderabbitai generate docstrings to improve docstring coverage.
✅ Passed checks (1 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
✨ Finishing touches
  • 📝 Generate docstrings
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment

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 and usage tips.

Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 2

🧹 Nitpick comments (2)
apps/desktop/src/routes/editor/ConfigSidebar.tsx (1)

1997-2004: UI fallback may not match backend default.

The fallback project.background.roundingSmoothness ?? 0 uses 0, but the Rust backend defaults rounding_smoothness to 0.6 for BackgroundConfiguration. Since serde's #[serde(default)] ensures the field is always populated when deserializing, the ?? 0 fallback should rarely trigger. However, for consistency and to avoid potential edge cases where the field might be undefined, consider aligning the fallback with the backend default:

 <Slider
-  value={[project.background.roundingSmoothness ?? 0]}
+  value={[project.background.roundingSmoothness ?? 0.6]}
   onChange={(v) => setProject("background", "roundingSmoothness", v[0])}
crates/rendering/src/lib.rs (1)

1447-1448: Consider using a consistent exponent value.

Since rounding_px is 0.0, the corner_exponent value doesn't affect rendering. However, 0.6 is outside the normal range produced by smoothness_to_exponent (which yields 2.0–8.0). Using 2.0 (equivalent to smoothness=0) would be more consistent with the rest of the codebase.

                     rounding_px: 0.0,
-                    corner_exponent: 0.6,
+                    corner_exponent: 2.0,
📜 Review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between fac67c0 and 0e6bbb3.

📒 Files selected for processing (8)
  • apps/desktop/src/routes/editor/ConfigSidebar.tsx (4 hunks)
  • apps/desktop/src/routes/editor/context.ts (2 hunks)
  • apps/desktop/src/utils/tauri.ts (1 hunks)
  • crates/project/src/configuration.rs (4 hunks)
  • crates/rendering/src/composite_frame.rs (2 hunks)
  • crates/rendering/src/lib.rs (5 hunks)
  • crates/rendering/src/shaders/composite-video-frame.wgsl (7 hunks)
  • packages/ui-solid/src/auto-imports.d.ts (1 hunks)
🧰 Additional context used
📓 Path-based instructions (7)
**/*.rs

📄 CodeRabbit inference engine (CLAUDE.md)

**/*.rs: Never use dbg!() macro; use proper logging (tracing::debug!, etc.) instead
Never write let _ = async_fn() which silently drops futures; await or explicitly handle them
Use duration.saturating_sub(other) instead of duration - other to avoid panics on underflow
Merge nested if statements: write 'if a && b { }' instead of 'if a { if b { } }'
Don't call .clone() on Copy types (integers, bools, etc.); copy them directly
Use function references directly: iter.map(foo) instead of iter.map(|x| foo(x))
Accept &[T] or &str instead of &Vec or &String in function parameters for flexibility
Use .is_empty() instead of .len() == 0 or .len() > 0 / .len() != 0
Don't assign () to a variable: write foo(); instead of let _ = foo(); or let x = foo(); when return is unit
Use .unwrap_or(val) instead of .unwrap_or_else(|| val) when the default is a simple/cheap value
Use 'for item in &collection' or 'for (i, item) in collection.iter().enumerate()' instead of 'for i in 0..collection.len()'
Use value.clamp(min, max) instead of manual if chains or .min(max).max(min) patterns
Always handle Result/Option or types marked #[must_use]; never ignore them

**/*.rs: Use rustfmt and workspace clippy lints for Rust code formatting and linting
Use snake_case for Rust module names and kebab-case for crate names
Never use dbg!() macro in Rust code; use proper logging instead (Clippy: dbg_macro = deny)
Always handle Result/Option or types marked #[must_use]; never ignore them (Rust compiler lint: unused_must_use = deny)
Never write let _ = async_fn() which silently drops futures; await or explicitly handle them (Clippy: let_underscore_future = deny)
Use saturating_sub instead of - for Duration to avoid panics (Clippy: unchecked_duration_subtraction = deny)
Merge nested if statements: use if a && b { } instead of if a { if b { } } (Clippy: collapsible_if = deny)
Don't call .clone() on Copy types; just copy them directly (Clippy: clone_on_copy = deny)
U...

Files:

  • crates/rendering/src/composite_frame.rs
  • crates/project/src/configuration.rs
  • crates/rendering/src/lib.rs
**/*.{ts,tsx,js,jsx,rs}

📄 CodeRabbit inference engine (AGENTS.md)

Never add comments to code (//, /* */, ///, //!, #, etc.); code must be self-explanatory through naming, types, and structure

Files:

  • crates/rendering/src/composite_frame.rs
  • packages/ui-solid/src/auto-imports.d.ts
  • crates/project/src/configuration.rs
  • apps/desktop/src/utils/tauri.ts
  • apps/desktop/src/routes/editor/context.ts
  • crates/rendering/src/lib.rs
  • apps/desktop/src/routes/editor/ConfigSidebar.tsx
**/*.ts

📄 CodeRabbit inference engine (CLAUDE.md)

Use TanStack Query v5 for all client-side server state and data fetching in TypeScript files

Files:

  • packages/ui-solid/src/auto-imports.d.ts
  • apps/desktop/src/utils/tauri.ts
  • apps/desktop/src/routes/editor/context.ts
**/*.{ts,tsx,js,jsx}

📄 CodeRabbit inference engine (CLAUDE.md)

**/*.{ts,tsx,js,jsx}: Use strict TypeScript; avoid any type; leverage shared types from @cap/* packages
Follow camelCase naming for variables and functions; PascalCase for components; hooks must start with 'use' prefix
Use Biome for linting and formatting; match existing formatting conventions in the codebase
Use Tailwind CSS for styling in web components; stay consistent with spacing and tokens
Use static skeletons for loading states that mirror content; avoid bouncing animations
Memoize expensive work, code-split naturally, and use Next/Image for remote assets

**/*.{ts,tsx,js,jsx}: Use 2-space indent for TypeScript files; format with Biome using pnpm format
Use Biome for code formatting and linting; run pnpm format regularly
Use kebab-case for file names (e.g., user-menu.tsx); use PascalCase for components

Files:

  • packages/ui-solid/src/auto-imports.d.ts
  • apps/desktop/src/utils/tauri.ts
  • apps/desktop/src/routes/editor/context.ts
  • apps/desktop/src/routes/editor/ConfigSidebar.tsx
**/*.{ts,tsx}

📄 CodeRabbit inference engine (CLAUDE.md)

**/*.{ts,tsx}: Never add any form of comments to code (single-line //, multi-line /* /, JSDoc /* */, or any other comment syntax); code must be self-explanatory through naming, types, and structure
Directory naming must use lowercase-dashed convention

Files:

  • packages/ui-solid/src/auto-imports.d.ts
  • apps/desktop/src/utils/tauri.ts
  • apps/desktop/src/routes/editor/context.ts
  • apps/desktop/src/routes/editor/ConfigSidebar.tsx
apps/desktop/**/*.ts

📄 CodeRabbit inference engine (CLAUDE.md)

apps/desktop/**/*.ts: Use @tanstack/solid-query for server state management in SolidJS components
Use generated commands and events from tauri_specta for IPC; never manually construct IPC calls
Listen directly to generated events from tauri_specta and use typed event interfaces

Files:

  • apps/desktop/src/utils/tauri.ts
  • apps/desktop/src/routes/editor/context.ts
**/*.tsx

📄 CodeRabbit inference engine (CLAUDE.md)

Use React Query hooks with Server Actions for mutations and perform precise cache updates using setQueryData/setQueriesData instead of broad invalidations

Files:

  • apps/desktop/src/routes/editor/ConfigSidebar.tsx
🧠 Learnings (3)
📚 Learning: 2025-12-07T14:29:40.721Z
Learnt from: CR
Repo: CapSoftware/Cap PR: 0
File: AGENTS.md:0-0
Timestamp: 2025-12-07T14:29:40.721Z
Learning: Applies to **/tauri.ts|**/queries.ts|apps/desktop/src-tauri/gen/** : Never edit auto-generated files: `**/tauri.ts`, `**/queries.ts`, `apps/desktop/src-tauri/gen/**`

Applied to files:

  • apps/desktop/src/routes/editor/ConfigSidebar.tsx
📚 Learning: 2025-12-07T14:29:19.166Z
Learnt from: CR
Repo: CapSoftware/Cap PR: 0
File: CLAUDE.md:0-0
Timestamp: 2025-12-07T14:29:19.166Z
Learning: Never edit auto-generated files: tauri.ts, queries.ts, and files under apps/desktop/src-tauri/gen/

Applied to files:

  • apps/desktop/src/routes/editor/ConfigSidebar.tsx
📚 Learning: 2025-12-07T14:29:19.165Z
Learnt from: CR
Repo: CapSoftware/Cap PR: 0
File: CLAUDE.md:0-0
Timestamp: 2025-12-07T14:29:19.165Z
Learning: Applies to **/*.config.{js,ts,mjs,cjs} : Configuration files must follow their respective tool conventions (Next.js, Tailwind, etc.)

Applied to files:

  • apps/desktop/src/routes/editor/ConfigSidebar.tsx
🧬 Code graph analysis (1)
apps/desktop/src/routes/editor/ConfigSidebar.tsx (1)
apps/desktop/src/routes/editor/ui.tsx (2)
  • Slider (65-149)
  • Field (25-47)
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (2)
  • GitHub Check: Clippy (aarch64-apple-darwin, macos-latest)
  • GitHub Check: Clippy (x86_64-pc-windows-msvc, windows-latest)
🔇 Additional comments (11)
packages/ui-solid/src/auto-imports.d.ts (1)

97-97: The square-round-corner icon exists in the Lucide icon library and is properly referenced. No issues detected.

apps/desktop/src/routes/editor/context.ts (1)

98-106: LGTM! Simplified type definitions.

The removal of WithCornerStyle wrapper and direct use of ProjectConfiguration["background"] and ProjectConfiguration["camera"] simplifies the type system. The serialization logic is also cleaner without the round-trip for roundingType.

crates/project/src/configuration.rs (3)

229-231: LGTM! Background smoothness default aligns with Apple HIG.

The default of 0.6 for rounding_smoothness matches the PR objective of aligning with Apple's Human Interface Guidelines for squircle aesthetics.


310-312: LGTM! Camera smoothness defaults to standard rounded corners.

Setting rounding_smoothness: 0.0 for the camera by default maintains backwards compatibility and keeps standard rounded corners, while users can opt into squircle styling.

Also applies to: 348-348


185-191: Consider removing unused CornerStyle enum if no longer referenced.

The CornerStyle enum appears to no longer be used after this refactor, as the configuration now uses rounding_smoothness: f32 instead. Verify that this enum is not referenced elsewhere in the codebase for backwards compatibility or other purposes before removal.

crates/rendering/src/composite_frame.rs (1)

22-24: LGTM! Semantic rename to corner_exponent.

The field rename from rounding_type to corner_exponent better describes the shader parameter's purpose. The struct maintains proper alignment with #[repr(C)] and the Pod/Zeroable derives.

apps/desktop/src/routes/editor/ConfigSidebar.tsx (2)

2341-2363: LGTM! Camera rounding controls.

The Camera section correctly implements separate "Rounded Corners" and "Corner Smoothness" sliders. The ?? 0 fallback for roundingSmoothness correctly matches the backend default of 0.0 for Camera.


1983-1992: LGTM! Background rounding slider refactored.

The "Rounded Corners" slider is correctly bound to project.background.rounding with appropriate range (0-100%) and step values.

crates/rendering/src/shaders/composite-video-frame.wgsl (1)

54-68: LGTM - Safety guards and parameter rename are well implemented.

The fallback to length(p) for non-positive exponents and the max(exponent, 1e-3) clamp provide good protection against edge cases. The refactor from rounding_type to exponent semantics is applied consistently.

crates/rendering/src/lib.rs (2)

1160-1166: LGTM - Display rounding calculation is correct.

The radius computation correctly uses min_target_axis for proportional scaling, and both compute_adjusted_radius and smoothness_to_exponent are applied consistently.


1343-1349: Verify: Camera uses project.background.rounding_smoothness - is this intentional?

The camera rounding smoothness is sourced from project.background.rounding_smoothness rather than a camera-specific setting. Confirm whether there is a single global smoothness slider or if the camera should have its own rounding_smoothness property.

Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 2

♻️ Duplicate comments (1)
crates/rendering/src/lib.rs (1)

2023-2041: Remove new Rust comments to match project guidelines

The smoothness_to_exponent and compute_adjusted_radius helpers now include // comments, but the repo’s .rs guidelines explicitly disallow comments, and a prior review already requested removing documentation/comments around these functions.

Please strip the comments and keep just the function definitions and logic, e.g.:

-// Converts a smoothness value (0.0 to 1.0) to a super ellipse exponent.
 #[inline]
 fn smoothness_to_exponent(smoothness: f32) -> f32 {
     2.0 + smoothness * 6.0
 }
 
-// Adjusts radius to maintain visual consistency across different super ellipse exponents.
 fn compute_adjusted_radius(radius: f32, smoothness: f32) -> f32 {
     if smoothness == 0.0 {
         return radius;
     }
 
     let power = smoothness_to_exponent(smoothness);
     let capsule_scale = 2.0f32.powf(0.5 - 1.0 / power);
-
-    // Visual normalization: compensate for super ellipses appearing smaller
     let visual_compensation = 1.0 + smoothness * 0.8;
     radius * capsule_scale * visual_compensation
 }

This restores compliance with the no-comments rule for Rust files.

🧹 Nitpick comments (4)
apps/desktop/src/routes/screenshot-editor/popovers/RoundingPopover.tsx (1)

25-54: Align rounding smoothness fallback with 0.6 default

The sliders are wired correctly, but roundingSmoothness currently falls back to 0, which conflicts with the intended default of 0.6 when the field is absent (e.g., older projects).

Recommend using 0.6 as the fallback to match the PR’s behavior spec and avoid unexpectedly “sharp” corners when the field is unset:

-        <Slider
-          value={[project.background.roundingSmoothness ?? 0]}
+        <Slider
+          value={[project.background.roundingSmoothness ?? 0.6]}
           onChange={(v) =>
             setProject("background", "roundingSmoothness", v[0])
           }
           minValue={0}
           maxValue={1}
           step={0.01}
           formatTooltip={(value) => `${Math.round(value * 100)}%`}
         />
apps/desktop/src/routes/editor/ConfigSidebar.tsx (3)

1715-1718: Inline Tauri bug comment conflicts with TSX no-comments guideline

The multiline comment documenting the Tauri file-type bug adds/changes comments in a .tsx file, which the project guidelines forbid (code should be self-explanatory, with no inline comments).

Recommend removing this comment block and capturing the context in commit messages or external docs/issues instead:

-        /*
-          this is a Tauri bug in WebKit so we need to validate the file type manually
-          https://github.com/tauri-apps/tauri/issues/9158
-          */

1984-2005: Background rounding/smoothness wiring looks good; adjust smoothness fallback

The new “Rounded Corners” and “Corner Smoothness” sliders for the background are correctly bound to project.background.rounding and project.background.roundingSmoothness, with sensible ranges and tooltips.

To better honor the intended default smoothness 0.6, consider updating the fallback to avoid defaulting to 0 when the field is undefined (e.g., older projects):

-        <Slider
-          value={[project.background.roundingSmoothness ?? 0]}
+        <Slider
+          value={[project.background.roundingSmoothness ?? 0.6]}
           onChange={(v) => setProject("background", "roundingSmoothness", v[0])}
           minValue={0}
           maxValue={1}
           step={0.01}
           formatTooltip={(value) => `${Math.round(value * 100)}%`}
         />

This aligns the UI fallback with the spec and with new projects that initialize the field to 0.6.


2342-2363: Camera rounding/smoothness controls are correct; mirror the 0.6 fallback

The camera “Rounded Corners” and “Corner Smoothness” sliders are wired correctly to project.camera.rounding and project.camera.roundingSmoothness, matching the background controls.

For consistency with the spec and background UI, suggest using 0.6 as the fallback for the smoothness slider:

-        <Slider
-          value={[project.camera.roundingSmoothness ?? 0]}
+        <Slider
+          value={[project.camera.roundingSmoothness ?? 0.6]}
           onChange={(v) => setProject("camera", "roundingSmoothness", v[0])}
           minValue={0}
           maxValue={1}
           step={0.01}
           formatTooltip={(value) => `${Math.round(value * 100)}%`}
         />

This keeps camera smoothness defaults in line with the background and the stated 0.6 default.

📜 Review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 0e6bbb3 and 69594bd.

📒 Files selected for processing (3)
  • apps/desktop/src/routes/editor/ConfigSidebar.tsx (4 hunks)
  • apps/desktop/src/routes/screenshot-editor/popovers/RoundingPopover.tsx (2 hunks)
  • crates/rendering/src/lib.rs (5 hunks)
🧰 Additional context used
📓 Path-based instructions (5)
**/*.tsx

📄 CodeRabbit inference engine (CLAUDE.md)

Use React Query hooks with Server Actions for mutations and perform precise cache updates using setQueryData/setQueriesData instead of broad invalidations

Files:

  • apps/desktop/src/routes/screenshot-editor/popovers/RoundingPopover.tsx
  • apps/desktop/src/routes/editor/ConfigSidebar.tsx
**/*.{ts,tsx,js,jsx}

📄 CodeRabbit inference engine (CLAUDE.md)

**/*.{ts,tsx,js,jsx}: Use strict TypeScript; avoid any type; leverage shared types from @cap/* packages
Follow camelCase naming for variables and functions; PascalCase for components; hooks must start with 'use' prefix
Use Biome for linting and formatting; match existing formatting conventions in the codebase
Use Tailwind CSS for styling in web components; stay consistent with spacing and tokens
Use static skeletons for loading states that mirror content; avoid bouncing animations
Memoize expensive work, code-split naturally, and use Next/Image for remote assets

**/*.{ts,tsx,js,jsx}: Use 2-space indent for TypeScript files; format with Biome using pnpm format
Use Biome for code formatting and linting; run pnpm format regularly
Use kebab-case for file names (e.g., user-menu.tsx); use PascalCase for components

Files:

  • apps/desktop/src/routes/screenshot-editor/popovers/RoundingPopover.tsx
  • apps/desktop/src/routes/editor/ConfigSidebar.tsx
**/*.{ts,tsx}

📄 CodeRabbit inference engine (CLAUDE.md)

**/*.{ts,tsx}: Never add any form of comments to code (single-line //, multi-line /* /, JSDoc /* */, or any other comment syntax); code must be self-explanatory through naming, types, and structure
Directory naming must use lowercase-dashed convention

Files:

  • apps/desktop/src/routes/screenshot-editor/popovers/RoundingPopover.tsx
  • apps/desktop/src/routes/editor/ConfigSidebar.tsx
**/*.{ts,tsx,js,jsx,rs}

📄 CodeRabbit inference engine (AGENTS.md)

Never add comments to code (//, /* */, ///, //!, #, etc.); code must be self-explanatory through naming, types, and structure

Files:

  • apps/desktop/src/routes/screenshot-editor/popovers/RoundingPopover.tsx
  • apps/desktop/src/routes/editor/ConfigSidebar.tsx
  • crates/rendering/src/lib.rs
**/*.rs

📄 CodeRabbit inference engine (CLAUDE.md)

**/*.rs: Never use dbg!() macro; use proper logging (tracing::debug!, etc.) instead
Never write let _ = async_fn() which silently drops futures; await or explicitly handle them
Use duration.saturating_sub(other) instead of duration - other to avoid panics on underflow
Merge nested if statements: write 'if a && b { }' instead of 'if a { if b { } }'
Don't call .clone() on Copy types (integers, bools, etc.); copy them directly
Use function references directly: iter.map(foo) instead of iter.map(|x| foo(x))
Accept &[T] or &str instead of &Vec or &String in function parameters for flexibility
Use .is_empty() instead of .len() == 0 or .len() > 0 / .len() != 0
Don't assign () to a variable: write foo(); instead of let _ = foo(); or let x = foo(); when return is unit
Use .unwrap_or(val) instead of .unwrap_or_else(|| val) when the default is a simple/cheap value
Use 'for item in &collection' or 'for (i, item) in collection.iter().enumerate()' instead of 'for i in 0..collection.len()'
Use value.clamp(min, max) instead of manual if chains or .min(max).max(min) patterns
Always handle Result/Option or types marked #[must_use]; never ignore them

**/*.rs: Use rustfmt and workspace clippy lints for Rust code formatting and linting
Use snake_case for Rust module names and kebab-case for crate names
Never use dbg!() macro in Rust code; use proper logging instead (Clippy: dbg_macro = deny)
Always handle Result/Option or types marked #[must_use]; never ignore them (Rust compiler lint: unused_must_use = deny)
Never write let _ = async_fn() which silently drops futures; await or explicitly handle them (Clippy: let_underscore_future = deny)
Use saturating_sub instead of - for Duration to avoid panics (Clippy: unchecked_duration_subtraction = deny)
Merge nested if statements: use if a && b { } instead of if a { if b { } } (Clippy: collapsible_if = deny)
Don't call .clone() on Copy types; just copy them directly (Clippy: clone_on_copy = deny)
U...

Files:

  • crates/rendering/src/lib.rs
🧠 Learnings (1)
📚 Learning: 2025-12-07T14:29:40.721Z
Learnt from: CR
Repo: CapSoftware/Cap PR: 0
File: AGENTS.md:0-0
Timestamp: 2025-12-07T14:29:40.721Z
Learning: Applies to **/tauri.ts|**/queries.ts|apps/desktop/src-tauri/gen/** : Never edit auto-generated files: `**/tauri.ts`, `**/queries.ts`, `apps/desktop/src-tauri/gen/**`

Applied to files:

  • apps/desktop/src/routes/editor/ConfigSidebar.tsx
🧬 Code graph analysis (1)
apps/desktop/src/routes/screenshot-editor/popovers/RoundingPopover.tsx (1)
apps/desktop/src/routes/screenshot-editor/ui.tsx (1)
  • Slider (65-147)
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (2)
  • GitHub Check: Clippy (x86_64-pc-windows-msvc, windows-latest)
  • GitHub Check: Clippy (aarch64-apple-darwin, macos-latest)
🔇 Additional comments (4)
apps/desktop/src/routes/screenshot-editor/popovers/RoundingPopover.tsx (1)

4-4: Shared Slider import looks correct

Using the shared Slider from ../ui here is consistent with the screenshot editor controls and keeps behavior (history pause, tooltip, drag UX) aligned.

crates/rendering/src/lib.rs (2)

3-5: Import adjustments are consistent with Crop usage

Pulling Crop directly from cap_project matches its later usage in ProjectUniforms::get_crop and keeps the import list coherent.


1160-1166: Display rounding uses new helpers correctly

rounding_px and corner_exponent for the display path are derived consistently from project.background.rounding and project.background.rounding_smoothness via compute_adjusted_radius and smoothness_to_exponent, matching the new squircle model.

apps/desktop/src/routes/editor/ConfigSidebar.tsx (1)

68-68: Editor context import is consistent

Switching/importing useEditorContext from "./context" matches its usage throughout this file and keeps things aligned with the editor data flow.

Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1

♻️ Duplicate comments (3)
crates/rendering/src/lib.rs (3)

2019-2037: Remove comments per coding guidelines.

Comments remain on lines 2019, 2025, and 2034 despite the coding guideline requiring no comments in .rs files and a previous review indicating this was addressed. The function names and types should be self-explanatory.

-// Converts a smoothness value (0.0 to 1.0) to a super ellipse exponent.
 #[inline]
 fn smoothness_to_exponent(smoothness: f32) -> f32 {
     2.0 + smoothness * 6.0
 }

-// Adjusts radius to maintain visual consistency across different super ellipse exponents.
 fn compute_adjusted_radius(radius: f32, smoothness: f32) -> f32 {
     if smoothness == 0.0 {
         return radius;
     }

     let power = smoothness_to_exponent(smoothness);
     let capsule_scale = 2.0f32.powf(0.5 - 1.0 / power);

-    // Visual normalization: compensate for super ellipses appearing smaller
     let visual_compensation = 1.0 + smoothness * 0.8;
     radius * capsule_scale * visual_compensation
 }

As per coding guidelines.


1341-1345: Camera rounding incorrectly uses background smoothness.

The camera rendering path uses project.background.rounding_smoothness for both the radius adjustment and exponent calculation. This means the camera's corner smoothness will always match the background instead of having its own independent control, breaking the "Camera Corner Smoothness" slider mentioned in the PR.

                     rounding_px: compute_adjusted_radius(
                         project.camera.rounding / 100.0 * 0.5 * size[0].min(size[1]) as f32,
-                        project.background.rounding_smoothness,
+                        project.camera.rounding_smoothness,
                     ),
-                    corner_exponent: smoothness_to_exponent(project.background.rounding_smoothness),
+                    corner_exponent: smoothness_to_exponent(project.camera.rounding_smoothness),

1444-1444: Camera-only path uses raw smoothness value as exponent.

The hardcoded 0.6 appears to be a smoothness value being used directly as an exponent, which is inconsistent with the conversion model defined in smoothness_to_exponent (exponents range from 2.0 to 8.0). This will produce unexpected rendering that doesn't match the smoothness scale used elsewhere.

Recommend either:

  • Use smoothness_to_exponent(0.6) for a fixed smoothness of 0.6, or
  • Use smoothness_to_exponent(project.camera.rounding_smoothness) to respect the camera's configured smoothness
                     rounding_px: 0.0,
-                    corner_exponent: 0.6,
+                    corner_exponent: smoothness_to_exponent(project.camera.rounding_smoothness),
📜 Review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 69594bd and ba6dbbe.

📒 Files selected for processing (2)
  • crates/rendering/src/composite_frame.rs (2 hunks)
  • crates/rendering/src/lib.rs (5 hunks)
🧰 Additional context used
📓 Path-based instructions (2)
**/*.rs

📄 CodeRabbit inference engine (CLAUDE.md)

**/*.rs: Never use dbg!() macro; use proper logging (tracing::debug!, etc.) instead
Never write let _ = async_fn() which silently drops futures; await or explicitly handle them
Use duration.saturating_sub(other) instead of duration - other to avoid panics on underflow
Merge nested if statements: write 'if a && b { }' instead of 'if a { if b { } }'
Don't call .clone() on Copy types (integers, bools, etc.); copy them directly
Use function references directly: iter.map(foo) instead of iter.map(|x| foo(x))
Accept &[T] or &str instead of &Vec or &String in function parameters for flexibility
Use .is_empty() instead of .len() == 0 or .len() > 0 / .len() != 0
Don't assign () to a variable: write foo(); instead of let _ = foo(); or let x = foo(); when return is unit
Use .unwrap_or(val) instead of .unwrap_or_else(|| val) when the default is a simple/cheap value
Use 'for item in &collection' or 'for (i, item) in collection.iter().enumerate()' instead of 'for i in 0..collection.len()'
Use value.clamp(min, max) instead of manual if chains or .min(max).max(min) patterns
Always handle Result/Option or types marked #[must_use]; never ignore them

**/*.rs: Use rustfmt and workspace clippy lints for Rust code formatting and linting
Use snake_case for Rust module names and kebab-case for crate names
Never use dbg!() macro in Rust code; use proper logging instead (Clippy: dbg_macro = deny)
Always handle Result/Option or types marked #[must_use]; never ignore them (Rust compiler lint: unused_must_use = deny)
Never write let _ = async_fn() which silently drops futures; await or explicitly handle them (Clippy: let_underscore_future = deny)
Use saturating_sub instead of - for Duration to avoid panics (Clippy: unchecked_duration_subtraction = deny)
Merge nested if statements: use if a && b { } instead of if a { if b { } } (Clippy: collapsible_if = deny)
Don't call .clone() on Copy types; just copy them directly (Clippy: clone_on_copy = deny)
U...

Files:

  • crates/rendering/src/composite_frame.rs
  • crates/rendering/src/lib.rs
**/*.{ts,tsx,js,jsx,rs}

📄 CodeRabbit inference engine (AGENTS.md)

Never add comments to code (//, /* */, ///, //!, #, etc.); code must be self-explanatory through naming, types, and structure

Files:

  • crates/rendering/src/composite_frame.rs
  • crates/rendering/src/lib.rs
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (2)
  • GitHub Check: Clippy (aarch64-apple-darwin, macos-latest)
  • GitHub Check: Clippy (x86_64-pc-windows-msvc, windows-latest)
🔇 Additional comments (3)
crates/rendering/src/composite_frame.rs (1)

23-23: LGTM! Field rename aligns with squircle implementation.

The field name corner_exponent clearly conveys that it controls the exponent parameter for super-ellipse rendering, replacing the previous type-based approach.

crates/rendering/src/lib.rs (2)

1160-1164: LGTM! Display path correctly uses background smoothness.

The display rendering path properly converts rounding_smoothness to both an adjusted radius and corner exponent using the helper functions. This ensures consistent super-ellipse rendering.


1443-1444: Verify if camera-only mode should inherit camera rounding settings or intentionally use zero rounding.

The camera-only rendering path sets rounding_px: 0.0 with corner_exponent: 0.6. If sharp corners are intentional for camera-only mode, the exponent is unused. If camera-only should respect the camera's rounding configuration for visual consistency, both fields should be derived from camera settings.

Copy link

@cursor cursor bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This PR is being reviewed by Cursor Bugbot

Details

You are on the Bugbot Free tier. On this plan, Bugbot will review limited PRs each billing cycle.

To receive Bugbot reviews on all of your PRs, visit the Cursor dashboard to activate Pro and start your 14-day free trial.

export type BackgroundConfiguration = { source: BackgroundSource; blur: number; padding: number; rounding: number; roundingSmoothness?: number; inset: number; crop: Crop | null; shadow?: number; advancedShadow?: ShadowConfiguration | null; border?: BorderConfiguration | null }
export type BackgroundSource = { type: "wallpaper"; path: string | null } | { type: "image"; path: string | null } | { type: "color"; value: [number, number, number]; alpha?: number } | { type: "gradient"; from: [number, number, number]; to: [number, number, number]; angle?: number }
export type BorderConfiguration = { enabled: boolean; width: number; color: [number, number, number]; opacity: number }
export type Camera = { hide: boolean; mirror: boolean; position: CameraPosition; size: number; zoomSize: number | null; rounding?: number; shadow?: number; advancedShadow?: ShadowConfiguration | null; shape?: CameraShape; roundingType?: CornerStyle }
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Bug: Screenshot editor defaults use removed roundingType property

The type definitions for BackgroundConfiguration and Camera were updated to replace roundingType?: CornerStyle with roundingSmoothness?: number, and CornerStyle was removed. However, the screenshot editor's default configuration in apps/desktop/src/routes/screenshot-editor/context.tsx still sets roundingType: "squircle" at lines 56 and 95. These objects use as unknown as type casts that bypass TypeScript checking, so the build succeeds but at runtime the old roundingType property is ignored and roundingSmoothness defaults to 0 (via the ?? 0 fallback). This causes the screenshot editor to default to circular corners instead of the intended squircle style.

Fix in Cursor Fix in Web

Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1

Caution

Some comments are outside the diff and can’t be posted inline due to platform limitations.

⚠️ Outside diff range comments (1)
crates/project/src/configuration.rs (1)

224-239: New rounding_smoothness fields are coherent, but existing CornerStyle values are effectively discarded

  • Background:
    • Adds rounding_smoothness: f32 with #[serde(default)], defaulting to 0.6 in Default. This matches the desired “Apple‑style squircle” default.
  • Camera:
    • Adds rounding_smoothness: f32 with #[serde(default)], defaulting to 0.0, which keeps cameras visually rounded by default.
  • Migration:
    • Camera no longer aliases rounding_type via serde, and BackgroundConfiguration never had such an alias. Any existing JSON rounding_type values will now be ignored and replaced by the above defaults on load.
    • camera_config_needs_migration still looks for "rounding_type" in raw JSON, but there’s no mapping from that to rounding_smoothness, so projects that previously chose a non‑default CornerStyle will silently lose that preference.

If the intent is to intentionally reset past corner styles to the new smoothness defaults, this is fine. If you want to preserve user intent, consider adding a one‑off migration that:

  • Reads rounding_type from the raw JSON, and
  • Maps it into an appropriate rounding_smoothness value before writing back.

Also applies to: 252-266, 293-313, 332-351, 1032-1041

♻️ Duplicate comments (1)
crates/rendering/src/lib.rs (1)

1951-1969: Remove helper function comments to comply with “no comments” rule

The two // comment lines above smoothness_to_exponent and compute_adjusted_radius, plus the inline “Visual normalization” comment, conflict with the guideline that .rs files should not contain comments. This is the same issue that was previously raised for the earlier doc‑comment block around these helpers.

The function names and parameter names are already descriptive enough; consider deleting these comments while keeping the logic unchanged.

📜 Review details

Configuration used: defaults

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 5d61eb2 and be6d45b.

📒 Files selected for processing (7)
  • apps/desktop/src/routes/editor/ConfigSidebar.tsx (4 hunks)
  • apps/desktop/src/routes/editor/context.ts (2 hunks)
  • apps/desktop/src/utils/tauri.ts (1 hunks)
  • crates/project/src/configuration.rs (4 hunks)
  • crates/rendering/src/composite_frame.rs (3 hunks)
  • crates/rendering/src/lib.rs (5 hunks)
  • packages/ui-solid/src/auto-imports.d.ts (1 hunks)
🚧 Files skipped from review as they are similar to previous changes (3)
  • apps/desktop/src/utils/tauri.ts
  • crates/rendering/src/composite_frame.rs
  • packages/ui-solid/src/auto-imports.d.ts
🧰 Additional context used
📓 Path-based instructions (7)
**/*.ts

📄 CodeRabbit inference engine (CLAUDE.md)

Use TanStack Query v5 for all client-side server state and data fetching in TypeScript files

Files:

  • apps/desktop/src/routes/editor/context.ts
**/*.{ts,tsx,js,jsx}

📄 CodeRabbit inference engine (CLAUDE.md)

**/*.{ts,tsx,js,jsx}: Use strict TypeScript; avoid any type; leverage shared types from @cap/* packages
Follow camelCase naming for variables and functions; PascalCase for components; hooks must start with 'use' prefix
Use Biome for linting and formatting; match existing formatting conventions in the codebase
Use Tailwind CSS for styling in web components; stay consistent with spacing and tokens
Use static skeletons for loading states that mirror content; avoid bouncing animations
Memoize expensive work, code-split naturally, and use Next/Image for remote assets

**/*.{ts,tsx,js,jsx}: Use 2-space indent for TypeScript files; format with Biome using pnpm format
Use Biome for code formatting and linting; run pnpm format regularly
Use kebab-case for file names (e.g., user-menu.tsx); use PascalCase for components

Files:

  • apps/desktop/src/routes/editor/context.ts
  • apps/desktop/src/routes/editor/ConfigSidebar.tsx
**/*.{ts,tsx}

📄 CodeRabbit inference engine (CLAUDE.md)

**/*.{ts,tsx}: Never add any form of comments to code (single-line //, multi-line /* /, JSDoc /* */, or any other comment syntax); code must be self-explanatory through naming, types, and structure
Directory naming must use lowercase-dashed convention

Files:

  • apps/desktop/src/routes/editor/context.ts
  • apps/desktop/src/routes/editor/ConfigSidebar.tsx
apps/desktop/**/*.ts

📄 CodeRabbit inference engine (CLAUDE.md)

apps/desktop/**/*.ts: Use @tanstack/solid-query for server state management in SolidJS components
Use generated commands and events from tauri_specta for IPC; never manually construct IPC calls
Listen directly to generated events from tauri_specta and use typed event interfaces

Files:

  • apps/desktop/src/routes/editor/context.ts
**/*.{ts,tsx,js,jsx,rs}

📄 CodeRabbit inference engine (AGENTS.md)

Never add comments to code (//, /* */, ///, //!, #, etc.); code must be self-explanatory through naming, types, and structure

Files:

  • apps/desktop/src/routes/editor/context.ts
  • crates/project/src/configuration.rs
  • apps/desktop/src/routes/editor/ConfigSidebar.tsx
  • crates/rendering/src/lib.rs
**/*.rs

📄 CodeRabbit inference engine (CLAUDE.md)

**/*.rs: Never use dbg!() macro; use proper logging (tracing::debug!, etc.) instead
Never write let _ = async_fn() which silently drops futures; await or explicitly handle them
Use duration.saturating_sub(other) instead of duration - other to avoid panics on underflow
Merge nested if statements: write 'if a && b { }' instead of 'if a { if b { } }'
Don't call .clone() on Copy types (integers, bools, etc.); copy them directly
Use function references directly: iter.map(foo) instead of iter.map(|x| foo(x))
Accept &[T] or &str instead of &Vec or &String in function parameters for flexibility
Use .is_empty() instead of .len() == 0 or .len() > 0 / .len() != 0
Don't assign () to a variable: write foo(); instead of let _ = foo(); or let x = foo(); when return is unit
Use .unwrap_or(val) instead of .unwrap_or_else(|| val) when the default is a simple/cheap value
Use 'for item in &collection' or 'for (i, item) in collection.iter().enumerate()' instead of 'for i in 0..collection.len()'
Use value.clamp(min, max) instead of manual if chains or .min(max).max(min) patterns
Always handle Result/Option or types marked #[must_use]; never ignore them

**/*.rs: Use rustfmt and workspace clippy lints for Rust code formatting and linting
Use snake_case for Rust module names and kebab-case for crate names
Never use dbg!() macro in Rust code; use proper logging instead (Clippy: dbg_macro = deny)
Always handle Result/Option or types marked #[must_use]; never ignore them (Rust compiler lint: unused_must_use = deny)
Never write let _ = async_fn() which silently drops futures; await or explicitly handle them (Clippy: let_underscore_future = deny)
Use saturating_sub instead of - for Duration to avoid panics (Clippy: unchecked_duration_subtraction = deny)
Merge nested if statements: use if a && b { } instead of if a { if b { } } (Clippy: collapsible_if = deny)
Don't call .clone() on Copy types; just copy them directly (Clippy: clone_on_copy = deny)
U...

Files:

  • crates/project/src/configuration.rs
  • crates/rendering/src/lib.rs
**/*.tsx

📄 CodeRabbit inference engine (CLAUDE.md)

Use React Query hooks with Server Actions for mutations and perform precise cache updates using setQueryData/setQueriesData instead of broad invalidations

Files:

  • apps/desktop/src/routes/editor/ConfigSidebar.tsx
🧬 Code graph analysis (2)
apps/desktop/src/routes/editor/context.ts (1)
apps/desktop/src/utils/tauri.ts (1)
  • ProjectConfiguration (460-460)
apps/desktop/src/routes/editor/ConfigSidebar.tsx (1)
apps/desktop/src/routes/editor/ui.tsx (2)
  • Slider (65-149)
  • Field (25-47)
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (4)
  • GitHub Check: Clippy (aarch64-apple-darwin, macos-latest)
  • GitHub Check: Clippy (x86_64-pc-windows-msvc, windows-latest)
  • GitHub Check: Format (Biome)
  • GitHub Check: Cursor Bugbot
🔇 Additional comments (3)
apps/desktop/src/routes/editor/context.ts (1)

108-116: Direct background/camera typing and serialization look consistent with new config shape

Using ProjectConfiguration["background"] / ["camera"] directly and round‑tripping them unchanged in serializeProjectConfiguration correctly aligns the editor state with the updated Tauri ProjectConfiguration (including new rounding/roundingSmoothness fields). I don’t see issues here.

Also applies to: 146-164

apps/desktop/src/routes/editor/ConfigSidebar.tsx (1)

68-68: Rounding and corner-smoothness sliders are correctly wired to project configuration

  • Background sliders:
    • Rounded Corners uses project.background.rounding in [0, 100] with % tooltip.
    • Corner Smoothness uses project.background.roundingSmoothness ?? 0 in [0, 1] with a % tooltip; with Rust default of 0.6, this will show as 60% for new/legacy configs.
  • Camera sliders:
    • Rounded Corners uses project.camera.rounding ?? 0 in [0, 100].
    • Corner Smoothness uses project.camera.roundingSmoothness ?? 0 in [0, 1], defaulting to 0.0 which matches the Rust Camera::default.

Importing useEditorContext from ./context is required for these bindings and is consistent with existing usage in this file. No functional issues from this set of changes.

Also applies to: 1984-2005, 2342-2363

crates/rendering/src/lib.rs (1)

2-5: Rounding radius and exponent computation are correctly tied to new smoothness fields

  • Display path:
    • rounding_px is now compute_adjusted_radius((background.rounding / 100) * 0.5 * min_target_axis, background.rounding_smoothness), which keeps the capsule behavior and adds visual normalization as smoothness changes.
    • corner_exponent comes from smoothness_to_exponent(background.rounding_smoothness), giving the shader a consistent exponent in [2, 8].
  • Camera path:
    • Mirrors the same pattern using project.camera.rounding and project.camera.rounding_smoothness, so the new “Camera Corner Smoothness” slider actually affects the rendered camera shape (unlike the earlier background‑smoothness wiring issue).
  • Camera‑only path:
    • With rounding_px: 0.0 and corner_exponent: 0.0, corners are effectively disabled in this mode, which lines up with rounding_px being zero.

Overall the rendering side is now in sync with the new numeric smoothness model and the UI bindings.

Also applies to: 1200-1217, 1384-1398, 1486-1497

Comment on lines 1715 to +1718
/*
this is a Tauri bug in WebKit so we need to validate the file type manually
https://github.com/tauri-apps/tauri/issues/9158
*/
this is a Tauri bug in WebKit so we need to validate the file type manually
https://github.com/tauri-apps/tauri/issues/9158
*/
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🛠️ Refactor suggestion | 🟠 Major

Remove the Tauri bug comment block to match “no comments” guideline

The multi‑line /* ... */ comment about the Tauri WebKit bug was modified in this PR and violates the guideline that .ts/.tsx/.js/.jsx/.rs files should not contain code comments. The surrounding code (manual extension validation) is already self‑explanatory.

Consider deleting this block entirely and, if needed, capturing the context in commit messages or external docs instead.

🤖 Prompt for AI Agents
In apps/desktop/src/routes/editor/ConfigSidebar.tsx around lines 1715 to 1718,
remove the multi-line comment block (/* this is a Tauri bug in WebKit so we need
to validate the file type manually
https://github.com/tauri-apps/tauri/issues/9158 */) so the file complies with
the "no comments" guideline; delete the block only and keep the surrounding
manual extension validation code unchanged, and capture any needed rationale in
the PR description or external docs instead.

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.

2 participants