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

[issue] Not all assets upload via Dashboard can be seen in Capture Cam #3148

Open
sync-by-unito bot opened this issue Dec 20, 2023 · 29 comments
Open

[issue] Not all assets upload via Dashboard can be seen in Capture Cam #3148

sync-by-unito bot opened this issue Dec 20, 2023 · 29 comments

Comments

@sync-by-unito
Copy link

sync-by-unito bot commented Dec 20, 2023

User story

As a user of the Capture service, I want all uploaded assets from Dashboard can be seen in Capture Cam as well. So I can have a seamless experience manage my assets from either Capture Dashboard or Capture Cam.

Reproduce step

  1. Upload asset from dashboard
  2. Pull down refresh on Capture Cam

Below is the asset upload via dashboard by me but can't been seen in my Capture Cap

  1. https://verify.numbersprotocol.io/asset-profile/?nid=bafybeicswdfopm67jmnyo4jojqwxojb654ev4vekpwscvmpjjtf3qyb2kq
  2. https://verify.numbersprotocol.io/asset-profile/?nid=bafybeihtskeabwozfln3zo26fzvjzp6mg7exfhhltn2spxmulfagt667nq
  3. https://verify.numbersprotocol.io/asset-profile/?nid=bafybeiecyxvplhqp55pndjossliznj4mmyxzl6tayggnt4i2n6dpuriaim
  4. https://verify.numbersprotocol.io/asset-profile/?nid=bafybeicetfvvhponys7crfxtwpqoav5pkuzu7jryka723s27fjtgfoesr4

Expectation

No matter the asset is uploaded from Cam or Dashboard, it should be displayed in either "VERIFIED" or "OWNED" tab with the same logic & order.

┆Issue is synchronized with this Asana task by Unito
┆Created By: Sherry Chung

Copy link
Author

sync-by-unito bot commented Dec 25, 2023

➤ Kenny Hung commented:

Sam (cc Scott Yan) Could you provide the current ionic "verified" & collect tab display rules?

Copy link
Author

sync-by-unito bot commented Dec 25, 2023

➤ Sam commented:

Kenny Hung, let me check.

Copy link
Author

sync-by-unito bot commented Dec 25, 2023

➤ Sam commented:

Kenny Hung (cc: Scott Yan).

