feat: show registry tab as read-only when permission is disabled#1994
Merged
feat: show registry tab as read-only when permission is disabled#1994
Conversation
Instead of hiding the Registry settings tab entirely when the SETTINGS_REGISTRY_TAB permission is disabled, always show the tab but disable form fields and hide action buttons. The permission check now lives in RegistryTab itself rather than in SettingsTabs. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Contributor
There was a problem hiding this comment.
Pull request overview
This PR changes Settings so the Registry tab is always visible, and becomes read-only (disabled fields + hidden Save/Reset actions) when the SETTINGS_REGISTRY_TAB permission is disabled.
Changes:
- Removed permission-based filtering from
SettingsTabs, always rendering the Registry tab/contents. - Added permission-aware read-only mode inside
RegistryTab, propagated via a newreadOnlyprop toRegistryForm. - Updated/added tests to verify the Registry tab remains visible but non-editable when permission is off.
Reviewed changes
Copilot reviewed 5 out of 5 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
| renderer/src/common/components/settings/tabs/settings-tabs.tsx | Always renders Registry tab and content; removes tab-container permission gating. |
| renderer/src/common/components/settings/tabs/tests/settings-tabs.test.tsx | Updates test to assert Registry tab is visible and read-only when permission is disabled. |
| renderer/src/common/components/settings/tabs/tests/registry-tab.test.tsx | Adds PermissionsProvider support and a new read-only behavior test for RegistryTab. |
| renderer/src/common/components/settings/registry/registry-tab.tsx | Moves permission check into RegistryTab and derives readOnly state. |
| renderer/src/common/components/settings/registry/registry-form.tsx | Adds readOnly prop to disable fields and hide Save/Reset actions. |
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
Read-only mode

SETTINGS_REGISTRY_TABpermission is disabledSettingsTabsintoRegistryTabitself, simplifying the tab containerTest plan
settings-tabs.test.tsxverifies tab is visible but read-onlyregistry-tab.test.tsxverifies disabled combobox and hidden buttons with permission off🤖 Generated with Claude Code