Skip to content

Phase 2: Invite links UI to call GQL#1921

Merged
GregorShear merged 20 commits intomainfrom
greg/invites2
Mar 31, 2026
Merged

Phase 2: Invite links UI to call GQL#1921
GregorShear merged 20 commits intomainfrom
greg/invites2

Conversation

@GregorShear
Copy link
Copy Markdown
Contributor

@GregorShear GregorShear commented Mar 11, 2026

  • Migrate invite links from PostgREST/directives to GraphQL
  • Simplify invite link table in Add Users dialog
  • Auto-accept invites (no "click-to-accept" step)

Verify:

  • end-to-end invite flow works through the UI, old directive path is no longer called
Screenshot 2026-03-21 at 12 23 42 PM

@GregorShear GregorShear changed the title invite links use gql now invite links self review Mar 11, 2026
@GregorShear GregorShear force-pushed the greg/invites2 branch 4 times, most recently from fbd9d95 to 4ef535a Compare March 13, 2026 03:20
@GregorShear GregorShear changed the title invite links self review Phase 2: Invite links use GQL [self review] Mar 16, 2026
@GregorShear GregorShear changed the title Phase 2: Invite links use GQL [self review] Phase 2: Invite links UI to call GQL [self review] Mar 16, 2026
@GregorShear GregorShear force-pushed the greg/invites2 branch 5 times, most recently from c6cfc0e to 960a7b9 Compare March 20, 2026 19:02
@GregorShear GregorShear mentioned this pull request Mar 20, 2026
@GregorShear GregorShear changed the base branch from main to greg/rm-stale-schema March 21, 2026 04:13
@GregorShear GregorShear force-pushed the greg/rm-stale-schema branch from 4d8ccc6 to 802db91 Compare March 23, 2026 15:17
Base automatically changed from greg/rm-stale-schema to main March 23, 2026 15:27
@GregorShear GregorShear force-pushed the greg/invites2 branch 2 times, most recently from 4003bff to 401a159 Compare March 23, 2026 18:12
@GregorShear GregorShear changed the title Phase 2: Invite links UI to call GQL [self review] Phase 2: Invite links UI to call GQL Mar 23, 2026
@GregorShear GregorShear marked this pull request as ready for review March 23, 2026 18:37
@GregorShear GregorShear requested a review from a team as a code owner March 23, 2026 18:37
Copy link
Copy Markdown
Member

@kiahna-tucker kiahna-tucker left a comment

Choose a reason for hiding this comment

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

Releasing review comments while manual testing is underway.

Given the Active Invite Links table no longer has selectable rows, please remove all remaining instances of SelectTableStoreNames.ACCESS_GRANTS_LINKS. At least one instance exists within the codebase given src/context/Zustand/invariableStores.ts is not in the change list.

Comment thread src/api/gql/inviteLinks.ts Outdated
Comment thread src/app/guards/GrantGuard/index.tsx
Comment thread src/app/guards/GrantGuard/RedeemInviteLink.tsx
Comment thread src/app/guards/GrantGuard/RedeemInviteLink.tsx
Comment thread src/components/tables/AccessGrants/AccessLinks/index.tsx Outdated
Comment on lines +158 to +162
if (error.networkError) {
setTableState({ status: TableStatuses.NETWORK_FAILED });
} else {
setTableState({ status: TableStatuses.TECHNICAL_DIFFICULTIES });
}
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

This syntax can be consolidated:

setTableState({ status: error.networkError ? TableStatuses.NETWORK_FAILED : TableStatuses.TECHNICAL_DIFFICULTIES });

Comment thread src/components/tables/AccessGrants/AccessLinks/index.tsx
Comment thread src/components/tables/AccessGrants/AccessLinks/index.tsx Outdated
Comment thread src/context/URQL.tsx Outdated
Comment thread src/components/tables/AccessGrants/AccessLinks/index.tsx Outdated
Comment thread src/context/URQL.tsx
Comment on lines +76 to +81
createInviteLink(_result, _args, cache) {
invalidateQuery(cache, 'inviteLinks');
},
deleteInviteLink(_result, _args, cache) {
invalidateQuery(cache, 'inviteLinks');
},
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

I am assuming (hoping) that was only have to manually manage this currently since we are not using the GraphCache right now?

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Did some more reading and this is not true. Oh well.

Comment thread src/app/guards/GrantGuard/RedeemInviteLink.tsx Outdated
Copy link
Copy Markdown
Member

@travjenkins travjenkins left a comment

Choose a reason for hiding this comment

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

some changes needed

Comment thread src/components/inputs/PrefixedName/PrefixSelector.tsx
@travjenkins
Copy link
Copy Markdown
Member

I tried testing with an incorrect backend (which is how I found this)

Looks like when there is an issue fetching data the error message is wrong or we are missing an alert at the top of the modal.

image

Comment thread src/components/login/SSO/useSSOSignIn.ts
Copy link
Copy Markdown
Member

@travjenkins travjenkins left a comment

Choose a reason for hiding this comment

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

1 small change to add a new LR event. Working on testing now.

@GregorShear
Copy link
Copy Markdown
Contributor Author

Now showing the error up top to agree with the table states... (network error show here, but would also apply to technical-difficulty error state)

Screenshot 2026-03-30 at 2 56 40 PM

@GregorShear GregorShear added the change:planned This is a planned change label Mar 30, 2026
Comment thread src/components/tables/AccessGrants/AccessLinks/Row.tsx Outdated
{hasData ? (
<TableFooter>
<TableRow>
<TablePagination
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Had video call - but adding this comment so we have a history.

Pagination is a bit messed up when you have multiple pages and click back. The first time the page updates but the data in the table does not.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

There is another issue - might be related.

If you block the gql endpoint and click through pagination it is not clear that no data was sent back. If that happens the "network issue" should show up on the tabe.

Copy link
Copy Markdown
Member

@travjenkins travjenkins left a comment

Choose a reason for hiding this comment

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

lgtm

@GregorShear GregorShear merged commit eac2f05 into main Mar 31, 2026
6 checks passed
@GregorShear GregorShear deleted the greg/invites2 branch March 31, 2026 15:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

change:planned This is a planned change

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants