Skip to content

Electron App: Real-time updates #139

Description

@jongio

Overview

File system watching for real-time session list updates and attention status changes.

Acceptance Criteria

  • Watch session-store.db WAL file for changes (same as TUI's DBWatcher)
  • Watch ~/.copilot/session-state/ for attention changes (events.jsonl, lock files)
  • Auto-refresh session list within 2 seconds of external changes
  • Incremental update: only re-query changed data, not full reload
  • Debounce rapid file changes (coalesce within 500ms window)
  • Attention status re-scan on file changes
  • Visual indicator when refresh is in progress (subtle spinner)
  • Manual refresh available (r key / refresh button)
  • Watcher pauses when window is minimized/hidden (save resources)
  • Watcher resumes immediately when window regains focus
  • Handle watcher errors gracefully (file deleted, permissions changed)

Implementation

  • Use chokidar for cross-platform file watching
  • SQLite PRAGMA data_version as primary change signal
  • WAL file mtime as fallback signal
  • Session-state directory watching for attention (events.jsonl mtime)
  • IPC events push changes from main to renderer

Metadata

Metadata

Assignees

No one assigned

    Labels

    electronElectron desktop appelectron-p2Electron Phase 2 - Core Features

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions