Skip to content
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

Fix/profile not found errors #225

Merged
merged 24 commits into from
Sep 12, 2023
Merged

Fix/profile not found errors #225

merged 24 commits into from
Sep 12, 2023

Conversation

mattyg
Copy link
Collaborator

@mattyg mattyg commented Sep 9, 2023

Resolves #188

Don't require profile for any component, instead, gracefully degrade to displaying agent pub key in place of profile name

Copy link
Collaborator

@jost-s jost-s left a comment

Choose a reason for hiding this comment

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

Is this abbreviation intentional?
image

@jost-s
Copy link
Collaborator

jost-s commented Sep 11, 2023

A related bug, when I'm on agent A's profile page and click on "Follow", the "Followers" count increases immediately, but when I click on it, the profile isn't displayed.
image

image

Copy link
Collaborator

@jost-s jost-s left a comment

Choose a reason for hiding this comment

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

@mattyg
Copy link
Collaborator Author

mattyg commented Sep 11, 2023

Is this abbreviation intentional?

yes, but it doesn't make sense for that component -- I'll remove it.

A related bug, when I'm on agent A's profile page and click on "Follow", the "Followers" count increases immediately, but when I click on it, the profile isn't displayed.

good catch -- fixed

These filters aren't needed any longer https://github.com/GeekGene/mewsfeed/pull/225/files#diff-a2957e428e699ad1bdd854cf0f707ce494ae491aaaca72e4b5cf8c72a6127229L92

https://github.com/GeekGene/mewsfeed/pull/225/files#diff-73289534eedce049cb269935139a2a58180c855a003fcc9a60d008b6093767f3L107

I think these links aren't directing me to the line -- what are you referring to? nvm I think I found it,

@jost-s
Copy link
Collaborator

jost-s commented Sep 11, 2023

I think these links aren't directing me to the line -- what are you referring to?

It's the next line actually return agentProfiles.filter(Boolean) as AgentProfile[];. Before there were null values, but now there'll be an incomplete profile, so filtering by Boolean doesn't change anything any longer.

@mattyg mattyg requested a review from jost-s September 11, 2023 23:15
Copy link
Collaborator

@jost-s jost-s left a comment

Choose a reason for hiding this comment

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

The pub key isn't abbreviated any longer. Please have a look at what's happening here. It could be because I messed with the load creators function to not load the profile for testing this:

const agentProfiles = await Promise.all(
    agents.map(async (agentPubKey) => {
      let profile;
      try {
        // profile = await profilesStore.client.getAgentProfile(agentPubKey);
      } catch (error) {
        console.error(error);
      }

      return {
        agentPubKey,
        profile,
      } as unknown as AgentProfile;
    })
  );
Screen.Recording.2023-09-11.at.19.52.10.mov

@mattyg
Copy link
Collaborator Author

mattyg commented Sep 12, 2023

I can't reproduce the issues seen the video. Going to merge for now to get a release out and we can see if they arise again.

@mattyg mattyg merged commit 92aa761 into main Sep 12, 2023
1 of 2 checks passed
@mattyg mattyg deleted the fix/profile-not-found-errors branch September 12, 2023 21:55
@jost-s
Copy link
Collaborator

jost-s commented Sep 12, 2023

Cool, yeah

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

"Profile Not Found" errors upon searching for names
2 participants