Skip to content

Conversation

@Rakly3
Copy link

@Rakly3 Rakly3 commented Nov 16, 2025

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.

…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.
@willmiao willmiao added codex and removed codex labels Nov 19, 2025
@willmiao
Copy link
Owner

@codex review

Copy link

@chatgpt-codex-connector chatgpt-codex-connector bot left a 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".

Comment on lines +329 to +336
// 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') {

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge 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 👍 / 👎.

@willmiao
Copy link
Owner

@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?

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.

2 participants