Temporary hide settings page - #47
Merged
LuisSchweinberger merged 1 commit intoMay 29, 2026
Merged
Conversation
There was a problem hiding this comment.
Pull request overview
This PR adds a temporary environment-driven feature flag to hide the Settings page until authentication is implemented, removing it from navigation and preventing direct access.
Changes:
- Introduces a
DISABLE_SETTINGSenv variable and exposes it via the client env context. - Hides the Settings menu entry when the flag is enabled.
- Redirects away from
/settingswhen the flag is enabled.
Reviewed changes
Copilot reviewed 4 out of 4 changed files in this pull request and generated 4 comments.
| File | Description |
|---|---|
| src/lib/env/MnestixEnv.ts | Adds DISABLE_SETTINGS to the public env surface and parses it from process.env. |
| src/app/EnvProvider.tsx | Adds DISABLE_SETTINGS to the client-side initial env values. |
| src/layout/menu/MainMenu.tsx | Conditionally removes the Settings navigation item when the flag is enabled. |
| src/app/[locale]/settings/page.tsx | Redirects users away from the Settings page when the flag is enabled. |
Comments suppressed due to low confidence (1)
src/layout/menu/MainMenu.tsx:126
- New behavior hides the settings entry when
env.DISABLE_SETTINGSis true, but the existing component tests forMainMenuonly assert that/settingsis present for admins. Please add/update a test case inMainMenu.spec.tsxthat setsDISABLE_SETTINGS: truein the mocked env and asserts the settings menu item is not rendered.
// HACK: Temporary workaround to hide the settings page until auth is implemented correctly.
if (checkIfRouteIsAllowed('/settings') && !env.DISABLE_SETTINGS) {
const settingsMenu = {
label: t('settings'),
to: '/settings',
icon: <Settings data-testid="settings-menu-icon" />,
};
basicMenu.push(settingsMenu);
}
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.
This pull request introduces a temporary feature flag to disable the settings page until authentication is properly implemented. The main changes add a
DISABLE_SETTINGSenvironment variable, which, when set, hides the settings page from both navigation and direct access.Feature flag for disabling settings page:
DISABLE_SETTINGSenvironment variable to the environment configuration and initial values (src/lib/env/MnestixEnv.ts,src/app/EnvProvider.tsx). [1] [2] [3]DISABLE_SETTINGSis true, preventing direct access (src/app/[locale]/settings/page.tsx). (src/app/[locale]/settings/page.tsxR27-R31)DISABLE_SETTINGSis true (src/layout/menu/MainMenu.tsx).Developer notes:
DISABLE_SETTINGSflag is clearly marked as a temporary workaround and should be removed once authentication is implemented. [1] src/app/[locale]/settings/page.tsxR27-R31, [2]