Skip to content

Comments

Feat/pomodoro#3

Closed
TexasOct wants to merge 3 commits intoUbiquantAI:mainfrom
TexasOct:feat/pomodoro
Closed

Feat/pomodoro#3
TexasOct wants to merge 3 commits intoUbiquantAI:mainfrom
TexasOct:feat/pomodoro

Conversation

@TexasOct
Copy link
Contributor


Add Pomodoro timer feature that controls perception layer
(screenshot/keyboard/mouse capture) based on work sessions.
Implements an idle-by-default strategy where perception only runs
during active Pomodoro sessions.

Core Changes:

  • Add PomodoroManager to handle session lifecycle and coordinate
    with perception layer
  • Implement session database storage (pomodoro_sessions,
    raw_records tables)
  • Create API handlers for starting/stopping Pomodoro sessions
  • Add migration system with initial schemas and Pomodoro feature
    migration

Perception Layer:

  • Remove _pomodoro_mode flag from ScreenshotCapture (Pomodoro
    only controls start/stop)
  • Fix screenshot capture blocking issue by removing
    run_in_executor
  • Simplify screenshot loop to call capture() directly in
    async context
  • Improve timing accuracy by compensating for execution time
    in sleep

Architecture:

  • Idle Mode (default): Perception layer stopped, zero resource
    usage
  • Active Mode (Pomodoro): Perception layer running, captures
    activity data
  • Session data persisted to database for deferred batch
    processing
  • SessionAgent paused during Pomodoro, resumes after for
    activity aggregation

Frontend:

  • Add PomodoroTimer component with start/stop controls
  • Create pomodoro Zustand store for state management
  • Add Tauri event handlers for Pomodoro processing events
  • Add i18n translations for Pomodoro UI

Documentation:

  • Update .project.md with Pomodoro mode principles and design
    rules
  • Document that Pomodoro has no system configuration parameters
  • Clarify that capture behavior (smart capture, deduplication)
    is not affected by Pomodoro mode

Technical Notes:

  • macOS Core Graphics requires screenshot capture in main event
    loop context
  • Thread pool execution causes 30s blocking on sct.grab() -
    resolved by direct async calls
  • Loop timing controlled by asyncio.sleep() with execution time
    compensation

Add dedicated Tauri event emitters for Pomodoro processing:

  • emit_pomodoro_processing_progress: Progress updates
  • emit_pomodoro_processing_complete: Completion notifications
  • emit_pomodoro_processing_failed: Error notifications

Resolves all TODOs in pomodoro_manager.py by integrating with
the existing event system infrastructure.

@TexasOct

- Remove unused 'processing.screenshot_interval'
  (replaced by monitoring.capture_interval)
- Remove unused 'image_optimization.max_images_per_event'
  (replaced by processing.max_screenshots_per_extraction)
- Clean up code references in settings.py and models/responses.py
- Adjust default capture interval from 0.2s to 1.0s
Add Pomodoro timer feature that controls perception layer
(screenshot/keyboard/mouse capture) based on work sessions.
Implements an idle-by-default strategy where perception only runs
during active Pomodoro sessions.

**Core Changes:**
- Add PomodoroManager to handle session lifecycle and coordinate
  with perception layer
- Implement session database storage (pomodoro_sessions,
  raw_records tables)
- Create API handlers for starting/stopping Pomodoro sessions
- Add migration system with initial schemas and Pomodoro feature
  migration

**Perception Layer:**
- Remove _pomodoro_mode flag from ScreenshotCapture (Pomodoro
  only controls start/stop)
- Fix screenshot capture blocking issue by removing
  run_in_executor
- Simplify screenshot loop to call capture() directly in
  async context
- Improve timing accuracy by compensating for execution time
  in sleep

**Architecture:**
- Idle Mode (default): Perception layer stopped, zero resource
  usage
- Active Mode (Pomodoro): Perception layer running, captures
  activity data
- Session data persisted to database for deferred batch
  processing
- SessionAgent paused during Pomodoro, resumes after for
  activity aggregation

**Frontend:**
- Add PomodoroTimer component with start/stop controls
- Create pomodoro Zustand store for state management
- Add Tauri event handlers for Pomodoro processing events
- Add i18n translations for Pomodoro UI

**Documentation:**
- Update .project.md with Pomodoro mode principles and design
  rules
- Document that Pomodoro has no system configuration parameters
- Clarify that capture behavior (smart capture, deduplication)
  is not affected by Pomodoro mode

**Technical Notes:**
- macOS Core Graphics requires screenshot capture in main event
  loop context
- Thread pool execution causes 30s blocking on sct.grab() -
  resolved by direct async calls
- Loop timing controlled by asyncio.sleep() with execution time
  compensation
Add dedicated Tauri event emitters for Pomodoro processing:
- emit_pomodoro_processing_progress: Progress updates
- emit_pomodoro_processing_complete: Completion notifications
- emit_pomodoro_processing_failed: Error notifications

Resolves all TODOs in pomodoro_manager.py by integrating with
the existing event system infrastructure.
@TexasOct TexasOct closed this Dec 27, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant