Skip to content

Review#1

Open
KevDil wants to merge 13 commits into
mainfrom
review
Open

Review#1
KevDil wants to merge 13 commits into
mainfrom
review

Conversation

@KevDil

@KevDil KevDil commented Oct 26, 2025

Copy link
Copy Markdown
Owner

No description provided.

KevDil added 13 commits October 20, 2025 15:30
…nshots

- Documented visible UI elements and key insights for Buy Item, Buy Confirmation, Sell Item, and Sell Confirmation windows.
- Highlighted critical differences from the original plan, including confirmation window text and item name positioning.
- Updated OCR patterns for detecting confirmation windows and extracting balance information.
- Included timing analysis and performance optimizations for balance detection.
- Summarized changes and adjustments made based on screenshot analysis.
…ransactions and metrics extraction

- Introduced a detailed end-to-end test guide for the detail window transaction recognition, covering various scenarios for sell and buy transactions, including expected outcomes and verification steps.
- Implemented unit tests for detail window metrics extraction, ensuring accurate parsing of balance, warehouse quantity, and item names from OCR text.
- Added unit tests for transaction inference logic, validating correct transaction types and quantities based on balance and warehouse changes.
- Created integration tests for window detection fixes, ensuring accurate identification of buy and sell items based on OCR text patterns.
- Enhanced error handling and validation in the metrics extraction and transaction inference methods.
…mulated purchases

- Added documentation for the "Ready for Real-World Test" including fixes for preorder tracking, window-close balance-only force, and log-based price deduplication.
- Created unit tests for accumulated purchase validation, ensuring correct handling of rapid purchases and validation limits.
- Developed tests for partial delta accumulation, verifying that balance and warehouse deltas are correctly accumulated across multiple scans.
- Implemented tests for specific scenarios related to the Pig Blood transaction bug, ensuring accurate transaction inference and delta management.
- Enhanced the MarketTracker class to handle edge cases in transaction processing, including smart delta resets and validation against unrealistic quantities.
- Introduced `test_direct_ocr.py` to benchmark direct OCR speed without caching.
- Created `test_pure_reader.py` to evaluate the performance of the PURE reader against benchmarks.
- Added `validate_easyocr_optimization.py` for quick validation of EasyOCR optimizations on key ROIs.
- Implemented `validate_performance_v5.py` to test performance improvements across multiple ROIs.
- Developed `validate_performance_v6.py` to assess performance with caching and batch inserts.
- Added `test_ocr_performance.py` to verify V5 optimizations after GPU warm-up.
- Created `test_preorder_fix.py` to validate the functionality of preorder management.
- Introduced `test_preorder_roi_debug.py` for generating debug screenshots of ROIs.
- Implemented `verify_relist_fallback_fix.py` to ensure relist detection works as intended.
- Added `verify_relist_fix.py` to check the implementation of the relist fix across multiple phases.
- Removed deprecated PaddleOCR migration documentation and analysis files that are no longer needed
- Deleted outdated project rules archive from 2025-10
- Removed unused market_tracker.rar archive file
- Updated AGENTS.md to add support for new 'buy_collect_balance_only_forced' transaction case
- Cleaned up documentation to reflect current OCR implementation using EasyOCR as primary engine

The main changes remove obsolete files relate
- Fine-tuned ROI coordinates for more precise text capture regions based on UI analysis
- Adjusted log ROI to focus on 3-29% height and 28-97% width range for better transaction text isolation
- Refined window label detection to 33-63% height and 31-62% width for improved accuracy
- Updated metrics ROI to cover 35-97% height and 31-96% width, eliminating overlap with label region
- Tightened balance ROI width to 4-22% for both buy/sell windows
- Reduce
- Added price hint extraction to store numeric values and digits for fallback matching
- Implemented price recovery logic for transactions with missing prices using related entries
- Added early price reconstruction before deduplication checks to improve accuracy
- Enhanced relist transaction handling to ensure net price availability
- Added force refresh flag for detail metrics to ensure data consistency after price updates
- Fixed potential
- Adjusted region of interest (ROI) coordinates for log detection:
  - Moved y_start from 3% to 4% of image height
  - Reduced y_end from 29% to 27% of image height
  - Increased x_start from 28% to 30% of image width
- Refined metrics ROI parameters:
  - Increased y_start from 35% to 36% of image height
  - Decreased y_end from 97% to 96% of image height
  - Moved x_start from 31% to 32% of image width
- Introduced `gui_config.py` to define light and dark color palettes, default theme, layout settings, and plot settings.
- Created `gui_helpers.py` to implement a `Palette` dataclass for managing color themes.
- Developed `ThemeManager` class for applying and toggling between light and dark themes in a Tkinter application.
- Added tooltip functionality with the `Tooltip` class for enhanced user experience.
- Implemented utility functions for parsing region text and making Treeview sortable.
- Included a method to bind global hotkeys for improved accessibility.
- Moved dark_mode_var initialization before _setup_theme call to ensure proper variable setup
- Reordered variable declarations to group related theme settings together
- Fixed potential race condition where dark mode state could be accessed before initialization
@KevDil

KevDil commented Oct 26, 2025

Copy link
Copy Markdown
Owner Author

@codex review

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread tracker.py
Comment on lines +3153 to +3160
tx = {
'item_name': corrected_name,
'quantity': int(quantity),
'price': total_spent,
'transaction_type': 'buy',
'tx_case': 'buy_collect_balance_only_forced',
'timestamp': datetime.datetime.now(),
'_from_detail_window': True,

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1 Badge Systemzeit für Detailfenster-Notfalltransaktionen vermeiden

Beim erzwungenen Speichern eines offenen Kaufvorgangs wird der Zeitstempel auf datetime.datetime.now() gesetzt. Das Repository fordert jedoch explizit, stets den im Spiel angezeigten Zeitstempel zu verwenden und keine Systemzeit einzusetzen. Ein mit der lokalen Zeit gespeicherter Datensatz kann in der Datenbank falsch eingeordnet werden, Duplikaterkennung nach Timestamp umgehen und die Chronologie der Transaktionshistorie verfälschen. Stattdessen sollte der zuletzt erkannte Spielzeitstempel weitergegeben oder der Vorgang verworfen, wenn kein valider Timestamp vorhanden ist.

Useful? React with 👍 / 👎.

@chatgpt-codex-connector

Copy link
Copy Markdown

Zusammenfassung

  • Initialisierung von dark_mode_var vor dem Theme-Aufbau belassen und die Variable explizit an das Hauptfenster gebunden, um implizite Master-Zuweisungen zu vermeiden. gui.pyL71-L85

Tests

  • Keine Tests ausgeführt (nicht angefordert).

View task →

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