== Background
Due to complications arising from using two different storage mechanisms for some Vector 2022 features (user options for logged-in users and cookies via clientPreferences.js for anons) it was discovered that the night mode "exclude" feature does not work consistently for anonymous users. The "exclude" configuration, which should prevent some pages from appearing in dark mode, works for logged-in users, but not for anonymous user who have set a clientPreferences cookie via the Appearance menu.
**Reproduction steps**
1. As an anonymous user, on https://en.wikipedia.beta.wmflabs.org/ ensure you have deleted the `enwikimwclientpreferences` cookie.
2. Go to https://en.wikipedia.beta.wmflabs.org/wiki/Banana - the Appearance settings should be greyed out.
3. Go to https://en.wikipedia.beta.wmflabs.org - change the appearanse menu settings to 'night mode'
4. Go back to https://en.wikipedia.beta.wmflabs.org/wiki/Banana
**expected**
- The Appearance menu settings should continue to be greyed out after you set the client-preferences cookie.
**observed**
- The Appearance menu setting become available after setting the client-preferences cookie.
== User story
- When switching between logged-in and logged-out, I expect the same pages to be excluded from night mode.
== Requirements
- On pages that are excluded from night-mode via configuration (e.g. `$wgVectorNightModeOptions['exclude']['mainpage'] = true`) the night-mode settings in the Appearance menu should be greyed out for logged-in users, logged-out users, and when a logged-out user changes the setting on a different page, then goes back to the excluded page, they should still be greyed out.
=== BDD
- For QA engineer to fill out
=== Test Steps
- For QA engineer to fill out
== Design
- Add mockups and design requirements
== Acceptance criteria
[ ] If I am an anonymous user, and I have selected night mode from the appearance menu in Vector, then I go to a page that should have night mode disabled, e.g. https://en.wikipedia.beta.wmflabs.org/wiki/Banana the night mode options should be disable in the appearance menu.
== Communication criteria - does this need an announcement or discussion?
- N/A