Skip to content

fix(browser): 修复区域框选的三处 review 问题 - #457

Merged
bubbleptr merged 1 commit into
mainfrom
fix/browser-annotation-area-review
Oct 10, 2026
Merged

bubbleptr merged 1 commit into
mainfrom
fix/browser-annotation-area-review

Conversation

@bubbleptr

@bubbleptr bubbleptr commented Oct 10, 2026 •

Copy link
Copy Markdown
Owner

Summary

修复 #455 合入后 Devin Review 指出的三个 bug:

  • 区域坐标对不上截图:resolveCommentCropRect 移入 @pace/core(主进程裁图与格式化共用一份规则);有截图的区域条目输出 - area: W×H at (sx, sy) in its screenshot; (x, y) in the viewport。截图按 CSS 宽度降采样,1 图像像素 = 1 CSS px。
  • 锚点自身滚动时轮廓漂移:area 偏移改为锚点滚动内容坐标(加锚点 scrollLeft/scrollTop;锚点是文档 scrollingElement 时为 0),保存与渲染共用 anchorScroll。
  • 拖动在徽章上松开后徽章点不开:每次 pointerdown(含覆盖层自身)重置 suppressClick,徽章吞掉一次 click 后即清除。
  • ADR-0029 与 v2 PRD 对应描述同步修订。

Test plan

  • 先写测试并确认失败(10 例),修复后 5 个测试文件 196 例通过
  • bun run typecheck / lint / build 绿(确认 resolveCommentCropRect 打进 out/main/main.js)

Devin Review

Address the #455 review: the prompt now gives an area's position inside
its cropped screenshot, area offsets track the anchor's own scroll so the
outline stays on the marked content, and a drag released over a badge no
longer leaves badges unclickable.

@devin-ai-integration devin-ai-integration 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.

✅ Devin Review: No Issues Found

Devin Review analyzed this PR and found no bugs or issues to report.

Devin Review

@bubbleptr
bubbleptr merged commit 46b0903 into main Oct 10, 2026
2 checks passed
@bubbleptr
bubbleptr deleted the fix/browser-annotation-area-review branch October 10, 2026 13:51
@bubbleptr bubbleptr mentioned this pull request Oct 10, 2026
3 tasks done
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