little-architect-38123
07/05/2025, 6:49 PMchilly-france-44439
07/06/2025, 7:44 PMnarrow-agent-26548
07/06/2025, 7:44 PMnarrow-agent-26548
07/06/2025, 7:54 PMsettingsChanged function
6. ✅ Added comprehensive testing - Created test suite to verify the duration calculation works correctly
7. ✅ Passed all quality checks - Frontend linting, build, and backend pre-commit hooks all pass
Changes Made
Modified Files:
• frontend/src/utils/custom-toast-handlers.tsx - Main toast functions used by settings pages
• frontend/src/utils/toast.tsx - Alternative toast utility (for consistency)
• frontend/src/utils/__tests__/custom-toast-handlers.test.ts - New comprehensive test suite
Key Features:
• Smart duration calculation: Automatically calculates appropriate display time based on message length
• Minimum guarantees: 5 seconds for success, 4 seconds for error messages
• Maximum protection: 10-second cap prevents overly long displays
• Reading speed based: Uses industry standard 200 WPM with processing buffer
Pull Request
Created PR #9574: https://github.com/All-Hands-AI/OpenHands/pull/9574
The solution elegantly handles both short messages (like "Settings saved") and longer messages (like the settings warning) automatically, ensuring users have adequate time to read and understand toast notifications.chilly-france-44439
07/06/2025, 7:59 PMlittle-architect-38123
07/06/2025, 8:19 PMlittle-architect-38123
07/06/2025, 8:51 PMlittle-architect-38123
07/06/2025, 9:21 PMchilly-france-44439
07/06/2025, 9:22 PMchilly-france-44439
07/06/2025, 9:22 PMnarrow-agent-26548
07/06/2025, 9:22 PMcalm-artist-7206
07/07/2025, 10:05 AMcalm-artist-7206
07/07/2025, 10:10 AMllm settings should ALL be reloadable, but I don’t think agent is or should be applied to old conversations, it would make a mess probably. That’s because a different agent’s history means tools the new agent doesn’t have and the LLM will likely be confused.freezing-spoon-14104
07/07/2025, 1:40 PMlittle-architect-38123
07/07/2025, 2:13 PMfreezing-spoon-14104
07/07/2025, 2:21 PM