Skip to content

fix(scan): separate name/icon cooldowns; skip name scans while cursor hidden - #76

Merged
DysektAI merged 5 commits into
masterfrom
fix/name-scan-gating
Oct 22, 2026
Merged

DysektAI merged 5 commits into
masterfrom
fix/name-scan-gating

Conversation

@DysektAI

Copy link
Copy Markdown
Member

Why

  • Name scans fire on every plain left click and shared a single 300 ms ScanThrottle with Shift+click icon scans. Any click within 300 ms before an icon scan silently dropped it (visible only as scan.throttled), which users experience as inconsistent icon scans.
  • Every shot in raid triggered a name scan: display detection, a 50 ms sleep, and a GDI capture of the game frame, up to ~3x per second.

What

  • Separate _nameScanThrottle and _iconScanThrottle (same NameScan.CooldownMs).
  • NameScanGate.ShouldSkip: skip NameScan and the auto NameScanScreen while GetCursorInfo reports the system cursor hidden. Unknown state (call failed, or touch/pen CURSOR_SUPPRESSED) never blocks. Counter scan.name_skipped_cursor_hidden.
  • New advanced switch NameScan.SkipWhenCursorHidden (config.cfg, default on, no UI), persisted with the other NameScan keys.

Validation

  • NameScanGateTests (hidden/shown/unknown/disabled; mutation fails the unknown case); config default + disable round-trip test.
  • GetCursorInfo struct verified at runtime (size 24, CURSOR_SHOWING on the desktop).
  • Debug and Release build; dotnet test 413/413; CodeRabbit finding (suppressed cursor) fixed in 251868a.

Not proven

  • ⚠️ Needs an in-game check that EFT shows the system cursor in the inventory/inspect screens. If EFT draws a software cursor there, name scans would be skipped; set SkipWhenCursorHidden=False under [NameScan] and report it.

https://claude.ai/code/session_01QFKiA2aswHyp8SnpraLxE2

… hidden

- Name scans run on every left click and shared one 300 ms throttle with
  Shift+click icon scans, so any click shortly before an icon scan
  silently dropped it. Each scan kind now has its own throttle.
- Every shot in raid triggered a name scan: a GDI capture of the game
  frame plus display detection. Skip name scans (and the auto full-screen
  name scan) while GetCursorInfo reports the system cursor hidden.
  Unknown cursor state never blocks; NameScan.SkipWhenCursorHidden in
  config.cfg turns the gate off for setups that hide the system cursor
  in menus. Counted as scan.name_skipped_cursor_hidden.

Claude-Session: https://claude.ai/code/session_01QFKiA2aswHyp8SnpraLxE2
@coderabbitai

coderabbitai Bot commented Oct 19, 2026 •

Copy link
Copy Markdown

Warning

Review limit reached

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).

Next included review available in 3 seconds.

Check out review usage here.

View limit details

Limit details: You’ve used the included review currently available. Your 68 included PR review attempts over the past 7 days set your current allowance at 1 review per hour.

Learn how review limits work.

Review configuration:

⚙️ Run configuration
  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: Organization UI
  • Review profile: ASSERTIVE
  • Plan: Essentials
  • Run ID: ab5ccd79-6c01-4904-b621-61fc89d18dc9
📥 Commits

Reviewing files that changed from the base of the PR and between 208f4ec and 2c86c63.

📒 Files selected for processing: 7
  • docs/agent-context/performance-diagnostics.md
  • src/App/RatConfig.cs
  • src/App/RatScannerMain.cs
  • src/App/Scan/NameScanGate.cs
  • src/App/UserActivityHelper.cs
  • tests/RatScanner.Tests/ConfigurationMigrationTests.cs
  • tests/RatScanner.Tests/NameScanGateTests.cs
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Comment @coderabbitai help to get the list of available commands.

DysektAI and others added 3 commits October 22, 2026 07:36
# Conflicts:
#	docs/agent-context/performance-diagnostics.md
# Conflicts:
#	tests/RatScanner.Tests/ConfigurationMigrationTests.cs
@DysektAI
DysektAI merged commit 724d263 into master Oct 22, 2026
9 checks passed
@DysektAI
DysektAI deleted the fix/name-scan-gating branch October 22, 2026 13:32
@DysektAI DysektAI self-assigned this Oct 22, 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