Skip to content

refactor: Migrate system preferences to field-based endpoint and remove deprecated endpoint#4958

Open
angelplusultra wants to merge 3 commits intomasterfrom
4957-remove-deprecated-admin-route
Open

refactor: Migrate system preferences to field-based endpoint and remove deprecated endpoint#4958
angelplusultra wants to merge 3 commits intomasterfrom
4957-remove-deprecated-admin-route

Conversation

@angelplusultra
Copy link
Contributor

Pull Request Type

  • ✨ feat
  • 🐛 fix
  • ♻️ refactor
  • 💄 style
  • 🔨 chore
  • 📝 docs

Relevant Issues

resolves #4957

What is in this change?

Migrates all frontend usages of the deprecated Admin.systemPreferences() service to the new field-based Admin.systemPreferencesByFields() service, then removes the deprecated endpoint and service.

Changes:

  • EmbeddingTextSplitterPreference - Now requests only text_splitter_chunk_size, text_splitter_chunk_overlap, max_embed_chunk_size
  • CustomSiteSettings - Now requests only meta_page_title, meta_page_favicon
  • FooterCustomization - Now requests only footer_data
  • ExperimentalFeatures - Now requests only feature_flags
  • WorkspaceAgentConfig - Removed unnecessary preferences fetch (wasn't being used)
  • Deleted GET /admin/system-preferences endpoint from server
  • Deleted Admin.systemPreferences() method from frontend

This improves efficiency by only fetching the specific settings each component needs rather than fetching all system preferences.

Additional Information

The new endpoint GET /admin/system-preferences-for?labels=field1,field2 was already in place and working. This PR completes the migration by updating all consumers and removing the deprecated code.

Developer Validations

  • I ran yarn lint from the root of the repo & committed changes
  • Relevant documentation has been updated
  • I have tested my code functionality
  • Docker build succeeds locally

@angelplusultra angelplusultra linked an issue Feb 2, 2026 that may be closed by this pull request
@angelplusultra angelplusultra added the PR:needs review Needs review by core team label Feb 2, 2026
Copy link
Collaborator

@shatfield4 shatfield4 left a comment

Choose a reason for hiding this comment

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

Fixed minor issue by destructuring settings object in CustomSiteSettings component.

LGTM

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

PR:needs review Needs review by core team

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[FEAT]: Remove deprecated admin route

3 participants