Skip to content

Conversation

@slifty
Copy link
Contributor

@slifty slifty commented Dec 18, 2025

This PR captures the outcome of our 2025 hackathon! Go team!

It adds support for a new record type: Web Archive, including the ability to render that content via detail view.

Before this PR is merged we should do some additional testing related to javascript security.

We should also consider using an npm package instead of loading the vendor script directly.

@codecov
Copy link

codecov bot commented Dec 18, 2025

Codecov Report

❌ Patch coverage is 50.00000% with 6 lines in your changes missing coverage. Please review.
✅ Project coverage is 47.77%. Comparing base (02eb5ef) to head (117e5d4).

Files with missing lines Patch % Lines
...er/components/file-viewer/file-viewer.component.ts 50.00% 6 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main     #861      +/-   ##
==========================================
- Coverage   47.82%   47.77%   -0.05%     
==========================================
  Files         351      351              
  Lines       11292    11304      +12     
  Branches     1889     1891       +2     
==========================================
+ Hits         5400     5401       +1     
- Misses       5705     5712       +7     
- Partials      187      191       +4     

☔ 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.

@cecilia-donnelly
Copy link
Member

Plan:

  • Remove vendor package
  • Show web archive as a type
  • Don't try to show the web archive in ReplayWeb yet

The goal is to not have this PR wait while we do infrastructure work to make playing JS as safe as possible.

@slifty
Copy link
Contributor Author

slifty commented Jan 5, 2026

This issue is related: #863

@cecilia-donnelly
Copy link
Member

Can we actually hide this behind a feature flag? We had suggested that we would say "if WebArchive and false" or similar, but let's instead say "if WebArchive and feature_flag" so that we can turn this on/off for brief periods, e.g. for demos.

cecilia-donnelly and others added 5 commits January 20, 2026 18:41
Set up a special treatment for archive files (currently .wacz, .zip,
and .7zip). This is very MVP and currently is trying to show the
ReplayWeb example file for any archive uploaded to Permanent.

This doesn't work because the "service worker" is not loading correctly.
In order to render the replay-web-page we need a web worker to run
and we cannot use a remote one because of CORS, that is why we are
adding the files locally.
Co-authored-by: Liam Lloyd-Tucker <liam@permanent.org>
We need to style the embed to actually fill the screen
We don't want to try to render zip files as web archives, so we're
introducing a brand new type.
For various reasons (security as well as a desire to avoid packaging
vendored code in our repository) we would like to render replay via
a hosted copy instead of loading js from our domain.

This is particularly important for ensuring replayed pages aren't able
to access user data / cookies that are scoped to permanent.org

This commit tests that approach.  Before we truly release this feature
we will want to make the replayUrl based on a configured value (e.g.
not hardcoded to `dev.replay.permanent.org`).
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.

4 participants