Vendor RatEye into monorepo and update name-scan marker#2
Conversation
Bring RatEye v4.0.1 sources under RatEye/ and wire the app via ProjectReference so scan/marker changes land with the app. Align RatStash and System.Drawing.Common with the app major versions, disable package publish on the vendored project, and document the layout.
Convert provided WebP (28x28) to PNG for System.Drawing, embed it in RatEye resources, set MarkerItemScale to 16/28, and ship a Data copy.
|
Note Reviews pausedIt looks like this branch is under active development. To avoid overwhelming you with review comments due to an influx of new commits, CodeRabbit has automatically paused this review. You can configure this behavior by changing the Use the following commands to manage reviews:
Use the checkboxes below for quick actions:
📝 WalkthroughWalkthroughThis PR rewrites RatScanner as "TarkovTracker Edition": removes the legacy RatScanner project, adds a restructured ChangesRatScanner TarkovTracker Edition rewrite
Estimated code review effort: 5 (Critical) | ~180+ minutes 🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✨ Finishing Touches🧪 Generate unit tests (beta)
Comment |
|
Review the following changes in direct dependencies. Learn more about Socket for GitHub. |
|
Warning Review the following alerts detected in dependencies. According to your organization's Security Policy, it is recommended to resolve "Warn" alerts. Learn more about Socket for GitHub.
|
This comment was marked as resolved.
This comment was marked as resolved.
Production reliability - Do not terminate the process for missing/corrupt maps.json or failed remote resource downloads; Logger.LogError exits, so use LogWarning. - Keep icon scans alive when Data/icons is absent by degrading to empty matches instead of throwing from EnsureStaticIconsLoaded. - Prevent offering pre-release GitHub updates to stable installs. - Null-coalesce ItemIconScan.IconPath; tolerate missing screens during full-screen name scan; use a seed placeholder when ItemQueue is empty. - Use LazyThreadSafetyMode.ExecutionAndPublication for TarkovDevAPI request deduplication. Dead code and asset cleanup These were confirmed unreferenced at runtime (call-site + history audit): - Remove unused Discord OAuth stack (AuthService, OAuth2) and legacy api.ratscanner.com ApiManager resource client, kept only for abandoned patronage/updater flows after GitHub-update migration. - Drop OAuthRefreshToken config, Paths.Updater, unused Patreon/Discord SVG constants, and unused DeepCloner/upgrade-assistant packages. - Delete orphaned WPF assets left after 2021 UI rewrite: iconMods.png (old HasMods badge) and settings.png (old settings button), now replaced by MudBlazor Material icons. - Delete unused Data/icon_search.png duplicate; RatEye embeds the name- scan magnifier as the sole marker source. - Delete unused bender fonts (theme uses Segoe UI; fonts were already excluded from publish). - Delete dead ASP.NET Error.cshtml stubs, WindowsServices click-through helper, empty CSS stubs, and unused Resource model. Why - Reliability fixes prevent non-fatal data/network issues from becoming full app exits, and stop accidental beta auto-updates. - Cleanup reduces maintenance cost and repo bulk without changing product behavior: removed paths had zero live consumers since the WPF to Blazor shell migration and GitHub-based updates. Verified: dotnet test RatScanner.sln (71 passed).
Day-to-day coding should use Debug + dotnet watch, not a full single-file publish. This makes that path one command and documents it clearly. Added - dev.bat / scripts/dev.ps1: ensure Data, restore, then `dotnet watch --non-interactive --no-hot-reload run` (restart-on-save; WPF/WebView2 hot reload is not reliable) - scripts/Expand-Zip.ps1: Expand-Archive -> ZipFile -> python so setup/publish work when PowerShell Archive fails Hardened - setup-data.ps1: skip if Data already valid, -Force re-download, curl fallback, nested archive layout handling - publish.bat: shared zip helper, error checks, Data validation, overwriteable zip; tip to use dev.bat for iteration - RatScanner.csproj: exclude Data/** from DefaultItemExcludes and mark Content Watch=false so ~4k icons do not flood the watcher while still copying Data into bin/publish - BlazorUI dispose: null-safe WebView dispose for clean restarts Docs - README + AGENTS: local workflow, dev vs publish, hot-reload note
Delete leftover watch-verify/watch-test stdout/stderr captures from local tooling checks and keep them out of git status going forward.
Rename project folders so the monorepo no longer looks like nested product repos at the root. Assemblies and C# namespaces are unchanged (RatScanner app, RatEye engine) to avoid a huge API churn. Layout - RatScanner/ -> src/App/ - RatEye/ -> src/ScanEngine/ - RatScanner.Tests/ -> tests/RatScanner.Tests/ Wiring - RatScanner.sln project paths - ProjectReference paths (App -> ScanEngine, Tests -> App) - publish.bat, CI workflow, setup-data/dev/bench scripts - gitignore Data path: src/App/Data Docs - README + AGENTS: new layout, Data path, local commands - ScanEngine/VENDOR.md: provenance + explicit license note (upstream RatEye still has no LICENSE file) Local Data remains gitignored under src/App/Data.
Harden CI dependency audit (JSON severity), publish package checks, updater cleanup, tracker 401 token race, exit disposals, map parse cache, drawer/status a11y, presentation i18n, and related tooling robustness.
Separate vulnerability-audit stdout/stderr, harden publish curl, translate new i18n strings, localize jump/tray menus, and restore focus on scanner settings navigation.
Review triage (
|
Replace the settings Save bar with per-control persistence, store independent PvP/PvE .org keys (plus legacy .io), and switch game mode from the sidebar with stale-request safety and config v3 migration.
Align softprops/action-gh-release with the org selected-actions allowlist so Build can start, reject Subject Search / UI chrome OCR as items, require MinItemConfidence before accepting fuzzy title matches, and correct ru/zh FIR recommendation strings from review.
|
Addressed the remaining open review thread and uncommitted production fixes:
Local validation: |
Restore the current release pin after adding its SHA to the TarkovTracker selected-actions policy; keep the older v2.5.0 pin listed for other org repos.
Replace node20-targeting setup-node v4 / upload-artifact v4 / download-artifact v4 pins with mature node24 pins (setup-node v6.4.0, upload-artifact v7.0.1, download-artifact v8.0.1) to clear the Node.js 20 deprecation annotation.
There was a problem hiding this comment.
Actionable comments posted: 14
Caution
Some comments are outside the diff and can’t be posted inline due to platform limitations.
⚠️ Outside diff range comments (3)
docs/agent-context/release-and-versioning.md (1)
37-43: 📐 Maintainability & Code Quality | 🔵 Trivial | ⚡ Quick winDocument the verified data-package contract.
The local publish instructions still say to download the mutable
latestarchive. Update them to require the same pinned RatScannerData release and checksum/signature verification used by the packaging scripts.🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In `@docs/agent-context/release-and-versioning.md` around lines 37 - 43, Update the local publish instructions to replace the mutable RatScannerData “latest” download with the pinned release used by the packaging scripts, and require matching checksum/signature verification before extraction into publish\Data. Keep the existing publish, LICENSE inclusion, and archive steps unchanged.scripts/bench/measure-idle.ps1 (2)
7-13: 🎯 Functional Correctness | 🟡 Minor | ⚡ Quick winValidate
WarmupSecondsbefore callingStart-Sleep.Negative values are accepted by parameter binding and then fail at runtime. Add a non-negative range constraint.
Proposed fix
- [int]$WarmupSeconds = 8, + [ValidateRange(0, [int]::MaxValue)] + [int]$WarmupSeconds = 8,🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In `@scripts/bench/measure-idle.ps1` around lines 7 - 13, Update the WarmupSeconds parameter validation in the measure-idle script to reject negative values while allowing zero, so Start-Sleep receives only non-negative durations. Preserve the existing parameter type and validation style used by SampleCount and SampleIntervalMilliseconds.
82-86: 🩺 Stability & Availability | 🟠 Major | 🏗️ Heavy liftMake cleanup fail closed on uncertain process identity.
When
StartTimecannot be read,$rootStartTimeremains null and any process currently using the PID is treated as the benchmark process. PID reuse can therefore terminate unrelated descendants. Conversely, if the root exits beforefinally,$liveis null and cleanup skips WebView2 children that may still be running. Track PID/start-time pairs during sampling, stop only matching processes, and do not perform PID-based cleanup when identity cannot be established.Also applies to: 165-194
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In `@scripts/bench/measure-idle.ps1` around lines 82 - 86, Update the sampling and cleanup logic around $rootStartTime, $live, and the finally block to track each discovered process as a PID/start-time pair. Only stop processes whose current PID and start time match the recorded identity; if any identity cannot be established, skip PID-based cleanup rather than guessing. Preserve descendant cleanup even when the root process exits before finally by using the identities collected during sampling.
♻️ Duplicate comments (2)
.github/workflows/build.yml (2)
30-47: 🔒 Security & Privacy | 🟠 Major | ⚡ Quick winDisable dependency caches for release-producing tag runs.
The workflow handles both pull requests and
v*pushes, but.NETand npm caches remain unconditional. This leaves the cache-poisoning path flagged by zizmor: a PR-controlled cache can influence a later release build. Guard both caches for tag refs or use a separate no-cache release build.🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In @.github/workflows/build.yml around lines 30 - 47, Update the .NET cache configuration in setup-dotnet and the npm cache configuration in setup-node so both are disabled for v* tag push runs while remaining enabled for pull requests and other builds. Use the workflow’s existing event/ref context to conditionally apply the cache settings, preserving the current dependency paths and Node/.NET versions.Source: Linters/SAST tools
107-109: 🔒 Security & Privacy | 🟠 Major | 🏗️ Heavy liftUse one pinned and verified RatScannerData release across all packaging paths.
The CI workflow and local publish script both consume a mutable, unverified archive, while the release documentation instructs the same behavior.
.github/workflows/build.yml#L107-L109: pin the data release and verify its checksum/signature before extraction.docs/agent-context/release-and-versioning.md#L37-L43: document the pinned artifact and integrity check.publish.bat#L28-L34: enforce the same pin and verification beforeExpand-Zip.ps1.🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In @.github/workflows/build.yml around lines 107 - 109, Use one pinned RatScannerData release and verified artifact across all packaging paths: update .github/workflows/build.yml lines 107-109 to download the pinned archive and verify its checksum or signature before extraction; update publish.bat lines 28-34 to enforce the identical pin and verification before Expand-Zip.ps1; document the pinned artifact and integrity check in docs/agent-context/release-and-versioning.md lines 37-43.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@src/App/Components/HotkeySelector.razor`:
- Around line 42-70: Update StopListeningAsync to transition _listening to false
before awaiting HotkeyChanged.InvokeAsync, preventing concurrent OnKeyUp calls
from re-entering the commit path. Keep the state refresh in a finally block so
the component exits listening mode and invokes StateHasChanged even when the
callback throws, while preserving discard and commit behavior.
In `@src/App/i18n/es.json`:
- Around line 241-307: Translate every value in the Spanish locale block from
SettingSaveFailed through CredentialUnexpectedResponse into Spanish, covering
the advanced-capture, settings, scanning, overlay, tracking, and credential
messages. Preserve all keys and the {0}/{1} placeholders exactly, using the
English values only as the source meaning.
In `@src/App/i18n/fr.json`:
- Around line 241-307: Translate every user-visible value in the shared English
string block into the target language while preserving all keys and
placeholders: update src/App/i18n/fr.json lines 241-307 in French,
src/App/i18n/pl.json lines 241-307 in Polish, and src/App/i18n/pt.json lines
241-307 in Portuguese. Keep the locale structure aligned with the English
baseline.
In `@src/App/i18n/ru.json`:
- Around line 241-307: Translate every user-visible key from SettingSaveFailed
through CredentialUnexpectedResponse into Russian in src/App/i18n/ru.json at
lines 241-307, preserving keys and placeholders. Translate the same key set into
Simplified Chinese in src/App/i18n/zh.json at lines 241-307; do not leave the
English baseline text in either locale.
In `@src/App/Pages/App/Settings/SettingsGeneral.razor`:
- Around line 230-241: Update RefreshDisplayDetectionAsync so
SettingsVM.RefreshGameDisplays and the subsequent LoadDisplaySettings view-model
mutations execute on the Blazor renderer synchronization context instead of
using Task.Run, or consistently protect every display-draft mutation with the
existing display-persistence lock. Ensure _refreshing is reset in all paths
while keeping SelectedGameDisplayId, resolution/scale text, and preview state
synchronized.
In `@src/App/Pages/App/Settings/SettingsScanning.razor`:
- Around line 101-110: The four settings pages duplicate the persist,
failure-snackbar, and StateHasChanged flow. Promote ReportAsync in
src/App/Pages/App/Settings/SettingsScanning.razor:101-110 into a shared helper
or SettingsPageBase, then route the corresponding handlers in
src/App/Pages/App/Settings/SettingsGeneral.razor:294-307,
src/App/Pages/App/Settings/SettingsInteractableOverlay.razor:47-53, and
src/App/Pages/App/Settings/SettingsMinimalUI.razor:61-67 through it, preserving
the existing failure message and UI refresh behavior.
In `@src/App/Pages/App/Settings/SettingsTracking.razor`:
- Around line 96-100: Update CancelOrgReplacement and CancelIoReplacement so
they cancel the corresponding in-flight validation operation and prevent its
completion from persisting the candidate key. Ensure the validation/save flow
checks cancellation immediately before saving, and apply the same behavior to
all related replacement sections and Cancel buttons.
In `@src/App/RatConfig.cs`:
- Around line 327-335: Gate the legacy-token fallback in the
configuration-loading logic around legacyToken and
Tracking.TarkovTracker.IoToken so it only runs for pre-v3 configurations.
Preserve the existing IO-token and PvP-token assignments, but require the config
version to indicate a pre-v3 file before using legacyToken when Backend is 0.
- Around line 383-415: Update SetGameModeAsync so SaveConfig is called only
after ActivateTrackerModeAsync(gameMode) completes successfully. Keep the
in-memory rollback and previous-mode restoration behavior unchanged when
activation fails, ensuring config.cfg never persists an unsuccessful game-mode
switch.
In `@src/App/SettingsPersistenceService.cs`:
- Around line 91-104: Update SaveImmediateAsync’s second lock around the _tail
continuation so it safely handles disposal before reading _lifetime.Token.
Re-check _disposed under the lock and return the appropriate completed/canceled
result, or reuse a token captured while the lifetime source was still valid,
ensuring ObjectDisposedException cannot escape from SaveImmediateAsync.
In `@src/App/Shared/AppLayout.razor`:
- Around line 64-69: Update the tracker-attention NavLink in AppLayout to wire
its `@onclick` handler to CloseDrawerAfterNavAsync, matching the other sidebar
navigation links and ensuring the drawer closes even when the current route is
already /app/settings/tracking.
In `@src/App/ViewModel/SettingsVM.cs`:
- Around line 341-352: Update SetShowTarkovTrackerTeamAsync so the
ActivateTrackerModeAsync task is observed instead of silently discarded.
Preserve the existing fire-and-forget behavior, but attach fault handling that
logs the activation failure and provides appropriate user feedback using the
surrounding SettingsVM error-handling conventions.
In `@src/ScanEngine/Processing/Inspection.cs`:
- Around line 259-271: Replace the Title property reads inside ScanTitle with
the _title backing field, including the IsUiChromeTitle check and its debug log,
so ScanTitle does not re-enter SatisfyState while processing OCR. Preserve the
existing UI-chrome skip behavior and item-state reset.
In `@tests/RatScanner.Tests/OpenCvPipelineTests.cs`:
- Around line 183-190: Update
Weak_title_fuzzy_matches_are_rejected_below_min_item_confidence to exercise the
actual Inspection acceptance path and assert that these weak title matches are
rejected as non-Items. Use the existing inspection pipeline and
MinItemConfidence behavior rather than only asserting NormedLevenshteinDistance
scores; alternatively, rename the test to accurately describe score-helper
coverage.
---
Outside diff comments:
In `@docs/agent-context/release-and-versioning.md`:
- Around line 37-43: Update the local publish instructions to replace the
mutable RatScannerData “latest” download with the pinned release used by the
packaging scripts, and require matching checksum/signature verification before
extraction into publish\Data. Keep the existing publish, LICENSE inclusion, and
archive steps unchanged.
In `@scripts/bench/measure-idle.ps1`:
- Around line 7-13: Update the WarmupSeconds parameter validation in the
measure-idle script to reject negative values while allowing zero, so
Start-Sleep receives only non-negative durations. Preserve the existing
parameter type and validation style used by SampleCount and
SampleIntervalMilliseconds.
- Around line 82-86: Update the sampling and cleanup logic around
$rootStartTime, $live, and the finally block to track each discovered process as
a PID/start-time pair. Only stop processes whose current PID and start time
match the recorded identity; if any identity cannot be established, skip
PID-based cleanup rather than guessing. Preserve descendant cleanup even when
the root process exits before finally by using the identities collected during
sampling.
---
Duplicate comments:
In @.github/workflows/build.yml:
- Around line 30-47: Update the .NET cache configuration in setup-dotnet and the
npm cache configuration in setup-node so both are disabled for v* tag push runs
while remaining enabled for pull requests and other builds. Use the workflow’s
existing event/ref context to conditionally apply the cache settings, preserving
the current dependency paths and Node/.NET versions.
- Around line 107-109: Use one pinned RatScannerData release and verified
artifact across all packaging paths: update .github/workflows/build.yml lines
107-109 to download the pinned archive and verify its checksum or signature
before extraction; update publish.bat lines 28-34 to enforce the identical pin
and verification before Expand-Zip.ps1; document the pinned artifact and
integrity check in docs/agent-context/release-and-versioning.md lines 37-43.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Organization UI
Review profile: ASSERTIVE
Plan: Pro
Run ID: 9325639b-8c17-4d96-9b97-90ce9a11dd55
📒 Files selected for processing (62)
.github/workflows/build.ymldocs/agent-context/app-ui.mddocs/agent-context/configuration-and-cache.mddocs/agent-context/data-integrations.mddocs/agent-context/project-overview.mddocs/agent-context/release-and-versioning.mdpublish.batscripts/bench/measure-idle.ps1src/App/APIClient.cssrc/App/Components/HotkeySelector.razorsrc/App/Components/ImmediateSettingSwitch.razorsrc/App/Components/ImmediateSettingSwitch.razor.csssrc/App/FetchModels/TarkovTracker/Exceptions.cssrc/App/FetchModels/TarkovTracker/ProgressResponse.cssrc/App/FetchModels/TarkovTracker/TokenResponse.cssrc/App/InteractableOverlay.razorsrc/App/ItemExtensions.cssrc/App/Overlay.razorsrc/App/PageSwitcher.xaml.cssrc/App/Pages/App/Settings/SettingsGeneral.razorsrc/App/Pages/App/Settings/SettingsGeneral.razor.csssrc/App/Pages/App/Settings/SettingsInteractableOverlay.razorsrc/App/Pages/App/Settings/SettingsInteractableOverlay.razor.csssrc/App/Pages/App/Settings/SettingsMinimalUI.razorsrc/App/Pages/App/Settings/SettingsScanning.razorsrc/App/Pages/App/Settings/SettingsScanning.razor.csssrc/App/Pages/App/Settings/SettingsTracking.razorsrc/App/Pages/App/Settings/SettingsTracking.razor.csssrc/App/Pages/App/Settings/_Imports.razorsrc/App/RatConfig.cssrc/App/RatScannerMain.cssrc/App/RazorApp.razorsrc/App/SettingsPersistenceService.cssrc/App/Shared/AppLayout.razorsrc/App/Shared/AppLayout.razor.csssrc/App/Shared/ScannerStatus.razorsrc/App/Shared/SettingsLayout.razorsrc/App/Shared/SettingsLayout.razor.csssrc/App/TarkovTrackerDB.cssrc/App/View/BlazorInteractableOverlay.xamlsrc/App/View/BlazorOverlay.xamlsrc/App/View/BlazorUI.xamlsrc/App/View/BlazorUI.xaml.cssrc/App/ViewModel/MenuVM.cssrc/App/ViewModel/SettingsVM.cssrc/App/i18n/en.jsonsrc/App/i18n/es.jsonsrc/App/i18n/fr.jsonsrc/App/i18n/pl.jsonsrc/App/i18n/pt.jsonsrc/App/i18n/ru.jsonsrc/App/i18n/zh.jsonsrc/ScanEngine/Config/Processing/Inspection.cssrc/ScanEngine/Processing/Inspection.cstests/RatScanner.Tests/ConfigurationMigrationTests.cstests/RatScanner.Tests/GameDisplayConfigurationTests.cstests/RatScanner.Tests/OpenCvPipelineTests.cstests/RatScanner.Tests/PresentationServicesTests.cstests/RatScanner.Tests/SettingsInputTests.cstests/RatScanner.Tests/SettingsLayoutContractTests.cstests/RatScanner.Tests/SettingsPersistenceTests.cstests/RatScanner.Tests/TarkovTrackerReliabilityTests.cs
Immediate name/icon enable toggles never rebuilt ActiveHotkey, so Enable stayed stale after settings changes. Rebuild hotkeys on those toggles. Reject non-HTTPS or non-GitHub release asset URLs before auto-update download/apply.
There was a problem hiding this comment.
Actionable comments posted: 2
Caution
Some comments are outside the diff and can’t be posted inline due to platform limitations.
⚠️ Outside diff range comments (1)
tests/RatScanner.Tests/PresentationServicesTests.cs (1)
351-383: 🩺 Stability & Availability | 🟠 Major | 🏗️ Heavy liftKeep
TarkovDevApiTestshermetic.These tests fetch live TarkovDev data and tolerate empty results during network/CI flakiness. That makes failures nondeterministic and can turn an API outage or schema regression into a passing test. Use a fake HTTP handler with small checked-in JSON fixtures and assert IDs/item IDs unconditionally.
As per coding guidelines, tests must be pure, hermetic, deterministic, and must not use live network services.
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In `@tests/RatScanner.Tests/PresentationServicesTests.cs` around lines 351 - 383, Make TarkovDevApiTests hermetic by injecting a fake HTTP handler into TarkovDevAPI and serving small checked-in JSON fixtures for FetchCraftsAsync and FetchBartersAsync. Remove the empty-result early returns and assert projected IDs and item IDs unconditionally, while preserving the existing ItemTypeLabel tests.Source: Coding guidelines
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@src/App/GitHubUpdateService.cs`:
- Around line 164-180: Update the downloader method around HttpClientHandler and
IsAllowedReleaseAssetUrl so redirects are not followed automatically. Manually
inspect each response Location, follow only HTTPS URLs accepted by
IsAllowedReleaseAssetUrl, and enforce a finite redirect hop limit; reject
missing, invalid, or unallowlisted targets before downloading or executing the
archive.
In `@tests/RatScanner.Tests/SettingsLayoutContractTests.cs`:
- Around line 50-58: Replace the raw-text search in
ContainsApplyRuntimeRegisterHotkeys with a behavior- or syntax-aware check that
targets applyRuntime. Verify HotkeyManager.RegisterHotkeys() is executable and
occurs after the immediate save operation, using controlled SettingsVM
dependencies or parsed method structure rather than comments or dead branches.
---
Outside diff comments:
In `@tests/RatScanner.Tests/PresentationServicesTests.cs`:
- Around line 351-383: Make TarkovDevApiTests hermetic by injecting a fake HTTP
handler into TarkovDevAPI and serving small checked-in JSON fixtures for
FetchCraftsAsync and FetchBartersAsync. Remove the empty-result early returns
and assert projected IDs and item IDs unconditionally, while preserving the
existing ItemTypeLabel tests.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Organization UI
Review profile: ASSERTIVE
Plan: Pro
Run ID: ce01cfd9-70c9-4c03-bea7-6199596314df
📒 Files selected for processing (4)
src/App/GitHubUpdateService.cssrc/App/ViewModel/SettingsVM.cstests/RatScanner.Tests/PresentationServicesTests.cstests/RatScanner.Tests/SettingsLayoutContractTests.cs
| private static bool ContainsApplyRuntimeRegisterHotkeys(string source, string methodName) | ||
| { | ||
| int methodStart = source.IndexOf($"internal Task<SettingSaveResult> {methodName}", StringComparison.Ordinal); | ||
| if (methodStart < 0) | ||
| return false; | ||
|
|
||
| int nextMethod = source.IndexOf("internal Task<SettingSaveResult>", methodStart + 1, StringComparison.Ordinal); | ||
| string methodBody = nextMethod < 0 ? source[methodStart..] : source[methodStart..nextMethod]; | ||
| return methodBody.Contains("HotkeyManager.RegisterHotkeys()", StringComparison.Ordinal); |
There was a problem hiding this comment.
🎯 Functional Correctness | 🟠 Major | 🏗️ Heavy lift
Make the hotkey contract test behavior- or syntax-aware.
ContainsApplyRuntimeRegisterHotkeys only searches raw source text for HotkeyManager.RegisterHotkeys(). It does not verify that the call is inside applyRuntime, occurs after the immediate save, or is executable; a comment or dead branch could keep the test green while the behavior is removed.
Prefer exercising SettingsVM with controlled dependencies, or parse the method structure and assert the call and ordering explicitly.
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
In `@tests/RatScanner.Tests/SettingsLayoutContractTests.cs` around lines 50 - 58,
Replace the raw-text search in ContainsApplyRuntimeRegisterHotkeys with a
behavior- or syntax-aware check that targets applyRuntime. Verify
HotkeyManager.RegisterHotkeys() is executable and occurs after the immediate
save operation, using controlled SettingsVM dependencies or parsed method
structure rather than comments or dead branches.
The ref bool parameter suggested live-tracking, but Enabled was always copied by value at construction. Settings toggles now call RegisterHotkeys() to rebuild with the current config value, making the ref keyword unnecessary and misleading.
Fixes applied: - Inspection.cs: use _title backing field to avoid stack-overflow from re-entrant Title getter (P0/Critical) - HotkeySelector.razor: set _listening=false before awaiting HotkeyChanged so duplicate key-up cannot double-commit; StateHasChanged in finally - SettingsPersistenceService.cs: capture _lifetime.Token while _gate is held to prevent ObjectDisposedException on disposal race - SettingsTracking.razor: add AbortOrgReplacement/AbortIoReplacement wrappers that cancel in-flight validation so a completed request cannot persist a canceled candidate; restore UI via Cancel*Replacement; also add ThrowIfCancellationRequested immediately after the save call; capture IO token locally to avoid disposed-CTS access and guard finalize cleanup via _ioValidation identity check - RatConfig.cs: gate legacy Token/Backend migration on pre-v3 configs; move SaveConfig after ActivateTrackerModeAsync so a failed mode switch never persists the failed mode on disk - SettingsVM.cs: wire _synchronizationContext in OnGameDisplayConfigurationChanged to marshal VM mutations to the Blazor renderer; add RefreshGameDisplaysAsync that offloads only detection to Task.Run and resumes state updates on the renderer; add fault-logging continuation to SetShowTarkovTrackerTeamAsync fire-and-forget activation - SettingsGeneral.razor: call RefreshGameDisplaysAsync instead of Task.Run(sync refresh) - GitHubUpdateService.cs: add NoRedirectHttp client with manual redirect loop (5-hop cap, per-hop host validation, relative-URI resolution, 308 PermanentRedirect support) so a trusted GitHub asset URL cannot silently redirect the download to an untrusted host - AppLayout.razor: wire CloseDrawerAfterNavAsync on the tracker-attention NavLink - Tests: ConfigurationMigrationTests adds v3 staleness regression; OpenCvPipelineTests renames to Ui_chrome_fuzzy_scores_stay_below_the_configured_min_item_confidence and reads threshold from config; SettingsLayoutContractTests strips comments and matches applyRuntime lambda shape to prevent false-positive coverage - i18n: todo — six locale blocks from SettingSaveFailed through CredentialUnexpectedResponse remain in English (es/fr/pl/pt/ru/zh ~67 keys each)
…UserProgress - Exceptions.cs: UnauthorizedTokenException had a copy-pasted comment about rate limiting; corrected to describe authentication failure. - ItemExtensions.cs: GetUserProgress read Progress and Self from TarkovTrackerDB across two accessor calls, allowing a mode switch or reconfiguration between reads to produce a mismatched Self/Progress snapshot. Capture both in locals from a single getter call.
- SettingsPersistenceService: guard disposed-path rollback so the returned task always completes even if apply(previous) throws (kilo-code-bot). - HotkeySelector: stop mutating the bound Hotkey before HotkeyChanged so the parent's rollback snapshot captures the original value (coderabbitai). - i18n: translate 67 untranslated settings/credential keys (lines 241-307) into es, fr, pl, pt, ru, zh — English was copy-pasted into all six non-English locale catalogs (coderabbitai x3). - OpenCvPipelineTests, SettingsLayoutContractTests: apply csharpier formatting to unblock CI csharpier check on this branch.
|
Skipped 2 unresolved threads as out-of-scope for merge-readiness:
5 other threads addressed in commit a846ae1: i18n translations (es/fr/pl/pt/ru/zh), SettingsPersistenceService disposed-path hang guard, HotkeySelector bound-hotkey mutation fix. |
This comment was marked as resolved.
This comment was marked as resolved.
This comment was marked as resolved.
This comment was marked as resolved.
There was a problem hiding this comment.
Actionable comments posted: 2
Caution
Some comments are outside the diff and can’t be posted inline due to platform limitations.
⚠️ Outside diff range comments (1)
src/App/Components/HotkeySelector.razor (1)
57-78: 🎯 Functional Correctness | 🟡 Minor | ⚡ Quick winResync the displayed hotkey after the save callback.
_tmpHotkeyis rendered by this component but is never replaced afterHotkeyChanged.InvokeAsynccompletes. If the parent save fails, the boundHotkeyis restored while the UI continues displaying the rejected candidate until the next capture starts. Copy the bound value back infinallybefore refreshing the component.Proposed fix
finally { + _tmpHotkey = new Hotkey(Hotkey); await InvokeAsync(StateHasChanged); }🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In `@src/App/Components/HotkeySelector.razor` around lines 57 - 78, Update StopListeningAsync so its finally block copies the current bound Hotkey value into _tmpHotkey before invoking StateHasChanged, ensuring the displayed hotkey reflects any parent-side save or rollback result.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@src/App/i18n/pl.json`:
- Line 242: Update the AdvancedCapture translation in pl.json from the masculine
form to the neuter form “Zaawansowane przechwytywanie,” preserving the existing
translation key.
In `@src/App/i18n/ru.json`:
- Line 273: Update the TeamPermissionDescription translation to replace both
occurrences of “требует разрешение” with “требует разрешения”, preserving the
rest of the Russian text unchanged.
---
Outside diff comments:
In `@src/App/Components/HotkeySelector.razor`:
- Around line 57-78: Update StopListeningAsync so its finally block copies the
current bound Hotkey value into _tmpHotkey before invoking StateHasChanged,
ensuring the displayed hotkey reflects any parent-side save or rollback result.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Organization UI
Review profile: ASSERTIVE
Plan: Pro
Run ID: 5392e638-5e1a-43f6-8216-28f0e3d7d5a9
📒 Files selected for processing (10)
src/App/Components/HotkeySelector.razorsrc/App/SettingsPersistenceService.cssrc/App/i18n/es.jsonsrc/App/i18n/fr.jsonsrc/App/i18n/pl.jsonsrc/App/i18n/pt.jsonsrc/App/i18n/ru.jsonsrc/App/i18n/zh.jsontests/RatScanner.Tests/OpenCvPipelineTests.cstests/RatScanner.Tests/SettingsLayoutContractTests.cs
User description
Summary
RatEye/and switch RatScanner from the NuGet package to an in-repoProjectReference, so scan/marker/OCR changes ship with the app in one PR.RatStash6.0.0,System.Drawing.Common8.0.7), disable NuGet packaging on the vendored project, and document the layout inRatEye/VENDOR.mdandAGENTS.md.RatScanner/Data/icon_search.pngoverride) and setMarkerItemScaleto16/28.Test plan
dotnet restore RatScanner.slndotnet build RatScanner.sln(Debug) — 0 errorsdotnet build RatScanner.sln -c Release— 0 errorsCodeAnt-AI Description
Ship RatEye with the app and update scan detection to the new marker
What Changed
Impact
✅ Fewer broken scans after UI changes✅ More reliable name and item detection✅ Cleaner marker matching on current inspection windows💡 Usage Guide
Checking Your Pull Request
Every time you make a pull request, our system automatically looks through it. We check for security issues, mistakes in how you're setting up your infrastructure, and common code problems. We do this to make sure your changes are solid and won't cause any trouble later.
Talking to CodeAnt AI
Got a question or need a hand with something in your pull request? You can easily get in touch with CodeAnt AI right here. Just type the following in a comment on your pull request, and replace "Your question here" with whatever you want to ask:
This lets you have a chat with CodeAnt AI about your pull request, making it easier to understand and improve your code.
Example
Preserve Org Learnings with CodeAnt
You can record team preferences so CodeAnt AI applies them in future reviews. Reply directly to the specific CodeAnt AI suggestion (in the same thread) and replace "Your feedback here" with your input:
This helps CodeAnt AI learn and adapt to your team's coding style and standards.
Example
Retrigger review
Ask CodeAnt AI to review the PR again, by typing:
Check Your Repository Health
To analyze the health of your code repository, visit our dashboard at https://app.codeant.ai. This tool helps you identify potential issues and areas for improvement in your codebase, ensuring your repository maintains high standards of code health.