Skip to content

Fix scroll jump issue when reading long completion messages in Agent Manager (#5903)#5904

Merged
kevinvandijk merged 6 commits intoKilo-Org:mainfrom
Githubguy132010:fix/agent-manager-scroll-5903
Feb 16, 2026
Merged

Fix scroll jump issue when reading long completion messages in Agent Manager (#5903)#5904
kevinvandijk merged 6 commits intoKilo-Org:mainfrom
Githubguy132010:fix/agent-manager-scroll-5903

Conversation

@Githubguy132010
Copy link
Contributor

@Githubguy132010 Githubguy132010 commented Feb 16, 2026

Fixes #5903

Context

Fix scroll jump issue when reading long completion messages in Agent Manager. When a task in Agent Manager completes with a long completion message, if the user scrolls down to read more of the message, the view automatically jumps back to the top, making it impossible to read the full message.

Implementation

  • Removed conflicting followOutput prop from Virtuoso in MessageList.tsx
  • Added a ref to track previous message count to distinguish new messages from updates
  • Modified the useEffect to only auto-scroll when user is at bottom AND a new message was added

How to Test

  1. Start a task in Agent Manager that produces a long completion message
  2. Wait for the task to complete
  3. The completion message appears but is too long to fit on screen
  4. Scroll down to read more of the message
  5. The view should now stay where you scrolled to (instead of jumping back to top)

Get in Touch

@changeset-bot
Copy link

changeset-bot bot commented Feb 16, 2026

🦋 Changeset detected

Latest commit: 379fc5a

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 1 package
Name Type
kilo-code Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

Copy link

@chatgpt-codex-connector chatgpt-codex-connector bot left a comment

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 25da5392d3

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Reset prevMessageCountRef when sessionId changes to ensure the first
render of a session with existing messages triggers scrollToIndex.
Without this, combinedMessages.length > prevMessageCountRef.current
is false on initial render since the ref is seeded with the same value.
- Added followOutput={isAtBottom ? "smooth" : false} to Virtuoso component
- Enables auto-scroll when at bottom, disables when user scrolls up
- Fixes failing test in MessageList.spec.tsx
Copy link
Collaborator

@kevinvandijk kevinvandijk left a comment

Choose a reason for hiding this comment

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

Thanks!

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.

Agent Manager Scroll Jump Issue

2 participants