Skip to content

Conversation

@linw1995
Copy link
Owner

Fix scroll-to-bottom behavior during tool event handling

When viewing messages at the bottom, tool events (e.g. tool approval, text edits) should keep the view scrolled to the bottom instead of staying in place.

Changes:

  • Add is_at_bottom() helper method to detect bottom position
  • Preserve bottom state in on_tool_event() handling
  • Optimize ensure_visible() to avoid unnecessary scroll calculations

@linw1995 linw1995 added the bug Something isn't working label Jan 31, 2026
@codecov-commenter
Copy link

Codecov Report

❌ Patch coverage is 90.00000% with 1 line in your changes missing coverage. Please review.
✅ Project coverage is 47.88%. Comparing base (c3970cb) to head (966f207).
⚠️ Report is 3 commits behind head on dev.

Files with missing lines Patch % Lines
crates/coco-tui/src/components/messages.rs 90.00% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##              dev     #166      +/-   ##
==========================================
+ Coverage   47.59%   47.88%   +0.29%     
==========================================
  Files         100      104       +4     
  Lines       27316    27698     +382     
==========================================
+ Hits        13000    13264     +264     
- Misses      14316    14434     +118     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@linw1995 linw1995 merged commit 7798753 into dev Jan 31, 2026
3 checks passed
@linw1995 linw1995 deleted the fix/combo-scroll-to-bottom branch January 31, 2026 04:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants