fix(core): replace numbered point callout with badge-neutral centered marker - #3096
Open
NianZheChao wants to merge 1 commit into
Open
fix(core): replace numbered point callout with badge-neutral centered marker#3096NianZheChao wants to merge 1 commit into
NianZheChao wants to merge 1 commit into
Conversation
The point-description marker was a red filled bubble with a white "1" digit and a leader line, visually similar to an Android notification badge, so vision-language models often described the annotation itself (e.g. "a red badge with number 1") instead of the real target element. - draw a hollow centered reticle (white halo, red ring, four crosshair ticks) with no digit and no callout offset in drawPointMarker - update describer prompts from "callout" to "target marker (ring with crosshair)" wording so the model ignores the overlay - update image marker unit tests and the describer prompt snapshot
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
In the recorder's tap-to-describe flow, the model receives a screenshot with a temporary annotation marking the tapped point and is asked to describe the real UI element at that point. The old annotation was a red filled bubble with a white "1" digit connected by a leader line — visually near-identical to an Android notification badge. Vision-language models frequently described the annotation itself as if it were part of the page (e.g. "a back arrow with a red badge showing 1"), polluting the recorded element descriptions.
This PR replaces the numbered callout with a badge-neutral centered marker: a hollow ring with four crosshair ticks, no digit, no leader line, no offset. The prompt wording is aligned with the new marker.
How I found it
adb+ scrcpy, 1080×2400 screenshots) to record taps in a finance app.describeElementAtPoint→service.describe→compositePointMarkerImg). The generated descriptions repeatedly mentioned a red badge that did not exist in the app. Examples fromai-call.log(back-translated):qwen3-vl-plusandqwen3.7-plus— so it did not look like a model-specific quirk.compositePointMarkerImgcode on a real 1080×2400 recording screenshot. The marker turned out to be a red filled circle with a bold white "1", drawn offset from the tap point with a leader line — structurally the same shape as an Android notification badge.
Root cause
drawPointMarkerinpackages/sharedrendered the point marker as a numbered callout bubble (filled red circle + white digit + leader line, offset from the point). Even though the system prompt states the annotation is temporary, the badge-like appearance was strong enough that both models interpreted it as a genuine notification indicator and included it in the element description.
Before / after

Same real recording screenshot, same tap point — generated with the production code path (marker code from
mainon the left, this PR on the right):
The old marker is a red filled bubble with a white "1" connected by a leader line; the new marker is a hollow centered ring with crosshair ticks. The white halo ring and white ticks stay visible on dark/red backgrounds, while the red ring stays visible on light backgrounds, and the center is left untouched so the tapped element remains readable.
Changes
packages/shared/src/img/box-select.tsdrawPointMarkerto draw a hollow marker centered exactly on the tap point: white halo ring + colored ring + four white crosshair ticks — no digit, no leader line, no callout offset. The center pixels are never painted. Red/blue marker variants (indexId) are preserved.drawCallout/drawEllipsehelpers (dead code, no remaining callers).
packages/core/src/ai-model/prompt/describe.tsring, crosshair, line, color, marker, border, dot, or selection box.
packages/core/src/service/index.ts
Tests
packages/shared/tests/unit-test/image/index.test.ts: pixel assertions updated for the centered ring (ring pixels at the expected offsets are colored; point-center pixels stay untouched; pixels outside the marker are untouched).packages/core/tests/unit-test/prompt/describe.test.ts(+ snapshot) andservice-describe.test.ts: assertions updated to the new marker wording.
Validation
npx rstest run tests/unit-test/imageinpackages/shared— 76/76 passednpx rstest run tests/unit-test/prompt/describe.test.ts tests/unit-test/service-describe.test.tsinpackages/core— 23/23 passednpx nx build sharedandnpx nx build core— success
No public API changes. The point marker is only used by the describe-for-point path; report rendering, planning, and element-index boxed annotations are untouched.