Skip to content

Utilize ReplayWeb environments#1069

Open
slifty wants to merge 2 commits into
mainfrom
1053-replay-config-url
Open

Utilize ReplayWeb environments#1069
slifty wants to merge 2 commits into
mainfrom
1053-replay-config-url

Conversation

@slifty

@slifty slifty commented Jun 22, 2026

Copy link
Copy Markdown
Contributor

This PR updates our replay scripts to use environment-specific hosted copies instead of a single hard coded environment.

Note that production's copy of ReplayWeb is not deployed; we can still merge this since it is behind a feature flag.

Resolves #1053

The web-archive viewer renders through an iframe, so the ui.js script
and its custom-element styling are not actually used.
Copilot AI review requested due to automatic review settings June 22, 2026 21:25
@codecov

codecov Bot commented Jun 22, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 51.63%. Comparing base (f67427b) to head (5265629).
⚠️ Report is 3 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #1069      +/-   ##
==========================================
- Coverage   51.64%   51.63%   -0.02%     
==========================================
  Files         354      354              
  Lines       12055    12055              
  Branches     2166     2166              
==========================================
- Hits         6226     6224       -2     
+ Misses       5604     5602       -2     
- Partials      225      229       +4     

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

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Pull request overview

This PR updates the web-archive “ReplayWeb” viewer integration to use environment-specific ReplayWeb hosts (dev/staging/prod) instead of a single hard-coded URL.

Changes:

  • Add replayBaseUrl to the Angular Environment interface and populate it across all environment configs.
  • Update FileViewerComponent to build ReplayWeb iframe URLs from environment.replayBaseUrl.
  • Remove the hard-coded ReplayWeb ui.js script include and clean up related styling.

Reviewed changes

Copilot reviewed 10 out of 10 changed files in this pull request and generated 1 comment.

Show a summary per file
File Description
src/index.html Removes the hard-coded ReplayWeb ui.js script include.
src/environments/environment-interface.ts Adds replayBaseUrl to the typed environment contract.
src/environments/environment.ts Defines replayBaseUrl for the default/local environment.
src/environments/environment.dev.ts Defines replayBaseUrl for dev deployments.
src/environments/environment.staging.ts Defines replayBaseUrl for staging deployments.
src/environments/environment.prod.ts Defines replayBaseUrl for prod deployments.
src/environments/environment.local.proxy.ts Defines replayBaseUrl for local proxy setup.
src/environments/environment.local-docker.proxy.ts Defines replayBaseUrl for local docker proxy setup.
src/app/file-browser/components/file-viewer/file-viewer.component.ts Uses environment.replayBaseUrl to build the ReplayWeb embed URL.
src/app/file-browser/components/file-viewer/file-viewer.component.scss Removes styling targeting a no-longer-used ReplayWeb element selector.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

}

const url = `https://replay.dev.permanent.org/?source=${encodeURIComponent(originalFileUrl)}&embed=replay-with-info`;
const url = `${environment.replayBaseUrl}/?source=${encodeURIComponent(originalFileUrl)}&embed=replay-with-info`;
Each environment should point at its own ReplayWeb instance instead of
everyone sharing the dev one.

Issue #1053 Update replay base URL to use an environment variable
@slifty slifty force-pushed the 1053-replay-config-url branch from 5265629 to 6e5b3e8 Compare June 22, 2026 21:47
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.

Update replay base URL to use an environment variable

2 participants