-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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
GetAuthenticatedUser in Dashboard #19142
Conversation
8e41547
to
3c3480d
Compare
3c3480d
to
21fd862
Compare
e44ab89
to
f3a1cc4
Compare
b0bfab8
to
0881a30
Compare
c71ddd7
to
79b52fc
Compare
996e47a
to
9155f4d
Compare
@akosyakov and @mustard-mh, I think everything is addressed now. Pray for another round of tests. |
@@ -21,37 +20,24 @@ export default function SelectIDE(props: SelectIDEProps) { | |||
const { user, setUser } = useContext(UserContext); | |||
const updateUser = useUpdateCurrentUserMutation(); | |||
|
|||
// Only exec once when we access this component | |||
useEffect(() => { |
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.
it is not required anymore? cc @mustard-mh
2091f1f
to
7664094
Compare
Updating the email address on Account page was broken. 5faa671 should fix and clean up more. That said, I need another test round. Going to use the the recorded tests of @akosyakov for the first time 🎉 |
@@ -312,3 +313,53 @@ export class UserService { | |||
log.info("User verified", { userId: user.id }); | |||
} | |||
} | |||
|
|||
// TODO: refactor where this is referenced so it's more clearly tied to just analytics-tracking | |||
// Let other places rely on the ProfileDetails type since that's what we store |
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.
need to remove this comment 🙈
but that describes exactly what was done here, the flat shape for analytics is not to be used on dashboard, as we already have ProfileDetails. especially, during the actual task of adapting new API this broke silently, as ProfileDetails and this one are not 100% compatible.
also fix toDurationString call
9afce3a
to
6071bd0
Compare
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.
it works well, i reviewed code and tested usual flow, i did not test dedicated setup and then a user is owner of installation.
Also it would be good not introducing a dependency on API from db, only keep it in server.
/unhold |
@@ -101,7 +100,6 @@ export class TeamDBImpl extends TransactionalDBImpl<TeamDB> implements TeamDB { | |||
return { | |||
userId: u.id, | |||
fullName: u.fullName || u.name, | |||
primaryEmail: User.getPrimaryEmail(u), |
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.
@AlexTugarev spec.ts file not updated so main build was failed.
Is it safe to remove? Since there're lots of places will use findMembersByTeam
function
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.
lots of places will use findMembersByTeam
@mustard-mh, that's a problem actually. We're only using the full version of MemberInfos in one place, when listing members. All other places just need to know the user id of members.
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.
Fixed in #19207
Description
This PR introduces
UserService.GetAuthenticatedUser
RPC in dashboard.The scope of this PR:
User
type for renderingOut of scope, primarily to keep this PR reviewable at all:
Summary generated by Copilot
🤖[deprecated] Generated by Copilot at 8e41547
This pull request adds a new way to fetch the current user data from the public API using a custom React Query hook and a new user service. It also updates the cache version and exports a workspace autostart option interface from the gitpod-protocol. These changes improve the dashboard data loading and user preferences management.
Related Issue(s)
Fixes #
How to test
disabled
(shim version only!)Documentation
Preview status
Gitpod was successfully deployed to your preview environment.
Build Options
Build
Run the build with werft instead of GHA
Run Leeway with
--dont-test
Publish
Installer
Add desired feature flags to the end of the line above, space separated
Preview Environment / Integration Tests
If enabled this will build
install/preview
If enabled this will create the environment on GCE infra
Saves cost. Untick this only if you're really sure you need a non-preemtible machine.
Valid options are
all
,workspace
,webapp
,ide
,jetbrains
,vscode
,ssh
. If enabled,with-preview
andwith-large-vm
will be enabled./hold