Skip to content

ADFA-3909 | Fix smart boundary detection zones and initial state#1301

Open
jatezzz wants to merge 1 commit into
stagefrom
fix/ADFA-3909-smart-boundary-detection-experimental
Open

ADFA-3909 | Fix smart boundary detection zones and initial state#1301
jatezzz wants to merge 1 commit into
stagefrom
fix/ADFA-3909-smart-boundary-detection-experimental

Conversation

@jatezzz
Copy link
Copy Markdown
Collaborator

@jatezzz jatezzz commented May 13, 2026

Description

This PR fixes the issue where the calculated left and right margins were incorrectly placed, either intersecting with widgets or snapping to the far edges. I adjusted the LEFT_ZONE_END_PERCENT and RIGHT_ZONE_START_PERCENT to 0.5f so the scanning zones divide the screen exactly in half. Additionally, previousIsActive was updated to initialize as true, ensuring that large empty spaces at the very left edge of the image are immediately recognized as valid gaps.

Details

Screen.Recording.2026-05-13.at.1.17.04.PM.mov

Ticket

ADFA-3909

@jatezzz jatezzz requested review from a team, Daniel-ADFA and avestaadfa May 13, 2026 20:42
@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai Bot commented May 13, 2026

Review Change Stack

Warning

Rate limit exceeded

@jatezzz has exceeded the limit for the number of commits that can be reviewed per hour. Please wait 59 minutes and 15 seconds before requesting another review.

You’ve run out of usage credits. Purchase more in the billing tab.

⌛ How to resolve this issue?

After the wait time has elapsed, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

We recommend that you space out your commits to avoid hitting the rate limit.

🚦 How do rate limits work?

CodeRabbit enforces hourly rate limits for each developer per organization.

Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout.

Please see our FAQ for further information.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: 30e2c840-5b73-4cc0-921f-bfd47a72a833

📥 Commits

Reviewing files that changed from the base of the PR and between 46ab04a and ff8b7f0.

📒 Files selected for processing (1)
  • cv-image-to-xml/src/main/java/org/appdevforall/codeonthego/computervision/utils/SmartBoundaryDetector.kt
📝 Walkthrough

Walkthrough

SmartBoundaryDetector's zone partition constants are adjusted to split at 0.5 instead of 0.4/0.6, and the gap detection initialization flag is changed from false to true. These tuning adjustments refine how the boundary detection algorithm partitions search regions and detects inactive gaps in the signal.

Changes

Boundary Detection Algorithm Tuning

Layer / File(s) Summary
Zone partition and gap detection initialization
cv-image-to-xml/src/main/java/org/appdevforall/codeonthego/computervision/utils/SmartBoundaryDetector.kt
LEFT_ZONE_END_PERCENT and RIGHT_ZONE_START_PERCENT are both adjusted to 0.5f to center the zone split, and previousIsActive is initialized to true instead of false in findBestGapMidpoint, affecting how gaps are detected from the beginning of the signal.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes

Possibly related PRs

  • appdevforall/CodeOnTheGo#1171: Introduced the SmartBoundaryDetector boundary detection algorithm that is being tuned by this PR's zone and gap detection adjustments.

Suggested reviewers

  • Daniel-ADFA
  • avestaadfa
  • hal-eisen-adfa

Poem

🐰 With whiskers twitching at the zone so fine,
Left and right now meet at point fifty—divine!
The gaps grow clear when flags flip true,
Boundaries sharper, cleaner through and through! ✨

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly and specifically summarizes the main changes: fixing smart boundary detection zones and initial state, directly corresponding to the zone constant adjustments and previousIsActive initialization changes.
Description check ✅ Passed The description is directly related to the changeset, explaining the rationale for adjusting zone percentages and the previousIsActive initialization with clear context about fixing margin placement issues.
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.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch fix/ADFA-3909-smart-boundary-detection-experimental

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.

@jatezzz jatezzz force-pushed the fix/ADFA-3909-smart-boundary-detection-experimental branch from 46ab04a to ff8b7f0 Compare May 14, 2026 14:45
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