WolvenKit icon indicating copy to clipboard operation
WolvenKit copied to clipboard

WScript shortcut in Log dock ignores update of WKit-Resources on first launch

Open poirierlouis opened this issue 1 year ago • 0 comments

Describe the bug WScript shortcut in Log dock was introduced by #1939. On first launch, the list of scripts will only show User scripts and not System scripts.

To Reproduce Steps to reproduce the behavior:

  1. Build with release mode (make sure Resources/Scripts/ is empty)
  2. Launch app
  3. Click on dropdown field in Log dock
  4. Only User scripts are listed

Expected behavior It should take into account downloaded scripts from WolvenKit-Resources. This is a minor issue as System scripts will be present on the next run. Furthermore, user can click the refresh button to update the list of scripts on the first run.

Version

  • not released yet

Leads I suggested the implementation of a ScriptFileRepository to isolate the management of script files. This repository could:

  • load script files from WolvenKit-Resources repository.
  • load script files from FileSystem (update scripts).
  • reload code of a script file.
  • provide an observable to emit script files.

This way, script files could be listen to, using this repository in ScriptManagerViewModel and in LogViewModel.

poirierlouis avatar Sep 29 '24 16:09 poirierlouis