Fixes for new UI and headless mode#12
Conversation
- conhost.exe process disabled for GUI mode - Fixed headless mode for rusro and jsro - Fixed tray icon size - Fixed splash screen size - Fixed main translation path
📝 WalkthroughWalkthroughThis PR updates console window handling for GUI mode by replacing Win32 interop calls with FreeConsole(), expands the splash screen layout from 533px to 640px width, refactors client startup to use async/await with error handling, and normalizes the Spanish localization file formatting. ChangesOasisBot Application Improvements
Estimated code review effort🎯 2 (Simple) | ⏱️ ~12 minutes Poem
🚥 Pre-merge checks | ✅ 3 | ❌ 2❌ Failed checks (1 warning, 1 inconclusive)
✅ Passed checks (3 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
Actionable comments posted: 3
🤖 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 `@Dependencies/Languages/OasisBot/es_ES.rsl`:
- Line 43: Two localization entries remain in English; update the Spanish locale
by replacing the English text for NoBotbaseDetectedDesc and the other
untranslated entry at the same block (the string on line 52) with proper Spanish
translations. Locate the NoBotbaseDetectedDesc and the second untranslated key
in the es_ES resource file, provide idiomatic Spanish equivalents (including the
help URL), and ensure newline sequences (\n) are preserved exactly as in the
original string.
- Line 24: Update the Spanish confirmation label RSBot.ExitDialog.Panel.btnYes
to use the correct accented character: change its value from "Si" to "Sí"
(ensure the file is saved with UTF-8 encoding so the accent persists).
In `@Plugins/RSBot.General/GeneralCLICommands.cs`:
- Line 25: Replace the current Log.Error call that only logs ex.Message so the
full exception (including stack trace and inner exceptions) is logged; in
GeneralCLICommands.cs locate the Log.Error(...) line that references ex and
change it to pass the exception object into the logger (e.g. use the Log.Error
overload that accepts an Exception and a message) so the log contains both the
"Failed to start client" context and the full exception details.
🪄 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: defaults
Review profile: CHILL
Plan: Pro Plus
Run ID: 3f1c9d52-42c9-4269-8612-89888782a640
⛔ Files ignored due to path filters (3)
Application/OasisBot/Resources/tray.icois excluded by!**/*.icoApplication/OasisBot/Resources/tray.pngis excluded by!**/*.pngApplication/OasisBot/tray.icois excluded by!**/*.ico
📒 Files selected for processing (10)
Application/OasisBot/Program.csApplication/OasisBot/Views/SplashScreen.Designer.csDependencies/Languages/OasisBot/ar_AR.rslDependencies/Languages/OasisBot/de_DE.rslDependencies/Languages/OasisBot/en_US.rslDependencies/Languages/OasisBot/es_ES.rslDependencies/Languages/OasisBot/ru_RU.rslDependencies/Languages/OasisBot/tr_TR.rslDependencies/Languages/OasisBot/vn_VN.rslPlugins/RSBot.General/GeneralCLICommands.cs
| RSBot.ScriptRecorder.Panel.btnClear="Limpiar" | ||
| RSBot.ScriptRecorder.Panel.btnStart="Grabar" | ||
| RSBot.ExitDialog.Panel.btnNo="No" | ||
| RSBot.ExitDialog.Panel.btnYes="Si" |
There was a problem hiding this comment.
Fix Spanish accent in confirmation label.
"Si" should be "Sí" in Spanish UI text.
Proposed fix
-RSBot.ExitDialog.Panel.btnYes="Si"
+RSBot.ExitDialog.Panel.btnYes="Sí"📝 Committable suggestion
‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.
| RSBot.ExitDialog.Panel.btnYes="Si" | |
| RSBot.ExitDialog.Panel.btnYes="Sí" |
🤖 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 `@Dependencies/Languages/OasisBot/es_ES.rsl` at line 24, Update the Spanish
confirmation label RSBot.ExitDialog.Panel.btnYes to use the correct accented
character: change its value from "Si" to "Sí" (ensure the file is saved with
UTF-8 encoding so the accent persists).
| StartBot="Iniciar BOT" | ||
| StopBot="Detener BOT" | ||
| NoBotbaseDetected="¡No se ha detectado ninguna base de bots!" | ||
| NoBotbaseDetectedDesc="The bot can not be run without any botbase!\n Please install a proper botbase and try again.\n You can find help at https://silkroad-developer-community.github.io/OasisBot" |
There was a problem hiding this comment.
Translate remaining English strings in es_ES locale.
These two entries are still English, which breaks localization consistency in Spanish mode.
Proposed fix
-NoBotbaseDetectedDesc="The bot can not be run without any botbase!\n Please install a proper botbase and try again.\n You can find help at https://silkroad-developer-community.github.io/OasisBot"
+NoBotbaseDetectedDesc="¡El bot no puede ejecutarse sin una base de bots!\nPor favor, instala una base de bots adecuada e inténtalo de nuevo.\nPuedes encontrar ayuda en https://silkroad-developer-community.github.io/OasisBot"
-ConfigureTrainingAreaBeforeStartBot="Please configure the training area before start the bot!"
+ConfigureTrainingAreaBeforeStartBot="¡Por favor, configura el área de entrenamiento antes de iniciar el bot!"Also applies to: 52-52
🤖 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 `@Dependencies/Languages/OasisBot/es_ES.rsl` at line 43, Two localization
entries remain in English; update the Spanish locale by replacing the English
text for NoBotbaseDetectedDesc and the other untranslated entry at the same
block (the string on line 52) with proper Spanish translations. Locate the
NoBotbaseDetectedDesc and the second untranslated key in the es_ES resource
file, provide idiomatic Spanish equivalents (including the help URL), and ensure
newline sequences (\n) are preserved exactly as in the original string.
| } | ||
| catch (Exception ex) | ||
| { | ||
| Log.Error($"Failed to start client: {ex.Message}"); |
There was a problem hiding this comment.
Log the full exception for better debuggability.
Logging only ex.Message loses the stack trace and any inner exceptions, making debugging failures more difficult. Consider logging the full exception object.
📝 Proposed fix to log the full exception
- Log.Error($"Failed to start client: {ex.Message}");
+ Log.Error($"Failed to start client: {ex}");Alternatively, if you want to keep the prefix message:
- Log.Error($"Failed to start client: {ex.Message}");
+ Log.Error(ex);📝 Committable suggestion
‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.
| Log.Error($"Failed to start client: {ex.Message}"); | |
| Log.Error($"Failed to start client: {ex}"); |
🤖 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 `@Plugins/RSBot.General/GeneralCLICommands.cs` at line 25, Replace the current
Log.Error call that only logs ex.Message so the full exception (including stack
trace and inner exceptions) is logged; in GeneralCLICommands.cs locate the
Log.Error(...) line that references ex and change it to pass the exception
object into the logger (e.g. use the Log.Error overload that accepts an
Exception and a message) so the log contains both the "Failed to start client"
context and the full exception details.
32c2fc0
into
Silkroad-Developer-Community:main
Summary by CodeRabbit
Release Notes
Bug Fixes
Style
Chores