Skip to content

fix: 3D raycast annotations follow reachable collider shapes - #1502

Merged
hatayama merged 12 commits into
mainfrom
fix/raycast-outline-annotations
Jul 4, 2026
Merged

fix: 3D raycast annotations follow reachable collider shapes#1502
hatayama merged 12 commits into
mainfrom
fix/raycast-outline-annotations

Conversation

@hatayama

@hatayama hatayama commented Jul 4, 2026

Copy link
Copy Markdown
Owner

Summary

  • Draw 3D raycast annotations as reachable sampled-cell outlines instead of large axis-aligned boxes.
  • Add a perspective demo scene for checking angled placement areas and UI-blocked cells.

User Impact

  • Annotated screenshots no longer suggest that empty space inside a large bbox is clickable.
  • Angled, L-shaped, split, and partially UI-covered 3D click areas are easier to inspect visually.

Changes

  • Build outline segments from reachable raycast samples while keeping JSON Bounds fields as compatibility bboxes.
  • Group multiple colliders on the same GameObject into one physics annotation.
  • Add pure EditMode coverage for outline generation, grouping, and top-left to Canvas coordinate conversion.
  • Document the outline behavior and add a perspective raycast annotation fixture scene.

Verification

  • uloop compile --force-recompile true --wait-for-domain-reload true
  • uloop run-tests --test-mode EditMode --filter-type regex --filter-value ".(RaycastGridAnnotatorTests|UIElementAnnotatorTests)."
  • Manual screenshot: .uloop/outputs/Screenshots/Rendering_20260704_212035_706.png
  • Manual screenshot: .uloop/outputs/Screenshots/Rendering_20260704_212117_441.png

Review in cubic

Summary

  • Updated 3D raycast physics collider annotations to render reachable sampled-cell outline segments (merged grid-edge segments) instead of large axis-aligned bounding boxes, while keeping JSON Bounds* as compatibility axis-aligned boxes (and omitting fully covered clusters).
  • Added RaycastOutlineSegments to UIElementInfo and updated overlay rendering/border rendering to prefer outline strokes when present; converted top-left raycast outline segments into screen-space for drawing, including correct canvas-space Y-flip behavior and per-segment rect calculation.
  • Refactored clustered physics-collider raycast sampling to group multiple colliders on the same GameObject into a single physics annotation, increased clustered grid density (20×20 → 40×40), and propagated row/column metadata into outline generation.
  • Implemented outline generation via a dedicated builder that derives occupied cells, emits up to four boundary segments per cell where neighbors are unoccupied, and then sorts/merges consecutive collinear segments; added robustness for adjacency merging, concave L-shapes, holes (inner+outer edges), and disconnected components.
  • Added EditMode NUnit coverage for:
    • cluster key/grouping by GameObject (multi-collider case),
    • outline segment generation across grid shapes (single cell, adjacency merge, L-shape concavity, hole handling, disconnected components),
    • attaching generated outline segments to PhysicsCollider UI elements when cluster samples include grid coordinates,
    • top-left-to-canvas coordinate conversion and RaycastOutlineSegment rect conversion.
  • Expanded/updated screenshot/annotation documentation to reflect the new outline-vs-bounds contract, clustered raycast/UI occlusion semantics, coordinate conversion rules, and demo-scene verification expectations; updated related CLI docs to require explicit true|false values for boolean flags.
  • Added/adjusted CLI E2E tests to ensure uloop compile boolean options reject bare flags and error when --force-recompile <value> / --wait-for-domain-reload <value> are omitted.
  • Added a maintained perspective demo scene to verify angled placement behavior: outline tracking of reachable sampled cells (including shrinking around blockers) and correct behavior when parts are UI-covered.

Replace large sampled-cell bounding boxes in the screenshot overlay with outlines built from reachable raycast sample cells. Keep the JSON bounds as a compatibility bbox while preserving SimX/SimY as the click-ready sampled point.

Add a perspective raycast annotation demo scene so angled placement areas and UI blockers can be visually checked.
@coderabbitai

coderabbitai Bot commented Jul 4, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

Warning

Review limit reached

@hatayama, you've reached your PR review limit, so we couldn't start this review.

Next review available in: 36 minutes

Enable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available.
You're only billed for reviews past your plan's rate limits ($0.25/file).

How can I continue?

After more reviews become available, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews.

How do review limits work?

CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability.

For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window.

Please refer docs for additional details.

Review details
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

Run ID: f2258213-6a9e-4616-ad10-3604feb68b4c

📥 Commits

Reviewing files that changed from the base of the PR and between 08735c5 and 706e988.

📒 Files selected for processing (9)
  • .agents/skills/uloop-execute-dynamic-code/references/playmode-automation-powershell.md
  • .agents/skills/uloop-screenshot/SKILL.md
  • .agents/skills/uloop-screenshot/references/annotated-elements.md
  • .claude/skills/uloop-execute-dynamic-code/references/playmode-automation-powershell.md
  • .claude/skills/uloop-screenshot/SKILL.md
  • .claude/skills/uloop-screenshot/references/annotated-elements.md
  • Packages/src/Editor/Api/McpTools/ExecuteDynamicCode/Skill/references/playmode-automation-powershell.md
  • Packages/src/Editor/Api/McpTools/Screenshot/Skill/SKILL.md
  • Packages/src/Editor/Api/McpTools/Screenshot/Skill/references/annotated-elements.md
📝 Walkthrough

Walkthrough

This PR adds clustered raycast outline generation and rendering for physics-collider annotations, extends tests around outline geometry and coordinate conversion, and updates related skill/reference docs for explicit boolean values and revised output semantics.

Changes

Outline and annotation updates

Layer / File(s) Summary
Outline segment builder
Packages/src/Editor/Utils/RaycastSampleOutlineBuilder.cs
New outline construction computes occupied cells, boundary segments, merging, and supporting cell/segment value types.
Cluster sampling and outline wiring
Packages/src/Editor/Utils/RaycastGridAnnotator.cs, Packages/src/Editor/Utils/RaycastHitClusterer.cs, Packages/src/Editor/Api/McpTools/Screenshot/UIElementInfo.cs
Clustered sampling now carries row/column data, uses collider-based cluster keys, increases grid resolution, and stores outline segments on physics-collider UI elements.
Overlay outline rendering
Packages/src/Editor/Utils/UIElementAnnotator.cs
Overlay rendering now converts top-left outline segments to screen space, draws layered outlines, and carries outline geometry through AnnotationDrawInfo.
Outline and coordinate tests
Assets/Tests/Editor/RaycastGridAnnotatorTests.cs, Assets/Tests/Editor/UIElementAnnotatorTests.cs
Adds coverage for cluster-key grouping, outline segment shapes, and screen-space conversion helpers.

Documentation updates

Layer / File(s) Summary
Skill and reference docs
.claude/skills/*, .agents/skills/*, Packages/src/Editor/Api/McpTools/*
Rewords command descriptions, prerequisite notes, output contracts, and example invocations; several options now require explicit `true

Estimated code review effort: 3 (Moderate) | ~30 minutes

Sequence Diagram(s)

sequenceDiagram
  participant RaycastGridAnnotator
  participant RaycastSampleOutlineBuilder
  participant UIElementInfo
  participant UIElementAnnotator

  RaycastGridAnnotator->>RaycastGridAnnotator: CollectClusterSamples (row, column, clusterKey)
  RaycastGridAnnotator->>RaycastSampleOutlineBuilder: CreateOutlineSegments(clusterSamples)
  RaycastSampleOutlineBuilder-->>RaycastGridAnnotator: outlineSegments
  RaycastGridAnnotator->>UIElementInfo: RaycastOutlineSegments = outlineSegments
  UIElementAnnotator->>UIElementInfo: read RaycastOutlineSegments
  UIElementAnnotator->>UIElementAnnotator: ConvertTopLeftOutlineSegmentToScreenSegment
  UIElementAnnotator->>UIElementAnnotator: CreateAnnotationOutlineForElement
Loading

Possibly related PRs

  • hatayama/unity-cli-loop#1210: Both PRs adjust uloop screenshot annotation option semantics around --annotate-elements, --annotate-raycast-grid, and --elements-only.
  • hatayama/unity-cli-loop#1500: Both PRs modify the RaycastGridAnnotator physics-collider annotation path and share the same clustered sample flow.
🚥 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 accurately summarizes the main change: 3D raycast annotations now follow reachable collider shapes instead of large bounding boxes.
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 unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch fix/raycast-outline-annotations

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.

@coderabbitai coderabbitai Bot left a comment

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.

Actionable comments posted: 1

🧹 Nitpick comments (1)
Assets/Tests/Editor/UIElementAnnotatorTests.cs (1)

129-141: 📐 Maintainability & Code Quality | 🔵 Trivial | ⚡ Quick win

Consider adding coverage for the outline-rect geometry, not just the Y-flip helper.

This test covers ConvertTopLeftOutlineSegmentToScreenSegment well, but CalculateOutlineSegmentRect and CreateOutline (the actual pixel geometry drawn per segment) have no direct tests. A test asserting adjoining segments produce a corner without gaps would have caught the corner-notch issue flagged in UIElementAnnotator.cs.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@Assets/Tests/Editor/UIElementAnnotatorTests.cs` around lines 129 - 141, The
current test only validates the Y-flip helper in
UIElementAnnotator.ConvertTopLeftOutlineSegmentToScreenSegment, but it does not
cover the actual outline geometry built by CalculateOutlineSegmentRect and
CreateOutline. Add tests around those methods that assert adjoining
RaycastOutlineSegment values produce a continuous corner with no gap/notch,
using UIElementAnnotator as the main entry point so the drawn pixel geometry is
verified directly.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@Packages/src/Editor/Utils/UIElementAnnotator.cs`:
- Around line 550-582: The outline corners in CreateOutline are leaving small
uncovered notches because CalculateOutlineSegmentRect only expands each segment
perpendicular to the line, not at the ends. Update CalculateOutlineSegmentRect
so horizontal and vertical segment rects are extended by thickness/2 on both
endpoints (square-cap behavior), ensuring adjacent perpendicular edges overlap
and fully cover each corner for all outline layers.

---

Nitpick comments:
In `@Assets/Tests/Editor/UIElementAnnotatorTests.cs`:
- Around line 129-141: The current test only validates the Y-flip helper in
UIElementAnnotator.ConvertTopLeftOutlineSegmentToScreenSegment, but it does not
cover the actual outline geometry built by CalculateOutlineSegmentRect and
CreateOutline. Add tests around those methods that assert adjoining
RaycastOutlineSegment values produce a continuous corner with no gap/notch,
using UIElementAnnotator as the main entry point so the drawn pixel geometry is
verified directly.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

Run ID: 7b854040-d4d3-4b4a-856d-d981bc168b4b

📥 Commits

Reviewing files that changed from the base of the PR and between a2abaf0 and 458e6a0.

⛔ Files ignored due to path filters (3)
  • Assets/Scenes/RaycastAnnotationPerspectiveDemoScene.unity is excluded by !**/*.unity and included by none
  • Assets/Scenes/RaycastAnnotationPerspectiveDemoScene.unity.meta is excluded by none and included by none
  • Packages/src/Editor/Utils/RaycastSampleOutlineBuilder.cs.meta is excluded by none and included by none
📒 Files selected for processing (9)
  • Assets/Tests/Editor/RaycastGridAnnotatorTests.cs
  • Assets/Tests/Editor/UIElementAnnotatorTests.cs
  • Packages/src/Editor/Api/McpTools/Screenshot/Skill/SKILL.md
  • Packages/src/Editor/Api/McpTools/Screenshot/Skill/references/annotated-elements.md
  • Packages/src/Editor/Api/McpTools/Screenshot/UIElementInfo.cs
  • Packages/src/Editor/Utils/RaycastGridAnnotator.cs
  • Packages/src/Editor/Utils/RaycastHitClusterer.cs
  • Packages/src/Editor/Utils/RaycastSampleOutlineBuilder.cs
  • Packages/src/Editor/Utils/UIElementAnnotator.cs

Comment thread Packages/src/Editor/Utils/UIElementAnnotator.cs

@cubic-dev-ai cubic-dev-ai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

1 issue found across 12 files

Reply with feedback, questions, or to request a fix.

Re-trigger cubic

Comment thread Packages/src/Editor/Utils/UIElementAnnotator.cs Outdated
hatayama added 6 commits July 4, 2026 21:43
Use distinct UI and visual blocker colors so the raycast annotation demo is easier to inspect from an angled camera.
Avoid a magenta blocker color that looks like a shader error while keeping the visual blocker distinct from the blue UI blocker.
Use a transparent amber material so the foreground blocker remains visible while revealing the placement cells behind it.
Clarify that screenshot boolean options require explicit true or false values so skill examples match the CLI option parser.
Regenerate the checked-in Claude and agent skill copies so screenshot examples include explicit boolean values.
Extend outline segment rectangles along their endpoints so perpendicular segments overlap at corners and avoid visible notches.

@cubic-dev-ai cubic-dev-ai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

3 issues found across 49 files (changes from recent commits).

Prompt for AI agents (unresolved issues)

Check if these issues are valid — if so, understand the root cause of each and fix them. If appropriate, use sub-agents to investigate and fix each issue separately.


<file name=".agents/skills/uloop-compile/SKILL.md">

<violation number="1" location=".agents/skills/uloop-compile/SKILL.md:39">
P2: The `compile` examples still demonstrate explicit `true`/`false` values for `--force-recompile` and `--wait-for-domain-reload`, which conflicts with the project's convention for valueless boolean flags in compile docs. Consider replacing these examples with valueless forms (e.g., `--force-recompile` and `--wait-for-domain-reload`) for consistency with the documented CLI contract.</violation>
</file>

<file name=".claude/skills/uloop-compile/SKILL.md">

<violation number="1" location=".claude/skills/uloop-compile/SKILL.md:39">
P2: The example commands use explicit `true`/`false` values for boolean flags (`--force-recompile true`, `--force-recompile false`, `--wait-for-domain-reload true`), which contradicts the project's convention of using valueless boolean flags for the `compile` command. The Usage section already shows the correct valueless form `[--force-recompile] [--wait-for-domain-reload]`, but the examples below it reintroduce the non-standard explicit-value style. This inconsistency can mislead users and downstream automation. Consider rewriting the examples to use the valueless flag convention consistently.</violation>
</file>

Tip: Review your code locally with the cubic CLI to iterate faster.

Re-trigger cubic

Comment thread .agents/skills/uloop-compile/SKILL.md Outdated

# Force recompilation and wait for Domain Reload completion
uloop compile --force-recompile true --wait-for-domain-reload true
npx --yes uloop-cli@2.2.0 compile --force-recompile true --wait-for-domain-reload true

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P2: The compile examples still demonstrate explicit true/false values for --force-recompile and --wait-for-domain-reload, which conflicts with the project's convention for valueless boolean flags in compile docs. Consider replacing these examples with valueless forms (e.g., --force-recompile and --wait-for-domain-reload) for consistency with the documented CLI contract.

Prompt for AI agents
Check if this issue is valid — if so, understand the root cause and fix it. At .agents/skills/uloop-compile/SKILL.md, line 39:

<comment>The `compile` examples still demonstrate explicit `true`/`false` values for `--force-recompile` and `--wait-for-domain-reload`, which conflicts with the project's convention for valueless boolean flags in compile docs. Consider replacing these examples with valueless forms (e.g., `--force-recompile` and `--wait-for-domain-reload`) for consistency with the documented CLI contract.</comment>

<file context>
@@ -30,16 +30,16 @@ uloop compile [--force-recompile] [--wait-for-domain-reload]
 
 # Force recompilation and wait for Domain Reload completion
-uloop compile --force-recompile true --wait-for-domain-reload true
+npx --yes uloop-cli@2.2.0 compile --force-recompile true --wait-for-domain-reload true
 
 # Wait for Domain Reload completion even without force recompilation
