Skip to content

feat: remember user configuration import/export folder - #3062

Merged
mondalaci merged 1 commit into
masterfrom
feat/remember-import-export-folder-3060
Oct 5, 2026
Merged

mondalaci merged 1 commit into
masterfrom
feat/remember-import-export-folder-3060

Conversation

@mondalaci

Copy link
Copy Markdown
Member

Closes #3060.

Problem

The import/export file pickers always opened in the OS default folder (~/) instead of the folder used previously.

Solution

Route the user configuration import/export through Electron native dialogs that accept a defaultPath, and persist the last used folder in electron-settings (key user-config-folder) so it survives restarts. Both import and export update the remembered folder.

  • uhk-common: new FileDialog IPC channels and dialog result types.
  • uhk-agent: new main-process FileDialogService using dialog.showOpenDialog/showSaveDialog, reading/writing the config file and persisting the folder.
  • uhk-web: new FileDialogService abstraction with a browser default (file input + file-saver) and an Electron override (IPC), wired via DI.
  • Export effects and the import button now go through the service.

Notes

The pickers were already OS-native before, but <input type="file"> and the file-saver download offer no way to set the default path, which is why Electron's dialog API is used for both.

Testing

  • Built uhk-common, uhk-web (renderer + web) and uhk-agent.
  • Lint passes.
  • Unit tests pass (uhk-web 33, uhk-common 113).
  • Web behavior is unchanged.

Persist the last used user configuration folder and pass it as the
default path of the native import/export dialogs, so the file picker
reopens in the previously used folder across Agent restarts.

Closes #3060
@mondalaci
mondalaci merged commit 8ef0aa9 into master Oct 5, 2026
6 checks passed
@mondalaci
mondalaci deleted the feat/remember-import-export-folder-3060 branch October 5, 2026 18:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Remember import/export folder

1 participant