Skip to content

Comments

feat(gateway): system prompt profiles UI with CRUD, section options, model overrides#190

Open
penso wants to merge 6 commits intomainfrom
settings-system-prompt
Open

feat(gateway): system prompt profiles UI with CRUD, section options, model overrides#190
penso wants to merge 6 commits intomainfrom
settings-system-prompt

Conversation

@penso
Copy link
Collaborator

@penso penso commented Feb 19, 2026

Summary

  • Profile CRUD: create, delete, and set-default prompt profiles from the settings UI via new system_prompt.config.create, .delete, .set_default RPC methods
  • Section Options panel: toggle runtime fields, user details mode, memory bootstrap options, and datetime tail mode per profile — changes reflected in live preview
  • Enabled Sections grid: enable/disable individual prompt sections per profile (required sections locked)
  • Model Overrides UI: route specific providers/models to different prompt profiles using glob patterns (e.g. *sonnet*, openai), with reorderable list, add/remove, and save via system_prompt.config.overrides.save RPC
  • Schema simplification: flatten PromptProfileOverride TOML schema — provider and model are now top-level fields instead of nested under [match] (backward compatible)
  • Polish: collapsible template variables (hidden by default), preview profile name display, inline style → Tailwind migration, indentation fix
  • Tests: scope authorization tests for all new RPCs, unit tests for apply_section_options and parse_enabled_sections, 5 new E2E tests

Validation

Completed

  • biome check --write (JS)
  • cargo +nightly-2025-11-30 fmt --all -- --check (Rust)
  • cargo +nightly-2025-11-30 clippy --workspace --all-targets -- -D warnings
  • cargo test (all pass, 499 gateway tests)
  • Tailwind CSS rebuilt
  • Merged main, no conflicts

Remaining

  • ./scripts/local-validate.sh
  • E2E playwright tests (npx playwright test)

Manual QA

  1. Navigate to Settings → System Prompt
  2. Create a new profile, verify it appears in the dropdown
  3. Set the new profile as default, verify label updates
  4. Delete a non-default profile
  5. Toggle Section Options (runtime checkboxes, user details mode, memory options, datetime tail mode) — verify live preview updates
  6. Toggle enabled sections in the grid — verify required sections are locked
  7. Expand Model Overrides, add an override with provider/model globs, reorder, save
  8. Reload page — verify overrides persist
  9. Expand/collapse Template Variables list
  10. Verify existing TOML configs with [[prompt_profiles.overrides]] using [match] tables still work (backward compat)

…model overrides

Add comprehensive system prompt profile management to the settings UI:

- Profile CRUD: create, delete, and set-default via new RPC methods
- Section Options panel: toggle runtime, user details, memory bootstrap,
  and datetime tail options per profile with live preview
- Enabled Sections toggle grid: enable/disable individual prompt sections
  (required sections locked)
- Model Overrides UI: route providers/models to different profiles using
  glob patterns with reorderable list and save
- Flatten PromptProfileOverride TOML schema (backward compatible)
- Collapsible template variables, preview profile name display
- Replace inline styles with Tailwind classes
- E2E tests for all new features
@codspeed-hq
Copy link
Contributor

codspeed-hq bot commented Feb 19, 2026

Merging this PR will degrade performance by 12.02%

❌ 2 regressed benchmarks
✅ 37 untouched benchmarks
⏩ 5 skipped benchmarks1

⚠️ Please fix the performance issues or acknowledge them on CodSpeed.

Performance Changes

Benchmark BASE HEAD Efficiency
config_validate_toml 1.9 ms 2.2 ms -12.02%
full_config_boot_path 3.2 ms 3.6 ms -11.13%

Comparing settings-system-prompt (5c53dfd) with main (38b8ca1)

Open in CodSpeed

Footnotes

  1. 5 benchmarks were skipped, so the baseline results were used instead. If they were deleted from the codebase, click here and archive them to remove them from the performance reports.

@codecov
Copy link

codecov bot commented Feb 21, 2026

Codecov Report

❌ Patch coverage is 79.41176% with 350 lines in your changes missing coverage. Please review.

Files with missing lines Patch % Lines
crates/gateway/src/methods.rs 35.51% 305 Missing ⚠️
crates/gateway/src/chat.rs 91.98% 25 Missing ⚠️
crates/agents/src/prompt.rs 97.44% 20 Missing ⚠️

📢 Thoughts on this report? Let us know!

# Conflicts:
#	CHANGELOG.md
#	crates/gateway/src/assets/style.css
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