Files
NebulaBrowser/plugins/nebot/TESTING_INSTRUCTIONS.md
T
2025-10-09 13:16:40 +13:00

3.7 KiB

Testing the Exponential Typing Animation Feature

How to Test the Speed-Up

1. Access Nebot Page

  1. Open Nebula Browser (should be running now)
  2. Navigate to the Nebot page:
    • Look for a "Nebot" tab/button in the interface
    • Or try navigating to the URL manually if accessible

2. Test the Exponential Typing Animation

  1. Send a prompt that will generate a medium/long response (e.g. "Explain how transformers work in detail" or "Write a 400 word summary about the Solar System").
  2. Watch the assistant response render: it will begin at a natural speed then accelerate.
  3. Observe the speed progression:
    • Starts at normal typing speed
    • Gets progressively faster as the message continues
    • Reaches higher speeds near the end so long replies finish quickly
    • Much faster than constant speed for long messages

3. Speed-Up Algorithm

  • Short messages (< 50 chars): Normal constant speed
  • Long messages: Exponential acceleration using formula:
    speedMultiplier = 1 + 9 * (progress^2)
    delay = max(baseSpeed / speedMultiplier, 5ms)
    
  • Result: 1x speed → 10x speed progression
  • Minimum delay: 5ms (prevents too-fast flashing)

4. Console Debugging

Open DevTools (F12) and watch for:

[Nebot Page] Char 20/500, delay: 23.5ms
[Nebot Page] Char 40/500, delay: 19.8ms  
[Nebot Page] Char 100/500, delay: 12.1ms
[Nebot Page] Char 400/500, delay: 5.2ms
[Nebot Page] Char 480/500, delay: 5.0ms (capped)

What You Should See

Working Correctly:

  • Short messages: Natural constant typing speed
  • Long messages: Start normal, accelerate smoothly
  • Very fast finish: Last portion zips by quickly
  • Console logs: Show decreasing delay times
  • Reasonable duration: Even 500+ char messages finish in ~8 seconds

If Using Old Version:

  • Long messages take forever (constant slow speed)
  • Tedious waiting for lengthy responses
  • No speed variation in console logs

Benefits of Exponential Speed-Up

Before (Constant Speed):

  • 500 characters @ 25ms = 12.5 seconds
  • 1000 characters @ 25ms = 25 seconds 😴
  • Very long AI responses become unbearable

After (Exponential Speed-Up):

  • 500 characters = ~4-6 seconds
  • 1000 characters = ~6-8 seconds 🚀
  • Capped at 8 seconds max for any length
  • Short messages still feel natural

Customization

  1. Settings Panel (⚙ button):

    • Toggle: Enable/disable typing animation
    • Base Speed: 10-200 chars/sec (affects acceleration curve)
    • Info: Shows explanation of exponential feature
  2. Speed Setting Effect:

    • Higher base speed = faster overall experience
    • Lower base speed = more dramatic for short messages
    • Exponential curve scales with base setting

Real Usage Scenarios

Perfect For:

  • 📝 Code explanations (often very long)
  • 📚 Detailed tutorials (hundreds of words)
  • 🔍 Research summaries (comprehensive responses)
  • 💬 Conversational responses (natural for short, fast for long)

Smart Behavior:

  • "Hello" → Types normally (natural feel)
  • 100+ word explanation → Starts normal, speeds up
  • 500+ word essay → Accelerates significantly
  • Any length → Never takes more than ~8 seconds

The exponential speed-up makes long AI responses enjoyable to read instead of tedious to wait for!

Implementation Notes

  • plugins/nebot/page.js - Includes calculateTypingDelay() adaptive timing logic
  • Settings UI - Provides toggle + base speed slider and explanatory hint
  • Previous temporary "Test Typing" debug button has been removed now that the feature is stable

You can validate behavior entirely through normal conversations; no special test button is required.