Uh oh!
There was an error while loading. Please reload this page.
issue #3895 Show all fingerprints for recipient - #4003
Conversation
a4b19d4 to
3ab5d6cCompare59d8ebc to
fc28f41Compare@tomholub@rrrooommmaaa I think I basically did it, but some CI test got broken, and from what I see in the CI logs I absolutely don't get any ideas what needs to be fixed. Please have a look on this. |
tomholub
commented
Sep 26, 2021
@IvanPizhenko I think you're missing local ci secrets? To run tests locally. See https://github.com/FlowCrypt/flowcrypt-browser/wiki/Writing-and-running-tests meanwhile I'll send them over email. |
tomholub
left a comment
There was a problem hiding this comment.
You're right that this is basically it. The broken tests could be that some behavior has changed (maybe for the better?) and the tests will need to be updated. Or a bug caused by this change, or a combination of both - that has to be investigated.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
IvanPizhenko
commented
Sep 26, 2021
Thanks Tom, yes, I really wasn't even thinking that secrets are needed to run tests locally, but now I see. |
IvanPizhenko
commented
Sep 26, 2021
@tomholub I made it passing tests |
IvanPizhenko
commented
Sep 26, 2021
Now should I add some UI for this? |
@tomholub@rrrooommmaaa Ready for review |
tomholub
commented
Sep 27, 2021
I suppose you could modify an existing test. You won't be able to test the hover but you could extract the |
| public lookupPubkeyFromKeyserversThenOptionallyFetchExpiredByFingerprintAndUpsertDb = async ( | ||
| email: string, name: string | undefined | ||
| ): Promise<Contact | "fail"> => { | ||
| ): Promise<Contact[] | "fail"> => { |
There was a problem hiding this comment.
Hi @IvanPizhenkoContact isn't stored in the database
test/source/platform/store/contact-store.ts-- this is a mock database used only in tests, so it is implemented to the extent required for tests to run -- it doesn't fully mimick the real store's behaviour.extension/js/common/platform/store/contact-store.ts-- this is the real one.
As you can see, onlyPubkey,EmailandRevocationentities are stored there.Contacttype is only left for some consumer classes that we haven't refactored yet -- it emulates the older storage by picking the best candidate pubkey for emal and including it in theContact. If consumer class needs more data then the best pubkey, it shouldn't useContacttype norContactStore.get. We will remove these type and method when no more consumers are left (updating the mockcontact-store.tsin due course).
rrrooommmaaa
commented
Oct 5, 2021
Yes, the second one only needs to warn in a situation when 1) lookup resulted in network failure or 2) saving to the store caused an exception. These are the situations when The first call extracts the keys from the storage if no error happens. If no keys, it will return an empty set (this is not 'fail'). |
IvanPizhenko
commented
Oct 5, 2021
Maybe this should be documented via some comments in the code. |
@rrrooommmaaa I'm thinking about how to refactor
constlookupResult=awaitthis.view.pubLookup.lookupEmail(email);if(lookupResult&&email){i.e. is it ever possible that
|
| @@ -0,0 +1,33 @@ | |||
| /* ©️ 2016 - present FlowCrypt a.s. Limitations apply. Contact human@flowcrypt.com */ | |||
There was a problem hiding this comment.
I guess these methods should go to test/source/tests/page-recipe/compose-page-recipe.ts
rrrooommmaaa
commented
Oct 6, 2021
It's not possible. Maybe it was done to trick the linter or something. Feel free to refactor.
|
rrrooommmaaa
commented
Oct 6, 2021
Sure. Where would the appropriate place be, in your opinion? |
IvanPizhenko
commented
Oct 6, 2021
I've added, in the |
IvanPizhenko
commented
Oct 6, 2021
@rrrooommmaaa So I've tried to implement all the notes above. Are there any other improvements to be done here? |
rrrooommmaaa
commented
Oct 7, 2021
|
rrrooommmaaa
commented
Oct 7, 2021
Should look like |
rrrooommmaaa
commented
Oct 7, 2021
I suggest to display |
you can import as many keys as needed to the same "contact" from https://github.com/FlowCrypt/flowcrypt-browser/blob/master/test/source/tests/tooling/consts.ts |
IvanPizhenko
commented
Oct 7, 2021
@rrrooommmaaa Fixed it |


This PR introduces showing all recepient's public key fingerprints
close#3985
Tests(delete all except exactly one):
To be filled by reviewers
I have reviewed that this PR... (tick whichever items you personally focused on during this review):