Skip to content

Conversation

@roomote
Copy link

@roomote roomote bot commented Oct 24, 2025

Summary

Adds a fun kangaroo-themed Easter egg to the Roo Code chat interface that displays random kangaroo jokes.

Changes

  • Created KangarooEasterEgg component with 5 different kangaroo jokes
  • Triggers after typing 'kangaroo' three times within 10 seconds
  • Displays a random joke with animated punchline reveal
  • Added comprehensive test coverage (7 tests, all passing)
  • Subtle, dismissible overlay that doesn't interrupt workflow

How to trigger

  1. Type the word 'kangaroo' in the chat input
  2. Do this 3 times within 10 seconds
  3. Enjoy the joke! 🦘

Testing

  • All tests pass (7/7)
  • Linting checks pass
  • Type checks pass
  • No breaking changes

Important

Adds a kangaroo-themed Easter egg to the chat interface, triggered by typing 'kangaroo' three times, with comprehensive test coverage.

  • Feature:
    • Adds KangarooEasterEgg component displaying random kangaroo jokes with animated punchline reveal.
    • Triggered by typing 'kangaroo' three times within 10 seconds in ChatTextArea.
    • Overlay is subtle and dismissible, ensuring no workflow interruption.
  • Testing:
    • Comprehensive test coverage for KangarooEasterEgg in __tests__/KangarooEasterEgg.spec.tsx with 7 tests.
    • Tests include rendering, joke display, punchline delay, and close functionality.
  • Integration:
    • Integrated into ChatTextArea.tsx with state management for triggering and displaying the Easter egg.

This description was created by Ellipsis for 6d14463. You can customize this summary. It will automatically update as commits are pushed.

- Created KangarooEasterEgg component with 5 different jokes
- Triggers after typing "kangaroo" three times within 10 seconds
- Displays random joke with animated punchline reveal
- Added comprehensive test coverage
- Subtle, dismissible overlay that does not interrupt workflow
@roomote roomote bot requested review from cte, jr and mrubens as code owners October 24, 2025 06:59
@dosubot dosubot bot added size:XL This PR changes 500-999 lines, ignoring generated files. UI/UX UI/UX related or focused labels Oct 24, 2025
@roomote
Copy link
Author

roomote bot commented Oct 24, 2025

Code Review Summary

I've reviewed the changes and found the following issues that should be addressed:

  • Memory leak in ChatTextArea.tsx: The timeout stored in kangarooTimeoutRef is never cleaned up when the component unmounts. Add a cleanup function in a useEffect hook to clear this timeout on unmount.
  • Incorrect trigger logic in ChatTextArea.tsx: The counter increments on every input change that contains "kangaroo" anywhere in the text, rather than tracking distinct instances of typing the word. This will cause the easter egg to trigger unexpectedly early during subsequent edits.

Follow Along on Roo Code Cloud

@hannesrudolph hannesrudolph added the Issue/PR - Triage New issue. Needs quick review to confirm validity and assign labels. label Oct 24, 2025
setCursorPosition(newCursorPosition)

// Easter egg detection: trigger on typing "kangaroo" three times
if (newValue.toLowerCase().includes("kangaroo")) {
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The Easter egg detection currently checks if the entire input includes "kangaroo" and then increments the counter on every change. This can lead to multiple increments if the input already contains the word. Consider counting exact occurrences (e.g., using a regex match) or checking that a new instance was added to avoid unintended multiple triggers.

Comment on lines +577 to +579
kangarooTimeoutRef.current = setTimeout(() => {
kangarooCountRef.current = 0
}, 10000)
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The timeout stored in kangarooTimeoutRef is never cleaned up when the component unmounts, which will cause a memory leak if the component is destroyed before the 10-second timeout fires. Add a cleanup function in a useEffect hook to clear this timeout on unmount.

Comment on lines +567 to +586
// Easter egg detection: trigger on typing "kangaroo" three times
if (newValue.toLowerCase().includes("kangaroo")) {
kangarooCountRef.current++

// Clear existing timeout
if (kangarooTimeoutRef.current) {
clearTimeout(kangarooTimeoutRef.current)
}

// Reset counter after 10 seconds
kangarooTimeoutRef.current = setTimeout(() => {
kangarooCountRef.current = 0
}, 10000)

// Show Easter egg on third "kangaroo"
if (kangarooCountRef.current >= 3) {
setShowKangarooEasterEgg(true)
kangarooCountRef.current = 0
}
}
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The trigger logic increments the counter on every input change that contains "kangaroo" anywhere in the text, rather than tracking distinct instances of typing the word. This means if a user types "kangaroo" once and then continues editing that same input (adding more text after it), the counter will increment again on each keystroke. The easter egg will trigger unexpectedly early if the input continues to contain the word during subsequent edits.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Issue/PR - Triage New issue. Needs quick review to confirm validity and assign labels. size:XL This PR changes 500-999 lines, ignoring generated files. UI/UX UI/UX related or focused

Projects

Status: Triage

Development

Successfully merging this pull request may close these issues.

2 participants