</file context>

Copy link
Copy Markdown
Owner Author

Choose a reason for hiding this comment

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

Addressed in 19d010a.

The CLI help shows these compile booleans as value-based options (--force-recompile <value> and --wait-for-domain-reload <value>), so I updated the source skill and generated copies to document <true|false> explicitly instead of switching to bare flags.

Verification: uloop compile --help; git diff --check.

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

The parent comment was wrong here: the CLI contract is value-based booleans, so documenting true/false is the right fix. Thanks for updating the source skill and generated copies.

Comment thread .claude/skills/uloop-compile/SKILL.md Outdated

# Force recompilation and wait for Domain Reload completion
uloop compile --force-recompile true --wait-for-domain-reload true
npx --yes uloop-cli@2.2.0 compile --force-recompile true --wait-for-domain-reload true

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P2: The example commands use explicit true/false values for boolean flags (--force-recompile true, --force-recompile false, --wait-for-domain-reload true), which contradicts the project's convention of using valueless boolean flags for the compile command. The Usage section already shows the correct valueless form [--force-recompile] [--wait-for-domain-reload], but the examples below it reintroduce the non-standard explicit-value style. This inconsistency can mislead users and downstream automation. Consider rewriting the examples to use the valueless flag convention consistently.

Prompt for AI agents
Check if this issue is valid — if so, understand the root cause and fix it. At .claude/skills/uloop-compile/SKILL.md, line 39:

<comment>The example commands use explicit `true`/`false` values for boolean flags (`--force-recompile true`, `--force-recompile false`, `--wait-for-domain-reload true`), which contradicts the project's convention of using valueless boolean flags for the `compile` command. The Usage section already shows the correct valueless form `[--force-recompile] [--wait-for-domain-reload]`, but the examples below it reintroduce the non-standard explicit-value style. This inconsistency can mislead users and downstream automation. Consider rewriting the examples to use the valueless flag convention consistently.</comment>

<file context>
@@ -30,16 +30,16 @@ uloop compile [--force-recompile] [--wait-for-domain-reload]
 
 # Force recompilation and wait for Domain Reload completion
-uloop compile --force-recompile true --wait-for-domain-reload true
+npx --yes uloop-cli@2.2.0 compile --force-recompile true --wait-for-domain-reload true
 
 # Wait for Domain Reload completion even without force recompilation
</file context>

Copy link
Copy Markdown
Owner Author

Choose a reason for hiding this comment

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

Addressed in 19d010a.

The CLI help shows these compile booleans as value-based options (--force-recompile <value> and --wait-for-domain-reload <value>), so I updated the source skill and generated copies to document <true|false> explicitly instead of switching to bare flags.

Verification: uloop compile --help; git diff --check.

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

You're right — the compile CLI treats those booleans as value-based options, so the parent comment was wrong here. Updating the source skill and generated copies to show <true|false> matches the actual help output.

Thanks for the feedback! I've updated an existing learning with this new information.

Comment thread .claude/skills/uloop-screenshot/SKILL.md Outdated
hatayama added 2 commits July 4, 2026 22:20
Align compile skill usage with the CLI value-based boolean parser and remove the duplicated raycast screenshot example from generated skill docs.

@cubic-dev-ai cubic-dev-ai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

1 issue found across 44 files (changes from recent commits).

Prompt for AI agents (unresolved issues)

Check if these issues are valid — if so, understand the root cause of each and fix them. If appropriate, use sub-agents to investigate and fix each issue separately.


<file name=".claude/skills/uloop-compile/SKILL.md">

<violation number="1" location=".claude/skills/uloop-compile/SKILL.md:20">
P1: The compile skill documentation now requires explicit `true`/`false` values for `--force-recompile` and `--wait-for-domain-reload`, and claims bare flags are not accepted. This contradicts the established CLI contract guidance for this repository (valueless boolean flags are the expected form for this command). Without evidence that the CLI parser itself was changed to reject bare flags, the documentation should continue to show valueless flags like `--force-recompile` without values.</violation>
</file>

Tip: Review your code locally with the cubic CLI to iterate faster.

