Repository navigation
feat(desktop): launch a project's desktop app only from its approval - #61
Merged
Merged
Conversation
The launch main gives the agent (PR 4a, design reviewed): the app's copy approved for this project and what it opens, inspected once by its status. An update by the same developer is tried confined first, quietly (one trial per app and project), and that build approved compare-and-set (the same copy, developer and opens, the project still open). Anything else is refused for the user to settle in the Apps panel, never for the agent to retry. - a take of a desktop app keeps its build and what it opened (appBuild: shown, never in its key, never a reason to record again) - Kif starting ends an "Add desktop app…" check in progress - BACKLOG: #60's CI flakes; what an approval doesn't cover (files/)
…proved - a launch re-reads the approval and the project after looking at the app: one removed or switched meanwhile is never launched - one quiet trial per build: an update landing during a trial is never launched untried; a stopped launch stops only its own wait - a quiet trial that didn't work says why (a site, a quit, a failure); an approval that can't be written is refused for the user - Kif starting ends checks in progress only (picked cards kept); a launch's stop reaches its look at the app; the take's build shape from its schema; status tests assert the app they return
…s asked again - one quiet trial per app and project (launches meanwhile wait); after it a launch asks the app's status again and must find the build just approved (an update, a move, a replacement meanwhile: refused) - the quiet trial ends with the launcher (stopAll: a project switch, a quit), never with one launch's stop; a launch already stopped starts none - the trial approves against the launch's own project; a launch checks the approved build is the one it starts - an add's check ended by Kif starting or a switch is said in words
Simplified after a third review round on the shared quiet trial: each launch of an updated app tries it itself (stopped by its own stop, or by the launcher's as it was when the launch began: a project switch, a quit refused in words), then approves compare-and-set (two launches that both tried it approve the same build). No trial shared, kept, or joined. - an add's check ended (Kif started, given up) always said in words - a folder in files/ gone mid-copy said as a change; the slow-copy tests budget the app's start on the slower of two
… met it On a busy CI runner the page loads slower than the late dialog's 300 ms, so the dialog is up as the steps begin and is handled before "wait" instead of "go" (seen twice). Handled once, off camera, before the click it would block, either way: the click works.
The previous commit's edit dropped the test's closing brace (lint and format failed in CI).
Codecov Report❌ Patch coverage is 📢 Thoughts on this report? Let us know! |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
PR 4a of the Electron targets epic (#55): the main side of "Kif works in desktop apps". The studio's side (grounding, checks, recordings) is 4b. The design was reviewed, and decisions were taken with the user (2026-10-09 and 2026-10-10).
Launching from the approval (
apps/desktop/src/main/desktop-launch.ts)DesktopLauncher.launch(name, signal)launches the project's app only from the copy approved for this project folder and for what the project opens with it. The app is inspected once, by its status.ready: launched with the copy's executable and bundle, the project'sfiles/when it has one, and itsargs,originsand viewport. The approval and the project are read again just before the spawn: if the app was removed, or the project switched, while it was being looked at, it is never launched. The approved build must also be the one being started.updated(the same developer's new build; user decision): the launch tries it confined, quietly. It's stopped by the launch's own stop, or by the launcher's (stopAll: a project switch, a quit; said in words). Then:DesktopRefused(needsUser) for the user to settle in the Apps panel. The agent says so and never retries. A quiet trial that didn't work says why (a site, a quit, a failure).Takes
A desktop app's take keeps its build:
appBuildholds its version (bounded) and what it opened. It's shown, never part of the take's key, and never a reason to record again (user decision). Its meta is strict, so an older Kiframe can't read such a take; OBJECT-MODEL says so.Also
files/that disappears mid-copy is said as a change.files/).Not yet
Nothing creates the launcher until 4b, which wires it into the studio, with
stopAllon a project switch and on quit. The quick wiring check from "Kif starting ends a check" is covered by 4b's end-to-end test.Tests
appBuild, read back from its meta.