Highlighter -> Replay rename - #6174
Draft
jankalthoefer wants to merge 11 commits into
Draft
Conversation
Streamlabs Replay cannot tell how it was installed on its own: Squirrel's Setup.exe launches the app directly, so there is no protocol link to read, and the installer carries no arguments. Parent apps therefore leave a marker file. Write %TEMP%\Streamlabs\install-origin.json with the sl_desktop origin before running the installer, per the contract in the highlighter repo. It has to precede the exec: Squirrel launches Replay at the end of the install, so Replay can resolve its origin while our exec call is still pending. The path is validated against the current user's temp directory first. Replay reads only that one location, so a SYSTEM or service identity would write somewhere it never looks. Elevation alone is fine. Best-effort by design: attribution is not worth failing an install over, so every failure is swallowed and only reported to Sentry. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
BundleMonFiles updated (1)
Unchanged files (3)
Total files change +6.49KB +0.04% Final result: ✅ View report in BundleMon website ➡️ |
Contributor
There was a problem hiding this comment.
🟡 Changes recommended
The new flow can lose import titles, bypass rollout behavior, block the renderer, and omit markers for valid redirected temp directories.
Once you've addressed the issues Copilot identified, you can request another Copilot review.
Pull request overview
Renames Highlighter to Replay while preserving legacy Highlighter migration routing and updating installation/import flows.
Changes:
- Adds Replay branding, protocol detection, and legacy Highlighter handoff.
- Adds local installer support and install-origin metadata.
- Updates React installation and import experiences.
File summaries
| File | Description |
|---|---|
app/services/utils.ts |
Adds the local installer environment variable. |
app/services/highlighter/models/highlighter.models.ts |
Defines installed-app and origin metadata types. |
app/services/highlighter/index.ts |
Implements detection, routing, installation, and marker handling. |
app/services/highlighter/constants.ts |
Adds Replay URLs, names, protocols, and marker constants. |
app/i18n/en-US/highlighter.json |
Adds migration-flow strings. |
app/components-react/pages/Highlighter.tsx |
Changes the default Highlighter view. |
app/components-react/highlighter/SettingsView.tsx |
Waits for Replay detection before rendering. |
app/components-react/highlighter/migration/useInstallState.ts |
Tracks Replay versus legacy Highlighter. |
app/components-react/highlighter/migration/PageInstallationFlow.tsx |
Adapts page CTAs to the detected app. |
app/components-react/highlighter/migration/ModalInstallationFlow.tsx |
Adapts modal copy and retry metadata. |
app/components-react/highlighter/migration/MigrationNotice.tsx |
Passes installation metadata through. |
app/components-react/highlighter/migration/MigrationNotice.m.less |
Hides page content during app detection. |
app/components-react/highlighter/ImportStream.tsx |
Routes imports and installer handoffs. |
Review details
Suppressed comments (1)
app/components-react/highlighter/ImportStream.tsx:164
- This second direct service call also becomes synchronous renderer IPC and can block form submission for both registry lookups. Await the async-return action proxy instead.
const app = await HighlighterService.getInstalledHighlighterApp();
- Files reviewed: 13/13 changed files
- Comments generated: 7
- Review effort level: Balanced
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
| useEffect(() => { | ||
| HighlighterService.isStreamlabsReplayInstalled().then(installed => { | ||
| setReplayInstalled(installed); | ||
| HighlighterService.getInstalledHighlighterApp().then(app => { |
Comment on lines
+196
to
+199
| installOriginMetadata={ | ||
| pendingImport | ||
| ? { videoPath: pendingImport.filePath, game: pendingImport.game } | ||
| : undefined |
Comment on lines
+171
to
+181
| .app-detection { | ||
| width: 100%; | ||
| opacity: 0; | ||
| pointer-events: none; | ||
| transition: opacity 160ms ease; | ||
| } | ||
|
|
||
| .app-detection-ready { | ||
| opacity: 1; | ||
| pointer-events: auto; | ||
| } |
| initialViewState = { view: EHighlighterView.CLIPS, id: undefined }; | ||
| } else { | ||
| initialViewState = { view: EHighlighterView.SETTINGS }; | ||
| initialViewState = { view: EHighlighterView.STREAM }; |
Comment on lines
+593
to
+610
| private getReplayInstallOriginMarkerPath(): string { | ||
| const isInside = (child: string, parent: string) => { | ||
| const relativePath = path.relative(parent, child); | ||
| return ( | ||
| relativePath !== '' && !relativePath.startsWith('..') && !path.isAbsolute(relativePath) | ||
| ); | ||
| }; | ||
|
|
||
| const temp = remote.app.getPath('temp'); | ||
| const home = remote.app.getPath('home'); | ||
| const systemRoot = remote.process.env.SystemRoot ?? 'C:\\Windows'; | ||
|
|
||
| if (!isInside(temp, home) || isInside(home, systemRoot)) { | ||
| throw new Error(`"${temp}" is not the desktop user's temp directory`); | ||
| } | ||
|
|
||
| return path.join(temp, REPLAY_INSTALL_ORIGIN_DIR_NAME, REPLAY_INSTALL_ORIGIN_FILE_NAME); | ||
| } |
| * Dev-only escape hatch for testing the install flow against a locally built Replay installer | ||
| * instead of the CDN one. Set HIGHLIGHTER_LOCAL_SETUP_PATH to the setup exe before launching, e.g. | ||
| * | ||
| * set "HIGHLIGHTER_LOCAL_SETUP_PATH=C:\path\to\Streamlabs Highlighter-0.0.16 Setup.exe" |
| * Extra hand-off data written into the install origin marker Replay reads on first run. | ||
| * | ||
| * Everything here is optional and best-effort: it describes what Desktop is about to ask Replay | ||
| * to do once the install finishes, so Replay launch the onboarding with more context. |
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.
No description provided.