feat(ui): refine scan guidance and adaptive layout - #30
Conversation
📝 WalkthroughSummary by CodeRabbit
WalkthroughThis PR adds applicability-aware quest classification driven by task gates, updates scan-result verdicts and status chips using quest need reports, introduces content-fit window sizing with animated height constraints, expands game-mode control patterns, debounces scanner status visibility, refreshes themes and native chrome styling, translates new UI labels across seven languages, and includes comprehensive regression tests for classification logic. ChangesQuest classification and scan presentation
Window sizing, controls, and styling
Estimated code review effort: 4 (Complex) | ~70 minutes Sequence Diagram(s)sequenceDiagram
participant ScanPage as Scan Page UI
participant FitWatch as RatScanner.fitWatch
participant AppState as AppStateService
participant PageSwitcher as PageSwitcher
participant Window as Window
FitWatch->>ScanPage: observe resize & mutation
ScanPage->>FitWatch: content changes occur
FitWatch->>AppState: OnContentFitChanged(requiredHeight, visibleHeight)
AppState->>PageSwitcher: ContentFitChanged event
PageSwitcher->>PageSwitcher: compute target height
PageSwitcher->>Window: animate MinHeight & Height
Note over Window: ease-out timing<br/>preserve user anchor<br/>clamp to working area
Possibly related PRs
Suggested labels: 🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✨ Finishing Touches 💡 1📝 Generate docstrings 💡
🧪 Generate unit tests (beta)
Comment |
This comment was marked as resolved.
This comment was marked as resolved.
This comment was marked as resolved.
This comment was marked as resolved.
|
Addressed the CodeRabbit outside-diff weapon-hand-in finding in commit 0cc1ac0: the usability advisory now counts give/build objectives only when the scanned item is a weapon (gun type). Added a regression proving a non-weapon give-item objective still contributes to quest totals without triggering WeaponHandInTotal. Local integrated validation after the full review batch: Release build 0 warnings/errors, 258 tests passed, CSharpier clean, all 7 locale catalogs in exact key parity, 52 agent-doc scenarios passed, 33 RatScannerData scenarios passed, Markdown lint clean, and behavior-tier WPF/WebView validation completed. |
What changed
Why
The previous single quest-needed total could not distinguish active needs from level-locked, prerequisite-locked, faction-dependent, trader-gated, or otherwise unmodeled requirements. The updated presentation keeps those states explicit and makes the primary scan decision easier to read across normal and narrow windows.
Validation
dotnet csharpier check .scripts/lint-markdown.ps1andscripts/check-agent-docs.ps1scripts/test-agent-docs.ps1(52 scenarios)scripts/test-data-validation.ps1(33 scenarios)dotnet build RatScanner.sln -c Release --no-restore(0 warnings, 0 errors)dotnet test RatScanner.sln -c Release --no-build(250 passed)npm audit --audit-level=high(0 vulnerabilities)json.tarkov.devtask-contract checkSummary by cubic
Make scan guidance applicability-aware so active quest needs are split from locked or conditional ones, and refine the scan UI and adaptive window sizing for clear results at any size. Recommendation verdicts now distinguish “keep for quest”, “available soon”, “needed later”, and “maybe needed”.
New Features
QuestNeedClassifierinto active now, available now, future-known, and maybe-needed; uncertain/future needs no longer inflate “needed now”.playerLevel,pmcFaction,failed/invalid) andjson.tarkov.devtask gates (min level, faction, prerequisites, trader standing/loyalty, optional flags, Lightkeeper/timed); bump tasks cache to v2 and extend models.ContentFitChanged/ContentFitClearedso the window ratchets its minimum height and grows smoothly while respecting user resizing.GameModeSwitchthe single authority; add a compact toolbarGameModeIndicatorthat opens the sidebar when collapsed.UI Improvements
Written for commit 95b8a96. Summary will update on new commits.