Skip to content

feat: show registry tab as read-only when permission is disabled#1994

Merged
peppescg merged 1 commit intomainfrom
feat/registry-tab-read-only
Apr 14, 2026
Merged

feat: show registry tab as read-only when permission is disabled#1994
peppescg merged 1 commit intomainfrom
feat/registry-tab-read-only

Conversation

@peppescg
Copy link
Copy Markdown
Collaborator

@peppescg peppescg commented Apr 14, 2026

Summary

Read-only mode
Screenshot 2026-04-14 at 18 20 11

  • Always show the Registry settings tab, even when the SETTINGS_REGISTRY_TAB permission is disabled
  • When permission is disabled, form fields are disabled and Save/Reset buttons are hidden (read-only mode)
  • Moved permission check from SettingsTabs into RegistryTab itself, simplifying the tab container

Test plan

  • Existing tests updated: settings-tabs.test.tsx verifies tab is visible but read-only
  • New test added: registry-tab.test.tsx verifies disabled combobox and hidden buttons with permission off
  • All 1788 tests pass
  • Type-check and lint pass

🤖 Generated with Claude Code

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>
Copilot AI review requested due to automatic review settings April 14, 2026 16:19
@peppescg peppescg self-assigned this Apr 14, 2026
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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 new readOnly prop to RegistryForm.
  • 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.

Comment thread renderer/src/common/components/settings/registry/registry-tab.tsx
Copy link
Copy Markdown
Collaborator

@samuv samuv left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🥷

@peppescg peppescg merged commit c03f34e into main Apr 14, 2026
25 checks passed
@peppescg peppescg deleted the feat/registry-tab-read-only branch April 14, 2026 16:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants