Skip to content

feat(studio): ground, check and record scenes in a desktop app - #62

Merged
winlp4ever merged 9 commits into
epic/electron-targetsfrom
feat/electron-studio
Oct 10, 2026
Merged

winlp4ever merged 9 commits into
epic/electron-targetsfrom
feat/electron-studio

Conversation

@winlp4ever

Copy link
Copy Markdown
Contributor

PR 4b of the Electron targets epic: Kif grounds, checks and records a scene in a project's desktop app, launched by the host's launcher (from its approval, confined).

  • One live launch of a desktop app, owned by the tool call that started it: a stop or the studio's close ends it; it's never joined; an app removed or changed while it opened is never kept. A web app's live context stays between web apps.
  • A check or recording runs in a fresh launch (closing that app's live copy first) and the take records appBuild.
  • No local path reaches the agent: launch errors are path-free at the source, the launcher replaces any message naming a known folder, and a desktop app's page and link addresses are said by its guard.
  • Every launch failure is the user's to settle: the agent tells them and never retries (needsUser, kept through the tool wrapper and the agent loop).
  • Handover is refused in desktop apps for now (measured and enabled in PR 5).

Redesigned after three review rounds (shared live launch, path regex), then two review rounds on the redesign. Each fix's test fails with the bug put back. pnpm check and the desktop e2e pass.

The studio works in a desktop app as in a web app (PR 4b, design
reviewed), through the host's launcher (from the app's approval, confined):

- grounding keeps one live launch of the scene's app (another app's scene
  closes it first; one that quit is launched again, said); a check and a
  recording each run in a fresh launch, closed whole after; a take keeps
  the app's build
- the app's pages are said by its guard (its own page or not), never its
  file path; looking at a ref and an approval's screenshot read the
  window's size from the page
- a refusal the user settles is said for the agent to tell them, never to
  retry; no handover in a desktop app yet (a scene with one isn't saved)
- main gives the agent its launcher, its quiet trials ended as the project
  switches or the app quits; the prompt says how desktop apps are worked
…sals

- every launch failure is a refusal for the user, its local paths taken out
  (the app's place, the work area, the project, the home: whole, then any
  other); a tool error the user settles never invites a retry
- the scene's app live before a step's refs are resolved (another app's
  page: a new snapshot asked); the live page kept between web apps' scenes
  (a sign-in by hand kept), closed only for a desktop app's
- a launch stopped with the tool that asked for it; an app removed from
  the project closed; a relaunch said on a failing step too
- no handover in a desktop app live either, nor through a preset; window
  sizes read with a bound
- the live page being opened is that app's: a caller asking for another
  waits, then asks again (closed first if need be); a desktop launch is
  the studio's (ended as it closes), each caller stopped by its own stop
- an app removed while it launched is never kept; a relaunch said only
  once it worked; a handover refused before anything launches; the
  handover check reads each step
- local paths taken out by one runtime helper (known ones whole, file:
  URLs, a path up to where it plainly ends); only an approval's refusal
  is the user's to settle (a launch that timed out may be tried again)
Round 3 still found normal-use bugs in the shared live launch and the
path regex, so both are redesigned:

- a desktop launch is owned by the tool call that started it: its stop
  or the studio's close ends it (trial and spawn), it is never joined (a
  call while it goes on is refused, one after a stop waits it out), and
  an app removed or changed while it opened is never kept
- launch errors name no local path by construction (OS errors by their
  code); the launcher passes only those and its own refusals, and
  replaces whole a message naming a folder it knows
- every launch failure is the user's to settle: the agent tells them and
  never retries
…t a time

- a refusal the user settles keeps its flag through the tool wrapper and
  the agent loop: the model is told to tell them, never to retry
- a check or recording closes the live copy of a desktop app first, and
  a stop during its launch ends the call as a stop
- a recording closes its launched app when its take folder can't be made
- the live app is closed when the project lists another app under its
  name; concurrent closes share one close
- a step is checked before any app is launched or closed for it
- a desktop app's snapshot says its links by the guard (never a file path)
- a copy error with no code is said without its message
… checked

- a step's shape is checked before any app opens or closes for it (its
  refs stood in for by a plain locator)
- a check or recording closes only its own app's live copy; another
  desktop app stays live
- whether a launch in flight is a desktop one is kept when it starts (an
  app removed meanwhile is still waited out); one rule for a launch in
  flight
- look says an app that quit and was launched again
- a refusal is said in its own words (no "Error:", no doubled prefix);
  one needsUser helper; the live page's app and identity required
With several apps and none open, snapshot, look and a handover say to open the scene's app with a step first (a pause step does nothing else) instead of opening the first app. A project with one app still opens it. look's hidden failure reason goes to stderr under KIFRAME_ELECTRON_DEBUG.
A hidden window never paints under xvfb, so a look's screenshot timed out on Linux CI. Also backlogs the launch's splash race (seen on macOS CI).
@winlp4ever
winlp4ever merged commit ad41fa9 into epic/electron-targets Oct 10, 2026
3 checks passed
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