Skip to content

feat: add UI controls for missing config fields#2011

Open
KristjanKruusRIA wants to merge 6 commits intosipeed:mainfrom
KristjanKruusRIA:feat/config-ui-missing-fields
Open

feat: add UI controls for missing config fields#2011
KristjanKruusRIA wants to merge 6 commits intosipeed:mainfrom
KristjanKruusRIA:feat/config-ui-missing-fields

Conversation

@KristjanKruusRIA
Copy link

@KristjanKruusRIA KristjanKruusRIA commented Mar 25, 2026

📝 Description

Add web UI controls for 17 configuration fields that were previously only editable via raw JSON. This includes Sub-Turn settings, Smart Routing, Tool Security, and several Agent Defaults and Runtime options that had no corresponding UI triggers on the configuration page.

New sections added:

  • Sub-Turns — max depth, max concurrent, default timeout (minutes), token budget, concurrency timeout (seconds)
  • Smart Routing — enabled toggle, light model, routing threshold
  • Tool Security — filter sensitive data toggle, minimum content length

Existing sections extended:

  • Agent Defaults — steering mode, temperature, max media size, allow read outside workspace
  • Runtime — voice echo transcription, gateway log level

🗣️ Type of Change

  • 🐞 Bug fix (non-breaking change which fixes an issue)
  • ✨ New feature (non-breaking change which adds functionality)
  • 📖 Documentation update
  • ⚡ Code refactoring (no functional changes, no api changes)

🤖 AI Code Generation

  • 🤖 Fully AI-generated (100% AI, 0% Human)
  • 🛠️ Mostly AI-generated (AI draft, Human verified/modified)
  • 👨‍💻 Mostly Human-written (Human lead, AI assisted or none)

🔗 Related Issue

N/A — discovered while auditing config.json vs the web UI for missing field coverage.

📚 Technical Context (Skip for Docs)

  • Reference URL: N/A
  • Reasoning: Many config fields (subturn, routing, voice, gateway, tool security, steering mode, temperature, etc.) had Go struct definitions and JSON tags but no corresponding React form controls. Users had to manually edit config.json to change these settings. This PR brings them into the existing config page using the established ConfigSectionCard / Field / SwitchCardField component patterns.

🧪 Test Environment

  • Hardware: PC (Windows 11)
  • OS: Windows 11
  • Model/Provider: N/A (frontend-only changes)
  • Channels: N/A

📸 Evidence (Optional)

Click to view Logs/Screenshots

Frontend-only changes across 5 files:

  • web/frontend/src/components/config/form-model.ts — 17 new form fields, parseFloatField utility, STEERING_MODE_OPTIONS and LOG_LEVEL_OPTIONS constants
  • web/frontend/src/components/config/config-sections.tsx — 3 new sections (SubTurnSection, RoutingSection, ToolSecuritySection), 2 extended sections
  • web/frontend/src/components/config/config-page.tsx — save/parse logic for all new fields, section rendering, routing validation (light_model required when enabled)
  • web/frontend/src/i18n/locales/en.json — 45+ English translation keys
  • web/frontend/src/i18n/locales/zh.json — 45+ Chinese translation keys

☑️ Checklist

  • My code/docs follow the style of this project.
  • I have performed a self-review of my own changes.
  • I have updated the documentation accordingly.

- Add steering mode, temperature, max media size, allow read outside
  workspace to Agent Defaults section
- Add Sub-Turns section (max depth, concurrency, timeouts, token budget)
- Add Smart Routing section (enabled toggle, light model, threshold)
- Add Tool Security section (filter sensitive data, min content length)
- Add voice echo transcription and gateway log level to Runtime section
- Add parseFloatField utility for float validation
- Add English and Chinese translations for all new controls
Copilot AI review requested due to automatic review settings March 25, 2026 14:58
KristjanKruusRIA and others added 2 commits March 25, 2026 17:03
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
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

Adds missing configuration controls to the web config page so users don’t need to edit raw JSON for Sub-Turns, Smart Routing, Tool Security, and several Agent/Runtime defaults.

Changes:

  • Extends the config form model with new fields/options and adds parsing helpers for float inputs.
  • Adds new config sections (Sub-Turns, Smart Routing, Tool Security) and extends existing sections (Agent Defaults, Runtime) with new controls.
  • Adds EN/ZH i18n keys for all new labels/hints and new section titles.

Reviewed changes

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

Show a summary per file
File Description
web/frontend/src/components/config/form-model.ts Adds new form fields + option lists + parseFloatField utility for new numeric controls.
web/frontend/src/components/config/config-sections.tsx Introduces new UI sections and new controls in Agent Defaults/Runtime.
web/frontend/src/components/config/config-page.tsx Adds save/patch logic (parsing + PATCH payload) and renders the new sections.
web/frontend/src/i18n/locales/en.json Adds translations for new controls and section names.
web/frontend/src/i18n/locales/zh.json Adds translations for new controls and section names.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Copilot AI review requested due to automatic review settings March 25, 2026 15:09
- Fix subturn_max_depth_hint: clarify that 0 uses default (3), not disable
- Fix subturn_default_timeout_hint: clarify that 0 uses system default (5 min)
- Add fatal log level option to i18n translations (en + zh)
- Extract select .find() lookups to component-level variables
- Add validation: routing enabled requires non-empty light_model
- Only parse filterMinLength when filter_sensitive_data is enabled
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

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


💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

- Update routing_threshold_hint (en/zh) to note that values <= 0 use
  the system default (0.35)
@sipeed-bot sipeed-bot bot added type: enhancement New feature or request domain: config labels Mar 25, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants