Merge pull request #765 from rowboatlabs/fix/first-app-built-credit

fix(x): grant first_app_built credit for copilot-built apps
This commit is contained in:
gagan 2026-07-20 16:27:18 +05:30 committed by GitHub
commit 789301402f
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -1814,6 +1814,13 @@ export function setupIpcHandlers() {
lastAppsFingerprint = fingerprint; lastAppsFingerprint = fingerprint;
invalidateCopilotInstructionsCache(); invalidateCopilotInstructionsCache();
} }
// The copilot builds apps by writing the folder directly — apps:create is
// never on that path — so the first-app reward triggers off observed
// state instead: a valid non-installed app means the user built one.
// Cheap on repeat polls (maybeActivateCredit short-circuits once claimed).
if (apps.some((a) => a.kind === 'local' && a.status === 'ok')) {
void maybeActivateCredit('first_app_built');
}
return { return {
serverRunning: status.running, serverRunning: status.running,
...(status.error ? { serverError: status.error } : {}), ...(status.error ? { serverError: status.error } : {}),