Skip to content

Target window config surface #28

Description

@jpka

Parent

Part of #25 (Screen Solver v1: implementation spec), itself under the map #1.

What to build

The app's settings, and a way to change the target window it watches without restarting. config.json lives under the state root established in ticket 1, holding the target window identity (process name + title — deliberately not a raw OS handle, since handles aren't stable across restarts) and the provider/model selection. Window enumeration lists the currently open windows a user could pick from. A write path lets a client change the target window; every field is live-reloadable with no restart, and a target change is broadcast (a config{target} event, consumed later by ticket 5's SSE layer and ticket 8's client — this ticket only needs to emit it on an internal event bus or equivalent, not yet serve it over the wire).

Acceptance criteria

  • config.json is created under the state root on first run if absent, with a null/unset target window.
  • The app can enumerate currently open top-level windows, returning enough identity (process name + title) to disambiguate them.
  • Setting a target window persists to config.json and survives an app restart.
  • Setting a target window while the app is running takes effect immediately — no restart required.
  • Setting a target window emits a change signal carrying the new target identity, observable by anything subscribed (even if nothing consumes it yet in this ticket).
  • The target window is re-resolved by process name + title on startup, with a documented fallback behavior if resolution fails (falls through to "no target configured").

Blocked by

#26 (Host process bootstrap & API key gate) — needs the state root and startup sequence in place.

Metadata

Metadata

Assignees

No one assigned

    Labels

    ready-for-agentImplementation-ready spec, ready to be picked up by an agent

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions