fix: disable non-current projects in switcher when NAO_DEFAULT_PROJECT_PATH is set#1177
Open
Nithishvb wants to merge 1 commit into
Open
fix: disable non-current projects in switcher when NAO_DEFAULT_PROJECT_PATH is set#1177Nithishvb wants to merge 1 commit into
Nithishvb wants to merge 1 commit into
Conversation
Contributor
|
This PR was auto-closed. Only contributors approved with Maintainers review auto-closed issues daily. Issues that do not meet the quality bar in CONTRIBUTING.md will not be reopened or receive a reply. If a maintainer replies See CONTRIBUTING.md. |
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.
Closes: #1172
When self-hosting with
NAO_DEFAULT_PROJECT_PATHset, the project switcher in settings silently ignored user selections — clicking a different project did nothing with no feedback.## Changes
system.routes.ts): ExposedhasDefaultProjectPathin thegetPublicConfigendpoint so the frontend knows when the env var is set.project-selector.tsx): Added optionaldisabledProjectIdsprop toProjectSelector. When provided, matching items are rendered with Radix's nativedisabledattribute (greyed out, not clickable).sidebar-settings-nav.tsx): ComputesdisabledProjectIdsfrom theisProjectPinnedflag and passes it toProjectSelector.sidebar.tsx): DerivesisProjectPinnedfrom config (!isCloud && hasDefaultProjectPath) and threads it to the settings nav.Now the dropdown remains openable so users can see all projects, but non-current entries are visibly disabled with no interaction possible — making the constraint obvious instead of silently doing nothing