Skip to content

Conversation

@aasandei-vsp
Copy link
Contributor

@aasandei-vsp aasandei-vsp commented Dec 9, 2025

Jira bug: https://permanent.atlassian.net/browse/PER-10371

STEPS TO TEST

Record as unlisted share, no account:

  1. Create a new account or log in to existing account
  2. Upload a record directly in the archive folder
  3. Create an unlisted share link the record
  4. Copy link and paste it in a new window
    EXPECTED: The preview of the record will appear, with the correct thumbnail
  5. Double click on the record thumbnail
    EXPECTED: The modal with details will appear, click on the download button/resize buttons

Record as unlisted share, with account:

  1. Create a new account or log in to existing account
  2. Upload a record directly in the archive folder
  3. Create an unlisted share link the record
  4. Open a new window, create or log in to another account
  5. Copy link and paste it in a new window
    EXPECTED: The preview of the record will appear, with the correct thumbnail, My Archive button and thumbnail will be present
  6. Double click on the record thumbnail
    EXPECTED: The modal with details will appear, click on the download button/resize buttons

OBSERVATION: Other scenarios could be tested, just to make sure share works correctly:

  • unlisted share folder
  • restricted folder/record

@aasandei-vsp aasandei-vsp self-assigned this Dec 9, 2025
@aasandei-vsp aasandei-vsp marked this pull request as draft December 9, 2025 09:24
@aasandei-vsp aasandei-vsp force-pushed the PER-10371-unlisted-share-preview-broken branch from 50b969c to bc63984 Compare December 10, 2025 11:30
@codecov
Copy link

codecov bot commented Dec 10, 2025

Codecov Report

❌ Patch coverage is 25.00000% with 3 lines in your changes missing coverage. Please review.
✅ Project coverage is 47.13%. Comparing base (3f01b5e) to head (5a4c06b).

Files with missing lines Patch % Lines
...omponents/share-preview/share-preview.component.ts 25.00% 2 Missing and 1 partial ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main     #855      +/-   ##
==========================================
- Coverage   47.15%   47.13%   -0.03%     
==========================================
  Files         372      372              
  Lines       11495    11498       +3     
  Branches     1912     1913       +1     
==========================================
- Hits         5421     5420       -1     
- Misses       5889     5896       +7     
+ Partials      185      182       -3     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@aasandei-vsp aasandei-vsp changed the title Started work on share preview [PER-10371] Unlisted share record preview fixes Dec 10, 2025
@aasandei-vsp aasandei-vsp marked this pull request as ready for review December 10, 2025 15:17
@aasandei-vsp
Copy link
Contributor Author

The test coverage is failing and there is indeed a test that I would need to add, but that won't raise the code coverage too much. The reason I am not able to add the test is because I would need to refactor the way the setup for testing is made(beforeEach) in order to be able to dynamically give values to the mockRoute.snapshot.sharePreviewVO.

Copy link
Member

@cecilia-donnelly cecilia-donnelly left a comment

Choose a reason for hiding this comment

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

The "My Archive" appears as expected, but clicking it doesn't do anything. That check is outside the test cases in the PR, so potentially it could be a separate piece of work, but I think showing a non-functional button instead of no button is a regression.

I tested with an account that only has one archive.

@aasandei-vsp
Copy link
Contributor Author

aasandei-vsp commented Dec 11, 2025

The "My Archive" appears as expected, but clicking it doesn't do anything. That check is outside the test cases in the PR, so potentially it could be a separate piece of work, but I think showing a non-functional button instead of no button is a regression.

I tested with an account that only has one archive.

Indeed, the button does not work, but the issue is fixed in the fallback PR that's in testing: #836
Once that is merged, the button should work fine on all types of share.

When previewing a record as an unlisted share, the folder cannot
be retrieved because the logged in user does not have rights to
view it. This is why we need to create a mock folder that will be
saved in the data service and be used accross the components from
the share flow.

Issue: PER-10371 Unlisted share record preview broken
When previewing an unlisted share record, we need a mock folder
for it to be stored in the data service and provide it to different
components from the share flow. When creating it, we should use
the thumbnails from the current record if that is available or
else use generated previews.

Issue: PER-10371 Unlisted share record preview broken
@aasandei-vsp aasandei-vsp force-pushed the PER-10371-unlisted-share-preview-broken branch from babcb4f to 5a4c06b Compare December 15, 2025 13:00
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.

3 participants