Skip to content

Fix doc/comment accuracy and dead code in grab template execution#627

Merged
TheJoeFin merged 2 commits intograb-templatesfrom
copilot/sub-pr-620
Mar 5, 2026
Merged

Fix doc/comment accuracy and dead code in grab template execution#627
TheJoeFin merged 2 commits intograb-templatesfrom
copilot/sub-pr-620

Conversation

Copy link
Copy Markdown
Contributor

Copilot AI commented Mar 5, 2026

Four inaccuracies flagged in code review of the grab templates feature:

  • Wrong placeholder in error messageValidateOutputTemplate used {{{{num}}}} which renders as the literal {{num}} instead of the actual missing placeholder number. Fixed to {{{num}}} so the message shows e.g. {3}.
  • Misleading XML doc on ExecuteTemplateAsynccaptureRegion was documented as "WPF units", but OcrUtilities.GetTextFromAbsoluteRectAsync treats it as physical screen pixels. Updated accordingly.
  • Incorrect summary on UpdateTemplateRegionOverlays — claimed "UniformToFill semantics" but the implementation scales each axis independently (stretch-to-fill). Comment updated to match reality.
  • Dead variables removedscaleX and scaleY were computed but never referenced in UpdateTemplateRegionOverlays.

💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.

…ables

Co-authored-by: TheJoeFin <7809853+TheJoeFin@users.noreply.github.com>
Copilot AI changed the title [WIP] Fix overlapping buttons in Post Grab Actions window Fix doc/comment accuracy and dead code in grab template execution Mar 5, 2026
@TheJoeFin TheJoeFin marked this pull request as ready for review March 5, 2026 05:23
@TheJoeFin TheJoeFin merged commit d62d7eb into grab-templates Mar 5, 2026
@TheJoeFin TheJoeFin deleted the copilot/sub-pr-620 branch March 5, 2026 05:24
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