ai-control-center 1.6.39 → 1.6.40
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Potentially problematic release.
This version of ai-control-center might be problematic. Click here for more details.
|
@@ -20,7 +20,7 @@ const STAGE_MAP = {
|
|
|
20
20
|
'implementation_complete': { pm: 'idle', arch: 'idle', coder: 'celebrating', deployer: 'idle' },
|
|
21
21
|
'review': { pm: 'reviewing', arch: 'idle', coder: 'waiting_input', deployer: 'idle' },
|
|
22
22
|
'review_complete': { pm: 'idle', arch: 'idle', coder: 'idle', deployer: 'idle' },
|
|
23
|
-
'approved': { pm: 'celebrating', arch: 'celebrating', coder: 'celebrating', deployer: '
|
|
23
|
+
'approved': { pm: 'celebrating', arch: 'celebrating', coder: 'celebrating', deployer: 'waiting_input' },
|
|
24
24
|
'deploying': { pm: 'idle', arch: 'idle', coder: 'idle', deployer: 'deploying' },
|
|
25
25
|
'deployed': { pm: 'celebrating', arch: 'celebrating', coder: 'celebrating', deployer: 'celebrating' },
|
|
26
26
|
'rejected': { pm: 'frustrated', arch: 'idle', coder: 'fighting_bug', deployer: 'idle' },
|
|
@@ -408,7 +408,10 @@ function onStateUpdate(projects) {
|
|
|
408
408
|
char.taskProgress = 0;
|
|
409
409
|
char.taskDuration = STAGE_DURATIONS[stage] || 0;
|
|
410
410
|
|
|
411
|
-
|
|
411
|
+
// When approved, always send deployer back to their dock to stand by
|
|
412
|
+
if (stage === 'approved' && char.role === 'deployer') {
|
|
413
|
+
char.moveTo(char.homeX, char.homeY);
|
|
414
|
+
} else if (!wasWorking && char.isWorking) {
|
|
412
415
|
char.moveTo(char.homeX, char.homeY);
|
|
413
416
|
}
|
|
414
417
|
}
|
|
@@ -451,21 +454,58 @@ function onStateUpdate(projects) {
|
|
|
451
454
|
|
|
452
455
|
if (stage) addActivity(name, stageToMessage(stage, feature));
|
|
453
456
|
|
|
454
|
-
//
|
|
457
|
+
// ── Deployed: play deploying animation first, then celebrate ───────────
|
|
455
458
|
if (stage === 'deployed' && feature) {
|
|
456
|
-
|
|
457
|
-
|
|
458
|
-
|
|
459
|
-
|
|
460
|
-
|
|
461
|
-
|
|
459
|
+
if (firstLoadDone) {
|
|
460
|
+
// Live: inject a client-side "deploying" phase (10s) before celebration
|
|
461
|
+
const deployerChar = characters.get(`${name}:deployer`);
|
|
462
|
+
if (deployerChar) {
|
|
463
|
+
deployerChar.state = 'deploying';
|
|
464
|
+
deployerChar.isWorking = true;
|
|
465
|
+
deployerChar.taskProgress = 0;
|
|
466
|
+
deployerChar.taskDuration = 10;
|
|
467
|
+
deployerChar.workBubble = '🚀 Launching to prod!';
|
|
468
|
+
deployerChar.workBubbleDuration = 9;
|
|
469
|
+
deployerChar.moveTo(deployerChar.homeX, deployerChar.homeY);
|
|
470
|
+
}
|
|
471
|
+
// Run conveyor belt for the deploy duration
|
|
472
|
+
layout.setProjectState(name, feature, 'deploying', true);
|
|
473
|
+
|
|
474
|
+
const capturedName = name;
|
|
475
|
+
const capturedFeature = feature;
|
|
476
|
+
setTimeout(() => {
|
|
477
|
+
// Celebration phase — all characters react
|
|
478
|
+
for (const role of ['pm', 'arch', 'coder', 'deployer']) {
|
|
479
|
+
const char = characters.get(`${capturedName}:${role}`);
|
|
480
|
+
if (char) {
|
|
481
|
+
const msg = role === 'deployer' ? '🚀 SHIPPED!' :
|
|
482
|
+
role === 'pm' ? '🎉 Amazing!' :
|
|
483
|
+
role === 'arch' ? '🏆 Nailed it!' : '🥳 We did it!';
|
|
484
|
+
char.react('celebrating', msg, 5);
|
|
485
|
+
}
|
|
486
|
+
}
|
|
487
|
+
// Fireworks + banner
|
|
488
|
+
if (effects) {
|
|
489
|
+
const origin = layout.getTeamOrigin(capturedName);
|
|
490
|
+
if (origin) effects.launchFireworks(origin.x + 160, origin.y + 80, 22);
|
|
491
|
+
effects.showBanner('🎉 SHIPPED!', `${capturedName}: ${capturedFeature.slice(0, 35)}`, 4.5);
|
|
492
|
+
}
|
|
493
|
+
layout.addShippedPackage(capturedName, capturedFeature);
|
|
494
|
+
saveShippedPackage(capturedName, capturedFeature);
|
|
495
|
+
// Mark ticket as delivered
|
|
496
|
+
const t = ticketManager.getByProject(capturedName);
|
|
497
|
+
if (t) t.delivered = true;
|
|
498
|
+
// Reset status board after celebration
|
|
499
|
+
setTimeout(() => {
|
|
500
|
+
layout.setProjectState(capturedName, '', 'idle', false);
|
|
501
|
+
prevStageMap.set(capturedName, 'idle');
|
|
502
|
+
}, 8000);
|
|
503
|
+
}, 10000);
|
|
504
|
+
} else {
|
|
505
|
+
// Page-load replay: silently add to warehouse, no animation
|
|
506
|
+
layout.addShippedPackage(name, feature);
|
|
507
|
+
saveShippedPackage(name, feature);
|
|
462
508
|
}
|
|
463
|
-
// Auto-reset status board to idle after celebration (8s matches char auto-expire)
|
|
464
|
-
const resetName = name;
|
|
465
|
-
setTimeout(() => {
|
|
466
|
-
layout.setProjectState(resetName, '', 'idle', false);
|
|
467
|
-
prevStageMap.set(resetName, 'idle');
|
|
468
|
-
}, 8000);
|
|
469
509
|
}
|
|
470
510
|
}
|
|
471
511
|
|
package/package.json
CHANGED