Skip to content

Tasks, autoupdate, general config, robust profile system#8

Merged
Egezenn merged 1 commit into
Silkroad-Developer-Community:mainfrom
Egezenn:main
May 21, 2026
Merged

Tasks, autoupdate, general config, robust profile system#8
Egezenn merged 1 commit into
Silkroad-Developer-Community:mainfrom
Egezenn:main

Conversation

@Egezenn
Copy link
Copy Markdown
Member

@Egezenn Egezenn commented May 6, 2026

  • Fetches every 12h (only once via general config caching the last check)

RSBot.AutoUpdate{True}
RSBot.Language{en_US}
RSBot.showExitDialog{True}
RSBot.Theme.Auto{True}
RSBot.LastUpdateCheck{638506116000000000}

Summary by CodeRabbit

Release Notes

  • New Features

    • Profile name validation prevents reserved names (Profiles, Default, Settings)
    • Auto-update setting with 12-hour rate limiting
  • Improvements

    • Redesigned updater interface with dark theme
    • Asynchronous updater checks during startup
    • Enhanced profile management consistency

- Fetches every 12h (only once via general config caching the last check)

RSBot.AutoUpdate{True}
RSBot.Language{en_US}
RSBot.showExitDialog{True}
RSBot.Theme.Auto{True}
RSBot.LastUpdateCheck{638506116000000000}
@coderabbitai
Copy link
Copy Markdown

coderabbitai Bot commented May 6, 2026

Caution

Review failed

Failed to post review comments

📝 Walkthrough

Walkthrough

This PR modernizes the configuration system by introducing GeneralConfig for centralized settings management, enhances ProfileManager to prevent reserved profile names and guarantee a Default profile, updates multiple UI components to use the new config system, refactors the Updater from Windows Forms to SDUI with GitHub-based version checking, and adds developer tooling (VSCode tasks and a mock updater server).

Changes

Configuration System Modernization & Updater Refactoring

Layer / File(s) Summary
Configuration Infrastructure
Library/RSBot.Core/Config/GeneralConfig.cs
New public static class providing Load, Get<T>, Set<T>, Exists, and Save methods for centralized config access at Kernel.BasePath/User/Settings.rs with exception handling.
Component Updates
Library/RSBot.Core/Components/ProfileManager.cs, Library/RSBot.Core/Kernel.cs
ProfileManager ensures Default profile exists at startup, rejects reserved profile names (Profiles, Default, Settings), and returns true on successful add. Kernel corrects Debug property key from "RSBot.DebugEnvironments" to "RSBot.DebugEnvironment".
Profile Dialog
Application/RSBot/Views/Dialog/ProfileSelectionDialog.cs
Removes inline Default profile creation, adds reserved-names validation with user feedback, updates profile deletion to check string equality against Default instead of index-based logic.
UI Configuration Migration
Application/RSBot/Views/Main.cs, Application/RSBot/Views/Dialog/ExitDialog.cs, Application/RSBot/Views/SplashScreen.cs
Migrate theme and language settings from GlobalConfig to GeneralConfig with explicit Load/Save calls. Main adds GeneralConfig.Load() during profile switch. SplashScreen converts to async to check for updates on startup and reads language/theme from GeneralConfig.
Updater Refactoring
Application/RSBot/Views/Updater.cs, Application/RSBot/Views/Updater.Designer.cs
Base class changes from Form to UIWindow; Check() method now enforces 12-hour rate limit, validates uninstaller presence, respects RSBot.AutoUpdate setting, and logs errors instead of showing dialogs. UI updated to dark theme with expanded layout and AcceptButton assignment. Download target changed to RSBot-Setup-Latest.exe.
Developer Tooling
.vscode/tasks.json, scripts/mock_updater.py
VSCode tasks added for Debug/Release builds, Clean Build, Build & Run (default), Run Mock Updater, Launch RSBot, Launch Setup, and Build Setup. Mock updater Python script serves a test update feed on localhost with latest RSBot-Setup-*.exe, creates dummy installer if absent, and runs until interrupted.

Sequence Diagram

sequenceDiagram
    actor User
    participant App as Application
    participant Config as GeneralConfig
    participant PM as ProfileManager
    participant Updater as Updater Service
    participant GitHub as GitHub Releases

    User->>App: Launch RSBot
    App->>Config: Load()
    Config->>Config: Initialize from Settings.rs
    App->>PM: Initialize profiles
    PM->>PM: Ensure Default profile exists
    App->>Updater: Check for updates
    Updater->>Config: Get RSBot.AutoUpdate
    alt AutoUpdate enabled
        Updater->>Config: Get last check timestamp
        alt 12+ hours since last check
            Updater->>GitHub: Fetch latest release
            GitHub-->>Updater: Release info
            Updater->>Updater: Parse version & build info
            Updater->>Config: Store check timestamp
            Updater-->>App: Update available
            App->>Updater: ShowDialog()
            User->>Updater: Click Download
            Updater->>Updater: Download RSBot-Setup-Latest.exe
            Updater->>App: Launch installer & exit
        else Recent check
            Updater-->>App: Skip check (rate limited)
        end
    else AutoUpdate disabled
        Updater-->>App: Skip check
    end
    App->>Config: Get RSBot.Theme.Auto
    App->>User: Render UI with theme
