Skip to content

[PER-10768] Add preview placeholders for files that are still processing, can't see or failed to preview - #1198

Open
aasandei-vsp wants to merge 5 commits into
PER-10680-migrate-navigate-lean-refresh-current-folderfrom
PER-10768-no-access-copy-yet-v2
Open

aasandei-vsp wants to merge 5 commits into
PER-10680-migrate-navigate-lean-refresh-current-folderfrom
PER-10768-no-access-copy-yet-v2

Conversation

@aasandei-vsp

@aasandei-vsp aasandei-vsp commented Oct 3, 2026 •

Copy link
Copy Markdown
Contributor

This PR adds preview placeholders for files that are still processing, can't actually be previewed or the BE failed to generate a copy for previewing. This applies mostly to docx file and such, but it also shows a nice preview page for files like archives, that we cannot actually see in the browser.

Issue: PER-10768

Click here to view curated manual test cases # Manual test cases — record preview states (PER-10768, part 1)

The visible change: opening a record that has no viewable copy yet now shows a nice friendly screen, with and accurate message about the state of the file copy.


Preparing a copy ⭐

Scenario — a document straight after upload

  1. Upload the .docx and open it in the viewer straight away.
    • EXPECTED: See the screen We're still preparing this file to view.
  2. Click Download original.
    • EXPECTED: The original .docx downloads.
  3. Click the help link.
    • EXPECTED: A page opens in a new tab, with the specified content.
  4. Leave the viewer open until the copy is ready (should take a few minutes).
    • EXPECTED: The screen switches to the document preview on its own, without reloading the page.

Scenario — formats whose original the browser can't show ⭐

  1. Upload the .tiff and open it straight away. --> NEEDS TESTING ON DEV
    • EXPECTED: See the screen We're still preparing this file to view.
  2. Repeat with the .heic, the .avi and the .wma.
    • EXPECTED: See the screen We're still preparing this file to view.
  3. Reopen the .tiff once its copy is ready.
    • EXPECTED: The image shows in the zoomable viewer.

Files that show from their original

(cheap regression checks: these must look exactly as before)

Scenario — opening straight after upload

  1. Upload the .jpg, .mp4, .mp3 and .pdf, and open each one straight away.
    • EXPECTED: Each one shows correctly.

Can't show it here

Scenario — a format that never gets a copy

  1. Upload the .zip and open it.
    • EXPECTED: This file is stored, but we can't show it here, with ZIP on the icon and on Download original, and the link Which files can Permanent preview?.

Failed copy

Scenario — an old document without a copy

(only if your archive has one) --> THIS CAN BE EASILY TESTED ON LOCAL(we don't seem to make copies there)

  1. Open the .docx that is more than a day old and never got a copy.
    • EXPECTED: We couldn't make a copy of this file to view, Download original, and the link Get help with this file.

Moving around while a copy is being prepared

Scenario — arrows and closing

  1. Open the freshly uploaded .docx from a folder that also holds the .jpg, and use the arrows to move to the .jpg.
    • EXPECTED: The image shows. No preparing screen is left behind.
  2. Move back to the .docx.
    • EXPECTED: The preparing screen again, or the preview if the copy arrived in the meantime.
  3. Close the viewer while the .docx is still preparing, wait a minute, and open the .jpg.
    • EXPECTED: The .jpg opens normally, with no errors.

Sharing

Scenario — an unlisted share link

  1. Share the freshly uploaded .docx with an unlisted link, and open the link in a private window.
    • EXPECTED: The preparing screen. Once the copy is ready it switches to the preview on its own.

@aasandei-vsp aasandei-vsp self-assigned this Oct 3, 2026
@codecov

codecov Bot commented Oct 3, 2026 •

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 98.78049% with 1 line in your changes missing coverage. Please review.
✅ Project coverage is 54.72%. Comparing base (d88916a) to head (ae01846).

Files with missing lines Patch % Lines
...er/components/file-viewer/file-viewer.component.ts 96.55% 0 Missing and 1 partial ⚠️
Additional details and impacted files
@@                                    Coverage Diff                                     @@
##           PER-10680-migrate-navigate-lean-refresh-current-folder    #1198      +/-   ##
==========================================================================================
+ Coverage                                                   54.53%   54.72%   +0.18%     
==========================================================================================
  Files                                                         368      372       +4     
  Lines                                                       12914    12990      +76     
  Branches                                                     2367     2383      +16     
==========================================================================================
+ Hits                                                         7043     7109      +66     
- Misses                                                       5634     5643       +9     
- Partials                                                      237      238       +1     

☔ View full report in Codecov by Harness.
📢 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 force-pushed the PER-10680-migrate-navigate-lean-refresh-current-folder branch from 30cbc66 to 12b5d5a Compare October 7, 2026 09:29
In order to map and show the status of a record, we need the
BE to provide a property that will decide in which state the preview
of the file it is.

Issue: PER-10768
Some record previews depend on the state a copy is, but some don't.
For example, images and videos are rendered as they are, so we
need to decide which records do need to consider the preview state
and which don't.

Issue: PER-10768
Every state that comes from the backend will yield into a different
preview, so the copy and SVGs will change accordingly. This way, the
user will be more accurately informed about the state of their file.

Issue: PER-10768
The existing preview component already tackles all of the types of
records we can upload, but not the status a record is in or if the
record cannot be viewed. So we have integrated the status preview
component for this exceptional cases.

Issue: PER-10768
@aasandei-vsp
aasandei-vsp force-pushed the PER-10768-no-access-copy-yet-v2 branch from 312e60f to ae01846 Compare October 8, 2026 12:27
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.

1 participant