Conversation
There was a problem hiding this comment.
Pull request overview
This PR introduces “Replay/Highlighter migration” plumbing by adding a Streamlabs Replay install/open/import flow (with UI notices) and wiring it behind a new incremental rollout flag.
Changes:
- Add a new
highlighterMigrationrollout flag and UI surfaces (migration notice + installation flow) in Highlighter/Import/Go-Live experiences. - Implement Windows-only detection (registry protocol + running process) and an installer download/execute flow for Streamlabs Replay.
Reviewed changes
Copilot reviewed 16 out of 16 changed files in this pull request and generated 5 comments.
Show a summary per file
| File | Description |
|---|
| app/services/incremental-rollout.ts | Adds highlighterMigration feature flag. |
| app/services/highlighter/models/highlighter.models.ts | Extends highlighter state with replay install status/progress model. |
| app/services/highlighter/index.ts | Implements Replay install/open/import/stop-recording flows and related analytics/state. |
| app/services/highlighter/constants.ts | Adds setup URLs and Replay protocol/app naming constants. |
| app/components-react/windows/go-live/AiHighlighterToggle.tsx | Adds warning UI when external recorder is running; updates service calls/imports. |
| app/components-react/windows/go-live/AiHighlighterToggle.m.less | Layout/style adjustments for Go-Live highlighter card. |
| app/components-react/pages/Highlighter.tsx | Removes unused incremental-rollout import. |
| app/components-react/highlighter/StreamView.tsx | Shows MigrationNotice in stream view when flag enabled. |
| app/components-react/highlighter/MigrationNotice.tsx | New migration notice component that can trigger open/install flow. |
| app/components-react/highlighter/MigrationNotice.m.less | Styles for migration notice + installation flow UI. |
| app/components-react/highlighter/InstallationFlow.tsx | New install progress/error/success UI tied to replay install state. |
| app/components-react/highlighter/ImportStream.tsx | Switches import flow to Replay deeplink + adds install gating/UI. |
| app/components-react/highlighter/HypeWrapper.tsx | Extracts shared “hype” wrapper and platform logos from ImportStream. |
| app/components-react/highlighter/HypeWrapper.m.less | Styles for the extracted hype wrapper. |
| app/components-react/highlighter/ClipsView.tsx | Minor modal handler type adjustment / whitespace. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| await downloadFile( | ||
| setupUrl, | ||
| setupPath, | ||
| (progress: IDownloadProgress) => { | ||
| // Map download progress to 0-75% | ||
| const downloadPercent = progress.percent * 75; | ||
| const current = this.state.replayInstall.progress; | ||
| if (downloadPercent > current) { | ||
| this.SET_REPLAY_INSTALL({ progress: downloadPercent }); | ||
| } | ||
| }, | ||
| signal, | ||
| ); | ||
|
|
||
| clearProgress(); | ||
|
|
||
| if (signal.aborted) { | ||
| this.usageStatisticsService.recordAnalyticsEvent('AIHighlighter', { | ||
| type: 'ReplayInstallationCancelled', | ||
| phase: 'downloading', | ||
| }); | ||
| return false; | ||
| } | ||
|
|
||
| this.SET_REPLAY_INSTALL({ progress: 75 }); | ||
|
|
||
| // --- Installing phase --- | ||
| this.SET_REPLAY_INSTALL({ step: 'installing', progress: 75 }); | ||
|
|
||
| // Fake progress for install phase | ||
| progressInterval = setInterval(() => { | ||
| const current = this.state.replayInstall.progress; | ||
| if (current < 95) { | ||
| const increment = Math.max(0.3, (95 - current) * 0.03); | ||
| this.SET_REPLAY_INSTALL({ progress: Math.min(95, current + increment) }); | ||
| } | ||
| }, 500); | ||
|
|
||
| // Run the installer silently | ||
| await execAsync(`"${setupPath}"`, { timeout: 120000 }); | ||
|
|
There was a problem hiding this comment.
This flow downloads an installer EXE from a CDN and executes it (downloadFile -> execAsync("${setupPath}")) without any integrity verification. Elsewhere (e.g., AiHighlighterUpdater) downloads are checksum-verified before execution/unzip. Please add a checksum/signature verification step (manifest-provided SHA256, Authenticode check, etc.) before running the installer, and fail with a clear error if verification fails.
…m/stream-labs/desktop into highlighter/jk-replay-integration
No description provided.