Loading

Estimated code review effort

🎯 4 (Complex) | ⏱️ ~60 minutes


A config system grows, profiles dance with grace,
Reserved names kept safe in their proper place,
The Updater now soars on SDUI wings,
While mock servers mock all the version-check things, 🐰✨
Dev tools hop faster—what joy this all brings!

🚥 Pre-merge checks | ✅ 3 | ❌ 2

❌ Failed checks (1 warning, 1 inconclusive)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 58.82% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
Title check ❓ Inconclusive The title partially captures key changes (autoupdate, general config, profile system) but is vague and lacks clear focus on the main objective. Revise to be more specific about the primary change (e.g., 'Add autoupdate mechanism with GeneralConfig and robust profile system' or 'Introduce GeneralConfig system with 12h autoupdate caching').
✅ Passed checks (3 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

Tip

💬 Introducing Slack Agent: The best way for teams to turn conversations into code.

Slack Agent is built on CodeRabbit's deep understanding of your code, so your team can collaborate across the entire SDLC without losing context.

  • Generate code and open pull requests
  • Plan features and break down work
  • Investigate incidents and troubleshoot customer tickets together
  • Automate recurring tasks and respond to alerts with triggers
  • Summarize progress and report instantly

Built for teams:

  • Shared memory across your entire org—no repeating context
  • Per-thread sandboxes to safely plan and execute work
  • Governance built-in—scoped access, auditability, and budget controls

One agent for your entire SDLC. Right inside Slack.

👉 Get started


Comment @coderabbitai help to get the list of available commands and usage tips.

@Egezenn Egezenn changed the title Tasks, autoupdate, general config, robust profile system - Fetches every 12h (only once via general config caching the last check) Tasks, autoupdate, general config, robust profile system May 6, 2026
@Egezenn Egezenn mentioned this pull request May 7, 2026
@Egezenn Egezenn merged commit 9453d3c into Silkroad-Developer-Community:main May 21, 2026
1 of 2 checks passed
Egezenn added a commit that referenced this pull request May 21, 2026
* Rebrand to OasisBot
- Requires changes to #8
- Icons made by @kis1yi
- Theme accent changed to (202, 179, 139) #CAB38B | (182, 159, 119) #B69F77
- Text references changed to OasisBot
- Changes links to OasisBot (https://github.com/Silkroad-Developer-Community/RSBot -> https://github.com/Silkroad-Developer-Community/OasisBot)
- Internals untouched

* Update SDUI reference and finalize OasisBot rebranding

* DMCA

* Revert copyright notice for Python
- Never merged
- All contributions from current org members -> @Day4Date, @kis1yi, @Egezenn
- myildirimofficial/RSBot#965

* Decoupling UI and Logic (#1)

* Added IBotbaseView and IPluginView Interfaces
Changed IBotbase and IPlugin Interface
Decoupled Chat Plugin

* General Plugin decoupled
Subviews still have to be decoupled

* Added Inventory Plugin to new Interface

* Decoupled Training Botbase
Removed Pickepet Timer from UI and created new one in TrainingManager.cs

* Added new Interface to all existing Plugins and Botbases

* Test

* Decoupled Skills Plugin
Added headless prototyp

* --headless starts now without Main UI
Improved decoupling for Party Plugin

* removed launchSettings

* test

* removed "h" keyword for headless launch

* Fix for General Plugin

* Decoupled ServerInfo Plugin

* invoked skills plugin

* Reworked Party decoupling

* Some spelling

* Stabilize behavior

* Command registries for plugins, headless attach

* Lower, start-client, exit commands

* Fixes and improvements
- Stable console cursor
- Fixes to some errors
- Help messages outputted only to console

---------

Co-authored-by: DayDate <DayDate>
Co-authored-by: Egezenn <egezenn@tutanota.com>

* Tasks, autoupdate, general config, robust profile system (#8)

- Fetches every 12h (only once via general config caching the last check)

RSBot.AutoUpdate{True}
RSBot.Language{en_US}
RSBot.showExitDialog{True}
RSBot.Theme.Auto{True}
RSBot.LastUpdateCheck{638506116000000000}

* Move Application/RSBot -> Application/OasisBot, Move URL dependencies
- Break stuff once
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