Skip to content

fix: narrow target-app-hints to avoid false-positive matches#7457

Merged
Jasonnnz merged 1 commit into
feature/qa-video-automationfrom
swarm/fb-7428
Feb 24, 2026
Merged

fix: narrow target-app-hints to avoid false-positive matches#7457
Jasonnnz merged 1 commit into
feature/qa-video-automationfrom
swarm/fb-7428

Conversation

@Jasonnnz
Copy link
Copy Markdown
Contributor

@Jasonnnz Jasonnnz commented Feb 24, 2026

Summary

  • Add \b word boundary before action verb group in contextPattern to prevent partial matches (e.g., "login" matching the "in" verb, "domain" matching "in")
  • Switch Cursor from simple \bcursor\b to contextPattern('cursor') so UI wording like "move cursor to the submit button" no longer triggers a false match
  • Switch Zoom from simple \bzoom\b to contextPattern('zoom') so "zoom in on the chart" no longer triggers a false match
  • Reorder iTerm entry before Terminal entry in APP_HINTS array so "open terminal in iterm2" resolves to iTerm, not Terminal
  • Add regression tests for all five false-positive scenarios

Addresses feedback from #7428.

Test plan

  • All 58 tests pass in target-app-hints.test.ts
  • New false-positive tests: "move cursor to the submit button" -> no match
  • New false-positive tests: "zoom in on the chart" -> no match
  • New false-positive tests: "login terminal" -> no match (word boundary)
  • New false-positive tests: "domain mail server" -> no match (word boundary)
  • New test: "open terminal in iterm2" -> resolves to iTerm

🤖 Generated with Claude Code


Open with Devin

- Add word boundary (\b) before action verb group in contextPattern to
  prevent partial matches like "login" matching "in" or "domain" matching "in"
- Switch Cursor from simple \bcursor\b to contextPattern('cursor') so
  "move cursor to the submit button" no longer triggers a match
- Switch Zoom from simple \bzoom\b to contextPattern('zoom') so
  "zoom in on the chart" no longer triggers a match
- Reorder iTerm before Terminal in APP_HINTS array so "open terminal in
  iterm2" resolves to iTerm instead of Terminal
- Add regression tests for all five false-positive scenarios

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@Jasonnnz Jasonnnz merged commit dd1e54f into feature/qa-video-automation Feb 24, 2026
@Jasonnnz Jasonnnz deleted the swarm/fb-7428 branch February 24, 2026 02:35
Copy link
Copy Markdown
Contributor

@devin-ai-integration devin-ai-integration Bot left a comment

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 potential bugs to report.

View in Devin Review to see 4 additional findings.

Open in Devin Review

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