Skip to content

feat(gamification): complete audio palette — moods, boss level, heartbeat, control center#182

Merged
jsell-rh merged 19 commits intomainfrom
feat/gamification
Mar 12, 2026
Merged

feat(gamification): complete audio palette — moods, boss level, heartbeat, control center#182
jsell-rh merged 19 commits intomainfrom
feat/gamification

Conversation

@jsell-rh
Copy link
Owner

Completing the audio-sme brainstorm (all 12 ideas)

Builds on PR #180. Implements the remaining 4 audio-sme ideas plus the audio control center infrastructure.

New in this PR

Audio Control Center (#11 — impact 5/5)

  • soundVolume ref (0–100% slider) — multiplied in tone()/sweep() for uniform scaling
  • soundCategories ref with 5 per-category toggles (persisted to localStorage):
    • Urgent — blocked/error alerts
    • Events — task transitions, spawn, PR shipped
    • Celebrations — task done, sprint complete
    • Ambient — activity ticks (default OFF)
    • Social — messages, @mention pings, collaboration
  • isCategoryEnabled(cat) — all play* functions check their category
  • SettingsView: volume slider + per-category toggle grid

Agent Moods (#5 — impact 4)

  • playAgentMoodActive(name): ascending root→fifth — agent 'waking up'
  • playAgentMoodIdle(name): descending fifth→root — agent 'settling down'
  • Uses each agent's pentatonic hash voice for tonal consistency with signature chimes
  • Fixed prevStatus capture bug in agent_updated handler (was reading post-patch status, now pre-patch)

Boss Level (#4 — impact 4)

  • playSuccess(priority?) now accepts priority
  • 'critical' priority adds a C5→G5→C6 ascending lead-in run before the chord
  • Theme-aware (retro/space/classic/nature variants)
  • KanbanView passes task priority on both local drag-drop and remote SSE

Heartbeat Mode (#7 — impact 3)

  • playAgentTick(name): 3ms pentatonic micro-tone at agent's signature frequency
  • Replaces uniform white-noise tick — active fleets now sound like a chord of working agents
  • Still gated by activityTickEnabled toggle

PR Shipped (#10) + Collaboration Chord (#8)

  • playPRShipped(): descending 700→350Hz sweep + landing tone
  • playCollaborationChord(sender, receiver): both agents' pentatonic voices as a brief harmony

Audio-sme scorecard (12/12 implemented)

# Name Category Status
1 Alert Taxonomy Architecture ✅ Fulfilled by category system
2 Dissonance Flag Urgent #180
3 The Arc Events #180
4 Boss Level Celebrations ✅ This PR
5 Agent Moods Events ✅ This PR
6 Warp Arrival Events #180
7 Heartbeat Mode Ambient ✅ This PR
8 Collaboration Harmony Social ✅ This PR
9 @Mention Ping Social #180
10 PR Shipped Events ✅ This PR
11 Audio Control Center Infrastructure ✅ This PR
12 Motion-Sound Parity Accessibility #180

jsell-rh and others added 19 commits March 12, 2026 16:23
…date

Status pulse animations (StatusBadge.vue):
- active: already had ping dot (unchanged)
- idle: slow breathe animation (opacity 1.0↔0.45, 3s ease-in-out)
- blocked/error: subtle jitter (±1.5px translateX, 0.4s loop)
- done: no animation — calm green glow (static)
- prefers-reduced-motion: all animations disabled

Event feed stagger (EventLog.vue):
- New rows slide in from slightly above (translateY -5px → 0, 0.18s)
- animation-fill-mode: both keeps initial state before start
- prefers-reduced-motion: disabled
- Works on DOM insertion — no re-animation on filter/re-render

Spec update (gamification.md):
- Mark 1.2 (sounds) and 2.2 (all-agents-idle) as implemented
- Add 2.3 agent status pulse rings (now implemented)
- Add 2.4 agent mood/vibes field
- Upgrade 3.5 sound themes to implemented
- Add 3.6 agent signature chimes, 3.7 @mention pulse, 3.8 event feed stagger
- Remove deterministic SVG avatar item (boss preference: keep existing avatars)

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
…print-fix

Kanban card spring-drop (KanbanColumn.vue):
- Cards enter with a physical spring animation: drop from above, slight
  overshoot (bounce +5px), then settle. CSS @Keyframes, 0.35s.
- prefers-reduced-motion: animation disabled.

@mention pulse animation (App.vue + AppSidebar.vue):
- SSE agent_message handler now parses @mentions from message content.
- Mentioned agent's card in sidebar pulses with a 3s ring animation
  (box-shadow expand/fade, CSS @Keyframes).
- Reactive mentionedAgents Set with auto-expiry timers.
- AppSidebar accepts mentionedAgents prop and applies .mention-pulse class.

Fleet Vibe roll-up (SpaceOverview.vue):
- Computed fleetVibe shows a live emoji + label in the space header
  based on agent status distribution (Shipping / Blocked / On fire / etc.).
- Tooltip shows "Fleet vibe: <label>" on hover.
- Updates reactively with every SSE agent_updated event.

Sprint-complete detection fix (App.vue):
- No longer triggers on page load (when agents are already idle).
- Requires at least one agent to have been `active` since the last
  celebration. Resets after celebrating, so next one needs a new active phase.
- Requires at least 2 agents — single-agent spaces don't have sprint semantics.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Agent spawn warp animation (App.vue + AppSidebar.vue):
- When agent_spawned SSE fires, adds agent to spawnedAgents set (600ms).
- AppSidebar applies .agent-spawn CSS class: scale(0.35) → overshoot →
  settle(1.0) with a ring burst. Feels like a portal opening.
- Clears automatically after 600ms animation.

PR badge shimmer (AppSidebar.vue):
- PR links (#N) on agent cards get a traveling light shimmer animation
  (CSS background-position sweep, 2.4s loop) whenever the agent has a PR.
- Visual signal: "code is out there, awaiting review."

Priority-based confetti variations (useConfetti.ts + KanbanView.vue):
- Critical tasks: gold/orange particle palette, 2x count (130), wider
  blast radius, 2.4s duration.
- High priority: 1.4x count (90), slightly faster spread.
- Medium: standard burst (65 particles).
- Low: lighter burst (40 particles).
- KanbanView passes task.priority to celebrate() on drag-drop and
  SSE-triggered task_updated to done transitions.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
…mentation status

Mark Tier 2.3-2.10 as implemented. Add Tier 3.9-3.18 from second
brainstorm round (audio ticks, emoji reactions, streaks, ship-it
broadcast, co-working indicators, standup digest, presence, leaderboard,
chromashift).

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
… fields

The MCP spawn_agent path (lifecycle.go:spawnAgentService) was broadcasting
the bare agent name string as the agent_spawned SSE payload. The frontend
SSEAgentSpawned type expects {space, agent} JSON, so data.space and
data.agent were undefined — causing '[undefined] agent spawned' in the
event log and 'Failed to load space undefined: 404' errors.

Fix: use json.Marshal({space, agent}) matching the handlers_agent.go path.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Agent signature chimes (useNotifications.ts + App.vue):
- Each agent gets a unique 2-note chord from a hash of their name.
- Pentatonic scale ensures all chords are consonant. Plays once per
  page load per agent on first agent_updated SSE event.
- Resets on space navigation so agents get their chime each visit.

Activity tick (useNotifications.ts + App.vue + SettingsView.vue):
- 4ms white-noise burst on each agent_updated SSE event. Very subtle.
- Off by default; toggled in Settings via new "Ambient activity tick" switch.
- Stored in localStorage (boss_activity_tick_enabled).

TASK-035 guard (App.vue):
- agent_spawned handler drops events with missing space/agent.
- Prevents loadSpace("undefined") from partial payloads.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Keep the updated @mention protocol note referencing PR #171 (garden docs merged).

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
- H1: make `now` a reactive ref in KanbanView, updated via setInterval
  every 60s so overdue detection stays accurate without page reload
- H2: replace browser confirm() in TaskDetailPanel delete with AlertDialog
  component for consistent UX and keyboard accessibility
- H6: add data-search-focus attribute to Kanban search input for
  Playwright and keyboard shortcut targeting
- H7: surface send errors in ConversationsView inline compose —
  previously silently swallowed, now shows error text below form
- TASK-038: fix agent selector dropdown overflow in ConversationsView
  new-message picker by replacing ScrollArea (which doesn't apply
  max-height correctly) with a plain div with max-h-48 overflow-y-auto

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
- H3: Tasks/Conversations sidebar nav items now show active state via
  useRoute() — was hardcoded :data-active="false"
- H4: Remove duplicate unread count badge on Conversations nav item;
  icon dot badge is sufficient, SidebarMenuBadge was redundant
- M1: Guard sound theme preview behind soundEnabled — selecting a theme
  no longer plays audio when sounds are disabled
- M13: pr-shimmer animation now conditional on agent.status === 'active';
  previously applied to all agents with a PR regardless of state

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
- C2: implement 'i' keyboard shortcut (navigate to space overview);
  was documented in help overlay but had no handler
- M2: add 'Change' label to task assignee dropdown trigger when task
  is already assigned — lone ChevronDown was undiscoverable
- M3: store due dates at noon UTC (T12:00:00Z) instead of midnight UTC
  (T00:00:00Z); midnight rolls back a day for all GMT+ users
- M4: Assignee and Label filter dropdowns highlight in primary color
  when an active filter is set, matching the Overdue button pattern
- M10: add 'no tasks match your filters' empty state + Clear filters
  button when all columns are empty due to active filters
- M11: add .prevent to @keydown.ctrl.enter on comment textarea so
  the default newline insertion is suppressed on submit
- M14: add 'Ctrl+Enter to send' hint below comment textarea

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
… panel

The 'Create persona' link in AgentCreateDialog emitted open-personas
while the Dialog was still open. Both Dialog and Sheet use z-50 fixed
portals, causing the Sheet to render behind (or at same level as) the
Dialog overlay.

Fix: close agentCreateDialogOpen before emitting open-personas in
SpaceOverview. The dialog animates out, then the Personas sheet slides
in — clean stack, no z-index conflict.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
- Add pitch micro-variation (±5%) and timing jitter (±15ms) to agent
  signature chimes so each play feels organic rather than robotic
- Extract _playAgentVoice() helper shared by auto-chime and preview
- Add previewAgentVoice() export — plays on demand regardless of
  once-per-session guard, for explicit user-triggered previews
- Add Volume2 button in AgentDetail header (only when sounds enabled)
  so users can hear an agent's unique voice from their profile

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
…system

Keep _playAgentVoice helper with micro-variation and previewAgentVoice export
over the inlined version from main.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
…k arc, mention ping

Based on audio-sme brainstorm (ideas #2, #3, #6, #9, #12):

- #2 Dissonance Flag: playBlockedAlert() — minor second interval (A4+A#4)
  fires when agent transitions INTO blocked or error state. Tense but
  not alarming; tells operator something needs attention.

- #3 The Arc: playTaskTransition(status) — rising sweep on →in_progress,
  suspended Csus2 chord on →review. Completes the emotional story that
  playSuccess() already starts at →done. Wired to both drag-drop and
  remote SSE task_updated events.

- #6 Warp Arrival: playAgentSpawn() — 200→1200Hz sweep + resonant ring.
  Fires on agent_spawned SSE, skipped under prefers-reduced-motion.

- #9 @Mention Ping: playMentionPing() — C6 percussive tone, distinct
  from message chime. Fires once per agent_message event that contains
  at least one valid @mention, alongside the existing CSS pulse ring.

- #12 Motion-Sound Parity: prefersReducedMotion check halves volume
  on all new sounds, skips sweeps, replaces with shorter tones.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
…es, PR shipped, collaboration chord

- soundVolume ref (0-100% slider) applied via tone()/sweep() multiplier
- soundCategories ref with 5 categories: urgent, events, celebrations, ambient, social
- SOUND_CATEGORY_META for rendering category toggles in SettingsView
- isCategoryEnabled() helper replaces bare soundEnabled checks in all play* fns
- SettingsView: volume slider + per-category toggle grid
- playPRShipped(): descending 700→350Hz sweep + landing tone (events)
- playCollaborationChord(): both agents' pentatonic voices as chord (social)
- App.vue: wire playPRShipped via currentSpace watch, playCollaborationChord in agent_message

Audio Control Center implements audio-sme idea #11 (impact 5)
PR shipped implements audio-sme idea #10
Collaboration harmony implements audio-sme idea #8
…o category system

Keep per-category isCategoryEnabled() checks (HEAD) over simple soundEnabled
guard from main. HEAD has the Audio Control Center with category toggles.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
… audio palette complete

audio-sme idea #5 (Agent Moods):
- playAgentMoodActive(name): ascending root→fifth — agent 'waking up'
- playAgentMoodIdle(name): descending fifth→root — agent 'settling down'
- Wired in agent_updated SSE via prevStatus captured before in-place patch
- Fixes prevStatus capture bug (was reading post-patch, now pre-patch)

audio-sme idea #4 (Boss Level):
- playSuccess(priority?) now accepts priority — critical tasks get an ascending
  C5→G5→C6 lead-in run before the chord, theme-aware
- KanbanView wires priority on both local drag-drop and remote SSE task_updated

audio-sme idea #7 (Heartbeat Mode):
- playAgentTick(name): 3ms pentatonic micro-tone at agent's signature freq
  instead of uniform white noise burst — active fleets sound like a chord
- Replaces playActivityTick() in agent_updated handler (still gated by activityTickEnabled)

All 12 audio-sme ideas now accounted for:
Implemented: #2 #3 #4 #5 #6 #7 #8 #9 #10 #11 #12
Architecture only (#1 Alert Taxonomy already fulfilled by category system)
Keep all 12 audio-sme features including moods, boss level, heartbeat mode
and audio control center over the older main branch version.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@jsell-rh jsell-rh merged commit 6f2a90a into main Mar 12, 2026
1 check passed
@jsell-rh jsell-rh deleted the feat/gamification branch March 12, 2026 22:01
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