Skip to content

Add web search autosave and usage preview data - #204

Draft
designerzhi wants to merge 1 commit into
mainfrom
feat/settings-behavior-updates
Draft

Add web search autosave and usage preview data#204
designerzhi wants to merge 1 commit into
mainfrom
feat/settings-behavior-updates

Conversation

@designerzhi

Copy link
Copy Markdown
Collaborator

Description

Summary

This PR contains Settings behavior changes and local-browser preview support.

Changes

  • Web Search settings now auto-save:

    • provider changes save automatically
    • API keys save on blur or Enter
    • removed the section-level Save button
  • Added lightweight Web Search API key validation:

    • required-key providers show “API key required” when empty
    • Brave keys must start with BSA
    • Tavily keys must start with tvly-
    • invalid formats show “Check the key format”
  • Added inline Web Search save status:

    • Saving...
    • Saved
    • Failed to save
    • validation messages
  • Simplified provider-specific UI:

    • providers that do not require an API key, such as Parallel, no longer show an API Key row
  • Added browser-development Usage mock data:

    • realistic spend, budget, sessions, messages, tokens, tool calls
    • model breakdown sample data
    • helps preview Usage UI in local browser without requiring live gateway data

Validation

  • Verified changed files have no editor-reported errors.
  • Tested Web Search behavior in local browser preview:
    • Parallel hides API key row
    • Brave without key shows required state
    • invalid Brave prefix shows format warning
    • plausible key saves successfully
  • Verified Usage page renders populated preview data locally.

Related Issue

Changes

Type of Change

  • Bug fix (non-breaking change that fixes an issue)
  • New feature (non-breaking change that adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • Documentation update
  • CI/CD or build configuration change
  • Refactoring (no functional changes)

Testing

  • Tests pass locally (cd desktop && npm run test)
  • Renderer tests pass locally (cd desktop/renderer && npm run test)
  • Build succeeds (cd desktop && npm run build)
  • Manual testing performed (describe below)

Checklist

  • My code follows the coding guidelines of this project
  • I have performed a self-review of my code
  • I have commented my code where necessary
  • I have made corresponding changes to the documentation
  • My changes generate no new warnings
  • I have added tests that prove my fix is effective or my feature works
  • New and existing unit tests pass locally with my changes

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.

1 participant