Utilize ReplayWeb environments#1069
Open
slifty wants to merge 2 commits into
Open
Conversation
The web-archive viewer renders through an iframe, so the ui.js script and its custom-element styling are not actually used.
Codecov Report✅ All modified and coverable lines are covered by tests. 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. 🚀 New features to boost your workflow:
|
There was a problem hiding this comment.
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
replayBaseUrlto the AngularEnvironmentinterface and populate it across all environment configs. - Update
FileViewerComponentto build ReplayWeb iframe URLs fromenvironment.replayBaseUrl. - Remove the hard-coded ReplayWeb
ui.jsscript 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
5265629 to
6e5b3e8
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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