Skip to content

Capture ground-truth app/window/URL metadata per frame #11

@sunnypatneedi

Description

@sunnypatneedi

Problem

Captures have no metadata about what app was in focus or what URL was active. This makes it impossible to filter, search, or attribute context to specific workflows.

Solution

Query macOS Accessibility API (via osascript) immediately before each frame write to get the frontmost app's bundle ID, display name, window title, and active browser URL. Store this in the SQLite queue so it's available for downstream consumers.

Details

  • 2s timeout; always resolves (never throws); missing values are null
  • Supports Chrome, Safari, Arc, Edge, Opera, Brave (Firefox: null — no AppleScript URL access)
  • Adds 4 columns to stills_queue: app_bundle_id, app_name, window_title, url
  • Backward-compatible migration via PRAGMA table_info + ALTER TABLE ADD COLUMN

Acceptance criteria

  • window-metadata.js exports getWindowMetadata()
  • All 4 metadata columns added to stills_queue with migration
  • Metadata fetched before file write (so exclusion can use it — see P0-3)
  • Injectable via _windowMetadataProvider for test isolation

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions