Warning
Review limit reached
You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository.
Next included review available in 47 minutes.
View limit details
Limit details: You’ve used the included review currently available.
Review configuration:
⚙️ Run configuration
- Configuration used: defaults
- Review profile: CHILL
- Plan: Advanced
- Run ID:
15145a20-0dd0-4995-af09-81d9db1767c6
📥 Commits
Reviewing files that changed from the base of the PR and between 9945a0a5f7557898b43bec0332bafc98643d19bd and 16b8babdb09d5af33f8ba81dda84638831d398c6.
📒 Files selected for processing (2)
src/browser/profiles.tstest/profiles.test.mjs
📝 Walkthrough
Walkthrough
Streams now start through short-lived claim links and require an authenticated, authorized owner. Each owner receives a persistent browser profile. The changes add profile and process lifecycle controls, claim authorization and web pages, Discord command integration, and supporting tests and deployment settings.
Changes
Personal Browser Streams
| Layer / File(s) | Summary |
|---|---|
Profile configuration and deployment .dockerignore, .env.example, .gitignore, README.md, compose.yaml, src/config.ts, src/index.ts | Configuration and startup now define and prepare a dedicated browser-profile root. Container settings mount persistent profile storage and allow 30 seconds for shutdown. Setup documentation describes the OAuth and profile requirements. |
Profile ownership and browser cleanup src/browser/*, src/streaming/direct.ts, src/browser/capture.ts, src/browser/child-exit.ts, test/profiles.test.mjs, test/driver.test.mjs, test/integration/profile-isolation.mjs, test/streaming.test.mjs | Browser startup leases a private profile to a validated owner and tracks the browser process. Browser operations check that the expected driver remains active. Shutdown waits for process exit before releasing the profile lease. Tests cover profile isolation, persistence, cleanup, and stale browser operations. |
Claim authorization and web flow src/server/claims.ts, src/server/authorization.ts, src/server/web.ts, src/server/index.ts, src/discord/streaming.ts, public/claim.html, public/js/claim.js, public/js/remote.js, public/css/style.css, docs/DISCORD_OAUTH.md, test/claims.test.mjs, test/web.test.mjs | The web server serves claim pages and accepts authenticated, origin- and CSRF-checked claim submissions. Claim handling verifies ownership, current membership, and join permission before startup. The claim page supports sign-in, account switching, and stream claiming. |
Discord command wiring src/discord/commands.ts, src/index.ts, test/commands.test.mjs, README.md, .env.example | Join commands reserve claims instead of starting streams directly. Leave and voice-departure handling stop streams through claim teardown. URL navigation requires browser ownership and current join permission. |
Priority: ➖ Normal
Estimated code review effort: 4 (Complex) | ~60 minutes
Change: Feature
Sequence Diagram(s)
| 1 | sequenceDiagram |
| 2 | participant DiscordCommands |
| 3 | participant ClaimPage |
| 4 | participant WebServer |
| 5 | participant StreamClaims |
| 6 | participant BrowserControls |
| 7 | participant VoiceConnection |
| 8 | participant CaptureService |
| 9 | DiscordCommands->>StreamClaims: Reserve a five-minute claim |
| 10 | DiscordCommands->>ClaimPage: Provide claim link |
| 11 | ClaimPage->>WebServer: Check login session |
| 12 | ClaimPage->>WebServer: Submit claim ID and CSRF token |
| 13 | WebServer->>StreamClaims: Validate claim and session |
| 14 | StreamClaims->>BrowserControls: Initialize owner's browser |
| 15 | StreamClaims->>VoiceConnection: Join claimed voice channel |
| 16 | StreamClaims->>CaptureService: Start selected capture mode |
Merge Risk: 🔵 Low · up to 9945a
Claim-based streams and per-user browser profiles appear coherent. One configuration gap remains: a profile root set to a parent directory of the app is accepted, and startup would lock down that parent directory's permissions. Tighten the check before or soon after merge.
🚥 Pre-merge checks | ✅ 4 | ❌ 1
❌ Failed checks (1 warning)
| Check name | Status | Explanation | Resolution |
|---|---|---|---|
| Docstring Coverage | ⚠️ Warning | Docstring coverage is 57.45% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 47 functions across 24 files. (8 skipped:… | Write docstrings for the functions missing them to satisfy the coverage threshold. |
✅ Passed checks (4 passed)
| Check name | Status | Explanation |
|---|---|---|
| Description Check | ✅ Passed | Check skipped - CodeRabbit’s high-level summary is enabled. |
| Title check | ✅ Passed | The title clearly summarizes the main change: OAuth claims are required for users who access personal browser profiles. |
| Linked Issues check | ✅ Passed | Check skipped because no linked issues were found for this pull request. |
| Out of Scope Changes check | ✅ Passed | Check skipped because no linked issues were found for this pull request. |
Full details: Docstring Coverage
Explanation
Docstring coverage is 57.45% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 47 functions across 24 files. (8 skipped: 8 unsupported.)
✨ Finishing Touches 💡 1
📝 Generate docstrings 💡
- Commit to this branch
- Create a new PR
🧪 Generate unit tests (beta)
- Commit to this branch
- Create a new PR
- Autopilot · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.
Comment @coderabbitai help to get the list of available commands.