Re-trigger cubic

Comment thread .claude/skills/uloop-compile/SKILL.md

@coderabbitai coderabbitai Bot left a comment

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.

Actionable comments posted: 6

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In
@.agents/skills/uloop-execute-dynamic-code/references/playmode-automation-powershell.md:
- Line 180: The `find-game-objects` example is currently using the default
inactive-object behavior implicitly, which can mislead readers about where the
behavior change applies. Update the example in the playmode automation docs to
keep `--include-inactive false` explicit on the hierarchy-related example, and
make sure the `get-hierarchy` guidance is the one that reflects the new default
of including inactive objects unless that flag is set.

In @.agents/skills/uloop-screenshot/references/annotated-elements.md:
- Line 41: Scope the direct-use note in annotated-elements.md to rendering
captures only: the current statement in the annotations section claims
AnnotatedElements[].SimX/SimY and RaycastGridPoints[].InputX/InputY are always
mouse-input coordinates, but that guarantee applies only when
ImageCoordinateSystem is "top-left-game-view". Update the wording near the
ResolutionScale/ImageToInputOffsetY guidance so it explicitly qualifies this
behavior for rendering captures and does not imply the same contract for window
captures.

In @.agents/skills/uloop-screenshot/SKILL.md:
- Around line 97-100: Clarify the capture-mode dependency in SKILL.md so
downstream tools only rely on conversion fields for rendering captures. Update
the documentation around the listed symbols (ImageToInputOffsetY, GameViewWidth,
GameViewHeight, ScreenshotToInputFormula, UnityInputFormula) to state they are
populated only when the screenshot comes from rendering capture, while window
captures leave them default or unavailable. Keep the scope explicit near the
relevant mouse-input guidance so users of the screenshot-to-input flow don’t
assume universal availability.

In @.claude/skills/uloop-screenshot/references/annotated-elements.md:
- Line 41: The direct-use note for AnnotatedElements[].SimX/SimY and
RaycastGridPoints[].InputX/InputY is too broad and should be scoped to rendering
captures only. Update the wording in annotated-elements.md to explicitly tie the
mouse-input coordinate guarantee to ImageCoordinateSystem being
"top-left-game-view" (for example in the section describing ResolutionScale and
ImageToInputOffsetY), so window captures are not implied to follow the same
contract.

In @.claude/skills/uloop-screenshot/SKILL.md:
- Around line 97-100: Clarify capture-mode dependency for the screenshot output
fields in the SKILL.md section: `ImageToInputOffsetY`, `GameViewWidth`,
`GameViewHeight`, `ScreenshotToInputFormula`, and `UnityInputFormula` should be
documented as rendering-capture-only values. Update the descriptions near those
symbols to state that window captures leave them at defaults or unavailable, so
downstream mouse-input tools do not assume these fields are always present or
usable.

In `@Packages/src/Editor/Api/McpTools/Screenshot/Skill/SKILL.md`:
- Around line 25-28: The `--raycast-layer-mask` row is misleading about
clustering: the implementation in the screenshot annotation flow groups dense
raycast samples by clickable object/GameObject via
`collider.gameObject.GetInstanceID()`, not by individual collider. Update the
wording in `SKILL.md` to reflect that `PhysicsCollider` entries are clustered by
the GameObject/clickable object so multiple colliders on the same object are
covered by one entry, while keeping the rest of the behavior description intact.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

Run ID: 6c80668d-358b-4579-ada2-0c17fd447eef

📥 Commits

Reviewing files that changed from the base of the PR and between 458e6a0 and 19d010a.

⛔ Files ignored due to path filters (1)
  • Assets/Scenes/RaycastAnnotationPerspectiveDemoScene.unity is excluded by !**/*.unity and included by none
📒 Files selected for processing (46)
  • .agents/skills/uloop-clear-console/SKILL.md
  • .agents/skills/uloop-compile/SKILL.md
  • .agents/skills/uloop-control-play-mode/SKILL.md
  • .agents/skills/uloop-execute-dynamic-code/references/asset-operations.md
  • .agents/skills/uloop-execute-dynamic-code/references/playmode-automation-powershell.md
  • .agents/skills/uloop-execute-dynamic-code/references/playmode-automation-zsh.md
  • .agents/skills/uloop-find-game-objects/SKILL.md
  • .agents/skills/uloop-focus-window/SKILL.md
  • .agents/skills/uloop-get-hierarchy/SKILL.md
  • .agents/skills/uloop-get-logs/SKILL.md
  • .agents/skills/uloop-launch/SKILL.md
  • .agents/skills/uloop-raycast/SKILL.md
  • .agents/skills/uloop-record-input/SKILL.md
  • .agents/skills/uloop-replay-input/SKILL.md
  • .agents/skills/uloop-run-tests/SKILL.md
  • .agents/skills/uloop-screenshot/SKILL.md
  • .agents/skills/uloop-screenshot/references/annotated-elements.md
  • .agents/skills/uloop-simulate-keyboard/SKILL.md
  • .agents/skills/uloop-simulate-mouse-input/SKILL.md
  • .agents/skills/uloop-simulate-mouse-ui/SKILL.md
  • .claude/skills/uloop-clear-console/SKILL.md
  • .claude/skills/uloop-compile/SKILL.md
  • .claude/skills/uloop-control-play-mode/SKILL.md
  • .claude/skills/uloop-execute-dynamic-code/references/asset-operations.md
  • .claude/skills/uloop-execute-dynamic-code/references/playmode-automation-powershell.md
  • .claude/skills/uloop-execute-dynamic-code/references/playmode-automation-zsh.md
  • .claude/skills/uloop-find-game-objects/SKILL.md
  • .claude/skills/uloop-focus-window/SKILL.md
  • .claude/skills/uloop-get-hierarchy/SKILL.md
  • .claude/skills/uloop-get-logs/SKILL.md
  • .claude/skills/uloop-launch/SKILL.md
  • .claude/skills/uloop-raycast/SKILL.md
  • .claude/skills/uloop-record-input/SKILL.md
  • .claude/skills/uloop-replay-input/SKILL.md
  • .claude/skills/uloop-run-tests/SKILL.md
  • .claude/skills/uloop-screenshot/SKILL.md
  • .claude/skills/uloop-screenshot/references/annotated-elements.md
  • .claude/skills/uloop-simulate-keyboard/SKILL.md
  • .claude/skills/uloop-simulate-mouse-input/SKILL.md
  • .claude/skills/uloop-simulate-mouse-ui/SKILL.md
  • Assets/Tests/Editor/UIElementAnnotatorTests.cs
  • Packages/src/Editor/Api/McpTools/Compile/Skill/SKILL.md
  • Packages/src/Editor/Api/McpTools/Screenshot/Skill/SKILL.md
  • Packages/src/Editor/Api/McpTools/Screenshot/Skill/references/annotated-elements.md
  • Packages/src/Editor/Api/McpTools/SimulateMouseUi/Skill/SKILL.md
  • Packages/src/Editor/Utils/UIElementAnnotator.cs
✅ Files skipped from review due to trivial changes (30)
  • .agents/skills/uloop-execute-dynamic-code/references/asset-operations.md
  • .claude/skills/uloop-raycast/SKILL.md
  • .agents/skills/uloop-raycast/SKILL.md
  • .agents/skills/uloop-focus-window/SKILL.md
  • .claude/skills/uloop-clear-console/SKILL.md
  • .claude/skills/uloop-get-hierarchy/SKILL.md
  • .agents/skills/uloop-clear-console/SKILL.md
  • .claude/skills/uloop-get-logs/SKILL.md
  • .agents/skills/uloop-control-play-mode/SKILL.md
  • .claude/skills/uloop-replay-input/SKILL.md
  • .agents/skills/uloop-launch/SKILL.md
  • .claude/skills/uloop-focus-window/SKILL.md
  • .claude/skills/uloop-execute-dynamic-code/references/asset-operations.md
  • .claude/skills/uloop-find-game-objects/SKILL.md
  • .claude/skills/uloop-record-input/SKILL.md
  • .agents/skills/uloop-get-hierarchy/SKILL.md
  • .agents/skills/uloop-get-logs/SKILL.md
  • .claude/skills/uloop-execute-dynamic-code/references/playmode-automation-powershell.md
  • .agents/skills/uloop-replay-input/SKILL.md
  • .claude/skills/uloop-launch/SKILL.md
  • .agents/skills/uloop-execute-dynamic-code/references/playmode-automation-zsh.md
  • Packages/src/Editor/Api/McpTools/Compile/Skill/SKILL.md
  • .claude/skills/uloop-simulate-keyboard/SKILL.md
  • .agents/skills/uloop-find-game-objects/SKILL.md
  • Packages/src/Editor/Api/McpTools/SimulateMouseUi/Skill/SKILL.md
  • .agents/skills/uloop-compile/SKILL.md
  • .claude/skills/uloop-compile/SKILL.md
  • .claude/skills/uloop-control-play-mode/SKILL.md
  • Packages/src/Editor/Api/McpTools/Screenshot/Skill/references/annotated-elements.md
  • .agents/skills/uloop-run-tests/SKILL.md
🚧 Files skipped from review as they are similar to previous changes (1)
  • Packages/src/Editor/Utils/UIElementAnnotator.cs

Comment thread .agents/skills/uloop-screenshot/references/annotated-elements.md Outdated
Comment thread .agents/skills/uloop-screenshot/SKILL.md Outdated
Comment thread .claude/skills/uloop-screenshot/references/annotated-elements.md Outdated
Comment thread .claude/skills/uloop-screenshot/SKILL.md Outdated
Comment thread Packages/src/Editor/Api/McpTools/Screenshot/Skill/SKILL.md
@hatayama

hatayama commented Jul 4, 2026

Copy link
Copy Markdown
Owner Author

Verified the latest cubic finding against the current CLI contract.

  • uloop compile --help lists --force-recompile <value> and --wait-for-domain-reload <value>.
  • Running uloop compile --force-recompile exits with option '--force-recompile <value>' argument missing.
  • Running uloop compile --wait-for-domain-reload exits with option '--wait-for-domain-reload <value>' argument missing.

Added commit 08735c56 to update the CLI E2E tests so bare compile booleans are explicitly rejected. The docs requiring true/false values match the current implementation.

@cubic-dev-ai cubic-dev-ai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

1 issue found across 9 files (changes from recent commits).

Prompt for AI agents (unresolved issues)

Check if these issues are valid — if so, understand the root cause of each and fix them. If appropriate, use sub-agents to investigate and fix each issue separately.


<file name=".agents/skills/uloop-compile/SKILL.md">

<violation number="1" location=".agents/skills/uloop-compile/SKILL.md:39">
P2: The `compile` examples still demonstrate explicit `true`/`false` values for `--force-recompile` and `--wait-for-domain-reload`, which conflicts with the project's convention for valueless boolean flags in compile docs. Consider replacing these examples with valueless forms (e.g., `--force-recompile` and `--wait-for-domain-reload`) for consistency with the documented CLI contract.</violation>
</file>

<file name=".claude/skills/uloop-compile/SKILL.md">

<violation number="1" location=".claude/skills/uloop-compile/SKILL.md:39">
P2: The example commands use explicit `true`/`false` values for boolean flags (`--force-recompile true`, `--force-recompile false`, `--wait-for-domain-reload true`), which contradicts the project's convention of using valueless boolean flags for the `compile` command. The Usage section already shows the correct valueless form `[--force-recompile] [--wait-for-domain-reload]`, but the examples below it reintroduce the non-standard explicit-value style. This inconsistency can mislead users and downstream automation. Consider rewriting the examples to use the valueless flag convention consistently.</violation>
</file>

Tip: Review your code locally with the cubic CLI to iterate faster.

Re-trigger cubic

@hatayama
hatayama merged commit e67dcba into main Jul 4, 2026
9 checks passed
@hatayama
hatayama deleted the fix/raycast-outline-annotations branch July 4, 2026 14:56
This was referenced Jul 13, 2026
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