Remove Permission tooltip from OSS#2009
Conversation
There was a problem hiding this comment.
Pull request overview
This PR removes the “Permission needed” tooltip UI from the OSS React UI by deleting the shared PermissionNeededTooltip component and removing its usage from affected screens.
Changes:
- Deleted
PermissionNeededTooltipfrom@openops/components/ui. - Removed tooltip wrapping from the Connections header “New Connection” button and the Flow Versions “Use as Draft” menu item.
- Updated Connections permission check to use
Permission.WRITE_APP_CONNECTION.
Reviewed changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated 2 comments.
| File | Description |
|---|---|
| packages/ui-components/src/ui/permission-needed-tooltip.tsx | Removes the tooltip component implementation from the UI components package. |
| packages/react-ui/src/app/features/connections/components/connection-table.tsx | Drops tooltip wrapper and updates permission check; keeps the “New Connection” trigger disabled when lacking permission. |
| packages/react-ui/src/app/features/builder/flow-versions/flow-versions-card.tsx | Drops tooltip wrapper from the “Use as Draft” dropdown action. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| const ConnectionsHeader = () => { | ||
| const { checkAccess } = useAuthorization(); | ||
| const userHasPermissionToWriteAppConnection = checkAccess(); | ||
| const userHasPermissionToWriteAppConnection = checkAccess( | ||
| Permission.WRITE_APP_CONNECTION, | ||
| ); |
There was a problem hiding this comment.
useAuthorization().checkAccess is currently defined as a zero-arg callback in authorization-hooks.ts (useCallback(() => true, [])). Calling it with Permission.WRITE_APP_CONNECTION will fail TypeScript type-checking unless checkAccess is updated to accept a permission argument (even as a no-op in OSS) or this call is reverted to checkAccess().
There was a problem hiding this comment.
yes, I think you will get a "Expected 0 arguments, but got 1" ts-error
There was a problem hiding this comment.
i changed it so we have the same interface as in internal for checkAccess function
|



Part of OPS-3675