Disable Specific User Personas#65
Open
NeonRyan wants to merge 12 commits into
Open
Conversation
…Context - Added useEffect to hydrate advisor preferences on modal open. - Introduced setAllAdvisorsEnabled function for bulk enabling/disabling advisors. - Updated AppConfigContext to handle fetching and persisting advisor preferences from the backend. - Improved local state management for disabled advisors with optimistic updates.
4489333 to
72de25c
Compare
NeonDaniel
requested changes
May 21, 2026
Member
NeonDaniel
left a comment
There was a problem hiding this comment.
Left initial feedback based on reading through changes. I will pull and test locally next and comment with any observed bugs
Comment on lines
+175
to
+180
| def _warn_empty_allowed_advisors(self): | ||
| if self.allowed_advisors is not None and len(self.allowed_advisors) == 0: | ||
| logger.warning( | ||
| "allowed_advisors is set to an empty list; no advisors will be available" | ||
| ) | ||
| return self |
Member
There was a problem hiding this comment.
Is there any case where this would lead to a working application?
I think we should decide to either raise an exception here, or treat an empty list the same as None
Collaborator
There was a problem hiding this comment.
No the app won't work if every advisor is filtered out. I think it makes the most sense to raise an exception here so we catch it right away.
Member
|
Two suggestions:
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
Backend
allowed_advisors) tophd_config.yaml, allowing admins to restrict which personas are available without removing their config files.persona_filter.pythat applies a two-layer filter: system whitelist → user blocklist.disabled_advisorsfield to theUsermodel.GET/PUT /api/me/advisor-preferencesendpoints for retrieving and persisting user advisor preferences, with validation against registered persona IDs.chat-streamorchestrator so disabled/disallowed advisors are excluded from LLM ranking and response generation.get_frontend_config()omits personas not in the system whitelist, preventing disallowed advisors from appearing in the UI at all.allowed_advisorsis configured as an empty list (no advisors available).Frontend
New Toggle component - small, accessible on/off switch used by both the Settings modal and the in-chat advisor dropdown.
AppConfigContext now owns the advisor enable/disable state
The ability to turn all on and off was added.
Issues
Closes #64
Other Notes
Backend
get_top_personasmethod onImprovedOrchestratornow accepts an optionalallowed_idsparameter. Existing callers that don't pass it will see no behavior change (defaults to all registered personas).test_persona_filter.py,test_advisor_preferences.py, and new cases intest_persona_config.pycover the filtering logic, API endpoints, and config validation.Frontend