Skip to content

fix(android): pass --scale with 4-decimal precision - #343

Open
gmegidish wants to merge 1 commit into
mainfrom
fix/scale-precision
Open

fix(android): pass --scale with 4-decimal precision#343
gmegidish wants to merge 1 commit into
mainfrom
fix/scale-precision

Conversation

@gmegidish

@gmegidish gmegidish commented Aug 20, 2026

Copy link
Copy Markdown
Member

%.2f quantized the requested capture scale before it reached devicekit — 0.4988 became "0.50", so fine-grained scale adjustments were silently a no-op (found while diagnosing the odd-dimension capture failure, mobile-next/devicekit-android#42). %.4f keeps the requested value.

  • go build passes (go vet has pre-existing unrelated failures in ios.go on main)

Summary by CodeRabbit

  • Bug Fixes
    • Improved Android screen capture scale precision by preserving up to four decimal places in the device configuration.

%.2f quantized the requested capture scale (0.4988 became "0.50"),
making fine-grained scale adjustments a no-op on the device encoder.
@coderabbitai

coderabbitai Bot commented Aug 20, 2026

Copy link
Copy Markdown

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

Run ID: 9ab706ef-a338-4c2d-ba53-37b7be4d4391

📥 Commits

Reviewing files that changed from the base of the PR and between 15e5bb7 and 706041f.

📒 Files selected for processing (1)
  • devices/android.go

Included review availability: 3 reviews are currently available. Your included PR review attempts over the past 7 days set your current allowance at 5 reviews per hour.


📝 Walkthrough

Walkthrough

StartScreenCapture now passes the configured scale to the DeviceKit screen-capture server with four decimal places instead of two.

Changes

Screen capture configuration

Layer / File(s) Summary
Pass four-decimal scale values
devices/android.go
StartScreenCapture formats config.Scale with four decimal places when constructing the DeviceKit server command.

Estimated code review effort: 1 (Trivial) | ~2 minutes

Merge Risk: ⚪ Minimal · up to 70604

This localized change preserves fine-grained Android capture scale values, and no actionable merge-blocking risk remains after normal checks and review.

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly and concisely describes the Android scale precision fix, which is the main change in the pull request.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch fix/scale-precision

Comment @coderabbitai help to get the list of available commands.

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