Skip to content

fix(desktop/linux): fix round camera shape preview in linux - #2404

Open
gedp wants to merge 2 commits into
CapSoftware:mainfrom
gedp:fix-camera-round-shape
Open

gedp wants to merge 2 commits into
CapSoftware:mainfrom
gedp:fix-camera-round-shape

Conversation

@gedp

@gedp gedp commented Oct 1, 2026 •

Copy link
Copy Markdown

Fixes circular/round camera shape not applying properly on Linux during recording preview.

In apply_recording_camera_preview_state (apps/desktop/src-tauri/src/recording.rs), when CameraPreviewShape::Round was selected, config.camera.rounding_type was not set to CornerStyle::Rounded, causing the camera bubble to render with incorrect corners.

Tested on Linux (CachyOS / Wayland).

RetriggerConfidence Score: 4/5

The PR is not ready to merge because the round-preview case breaks an existing desktop test.

Findings

  1. P1 Round preview breaks existing test ▶
Fix with agent prompt
### Issue 1
apps/desktop/src-tauri/src/recording.rs:6703
When the existing camera-state test checks the Round shape, this line changes `rounding_type` to `Rounded`, but the test still expects its default `Squircle` value. Its full-config assertion therefore fails, breaking the desktop test suite. Update the expected config to include the intended corner-style change.

---

For each issue above, determine whether it is valid and should be fixed. If so, fix it directly.

Summary

The PR makes round camera previews use the Rounded corner style in generated recording configurations.

  • The existing camera-state test still expects round previews to retain the default corner style and needs updating.

Reviews (1) · Last reviewed commit: "fix(camera): set camera rounding_type to..."

@gedp gedp changed the title fix(camera): set camera rounding_type to Rounded when preview shape is Round fix(desktop/linux): fix round camera shape preview in linux Oct 1, 2026
CameraPreviewShape::Round => {
config.camera.shape = CameraShape::Square;
config.camera.rounding = 100.0;
config.camera.rounding_type = cap_project::CornerStyle::Rounded;

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

P1 Round preview breaks existing test
When the existing camera-state test checks the Round shape, this line changes rounding_type to Rounded, but the test still expects its default Squircle value. Its full-config assertion therefore fails, breaking the desktop test suite. Update the expected config to include the intended corner-style change.

Prompt To Fix With AI
This is a comment left during a code review.
Path: apps/desktop/src-tauri/src/recording.rs
Line: 6703

Comment:
**Round preview breaks existing test**
When the existing camera-state test checks the Round shape, this line changes `rounding_type` to `Rounded`, but the test still expects its default `Squircle` value. Its full-config assertion therefore fails, breaking the desktop test suite. Update the expected config to include the intended corner-style change.

---

For each issue above, determine whether it is valid and should be fixed. If so, fix it directly.

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

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

Fixed in 81f804c, updated the test expectation.

This branch has not been deployed

No deployments
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