-
Notifications
You must be signed in to change notification settings - Fork 13.5k
bug: Sidebar items depending on reactive settings do not update until page reload #39817
Description
Problem Statement
When an admin changes settings that control sidebar item visibility (for example Feature Preview navigation settings), the Account sidebar does not update reactively and requires a full page reload for the changes to appear.
This was observed when enabling/disabling Feature Preview -> Navigation -> Filters and secondary sidebar, but the issue appears to be related to the sidebar update mechanism itself rather than a specific feature.
Current Behavior
After changing a setting that affects sidebar item visibility, the sidebar does not update immediately. The change is only reflected after a full page reload.
Expected Behavior
Sidebar items should appear immediately after the related setting is changed, without requiring a page reload.
Steps to Reproduce
- Go to Admin -> Settings -> Accounts
- Enable Feature Preview
- Inside Feature Preview, enable Navigation -> Filters and secondary sidebar
- Navigate back to Home without reloading
- Observe that the Filters / secondary sidebar does not appear
- Reload the page
- The Filters / secondary sidebar now appears
Possible Root Cause
The issue may be related to how sidebar items are managed and updated in 'apps/meteor/client/lib/createSidebarItems.ts' when settings change.
Settings themselves appear to update reactively, but the sidebar/navigation does not re-render until a full page reload, which suggests the sidebar update mechanism may not be reacting to setting changes.
It may be related to how sidebar items are registered or how subscribers are notified when settings change, but this would need confirmation from maintainers.
Suggested Fix (High Level)
Possible approaches could include:
- Ensuring sidebar items are re-evaluated when relevant settings change
- Triggering sidebar updates when reactive settings change
- Reviewing the sidebar subscription/update mechanism
