Lucas/onboarding browser activity#12
Merged
Merged
Conversation
* "Claude PR Assistant workflow" * "Claude Code Review workflow"
* feat(cv): add phone detector placeholder + detection loop
- phone_detector.py: detect_phone(frame) placeholder, returns protocol-shaped
event ({type,status,confidence,timestamp}); real detector slots in behind it
- detection_loop.py: camera -> detect_phone -> print loop at 10fps, clean shutdown
- requirements.txt: pin CV/server deps (Python 3.11; MediaPipe lacks 3.13/3.14 wheels)
- setup.sh: one-shot install for Python venv + Electron npm
- docs: python/README.md (incl. camera vs loop separation rationale), root README setup
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
* feat(cv): implement phone detection with YOLOX via onnxruntime
Replace the placeholder detect_phone() with a real detector:
- find_phones(frame): YOLOX-S inference -> decoded, thresholded, NMS'd boxes
- detect_phone(frame): per-frame protocol event (status/confidence/timestamp)
- phone_detect_test.py: visual webcam test that reuses find_phones()
- lazy-loaded onnxruntime session (load model once, reuse every frame)
- setup.sh fetches yolox_s.onnx; onnxruntime added to requirements
- gitignore *.task for the upcoming gaze model
Detector is perception only ("phone in this frame?"); distracted-state
policy (smoothing / N-second timer) stays in the loop layer.
---------
Co-authored-by: Claude Opus 4.8 <noreply@anthropic.com>
…tor tabs detection UI and detection logic (possibly)
* ci: add Electron workflow * ci: add Electron and Python workflows
* Onboarding flow updates: added new onboarding steps, updated styles, and removed old assets and components. The new onboarding steps include Camera Setup, Distraction Options, Focus Environment, and Welcome. The styles for the onboarding flow have been updated to enhance the visual appeal and user experience. Old assets such as hero.png, react.svg, and vite.svg have been removed to streamline the design. Additionally, the Onboarding component has been deleted in favor of a more modular approach with individual components for each onboarding step. * changes on onboarding file names and added camera status and camera selection in camera setup step
…cker readme guide
rxv801
approved these changes
Jun 11, 2026
rxv801
left a comment
Owner
There was a problem hiding this comment.
Should fix soon:
- ipc-handlers.ts — duplicate import { ipcMain } from 'electron' (build/lint risk)
- Remove leftover debug console.logs — detectCommonWindowsApps.ts (one marked "remove later"), ipc-handlers.ts, preload/index.js
Confirm / clarify:
- preload/index.ts deleted, raw index.js committed (skips type-check, uses CJS in an ESM app) — intentional?
-- shared/protocol.ts looks deleted — intended? - detectCommonWindowsApps is Windows-only + detects installed (not running) apps — flag as cross-platform / runtime-detection
overall seems fine to me
rxv801
added a commit
that referenced
this pull request
Jun 12, 2026
* Onboarding flow updates: added new onboarding steps, updated styles, and removed old assets and components. The new onboarding steps include Camera Setup, Distraction Options, Focus Environment, and Welcome. The styles for the onboarding flow have been updated to enhance the visual appeal and user experience. Old assets such as hero.png, react.svg, and vite.svg have been removed to streamline the design. Additionally, the Onboarding component has been deleted in favor of a more modular approach with individual components for each onboarding step. * changes on onboarding file names and added camera status and camera selection in camera setup step * Lucas/onboarding browser activity (#12) * Add claude GitHub actions 1778132378878 (#4) * "Claude PR Assistant workflow" * "Claude Code Review workflow" * feat(cv): phone detection (YOLOX-S via onnxruntime) (#5) * feat(cv): add phone detector placeholder + detection loop - phone_detector.py: detect_phone(frame) placeholder, returns protocol-shaped event ({type,status,confidence,timestamp}); real detector slots in behind it - detection_loop.py: camera -> detect_phone -> print loop at 10fps, clean shutdown - requirements.txt: pin CV/server deps (Python 3.11; MediaPipe lacks 3.13/3.14 wheels) - setup.sh: one-shot install for Python venv + Electron npm - docs: python/README.md (incl. camera vs loop separation rationale), root README setup Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> * feat(cv): implement phone detection with YOLOX via onnxruntime Replace the placeholder detect_phone() with a real detector: - find_phones(frame): YOLOX-S inference -> decoded, thresholded, NMS'd boxes - detect_phone(frame): per-frame protocol event (status/confidence/timestamp) - phone_detect_test.py: visual webcam test that reuses find_phones() - lazy-loaded onnxruntime session (load model once, reuse every frame) - setup.sh fetches yolox_s.onnx; onnxruntime added to requirements - gitignore *.task for the upcoming gaze model Detector is perception only ("phone in this frame?"); distracted-state policy (smoothing / N-second timer) stays in the loop layer. --------- Co-authored-by: Claude Opus 4.8 <noreply@anthropic.com> * whitelist common windows apps detection, and UI, preparing for navigator tabs detection UI and detection logic (possibly) * minor fixes on build, unused import * ci: add Electron workflow (#7) * ci: add Electron workflow * ci: add Electron and Python workflows * Lucas/onboarding (#6) * Onboarding flow updates: added new onboarding steps, updated styles, and removed old assets and components. The new onboarding steps include Camera Setup, Distraction Options, Focus Environment, and Welcome. The styles for the onboarding flow have been updated to enhance the visual appeal and user experience. Old assets such as hero.png, react.svg, and vite.svg have been removed to streamline the design. Additionally, the Onboarding component has been deleted in favor of a more modular approach with individual components for each onboarding step. * changes on onboarding file names and added camera status and camera selection in camera setup step * no changes * merge conflicts solved * Add browser activity onboarding rules UI and logic * Clean up camera setup lifecycle and comments * fixed environment focus settings directory --------- Co-authored-by: Saatvik Sharma <200460255+rxv801@users.noreply.github.com> Co-authored-by: Claude Opus 4.8 <noreply@anthropic.com> --------- Co-authored-by: Saatvik Sharma <200460255+rxv801@users.noreply.github.com> Co-authored-by: Claude Opus 4.8 <noreply@anthropic.com>
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.
Summary
This PR is stacked on top of
lucas/onboarding.Please review the base onboarding PR first, then review this PR.
This PR adds a new Browser Activity onboarding step, moves browser page rules into shared defaults, connects them to the focus environment settings hook, and cleans up camera lifecycle/comments.
Review order
Base PR first:
This PR second:
This PR should only show the follow-up browser activity and cleanup work. If GitHub shows the whole onboarding implementation, the PR base is probably wrong.
What changed
New browser activity onboarding screen
electron/src/renderer/components/onboarding/BrowserActivitySelectionStep.tsxAdds a new onboarding step for common websites/pages.
This screen lets the user mark browser activity as allowed or blocked.
Examples:
Important: this does not detect websites yet. It only lets the user configure rules that can later be matched against the active browser window title.
For example:
can later match:
["youtube"]Shared browser activity rules
electron/src/shared/browserActivity/commonBrowserActivityRules.tsAdds the default browser activity rule catalogue.
This is separate from
commonApps.tsbecause browser activity rules are not installed desktop programs.It includes:
Example distinction:
Focus environment settings integration
electron/src/renderer/hooks/useFocusEnvironmentSettings.tsUpdates the settings hook so it now owns both:
It now exposes:
The browser activity rules are saved in the same localStorage object:
This keeps the focus environment settings in one place.
Onboarding flow update
electron/src/renderer/pages/OnboardingPage.tsxAdds the Browser Activity screen into the onboarding flow.
Updated flow:
Browser activity UI styling
electron/src/renderer/index.cssAdds styling for the new browser activity screen.
The layout was changed to a single-column list because website descriptions need more horizontal space than desktop app names.
Camera lifecycle cleanup
electron/src/renderer/hooks/useCameraDevices.tsImproves the camera lifecycle so the preview stream is stopped when the camera setup step unmounts.
Expected behaviour:
Because onboarding uses an exit animation, the camera may stay on briefly during the transition before the previous screen fully unmounts.
Camera setup comments and cleanup
electron/src/renderer/components/onboarding/OnboardingCameraSetup.tsxAdds clearer comments and makes the video preview cleanup more explicit.
General comments and structure cleanup
Adds file headers and higher-level comments to make the onboarding code easier for new contributors to understand.
Suggested review focus
Please focus on:
BrowserActivitySelectionStep.tsxcommonBrowserActivityRules.tsuseFocusEnvironmentSettings.tsOnboardingPage.tsxuseCameraDevices.tsNotes
This PR does not implement real browser tab detection yet.
For the MVP, browser activity will later be estimated from the active browser window title. A future browser extension can replace that with accurate tab URL detection.