VERIFIED TAB display logic (

private async storeIndexedProof(diaBackendAsset: DiaBackendAsset) {
) tab:

  1. fetch user assets
  2. for each asset show asset if diaBackendAsset.information.proof is not empty AND diaBackendAsset.information.information is not empty

COLLECTED TAB display logic ( https://github.com/numbersprotocol/capture-lite/blob/master/src/app/shared/dia-backend/asset/dia-backend-asset-repository.service.ts#L80 ) tab:

  1. fetch user assets orderBy: 'source_transaction'
  2. no filter logic is applied just shows response from step 1

Copy link
Author

sync-by-unito bot commented Dec 26, 2023

➤ Kenny Hung commented:

Sam (cc Sherry ChungEthan Wu) Please refer the rule the same as dashboard ([FR] Defining what assets should display in "Verified" folder and what should display in "Collected" folder ( https://app.asana.com/0/1201016280880505/1206212142922269/f ))

  • Created (Verified)
    • Storage Backend - Get Media
    • Filter Parameters: source_type = original

Copy link
Author

sync-by-unito bot commented Dec 26, 2023

➤ Sherry Chung commented:

Sam (cc Scott YanKenny Hung ) Please refer to the latest definition for both VERIFIED & COLLECTED here

Comment by @olga on [FR] Defining what assets should display in "Verified" folder and what should display in "Collected" folder ( https://app.asana.com/0/0/1206212142922269/1206239195659278/f )

Copy link
Author

sync-by-unito bot commented Jan 2, 2024

➤ Sherry Chung commented:

Update:

There're 2 issues on Dashboard related to this issue.

  1. ✓ When the user does not fill in the create time, the information timestamp of the asset in the background will be filled in with 0 ( https://app.asana.com/0/0/1206247844962858 )
    1. This will cause the latest photo uploaded from Dashboard will show in the last one in Capture Cam "Verified Tab"
    2. Already fixed in ✓ v231017-capture-cam-ionic-launch ( https://app.asana.com/0/0/1205657810319901 ) release (not yet push to public)

  2. ✓ dashboard upload not filling the information ( https://app.asana.com/0/0/1206247844962855 )
    1. This will cause some photos uploaded from Dashboard will not show in Capture Cam "Verified Tab"
    2. Already fixed in ✓ v231226-capture-dashboard ( https://app.asana.com/0/0/1206201661307151 ), currently under testing.

cc Bofu Chen ^^ the issue you reported in https://dt42-numbers.slack.com/archives/C0323488MEJ/p1703591061245569 ( https://dt42-numbers.slack.com/archives/C0323488MEJ/p1703591061245569 ) is already confirmed and the fixes are waiting for testing & deploy.

@sync-by-unito sync-by-unito bot closed this as completed Jan 2, 2024
Copy link
Author

sync-by-unito bot commented Jan 2, 2024

➤ Sherry Chung commented:

SamKenny HungScott Yan Since most of the issue related to this issues are due to Capture Dashboard.

To prevent the disperse message, I'll close this issue and we leave the remain task & discussion in the following tasks below

  1. [FR] Defining what assets should display in "Verified" folder and what should display in "Collected" folder ( https://app.asana.com/0/0/1206212142922269 )
  2. [issue] ionic can't display the asset upload from dashboard when creator is null ( https://app.asana.com/0/0/1205946651822451 )

Copy link
Author

sync-by-unito bot commented Jan 4, 2024

➤ Sam commented:

Kenny Hung in Reproduce step there are example captures that can't be seen in my capture.

Which account they belong to? Because I only have access to [email protected] to test with.

Copy link
Author

sync-by-unito bot commented Jan 4, 2024

➤ Kenny Hung commented:

Sam

Reproduce steps

  1. Registered the asset whose backend information is blank (Currently the dashboard is fixed this issue.)
  2. It won't display on Capture Cam, due to these asset will be filtered by the current rule. (When [FR] Defining what assets should display in "Verified" folder and what should display in "Collected" folder ( https://app.asana.com/0/1201016280880500/1206212142922269/f ) fixed, this issue won't happened again.

If you want to see the sample, you could try this test account([email protected] ( mailto:[email protected] ))

It would help if you compared Dashboard and Ionic.

Copy link
Author

sync-by-unito bot commented Jan 4, 2024

➤ Sam commented:

Kenny Hung regarding slack thread ( https://dt42-numbers.slack.com/archives/C0323488MEJ/p1704359544665969 ) you were right it's not showing.

I check to get assets in VERIFIED TAB capture cam (v0.88.4) do the following

  1. fetch https://api.numbersprotocol.io/api/v3/assets/?offset=0&limit=1&[email protected]&source_type=original ( https://api.numbersprotocol.io/api/v3/assets/?offset=0&limit=1&[email protected]&source_type=original )
    1. it returns bafybeibv4epkptt4he3szwyqmjvos5cfk3654cmwao5ijlskqjq546yxom as expected

  2. capture cam store remote capture (from step 1) locally to show in VERIFIED tab
    1. capture cam store remote capture by this rule (

    )diaBackendAsset.information.proof is not empty AND diaBackendAsset.information.information is not empty as mentioned before ( https://app.asana.com/0/0/1206212142922263/1206236170607481/f ).

I think it need to change 2 parts.

  1. 1st part is to use new API call ( https://app.asana.com/0/0/1206212142922269/1206277242883302/f ) which is already done in capture cam (v0.88.4)
  2. 2nd part we need to decide should we allow to store remote capture if
    1. diaBackendAsset.information.proof is empty OR diaBackendAsset.information.information is empty

For 2nd part I might ask senior devs to confirm.

Copy link
Author

sync-by-unito bot commented Jan 4, 2024

➤ Sam commented:

Kenny Hung, basically if backend asset.information is empty it can not be shown in capture cam. If you fetch bafybeibv4epkptt4he3szwyqmjvos5cfk3654cmwao5ijlskqjq546yxom you can see that it's information field is empty

image.png

Copy link
Author

sync-by-unito bot commented Jan 4, 2024

➤ Sam commented:

Olga, I have a question. Why bafybeibv4epkptt4he3szwyqmjvos5cfk3654cmwao5ijlskqjq546yxom 's .information field might be empty?

According to docs ( https://docs.captureapp.xyz/capture-sdk/initial-asset-registration ):

Please note that proof session is a required part of your metadata. The hash, mimeType, and timestamp fields may be left empty, as the Capture backend will automatically calculate these values for you, as shown in the example above.

Screenshot 2024-01-04 at 5.48.48 PM.png

I assume even if Dashboard didn't fill .proof data backend will autogenerate etc.

Copy link
Author

sync-by-unito bot commented Jan 4, 2024

Copy link
Author

sync-by-unito bot commented Jan 4, 2024

➤ Olga commented:

Sam Our backend code never automatically fills in information. However, I can address this in the next release to align with our documentation. Unfortunately, I don't have the time to implement it in this current release. Additionally, the description mentions, proof session is a required part of your metadata, but the asset's metadata does not include the proof.

Copy link
Author

sync-by-unito bot commented Jan 4, 2024

➤ Kenny Hung commented:

Sam

This asset(bafybeibv4epkptt4he3szwyqmjvos5cfk3654cmwao5ijlskqjq546yxom) was deliberately created by QA because, after adjusting the rules for the verified filter, this asset should also be displayed.

Copy link
Author

sync-by-unito bot commented Jan 4, 2024

➤ Sam commented:

Kenny Hung, oh I see so bafybeibv4epkptt4he3szwyqmjvos5cfk3654cmwao5ijlskqjq546yxom is to make sure old assets uploaded from dashboard before and has no information should still be shown from capture cam is my understanding correct?

Copy link
Author

sync-by-unito bot commented Jan 4, 2024

➤ Kenny Hung commented:

Sam (cc Scott YanOlga)

Yes, as I know in this version(0.88.4) the rule should be changed to

Created (Verified)

https://api.numbersprotocol.io/api/v3/assets/?offset=0&limit=100&owner= ( https://api.numbersprotocol.io/api/v3/assets/?offset=0&amp;limit=100&amp;owner= )<USER_EMAIL>&source_type=original

Owned (Collected)

https://api.numbersprotocol.io/api/v3/assets/?offset=0&limit=100&owner= ( https://api.numbersprotocol.io/api/v3/assets/?offset=0&amp;limit=100&amp;owner= )<USER_EMAIL>&not_source_type=original

Copy link
Author

sync-by-unito bot commented Jan 4, 2024

➤ Sam commented:

Kenny Hung, already changed as mentioned ( https://app.asana.com/0/0/1206212142922263/1206278700843009/f ) before.

capture cam v0.88.4

  1. fetched assets in VERIFIED tab using new API call ( https://app.asana.com/0/1201016280880500/1206212142922269/1206277242883302 ) (already)
  2. store them locally (only if asset.information is not empty)
  3. show locally stored assets in VERIFIED tab

Question is what should we do with assets that uploaded before from dashboard (or other client if any) that does not have .information field.

So far I see 2 options:

  1. Front End: Force capture cam to show asset in VERIFIED tab even if asset has no information field (but I think it's not valid need to confirm with seniors)
  2. Back End: Comment by @olga on [issue] Not all assets upload via Dashboard can be seen in Capture Cam ( https://app.asana.com/0/0/1206212142922263/1206278821856585/f )

Copy link
Author

sync-by-unito bot commented Jan 4, 2024

➤ Sherry Chung commented:

OlgaSam (also cc Scott YanKenny Hung ) Suggestion, If we found that some of the assets registered via our service didn't follow our spec on gitbook. We should open an issue to that service.

@sync-by-unito sync-by-unito bot reopened this Jan 4, 2024
Copy link
Author

sync-by-unito bot commented Jan 4, 2024

➤ Sherry Chung commented:

Olga Also, for what Sam mentioned in the rule for Capture Cam to store remote capture (most of them are assets registered through dashboard / backend API)

Comment by @sam on [issue] Not all assets upload via Dashboard can be seen in Capture Cam ( https://app.asana.com/0/0/1206212142922263/1206278700843009/f )

Can you help to check if the logic make sense or you can suggest other logic?

Copy link
Author

sync-by-unito bot commented Jan 4, 2024

➤ Sherry Chung commented:

Sam OK. For the statement you mentioned

"capture cam store remote capture by this rule (

)diaBackendAsset.information.proof is not empty AND diaBackendAsset.information.information is not empty as mentioned before ( https://app.asana.com/0/1201016280880500/1206212142922263/1206236170607481/f )."

I want to know why you need to set this rule and is it reasonable. Please consult and discuss with Olga then decide if we'll keep this rule or we'll remove it.

Copy link
Author

sync-by-unito bot commented Jan 4, 2024

➤ Olga commented:

Sam I'm unfamiliar with the purpose or definition of store remote capture. Could you provide a brief explanation?

Sherry Chung Additionally, apart from Dashboard updating the code, I believe the backend should also update the code to automatically fill data, aligning it with our documentation in the next release.

Copy link
Author

sync-by-unito bot commented Jan 4, 2024

➤ Sherry Chung commented:

Olga I think this is for Capture Cam to fetch assets registered by other Capture services (dashboard, backend) then store it and show in Capture Cam.

I want to know if the extra rules are needed for some purpose. If not, probably we can also save some API calls and increase performance.

Copy link
Author

sync-by-unito bot commented Jan 4, 2024

➤ Tammy Yang commented:

Sherry Chung for any issue that is related to the sync between Capture Cam and Capture Dashboard, its medium priority (i.e. please do not focus on it now).

Copy link
Author

sync-by-unito bot commented Jan 4, 2024

➤ Tammy Yang commented:

Sam please drop any fix if it was not yey discussed fully and drop this issue from the milestone.

Copy link
Author

sync-by-unito bot commented Jan 5, 2024

➤ Olga commented:

Sherry Chung After reviewing the logic Sammentioned ( https://app.asana.com/0/1201016280880500/1206212142922263/1206236170607481 ), I believe the purpose of storing remote capture is to retrieve assets from the backend. The original intent to filter out entries with no proof or information was because the subsequent logic depends on having proof and information.

When the code was initially implemented, we didn't have Dashboard yet, and the definition was assets captured by the App. Therefore, those assets were expected to have proof. However, the definition has now changed to assets registered by the user. As a result, we need to consider and handle sources from any, such as Dashboard or third-party users. It's essential to note that there might not be proof, information, and signature since only the asset_file is required, and other fields are optional.

Copy link
Author

sync-by-unito bot commented Jan 5, 2024

➤ Sam commented:

Sherry Chung, (cc: Olga, Tammy Yang). regarding Comment by @olga on [issue] Not all assets upload via Dashboard can be seen in Capture Cam ( https://app.asana.com/0/0/1206212142922263/1206284587647885/f )

Agree with Olga assets in capture app expected to have a proof.

Since dashboard is also our product can we auto include proof, information signature on asset upload.

By auto include I mean dashboard behind the scenes collect minimal browser info to collect information to fulfill proof etc.

Copy link
Author

sync-by-unito bot commented Jan 5, 2024

➤ Tammy Yang commented:

Agreed, makes sense to me (collecting minimal info)

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

No branches or pull requests

0 participants