[PR #14526] app: add extended settings with tabbed UI #19984

Open
opened 2026-04-16 07:22:22 -05:00 by GiteaMirror · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/ollama/ollama/pull/14526
Author: @4RH1T3CT0R7
Created: 3/1/2026
Status: 🔄 Open

Base: mainHead: feature/extended-settings


📝 Commits (5)

  • c6df318 Add tests and logic to adjust defaultNumCtx based on parallelism
  • a88a03e Merge remote-tracking branch 'origin/main'
  • 878e626 Merge remote-tracking branch 'origin/main'
  • 5ca8fb6 app: add extended settings with tabbed UI
  • 581505b Fix review issues: type safety, dead props, env var handling

📊 Changes

14 files changed (+1520 additions, -168 deletions)

View changed files

📝 app/server/server.go (+49 -1)
📝 app/store/database.go (+90 -5)
📝 app/store/store.go (+46 -0)
📝 app/ui/app/codegen/gotypes.gen.ts (+52 -0)
📝 app/ui/app/src/components/Settings.tsx (+99 -161)
app/ui/app/src/components/settings/GeneralTab.tsx (+231 -0)
app/ui/app/src/components/settings/GenerationDefaultsTab.tsx (+318 -0)
app/ui/app/src/components/settings/GpuPerformanceTab.tsx (+167 -0)
app/ui/app/src/components/settings/NetworkSecurityTab.tsx (+147 -0)
app/ui/app/src/components/ui/number-input.tsx (+126 -0)
app/ui/app/src/components/ui/select.tsx (+109 -0)
📝 app/ui/ui.go (+15 -1)
📝 server/routes.go (+6 -0)
📝 server/routes_options_test.go (+65 -0)

📄 Description

Summary

  • Adds ~22 new configuration fields to the desktop app settings, organized into 4 tabs: General, GPU & Performance, Generation Defaults, and Network & Security
  • Refactors the monolithic Settings.tsx into modular tab components using Headless UI TabGroup
  • New settings include: debug logging, keep-alive duration, flash attention, KV cache type, parallel requests, GPU overhead, schedule spread, Vulkan toggle, temperature/top_k/top_p/min_p/repeat_penalty/seed/num_predict defaults, host/port, HTTP/HTTPS proxy, no-proxy, CORS origins, and allowed remotes
  • Backend: extends Settings struct, adds SQLite migration v15→v16, maps new fields to environment variables, extends server restart triggers
  • New UI components: Select dropdown (Headless UI Listbox) and NumberInput with +/- controls

This is Part 1 of 3 in the Ollama Desktop UI improvement series:

  1. This PR — Extended Settings: Tabbed settings UI with ~22 new configuration fields (General, GPU, Generation, Network)
  2. PR #14528Monitoring Dashboard: GPU/memory monitoring, loaded models, system tray extensions
  3. PR #14531Model Manager: Full model CRUD, batch ops, copy/alias, per-model settings

Each PR is independent and can be merged separately. Together they transform the desktop app from a chat-only interface into a comprehensive Ollama management tool with full settings control, real-time monitoring, and model lifecycle management.

Changes

Area Files Description
Backend store.go, database.go 22 new fields in Settings struct, SQLite migration
Server server.go Environment variable mappings for new settings
Restart ui.go Extended restart trigger conditions
Settings UI Settings.tsx Refactored into tabbed layout
Tabs GeneralTab.tsx, GpuPerformanceTab.tsx, GenerationDefaultsTab.tsx, NetworkSecurityTab.tsx New tab components
UI Components select.tsx, number-input.tsx New reusable UI components
Types gotypes.gen.ts TypeScript types for new settings fields

Design decisions

  • Generation defaults use nullable types (*float64/*int in Go, number | null in TS) — null means "use model/system default", distinguishing from zero values
  • GPU & Performance tab hides Vulkan toggle on macOS (not applicable)
  • CorsOrigins respects Browser setting — won't override wildcard origins when Browser is enabled
  • All new settings with zero/empty defaults maintain backward compatibility
  • Generation defaults do NOT trigger server restart (applied per-request)

Test plan

  • Open Settings, verify all 4 tabs render correctly
  • Toggle each boolean setting, verify persistence
  • Change GPU/network settings, verify server restarts
  • Change generation defaults, verify they do NOT trigger restart
  • Reset to defaults, verify all fields clear properly
  • Build passes: cd app/ui/app && npm run build
  • TypeScript check passes: npx tsc --noEmit
Screenshot_1 Screenshot_2

🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/ollama/ollama/pull/14526 **Author:** [@4RH1T3CT0R7](https://github.com/4RH1T3CT0R7) **Created:** 3/1/2026 **Status:** 🔄 Open **Base:** `main` ← **Head:** `feature/extended-settings` --- ### 📝 Commits (5) - [`c6df318`](https://github.com/ollama/ollama/commit/c6df31859c31c475306188d4697b67563b20b4f8) Add tests and logic to adjust defaultNumCtx based on parallelism - [`a88a03e`](https://github.com/ollama/ollama/commit/a88a03efbfa305d7b4a6f9c5a0773949b6762ed9) Merge remote-tracking branch 'origin/main' - [`878e626`](https://github.com/ollama/ollama/commit/878e626f70d3754027c1e459b51deee54da5a2f8) Merge remote-tracking branch 'origin/main' - [`5ca8fb6`](https://github.com/ollama/ollama/commit/5ca8fb61bb12319791144c11cc25f2e08c97aa6b) app: add extended settings with tabbed UI - [`581505b`](https://github.com/ollama/ollama/commit/581505bea4c6953e519879e96605ff0ec812caa7) Fix review issues: type safety, dead props, env var handling ### 📊 Changes **14 files changed** (+1520 additions, -168 deletions) <details> <summary>View changed files</summary> 📝 `app/server/server.go` (+49 -1) 📝 `app/store/database.go` (+90 -5) 📝 `app/store/store.go` (+46 -0) 📝 `app/ui/app/codegen/gotypes.gen.ts` (+52 -0) 📝 `app/ui/app/src/components/Settings.tsx` (+99 -161) ➕ `app/ui/app/src/components/settings/GeneralTab.tsx` (+231 -0) ➕ `app/ui/app/src/components/settings/GenerationDefaultsTab.tsx` (+318 -0) ➕ `app/ui/app/src/components/settings/GpuPerformanceTab.tsx` (+167 -0) ➕ `app/ui/app/src/components/settings/NetworkSecurityTab.tsx` (+147 -0) ➕ `app/ui/app/src/components/ui/number-input.tsx` (+126 -0) ➕ `app/ui/app/src/components/ui/select.tsx` (+109 -0) 📝 `app/ui/ui.go` (+15 -1) 📝 `server/routes.go` (+6 -0) 📝 `server/routes_options_test.go` (+65 -0) </details> ### 📄 Description ## Summary - Adds ~22 new configuration fields to the desktop app settings, organized into 4 tabs: General, GPU & Performance, Generation Defaults, and Network & Security - Refactors the monolithic Settings.tsx into modular tab components using Headless UI TabGroup - New settings include: debug logging, keep-alive duration, flash attention, KV cache type, parallel requests, GPU overhead, schedule spread, Vulkan toggle, temperature/top_k/top_p/min_p/repeat_penalty/seed/num_predict defaults, host/port, HTTP/HTTPS proxy, no-proxy, CORS origins, and allowed remotes - Backend: extends Settings struct, adds SQLite migration v15→v16, maps new fields to environment variables, extends server restart triggers - New UI components: Select dropdown (Headless UI Listbox) and NumberInput with +/- controls ### Related PRs This is **Part 1 of 3** in the Ollama Desktop UI improvement series: 1. **This PR** — Extended Settings: Tabbed settings UI with ~22 new configuration fields (General, GPU, Generation, Network) 2. **PR #14528** — [Monitoring Dashboard](https://github.com/ollama/ollama/pull/14528): GPU/memory monitoring, loaded models, system tray extensions 3. **PR #14531** — [Model Manager](https://github.com/ollama/ollama/pull/14531): Full model CRUD, batch ops, copy/alias, per-model settings Each PR is independent and can be merged separately. Together they transform the desktop app from a chat-only interface into a comprehensive Ollama management tool with full settings control, real-time monitoring, and model lifecycle management. ## Changes | Area | Files | Description | |------|-------|-------------| | Backend | `store.go`, `database.go` | 22 new fields in Settings struct, SQLite migration | | Server | `server.go` | Environment variable mappings for new settings | | Restart | `ui.go` | Extended restart trigger conditions | | Settings UI | `Settings.tsx` | Refactored into tabbed layout | | Tabs | `GeneralTab.tsx`, `GpuPerformanceTab.tsx`, `GenerationDefaultsTab.tsx`, `NetworkSecurityTab.tsx` | New tab components | | UI Components | `select.tsx`, `number-input.tsx` | New reusable UI components | | Types | `gotypes.gen.ts` | TypeScript types for new settings fields | ## Design decisions - Generation defaults use nullable types (`*float64`/`*int` in Go, `number | null` in TS) — null means "use model/system default", distinguishing from zero values - GPU & Performance tab hides Vulkan toggle on macOS (not applicable) - CorsOrigins respects Browser setting — won't override wildcard origins when Browser is enabled - All new settings with zero/empty defaults maintain backward compatibility - Generation defaults do NOT trigger server restart (applied per-request) ## Test plan - [ ] Open Settings, verify all 4 tabs render correctly - [ ] Toggle each boolean setting, verify persistence - [ ] Change GPU/network settings, verify server restarts - [ ] Change generation defaults, verify they do NOT trigger restart - [ ] Reset to defaults, verify all fields clear properly - [ ] Build passes: `cd app/ui/app && npm run build` - [ ] TypeScript check passes: `npx tsc --noEmit` <img width="771" height="707" alt="Screenshot_1" src="https://github.com/user-attachments/assets/47a54d28-13c4-4d60-9e20-90addc8f04d4" /> <img width="851" height="872" alt="Screenshot_2" src="https://github.com/user-attachments/assets/cc92ff2a-5866-4abc-ad6a-69db28f1eec7" /> --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
GiteaMirror added the pull-request label 2026-04-16 07:22:22 -05:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/ollama#19984