-
-
Notifications
You must be signed in to change notification settings - Fork 81
feat(metadata-archive): add custom database path functionality #679
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
…date path handling Implement the ability to specify a custom path for the metadata archive database across multiple locales. This includes updating the database path, moving the database if necessary, and providing user feedback through the UI. The changes enhance the flexibility of database management for users.
|
@codex review |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
💡 Codex Review
Here are some automated review suggestions for this pull request.
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| // Setup metadata archive database path input | ||
| const metadataArchiveDbPathInput = document.getElementById('metadataArchiveDbPath'); | ||
| if (metadataArchiveDbPathInput) { | ||
| metadataArchiveDbPathInput.addEventListener('blur', () => { | ||
| this.saveMetadataArchivePath(); | ||
| }); | ||
| metadataArchiveDbPathInput.addEventListener('keydown', (e) => { | ||
| if (e.key === 'Enter') { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Avoid double-binding metadata path blur handler
The input for metadataArchiveDbPath already invokes settingsManager.saveMetadataArchivePath() via inline onblur/onkeydown attributes in settings_modal.html, yet this block adds a second pair of listeners for the same events. Blurring the field now fires two POSTs to /api/lm/update-metadata-archive-path and two subsequent settings saves, which can trigger redundant database moves and provider reinitialisations or surface transient errors when the second request races the first. Consider removing either the inline handlers or these listeners so the update runs only once per user action.
Useful? React with 👍 / 👎.
|
@Rakly3 Thanks a lot for the contribution! When you get a chance, could you review the issue flagged by the codex bot and update the PR if it makes sense? |
Implement the ability to specify a custom path for the metadata archive database across multiple locales. This includes updating the database path, moving the database if necessary, and providing user feedback through the UI. The changes enhance the flexibility of database management for users.