Skip to content

Implement comprehensive settings UI to configure all application settings#6

Merged
streed merged 2 commits intomainfrom
copilot/fix-74f1c7aa-adf3-4f2d-a0b5-b55b3b99b121
Sep 12, 2025
Merged

Implement comprehensive settings UI to configure all application settings#6
streed merged 2 commits intomainfrom
copilot/fix-74f1c7aa-adf3-4f2d-a0b5-b55b3b99b121

Conversation

Copy link
Contributor

Copilot AI commented Sep 12, 2025

This PR implements a complete settings UI that allows users to configure all ML Notes application settings from the web interface, providing the same functionality as the CLI ml-notes config set command.

Problem

The existing settings UI was incomplete and had several issues:

  • Referenced non-existent configuration fields (EnableVectorSearch, EmbeddingModel, VectorDimensions)
  • Missing several important configuration options available via CLI
  • API handlers didn't support all configuration fields
  • CLI config command was missing the lilrag-url option

Solution

Enhanced CLI Configuration

  • Added lilrag-url support to ml-notes config set command
  • Updated help text to reflect all available configuration options
  • Ensured CLI commands match the actual Config struct fields

Complete Settings UI Implementation

  • Fixed template field mapping: Updated settings.html to use correct field names from the Config struct
  • Added missing configuration sections:
    • Lil-Rag Integration (lilrag_url) for enhanced semantic search
    • Auto-tagging model configuration (auto_tag_model)
    • Web UI theme configuration (webui_theme)
  • Enhanced API support: Updated UpdateSettingsRequest struct and handlers to support all configuration fields
  • Improved organization: Grouped settings into logical sections with clear descriptions

Functionality Verified

  • All field types work correctly: text inputs, checkboxes, dropdowns, number inputs
  • Settings load from and save to configuration file properly
  • Form validation (e.g., max-auto-tags range 1-20)
  • "Test Ollama Connection" button with proper error handling
  • "Reset to Defaults" with confirmation dialog
  • Success/error notifications

Configuration Options Now Available in UI

  • Ollama Integration: Endpoint configuration
  • Lil-Rag Integration: Service URL for enhanced semantic search
  • Summarization & Analysis: Enable/disable and model selection
  • Auto-tagging: Enable/disable, model selection, and max tag limits
  • Editor Configuration: Default editor command
  • Web UI Configuration: Theme selection
  • Update Configuration: GitHub repository settings
  • System Configuration: Debug mode and read-only system paths

The settings UI now provides complete parity with the CLI configuration commands, allowing users to manage their ML Notes setup entirely through the web interface.


✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.

Co-authored-by: streed <805140+streed@users.noreply.github.com>
Copilot AI changed the title [WIP] On the settings page I want to update it to allow for configuring all of the apps settings from the ui, much in the same way that you can use the cli config flag to modify the local config. It should support all settings. Implement comprehensive settings UI to configure all application settings Sep 12, 2025
Copilot AI requested a review from streed September 12, 2025 18:09
@streed streed marked this pull request as ready for review September 12, 2025 18:19
Copilot AI review requested due to automatic review settings September 12, 2025 18:19
@streed streed merged commit 13c5359 into main Sep 12, 2025
8 checks passed
@streed streed deleted the copilot/fix-74f1c7aa-adf3-4f2d-a0b5-b55b3b99b121 branch September 12, 2025 18:19
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

This PR implements a comprehensive settings UI that provides full parity with the CLI configuration commands, allowing users to configure all ML Notes application settings through the web interface.

Key changes include:

  • Removal of non-existent configuration fields and addition of missing ones in the settings template
  • Enhanced API support for all configuration fields including new LilRag integration and auto-tag model settings
  • Updated CLI config command to include the missing lilrag-url option

Reviewed Changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated 3 comments.

File Description
web/templates/settings.html Replaced non-existent vector search fields with proper configuration sections for LilRag, auto-tag model, and web UI theme
internal/api/server.go Added support for new configuration fields in API handlers and request/response structures
cmd/config.go Added missing lilrag-url configuration option and updated help documentation

Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

Comment on lines +1456 to +1458
if req.AutoTagModel != "" {
newCfg.AutoTagModel = req.AutoTagModel
}
Copy link

Copilot AI Sep 12, 2025

Choose a reason for hiding this comment

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

The auto tag model field should allow empty strings to be set (to clear the value), but this condition prevents empty strings from being processed. Consider checking if the field exists in the request rather than if it's non-empty.

Copilot uses AI. Check for mistakes.
Comment on lines +1472 to +1474
if req.LilRagURL != "" {
newCfg.LilRagURL = req.LilRagURL
}
Copy link

Copilot AI Sep 12, 2025

Choose a reason for hiding this comment

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

Similar to the auto tag model, this condition prevents clearing the LilRag URL by setting it to an empty string. The field should be updateable to empty values.

Suggested change
if req.LilRagURL != "" {
newCfg.LilRagURL = req.LilRagURL
}
newCfg.LilRagURL = req.LilRagURL

Copilot uses AI. Check for mistakes.
Comment on lines +1475 to +1477
if req.WebUITheme != "" {
newCfg.WebUITheme = req.WebUITheme
}
Copy link

Copilot AI Sep 12, 2025

Choose a reason for hiding this comment

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

This condition prevents clearing the WebUI theme setting. Consider allowing empty strings to reset to default theme behavior.

Suggested change
if req.WebUITheme != "" {
newCfg.WebUITheme = req.WebUITheme
}
newCfg.WebUITheme = req.WebUITheme

Copilot uses AI. Check for mistakes.
This was referenced Sep 17, 2025
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.

3 participants