Skip to content

Add animations to hero SVGs for dynamic flow visualization#180

Merged
amavashev merged 4 commits intomainfrom
claude/animate-hero-svgs-1hLRt
Mar 22, 2026
Merged

Add animations to hero SVGs for dynamic flow visualization#180
amavashev merged 4 commits intomainfrom
claude/animate-hero-svgs-1hLRt

Conversation

@amavashev
Copy link
Contributor

Summary

Enhanced both hero SVG files (light and dark themes) with comprehensive animations to create a dynamic, interactive visualization of the enforcement gate workflow. The changes include animated flow dots, pulsing glow effects, budget consumption visualization, and accessibility support for reduced motion preferences.

Key Changes

  • Accessibility: Added @media (prefers-reduced-motion: reduce) styles to hide all animations for users who prefer reduced motion
  • Flow Animations:
    • Added animated dots that travel along paths from agents to the enforcement gate
    • Implemented separate flow dots for allowed and blocked outcomes
    • Each flow dot has synchronized opacity and motion animations on an 8-second cycle
  • Agent Updates:
    • Changed Agent A icon from generic bot head to chat bubble (LLM completion)
    • Changed Agent B icon to magnifying glass (web search)
    • Changed Agent C icon to envelope (send_email) and updated label from tool.db_delete
    • Added visual tints: blue for Agent A, warm/orange for Agent C
    • Added send pulse animations to each agent card
  • Gate Enhancements:
    • Added stroke-width animation to shield during validation
    • Implemented scanning effect on shield inner glow with multi-step opacity/stroke animations
  • Budget Visualization:
    • Animated budget bar width from 30% → 55% → 80% → 90% (danger state)
    • Dynamic color change to orange (#FF9500) when budget exceeds threshold
    • Swapped percentage text labels with opacity animations (30% → 55% → 80% → 90%)
  • Glow Rings: Added synchronized pulsing animations to all three concentric circles around the gate
  • Path Markers: Added orange arrow marker for the danger path (Agent C)
  • Result Cards: Added flash animations on ALLOWED and BLOCKED card arrivals

Implementation Details

  • All animations use SMIL (Scalable Vector Graphics animation) with 8-second cycles and repeatCount="indefinite"
  • Flow dots use animateMotion with mpath references for smooth path following
  • Staggered keyTimes create a sequential flow: Agent A (0%) → Agent B (5%) → Agent C (10%) → Results (50-85%)
  • Text content changes (budget percentages) implemented via opacity swaps since SMIL cannot animate text content directly
  • Both SVG files maintain identical animation logic with theme-appropriate colors

https://claude.ai/code/session_01EGvZV9ckmJBJWRwZAMPhYp

claude added 4 commits March 22, 2026 19:16
Add SMIL animations to both light and dark hero SVGs with an 8-second
looping cycle: flowing dots along agent-to-gate paths (staggered),
pulsing glow rings during gate processing, shield stroke pulse,
outcome dots flowing to allowed/blocked cards, and budget meter shimmer.
Respects prefers-reduced-motion via inline SVG style block.

https://claude.ai/code/session_01EGvZV9ckmJBJWRwZAMPhYp
Bar animates from 30% to 90% over the 8s cycle, turning orange after
80% to signal budget exhaustion. Percentage labels swap via overlaid
text elements with staggered opacity animations.

https://claude.ai/code/session_01EGvZV9ckmJBJWRwZAMPhYp
- Agent A: chat bubble icon with blue-tinted card (LLM inference)
- Agent B: magnifying glass icon, neutral card (web search)
- Agent C: envelope icon with warm-tinted card, orange flow path
  (tool.send_email replaces tool.db_delete for relatability)
- Agent cards flash white when their request dot departs
- ALLOWED/BLOCKED cards flash on dot arrival
- Shield inner arc triple-pulses during evaluation (scanning effect)
- Agent C flow line and dot colored orange to signal risk

https://claude.ai/code/session_01EGvZV9ckmJBJWRwZAMPhYp
- Flow paths now have animated dashed strokes (marching ants) showing
  continuous data flow direction toward the gate
- Lock shackle lifts briefly when ALLOWED decision fires (gate opens)
- BLOCKED card shakes left-right on red dot arrival (rejection jolt)
- Agent C 'tool.send_email' label flashes orange when its dot departs

https://claude.ai/code/session_01EGvZV9ckmJBJWRwZAMPhYp
@amavashev amavashev merged commit 1037d7f into main Mar 22, 2026
2 checks passed
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.

2 participants