-
Notifications
You must be signed in to change notification settings - Fork 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
[$75] Copilot - Delegated user is not visible in the list until relogin #53971
Comments
Triggered auto assignment to @adelekennedy ( |
This comment was marked as outdated.
This comment was marked as outdated.
@adelekennedy Eep! 4 days overdue now. Issues have feelings too... |
struggling to reproduce - testing again |
@adelekennedy Huh... This is 4 days overdue. Who can take care of this? |
@adelekennedy this issue was created 2 weeks ago. Are we close to a solution? Let's make sure we're treating this as a top priority. Don't hesitate to create a thread in #expensify-open-source to align faster in real time. Thanks! |
@adelekennedy Still overdue 6 days?! Let's take care of this! |
@adelekennedy Now this issue is 8 days overdue. Are you sure this should be a Daily? Feel free to change it! |
@adelekennedy 12 days overdue now... This issue's end is nigh! |
This issue has not been updated in over 14 days. @adelekennedy eroding to Weekly issue. |
ProposalPlease re-state the problem that we are trying to solve in this issue.
What is the root cause of that problem?
App/src/components/AccountSwitcher.tsx Line 59 in 04cd7b0
is undefined, it can result in the bug where the delegated user does not appear in the list.
What changes do you think we should make in order to solve the problem?
App/src/components/AccountSwitcher.tsx Line 55 in 04cd7b0
and add the fallback data for the
App/src/components/AccountSwitcher.tsx Line 112 in 04cd7b0
pass the What specific scenarios should we cover in automated tests to prevent reintroducing this issue in the future?What alternative solutions did you explore? (Optional)
App/src/components/AccountSwitcher.tsx Line 60 in 04cd7b0
|
Yours could be considered a template-based comment, but there is a missing mandatory line. Here's the evaluation:
You missed the line for scenarios in automated tests and its user content. Your proposal will be dismissed because you did not follow the proposal template. |
Job added to Upwork: https://www.upwork.com/jobs/~021876420696889822612 |
@tgolen I tested your JSON. You are missed Example should be: {
updates: [
{
data: [
{
key: 'account',
onyxMethod: 'merge',
value: {
delegatedAccess: {
delegates: [],
delegators: [
{
email: '4@1.com',
role: 'all',
},
],
},
},
},
{
key: 'personalDetailsList',
onyxMethod: 'merge',
value: {
'9': {
firstName: 'T T C D',
lastName: 'T T C D',
login: '4@1.com',
avatar: 'https://d1wpcgnaa73g0y.cloudfront.net/26271df52c9c9db57fa0221feaef04d18a045f2b_128.jpeg',
},
},
},
],
eventType: 'onyxApiUpdate',
},
],
lastUpdateID: pushJSONS?.lastUpdateID,
previousUpdateID: pushJSONS?.previousUpdateID,
} Line 29 in 4ffbd42
function subscribeToPrivateUserChannelEvent(eventName: string, accountID: string, onEvent: (pushJSONS: OnyxUpdatesFromServer) => void) {
const pusherChannelName = `${CONST.PUSHER.PRIVATE_USER_CHANNEL_PREFIX}${accountID}${CONFIG.PUSHER.SUFFIX}` as const;
function logPusherEvent(pushJSONS: OnyxUpdatesFromServer) {
const pushJSON = {
updates: [
{
data: [
{
key: 'account',
onyxMethod: 'merge',
value: {
delegatedAccess: {
delegates: [],
delegators: [
{
email: '3@1.com',
role: 'all',
},
],
},
},
},
{
key: 'personalDetailsList',
onyxMethod: 'merge',
value: {
'8': {
firstName: 'T T C D',
lastName: 'T T C D',
login: '3@1.com',
avatar: 'https://d1wpcgnaa73g0y.cloudfront.net/26271df52c9c9db57fa0221feaef04d18a045f2b_128.jpeg',
},
},
},
],
eventType: 'onyxApiUpdate',
},
],
lastUpdateID: pushJSONS?.lastUpdateID,
previousUpdateID: pushJSONS?.previousUpdateID,
};
Log.info(`[Report] Handled ${eventName} event sent by Pusher`, false, pushJSON);
}
function onPusherResubscribeToPrivateUserChannel() {
NetworkConnection.triggerReconnectionCallbacks('Pusher re-subscribed to private user channel');
}
function onEventPush(pushJSONS: OnyxUpdatesFromServer) {
const pushJSON = {
updates: [
{
data: [
{
key: 'account',
onyxMethod: 'merge',
value: {
delegatedAccess: {
delegates: [],
delegators: [
{
email: '3@1.com',
role: 'all',
},
],
},
},
},
{
key: 'personalDetailsList',
onyxMethod: 'merge',
value: {
'8': {
firstName: 'T T C D',
lastName: 'T T C D',
login: '3@1.com',
avatar: 'https://d1wpcgnaa73g0y.cloudfront.net/26271df52c9c9db57fa0221feaef04d18a045f2b_128.jpeg',
},
},
},
],
eventType: 'onyxApiUpdate',
},
],
lastUpdateID: pushJSONS?.lastUpdateID,
previousUpdateID: pushJSONS?.previousUpdateID,
};
logPusherEvent(pushJSON);
onEvent(pushJSON);
}
function onSubscriptionFailed(error: Error) {
Log.hmmm('Failed to subscribe to Pusher channel', {error, pusherChannelName, eventName});
}
Pusher.subscribe(pusherChannelName, eventName, onEventPush, onPusherResubscribeToPrivateUserChannel).catch(onSubscriptionFailed);
} Screen.Recording.2025-01-23.at.09.08.58.mp4 |
Oh, Thanks! OK, I can add those two fields... but that brings up another question. What if the user has never uploaded a custom avatar or added their first and last name? Will the frontend fallback to just displaying their login (email or phone number) and their default avatar? |
Nevermind on those other questions. I found the proper data I needed to return and it's working fine now: I've submitted an internal PR to implement this and I'll keep you updated on the progress. |
Daily Update
Next Steps
ETA
|
Daily Update
Next Steps
ETA
|
Daily Update
Next Steps
ETA
|
📣 It's been a week! Do we have any satisfactory proposals yet? Do we need to adjust the bounty for this issue? 💸 |
Daily Update
Next Steps
ETA
|
Daily Update
Next Steps
ETA
|
Daily Update
Next Steps
ETA
|
I'm testing |
@tgolen I tested and saw that the avatar, name, and email are displaying as shown in the video below. I think we don’t need to make any updates on the frontend. Screen.Recording.2025-02-03.at.15.24.41.mp4 |
OK, great. Thank you for verifying! I will go ahead and close this out then. |
@tgolen May I receive any payment here? |
I don't think we typically pay out anything for internal issues, although I appreciate your help with this. If you were to receive payment, how much payment are you requesting? |
@tgolen Thank you for your appreciation! I’m happy to help without any payment. However, if payment is possible, I would kindly accept any amount you consider appropriate. |
OK, I'll approve this for a partial $75 payment. @adelekennedy Can you make that happen, please? |
Upwork job price has been updated to $75 |
Friendly bump, @adelekennedy, for this comment. |
Friendly bump, @adelekennedy |
reopened for payment https://www.upwork.com/jobs/~021889354259199458212 @huult please apply above! |
@adelekennedy , Applied. Thanks! |
If you haven’t already, check out our contributing guidelines for onboarding and email contributors@expensify.com to request to join our Slack channel!
Issue was found while executing QA for PR #52980
Version Number: v9.0.74-2
Reproducible in staging?: Yes
Reproducible in production?: Yes
If this was caught on HybridApp, is this reproducible on New Expensify Standalone?: N/A
If this was caught during regression testing, add the test name, ID and link from TestRail: #52980
Email or phone of affected tester (no customers): New Gmail account
Issue reported by: Applause Internal Team
Device used: MacOS Catalina 10.15.7
App Component: User Settings
Action Performed:
Precondition: sign up new gmaill account on desktop app. don't validate account.
Expected Result:
List of accounts is opened. Delegated account's email is visible.
Actual Result:
List of accounts is opened. Delegated account's email is not visible. Blank row with a 'Full' label. User has to relogin to be see delegated account's email.
NOTE: despite email is blank, user still can switch account.
Workaround:
Unknown
Platforms:
Screenshots/Videos
bug.mp4
View all open jobs on GitHub
Upwork Automation - Do Not Edit
Issue Owner
Current Issue Owner: @tgolenThe text was updated successfully, but these errors were encountered: