feat(invitations): added invitations query hook, migrated all tool files to use absolute imports#3092
Merged
waleedlatif1 merged 4 commits intostagingfrom Jan 31, 2026
Merged
feat(invitations): added invitations query hook, migrated all tool files to use absolute imports#3092waleedlatif1 merged 4 commits intostagingfrom
waleedlatif1 merged 4 commits intostagingfrom
Conversation
…les to use absolute imports
|
The latest updates on your projects. Learn more about Vercel for GitHub. |
Collaborator
Author
|
@greptile |
Contributor
Greptile OverviewGreptile SummaryThis PR introduces a centralized invitations query hook and migrates 269 tool files from relative to absolute imports for improved maintainability and consistency. Key Changes
Technical Improvements
Confidence Score: 5/5
Important Files Changed
Sequence DiagramsequenceDiagram
participant User
participant InviteModal
participant InvitationsHooks
participant TanstackQuery
participant API
participant PermissionsProvider
User->>InviteModal: Open invite modal
InviteModal->>InvitationsHooks: usePendingInvitations(workspaceId)
InvitationsHooks->>TanstackQuery: useQuery(invitationKeys.list())
TanstackQuery->>API: GET /api/workspaces/invitations
API-->>TanstackQuery: Return pending invitations
TanstackQuery-->>InviteModal: Display existing invitations
User->>InviteModal: Add email(s) and set permissions
User->>InviteModal: Click "Invite"
InviteModal->>InvitationsHooks: useBatchSendWorkspaceInvitations()
InvitationsHooks->>TanstackQuery: useMutation()
TanstackQuery->>API: POST /api/workspaces/invitations (parallel)
API-->>TanstackQuery: Return results
TanstackQuery->>TanstackQuery: Invalidate invitationKeys.list()
TanstackQuery-->>InviteModal: Success/failure results
InviteModal-->>User: Show updated invitation list
User->>InviteModal: Modify member permissions
User->>InviteModal: Click "Save Changes"
InviteModal->>InvitationsHooks: useUpdateWorkspacePermissions()
InvitationsHooks->>TanstackQuery: useMutation()
TanstackQuery->>API: PATCH /api/workspaces/{id}/permissions
API-->>TanstackQuery: Return updated permissions
TanstackQuery->>TanstackQuery: Invalidate workspaceKeys.permissions()
TanstackQuery->>PermissionsProvider: Refresh permissions context
PermissionsProvider-->>InviteModal: Updated permissions
InviteModal-->>User: Show success
User->>InviteModal: Cancel invitation
InviteModal->>InvitationsHooks: useCancelWorkspaceInvitation()
InvitationsHooks->>TanstackQuery: useMutation()
TanstackQuery->>API: DELETE /api/workspaces/invitations/{id}
API-->>TanstackQuery: Confirmation
TanstackQuery->>TanstackQuery: Invalidate invitationKeys.list()
TanstackQuery-->>InviteModal: Removed from list
InviteModal-->>User: Show updated list
|
apps/sim/app/workspace/[workspaceId]/w/components/sidebar/hooks/use-workspace-management.ts
Show resolved
Hide resolved
...d]/w/components/sidebar/components/workspace-header/components/invite-modal/invite-modal.tsx
Outdated
Show resolved
Hide resolved
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes and found 1 potential issue.
Bugbot Autofix is OFF. To automatically fix reported issues with Cloud Agents, enable Autofix in the Cursor dashboard.
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
Type of Change
Testing
Tested manually
Checklist