Skip to content

Commit f4a36fd

Browse files
Cell completion: random Nurro celebration with +1 and total count
- 10 Nurro images in rotation (success, trophy, celebrate, dance, at-home, confetti popper, celebrate2, popcorn, celebrate3, experiment) - Shows "+1 Cell Complete!" with total cells proofread count - Triggers from both Cell Library Complete button and lightbulb menu - Also: Pyr icon 28px with glow, streak flame pulse in profile Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
1 parent 311fe88 commit f4a36fd

File tree

12 files changed

+40
-11
lines changed

12 files changed

+40
-11
lines changed

src/components/CellLibraryPanel.vue

Lines changed: 23 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ import {
66
useLoginStore,
77
useCellHistoryStore,
88
useHelpRequestStore,
9+
useUserStatsStore,
910
type ProofreadingTask,
1011
type HelpRequest,
1112
} from '../store';
@@ -267,14 +268,29 @@ async function completeCell(cell: typeof cells.value[0]) {
267268
document.dispatchEvent(new CustomEvent('nge:seg-status-changed', { detail: { segmentId: cell.segId, status: 'completed' } }));
268269
await backend.loadTasks('eyewire_ii');
269270
// Celebration!
270-
triggerCellCelebration(cell.segId);
271-
}
272-
273-
function triggerCellCelebration(segId: string) {
271+
triggerCellCelebration();
272+
}
273+
274+
import nurroSuccess from '../../static/nurro/nurro-success.png';
275+
import nurroTrophy from '../../static/nurro/nurro-trophy.png';
276+
import nurroCelebrate from '../../static/nurro/nurro-celebrate.png';
277+
import nurroDance from '../../static/nurro/nurro-dance.png';
278+
import nurroAtHome from '../../static/nurro/nurro-at-home.png';
279+
import nurroConfetti from '../../static/nurro/nurro-confetti.png';
280+
import nurroCelebrate2 from '../../static/nurro/nurro-celebrate2.png';
281+
import nurroPopcorn from '../../static/nurro/nurro-popcorn.png';
282+
import nurroCelebrate3 from '../../static/nurro/nurro-celebrate3.png';
283+
import nurroExperiment from '../../static/nurro/nurro-experiment.png';
284+
const NURRO_IMAGES = [nurroSuccess, nurroTrophy, nurroCelebrate, nurroDance, nurroAtHome, nurroConfetti, nurroCelebrate2, nurroPopcorn, nurroCelebrate3, nurroExperiment];
285+
286+
function triggerCellCelebration() {
287+
const statsStore = useUserStatsStore();
288+
const total = statsStore.stats.cellsSubmitted;
289+
const nurro = NURRO_IMAGES[Math.floor(Math.random() * NURRO_IMAGES.length)];
274290
backend.pendingBadgeCelebration = {
275-
title: 'Cell Complete!',
276-
body: `You finished proofreading segment ...${segId.slice(-6)}. Great work!`,
277-
imageUrl: neuronIcon,
291+
title: '+1 Cell Complete!',
292+
body: `Total cells proofread: ${total}`,
293+
imageUrl: nurro,
278294
};
279295
}
280296

src/widgets/lightbulb_service.ts

Lines changed: 17 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,17 @@
88

99
import {EYEWIRE_II_CAVE_CONFIG} from '../config';
1010
import {useProofreadingBackendStore, useCellHistoryStore, useUserStatsStore} from '../store';
11-
import neuronIcon from '../../static/badges/pyr/neuron-icon-white.png';
11+
import nurroSuccess from '../../static/nurro/nurro-success.png';
12+
import nurroTrophy from '../../static/nurro/nurro-trophy.png';
13+
import nurroCelebrate from '../../static/nurro/nurro-celebrate.png';
14+
import nurroDance from '../../static/nurro/nurro-dance.png';
15+
import nurroAtHome from '../../static/nurro/nurro-at-home.png';
16+
import nurroConfetti from '../../static/nurro/nurro-confetti.png';
17+
import nurroCelebrate2 from '../../static/nurro/nurro-celebrate2.png';
18+
import nurroPopcorn from '../../static/nurro/nurro-popcorn.png';
19+
import nurroCelebrate3 from '../../static/nurro/nurro-celebrate3.png';
20+
import nurroExperiment from '../../static/nurro/nurro-experiment.png';
21+
const NURRO_IMAGES = [nurroSuccess, nurroTrophy, nurroCelebrate, nurroDance, nurroAtHome, nurroConfetti, nurroCelebrate2, nurroPopcorn, nurroCelebrate3, nurroExperiment];
1222

1323
// ─── Auth token helpers (mirrors the pattern in store.ts) ───────────────────
1424

@@ -269,10 +279,13 @@ export async function setCellComplete(
269279
// Celebration!
270280
try {
271281
const backend = useProofreadingBackendStore();
282+
const statsStore = useUserStatsStore();
283+
const total = statsStore.stats.cellsSubmitted;
284+
const nurro = NURRO_IMAGES[Math.floor(Math.random() * NURRO_IMAGES.length)];
272285
backend.pendingBadgeCelebration = {
273-
title: 'Cell Complete!',
274-
body: `You finished proofreading segment ...${rootId.slice(-6)}. Great work!`,
275-
imageUrl: neuronIcon,
286+
title: '+1 Cell Complete!',
287+
body: `Total cells proofread: ${total}`,
288+
imageUrl: nurro,
276289
};
277290
} catch { /* non-critical */ }
278291
return true;

static/nurro/nurro-at-home.png

87.8 KB
Loading

static/nurro/nurro-celebrate.png

804 KB
Loading

static/nurro/nurro-celebrate2.png

210 KB
Loading

static/nurro/nurro-celebrate3.png

2.03 MB
Loading

static/nurro/nurro-confetti.png

740 KB
Loading

static/nurro/nurro-dance.png

792 KB
Loading

static/nurro/nurro-experiment.png

554 KB
Loading

static/nurro/nurro-popcorn.png

697 KB
Loading

0 commit comments

Comments
 (0)