-
Notifications
You must be signed in to change notification settings - Fork 7
refactor: launcher actions #4222
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: feat/jobs
Are you sure you want to change the base?
Changes from 9 commits
3d94997
cba36e1
d577b60
47c6f76
5ef3d62
a4dd2f2
0ea3ef9
4ec3720
b2a0dd3
63c2b80
6f02989
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,4 +1,5 @@ | ||
| export type EntityTypes = | ||
| | "code-repository" | ||
| | "data-connector" | ||
| | "job-launcher" | ||
| | "session-launcher"; |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -21,3 +21,7 @@ export type RequestedPermission = "write" | "delete" | "change_membership"; | |
| export type Permissions = { | ||
| [key in RequestedPermission]: boolean; | ||
| }; | ||
|
|
||
| export type ProjectPermissions = Permissions & { | ||
| isLoadingPermissions: boolean; | ||
| }; | ||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This is weird. Why is it called ProjectPermissions when it is generic?
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This type is really Permissions plus a loading flag from the hook, not the API's ProjectPermissions. I'll rename it to something like PermissionsWithLoadingState and keep it close to the hook so the generic permissions.types.ts stays API-aligned. |
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Logic error:
You can see above that we trigger fetching data when
projectId && isUninitialized=> this is when the projectId is set and the API fetch has not been triggered yet.If you do not check for
projectId(not null, not empty), thenisUninitializedwill be true forever.