-
Notifications
You must be signed in to change notification settings - Fork 1.2k
feat: chrome extension #1519
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
feat: chrome extension #1519
Conversation
- Add settings panel with device memory toggle to web recorder interface - Support callbackUrl parameter in login form for post-auth redirects - Move AuthContextProvider to record layout for better auth state management - Improve permission request handling with fallback for denied devices - Show sign-in prompt when user is not authenticated on recorder page - Add settings button to recorder header with animated panel transition
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
12 files reviewed, 5 comments
apps/chrome-extension/README.md
Outdated
| ## Permissions | ||
|
|
||
| The extension requires the following permissions: | ||
|
|
||
| - **`storage`**: Store authentication tokens and user preferences | ||
| - **`tabs`**: Access tab information for tab recording | ||
| - **`activeTab`**: Capture current tab content | ||
| - **`scripting`**: Inject content script for recording indicator | ||
| - **`offscreen`**: Create offscreen document for media capture |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
logic: README lists permissions that aren't declared in manifest.json. The manifest only requests tabs, but this lists storage, activeTab, scripting, and offscreen. Either add these permissions to the manifest or update the README to match what's actually implemented.
Prompt To Fix With AI
This is a comment left during a code review.
Path: apps/chrome-extension/README.md
Line: 86:94
Comment:
**logic:** README lists permissions that aren't declared in `manifest.json`. The manifest only requests `tabs`, but this lists `storage`, `activeTab`, `scripting`, and `offscreen`. Either add these permissions to the manifest or update the README to match what's actually implemented.
How can I resolve this? If you propose a fix, please make it concise.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
apps/chrome-extension/README.md
Outdated
| ## Features | ||
|
|
||
| - **Multiple Recording Modes** | ||
| - Screen recording (entire screen or specific window) | ||
| - Tab recording (current browser tab) | ||
| - Camera recording (webcam only) | ||
|
|
||
| - **Recording Controls** | ||
| - Start/stop recording | ||
| - Pause/resume during recording | ||
| - Real-time recording timer | ||
| - On-page recording indicator | ||
|
|
||
| - **Audio Options** | ||
| - Optional microphone audio | ||
| - System audio capture (for tab recording) | ||
| - High-quality audio encoding | ||
|
|
||
| - **Seamless Integration** | ||
| - Automatic upload to Cap | ||
| - Direct link to recorded video | ||
| - Progress tracking during upload | ||
| - Multipart upload for large files |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
logic: README claims the extension provides recording controls, audio options, and upload functionality. The actual extension code only opens a tab to /record - all these features are implemented in the web app, not the extension. Update the README to clarify that the extension is a launcher for the web-based recorder.
Prompt To Fix With AI
This is a comment left during a code review.
Path: apps/chrome-extension/README.md
Line: 5:27
Comment:
**logic:** README claims the extension provides recording controls, audio options, and upload functionality. The actual extension code only opens a tab to `/record` - all these features are implemented in the web app, not the extension. Update the README to clarify that the extension is a launcher for the web-based recorder.
How can I resolve this? If you propose a fix, please make it concise.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| useEffect(() => { | ||
| console.log('Recording state:', { | ||
| canStartRecording, | ||
| isBrowserSupported, | ||
| supportCheckCompleted, | ||
| supportsDisplayRecording, | ||
| recordingMode, | ||
| organisationId, | ||
| unsupportedReason | ||
| }); | ||
| }, [canStartRecording, isBrowserSupported, supportCheckCompleted, supportsDisplayRecording, recordingMode, organisationId, unsupportedReason]); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
style: Remove debug console.log before merging to production.
| useEffect(() => { | |
| console.log('Recording state:', { | |
| canStartRecording, | |
| isBrowserSupported, | |
| supportCheckCompleted, | |
| supportsDisplayRecording, | |
| recordingMode, | |
| organisationId, | |
| unsupportedReason | |
| }); | |
| }, [canStartRecording, isBrowserSupported, supportCheckCompleted, supportsDisplayRecording, recordingMode, organisationId, unsupportedReason]); | |
| useEffect(() => { | |
| console.log('Recording state:', { | |
| canStartRecording, | |
| isBrowserSupported, | |
| supportCheckCompleted, | |
| supportsDisplayRecording, | |
| recordingMode, | |
| organisationId, | |
| unsupportedReason | |
| }); | |
| }, [canStartRecording, isBrowserSupported, supportCheckCompleted, supportsDisplayRecording, recordingMode, organisationId, unsupportedReason]); |
Note: If this suggestion doesn't match your team's coding style, reply to this and let me know. I'll remember it for next time!
Prompt To Fix With AI
This is a comment left during a code review.
Path: apps/web/app/(org)/record/RecorderPageContent.tsx
Line: 173:183
Comment:
**style:** Remove debug `console.log` before merging to production.
```suggestion
useEffect(() => {
console.log('Recording state:', {
canStartRecording,
isBrowserSupported,
supportCheckCompleted,
supportsDisplayRecording,
recordingMode,
organisationId,
unsupportedReason
});
}, [canStartRecording, isBrowserSupported, supportCheckCompleted, supportsDisplayRecording, recordingMode, organisationId, unsupportedReason]);
```
<sub>Note: If this suggestion doesn't match your team's coding style, reply to this and let me know. I'll remember it for next time!</sub>
How can I resolve this? If you propose a fix, please make it concise.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| const handleStopClick = () => { | ||
| stopRecording().catch((err: unknown) => { | ||
|
|
||
| }); | ||
| }; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
style: Empty catch block silently swallows errors. Handle errors properly or at least log them.
| const handleStopClick = () => { | |
| stopRecording().catch((err: unknown) => { | |
| }); | |
| }; | |
| const handleStopClick = () => { | |
| stopRecording().catch((err: unknown) => { | |
| console.error('Failed to stop recording:', err); | |
| }); | |
| }; |
Prompt To Fix With AI
This is a comment left during a code review.
Path: apps/web/app/(org)/record/RecorderPageContent.tsx
Line: 197:201
Comment:
**style:** Empty catch block silently swallows errors. Handle errors properly or at least log them.
```suggestion
const handleStopClick = () => {
stopRecording().catch((err: unknown) => {
console.error('Failed to stop recording:', err);
});
};
```
How can I resolve this? If you propose a fix, please make it concise.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| : () => { | ||
| startRecording().catch((err: unknown) => { | ||
|
|
||
| }); | ||
| } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
style: Empty catch block silently swallows errors. Handle errors properly or at least log them.
| : () => { | |
| startRecording().catch((err: unknown) => { | |
| }); | |
| } | |
| : () => { | |
| startRecording().catch((err: unknown) => { | |
| console.error('Failed to start recording:', err); | |
| }); | |
| } |
Prompt To Fix With AI
This is a comment left during a code review.
Path: apps/web/app/(org)/record/RecorderPageContent.tsx
Line: 389:393
Comment:
**style:** Empty catch block silently swallows errors. Handle errors properly or at least log them.
```suggestion
: () => {
startRecording().catch((err: unknown) => {
console.error('Failed to start recording:', err);
});
}
```
How can I resolve this? If you propose a fix, please make it concise.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
…ogging - Simplify Chrome extension README to reflect launcher-only functionality - Remove detailed feature descriptions for recording modes and controls - Update permissions list to only include required tabs permission - Fix organisationId nullish coalescing to use undefined instead of null - Remove verbose recording state debug logging from RecorderPageContent - Add error logging to start/stop recording handlers for better debugging
Summary
This PR adds a new tab-based web recorder flow. When users click the Chrome extension icon, it opens (or focuses) a dedicated recorder tab and redirects to /record, where the app can safely request camera and microphone permissions and start recording.
Why this approach
Chrome extensions can’t directly request camera/microphone access — permissions must come from a real web page.
The reason I created a new page instead of using the existing web-browser recording modal is to make it feel like a native browser extension experience. Opening it in a new page allows it to appear like an extension popup in the top-right corner, so it feels like you’re interacting with the extension itself rather than just another web modal.
What’s included
Opens or reuses a dedicated recorder tab from the extension
Full recording UI at /record with:
Recording mode selection (fullscreen, window, tab, camera-only)
Device selection & settings panel
In-progress controls (pause / resume / restart)
Persists selected devices via localStorage
Polished UI with smooth transitions and animated icons
https://cap.link/etvvdnprradt3x8
fixes #1502
fixes CAP-592
Future work
Explored an in-page iframe overlay recorder, but it introduces significant complexity (cross-origin permissions, iframe restrictions, state sync). The current tab-based approach is simpler and more robust for V1.