feat(ui): flexible admin UI sections for embedded contexts#2869
Merged
crivetimihai merged 10 commits intomainfrom Feb 16, 2026
Merged
feat(ui): flexible admin UI sections for embedded contexts#2869crivetimihai merged 10 commits intomainfrom
crivetimihai merged 10 commits intomainfrom
Conversation
Add env controls to hide UI sections/header items (including embedded mode defaults). Support per-request ?ui_hide= overrides persisted via cookie and prevent hidden sections from loading data. Update Helm values/schema, docker-compose, docs, and add unit + JS tests. Signed-off-by: Mihai Criveti <crivetimihai@gmail.com>
Prefer the Overview tab when available and fall back to Gateways for minimal DOM states. Align JS tab tests with the restored default tab behavior. Signed-off-by: Mihai Criveti <crivetimihai@gmail.com>
Deduplicate UI_HIDABLE_SECTIONS, UI_HIDABLE_HEADER_ITEMS, and UI_HIDE_SECTION_ALIASES constants — define once in config.py, import in admin.py. Harden normalizeTabName() against CSS selector injection by restricting to [a-z0-9-] characters. Add max_age (30 days) to the ui_hide_sections cookie so preferences persist across browser sessions. Filter global search results to exclude hidden sections. Expand JS test coverage: normalizeTabName edge cases, admin-only tab blocking, idempotency guard, getDefaultTabName priority, isTabAvailable, getUiHiddenSections/Tabs normalization, and global search filtering. Signed-off-by: Mihai Criveti <crivetimihai@gmail.com>
…lity Cover _normalize_ui_hide_values, cookie set/delete behavior, section-aware data loading, config validators, isTabHidden, and resolveTabForNavigation. Signed-off-by: Mihai Criveti <crivetimihai@gmail.com>
498b525 to
300e148
Compare
NoDecode() (instance) in Annotated metadata is not found by pydantic-settings' `NoDecode in field.metadata` check, causing json.loads to be called on raw CSV strings. Use NoDecode (class) which matches correctly. Also adds ADR-040 and admin UI customization guide. Signed-off-by: Mihai Criveti <crivetimihai@gmail.com>
300e148 to
0eb7f22
Compare
Collaborator
|
Some considerations on testing the changes:
|
Signed-off-by: Mihai Criveti <crivetimihai@gmail.com>
Signed-off-by: Mihai Criveti <crivetimihai@gmail.com>
Signed-off-by: Mihai Criveti <crivetimihai@gmail.com>
Member
Author
|
More items can be hidden now:
|
Collaborator
vishu-bh
pushed a commit
that referenced
this pull request
Feb 18, 2026
* feat(ui): flexible admin UI sections for embedded contexts Add env controls to hide UI sections/header items (including embedded mode defaults). Support per-request ?ui_hide= overrides persisted via cookie and prevent hidden sections from loading data. Update Helm values/schema, docker-compose, docs, and add unit + JS tests. Signed-off-by: Mihai Criveti <crivetimihai@gmail.com> * fix(ui): restore default tab fallback Prefer the Overview tab when available and fall back to Gateways for minimal DOM states. Align JS tab tests with the restored default tab behavior. Signed-off-by: Mihai Criveti <crivetimihai@gmail.com> * fix(ui): review fixes for admin UI section visibility Deduplicate UI_HIDABLE_SECTIONS, UI_HIDABLE_HEADER_ITEMS, and UI_HIDE_SECTION_ALIASES constants — define once in config.py, import in admin.py. Harden normalizeTabName() against CSS selector injection by restricting to [a-z0-9-] characters. Add max_age (30 days) to the ui_hide_sections cookie so preferences persist across browser sessions. Filter global search results to exclude hidden sections. Expand JS test coverage: normalizeTabName edge cases, admin-only tab blocking, idempotency guard, getDefaultTabName priority, isTabAvailable, getUiHiddenSections/Tabs normalization, and global search filtering. Signed-off-by: Mihai Criveti <crivetimihai@gmail.com> * test(ui): add comprehensive test coverage for admin UI section visibility Cover _normalize_ui_hide_values, cookie set/delete behavior, section-aware data loading, config validators, isTabHidden, and resolveTabForNavigation. Signed-off-by: Mihai Criveti <crivetimihai@gmail.com> * fix(config): use NoDecode class instead of instance for env parsing NoDecode() (instance) in Annotated metadata is not found by pydantic-settings' `NoDecode in field.metadata` check, causing json.loads to be called on raw CSV strings. Use NoDecode (class) which matches correctly. Also adds ADR-040 and admin UI customization guide. Signed-off-by: Mihai Criveti <crivetimihai@gmail.com> * Fixes Signed-off-by: Mihai Criveti <crivetimihai@gmail.com> * fix(ui): expand admin section hiding coverage Signed-off-by: Mihai Criveti <crivetimihai@gmail.com> * test(metrics): stabilize db engine detection setup test Signed-off-by: Mihai Criveti <crivetimihai@gmail.com> * fix(playwright): stabilize admin ui tab and search flows Signed-off-by: Mihai Criveti <crivetimihai@gmail.com> * Fixes Signed-off-by: Mihai Criveti <crivetimihai@gmail.com> --------- Signed-off-by: Mihai Criveti <crivetimihai@gmail.com> Signed-off-by: Vishu Bhatnagar <vishu.bhatnagar@ibm.com>
cafalchio
pushed a commit
that referenced
this pull request
Feb 26, 2026
* feat(ui): flexible admin UI sections for embedded contexts Add env controls to hide UI sections/header items (including embedded mode defaults). Support per-request ?ui_hide= overrides persisted via cookie and prevent hidden sections from loading data. Update Helm values/schema, docker-compose, docs, and add unit + JS tests. Signed-off-by: Mihai Criveti <crivetimihai@gmail.com> * fix(ui): restore default tab fallback Prefer the Overview tab when available and fall back to Gateways for minimal DOM states. Align JS tab tests with the restored default tab behavior. Signed-off-by: Mihai Criveti <crivetimihai@gmail.com> * fix(ui): review fixes for admin UI section visibility Deduplicate UI_HIDABLE_SECTIONS, UI_HIDABLE_HEADER_ITEMS, and UI_HIDE_SECTION_ALIASES constants — define once in config.py, import in admin.py. Harden normalizeTabName() against CSS selector injection by restricting to [a-z0-9-] characters. Add max_age (30 days) to the ui_hide_sections cookie so preferences persist across browser sessions. Filter global search results to exclude hidden sections. Expand JS test coverage: normalizeTabName edge cases, admin-only tab blocking, idempotency guard, getDefaultTabName priority, isTabAvailable, getUiHiddenSections/Tabs normalization, and global search filtering. Signed-off-by: Mihai Criveti <crivetimihai@gmail.com> * test(ui): add comprehensive test coverage for admin UI section visibility Cover _normalize_ui_hide_values, cookie set/delete behavior, section-aware data loading, config validators, isTabHidden, and resolveTabForNavigation. Signed-off-by: Mihai Criveti <crivetimihai@gmail.com> * fix(config): use NoDecode class instead of instance for env parsing NoDecode() (instance) in Annotated metadata is not found by pydantic-settings' `NoDecode in field.metadata` check, causing json.loads to be called on raw CSV strings. Use NoDecode (class) which matches correctly. Also adds ADR-040 and admin UI customization guide. Signed-off-by: Mihai Criveti <crivetimihai@gmail.com> * Fixes Signed-off-by: Mihai Criveti <crivetimihai@gmail.com> * fix(ui): expand admin section hiding coverage Signed-off-by: Mihai Criveti <crivetimihai@gmail.com> * test(metrics): stabilize db engine detection setup test Signed-off-by: Mihai Criveti <crivetimihai@gmail.com> * fix(playwright): stabilize admin ui tab and search flows Signed-off-by: Mihai Criveti <crivetimihai@gmail.com> * Fixes Signed-off-by: Mihai Criveti <crivetimihai@gmail.com> --------- Signed-off-by: Mihai Criveti <crivetimihai@gmail.com>
3 tasks
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.


Summary
Closes #2075
Adds flexible Admin UI visibility controls for embedded contexts, allowing specific UI sections and header controls to be hidden without triggering backend data loads. Hidden/
invalid hash navigation is redirected to the first available visible tab.
Configuration
New env vars:
Per-request override:
What Changed