Skip to content

Enhance multi-instance manager stability and user experience - #153

Closed
AbyssRei wants to merge 9 commits into
feature-train-loggerfrom
main
Closed

Enhance multi-instance manager stability and user experience#153
AbyssRei wants to merge 9 commits into
feature-train-loggerfrom
main

Conversation

@AbyssRei

@AbyssRei AbyssRei commented May 1, 2026

Copy link
Copy Markdown
Collaborator

This pull request introduces a series of improvements and refinements across the codebase, focusing on UI adjustments, usability enhancements, timeout logic, and code robustness. The changes include more flexible and maintainable CSV header generation, improved device selection logic, more responsive and informative login handling, and several UI/UX tweaks for better user experience.

Most important changes:

UI/UX Improvements:

  • Increased the number of columns in the input panel grid and reduced image and input field sizes for a more compact layout (input_panel_ui.py). [1] [2] [3]
  • Refactored the main window layout: adjusted window size, reorganized control panel buttons, added a prediction toggle checkbox that enables/disables related features, and improved signal handling for button states (main.py). [1] [2] [3] [4] [5] [6] [7] [8] [9] [10] [11]

Data Handling and Logging:

  • Simplified and made CSV header generation more robust by using a helper function and configuration constants instead of relying on the recognizer's runtime properties (auto_fetch.py).
  • Standardized statistics and log messages for clarity and consistency in both the main UI and log files (auto_fetch.py, main.py). [1] [2]

Timeouts and Robustness:

  • Revised timeout logic for auto-fetching data: increased non-battle timeout to 50s and decreased battle timeout to 120s, now applied globally regardless of state; improved logging for timeout events (auto_fetch.py).
  • Improved error handling in the auto-fetch loop with better exception logging and adjusted sleep interval for performance (auto_fetch.py). [1] [2]

Device and Model Handling:

  • Changed device selection logic to only use the specified device, avoiding unintended automatic selection of any available device (loadData.py).
  • Ensured that the prediction model is only used if enabled by the user, and that the invest checkbox is disabled if prediction is turned off (main.py, auto_fetch.py). [1] [2] [3]

Login and Workflow Enhancements:

  • Enhanced login handling: improved wait logic with periodic checks, more efficient detection of game screens, and robust handling of pop-ups with retries and timeouts (login.py). [1] [2]

Other minor changes include improved zip filename formatting (data_package.py).

Evoltsuki and others added 9 commits April 30, 2026 17:55
- 添加智能端口输入框,支持延迟格式化
- 实现崩溃检测和自动恢复机制,监控实例活动状态
- 优化设备连接逻辑,只使用指定设备不自动选择
- 调整超时检测机制,统一处理所有状态的超时情况
- 改进登录流程,增加动态检测和弹窗处理
- 添加心跳机制保持实例活跃状态
- 保存实例配置便于崩溃后恢复
Co-authored-by: Copilot <copilot@github.com>
…151)

* refactor: 规范项目目录结构与模块分层,提升可维护性以符合标准工程化要求

* fix: 补全文件

Co-authored-by: Copilot <copilot@github.com>

* Refactor UV installation and inference environment selection logic #149

This pull request introduces improvements to both the user experience and code logic in the launcher batch script and the auto-fetch module. The batch script now provides more flexible inference environment options for users, while the auto-fetch logic is refined to prevent unintentional overwriting of prediction results.

Launcher script enhancements:

Expanded the inference environment selection in iron_shark_launcher.bat to allow users to choose between PyTorch CPU, CUDA 12.8, CUDA 13.0, or onnxruntime, with improved prompt text and logic for handling user input.
Updated the script to use uv sync with the appropriate --extra flag based on the user's choice, rather than always attempting to install PyTorch, and clarified messages to the user.
Auto-fetch logic improvement:

In src/game/auto_fetch.py, changed the heartbeat update to use the current prediction value instead of a fixed 0, preventing accidental overwriting of GUI prediction results.

* Refactor UV installation logic and add path management module (#150)

* refactor: 优化uv安装和推理环境选择逻辑

Co-authored-by: Copilot <copilot@github.com>

* fix(auto_fetch): 刷新当前预测显示,避免覆盖 GUI 错误

* fix(sim): 修复路径问题

* feat(paths): 添加路径管理模块,统一资源路径管理
- 新增 paths.py 文件,定义项目根目录、资源目录、数据目录等路径
- 更新多个模块以使用新的路径管理函数,确保路径的一致性和可维护性

Co-authored-by: Copilot <copilot@github.com>

---------

Co-authored-by: Copilot <copilot@github.com>

---------

Co-authored-by: Copilot <copilot@github.com>
Co-authored-by: Copilot <copilot@github.com>
@AbyssRei AbyssRei closed this May 1, 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.

4 participants