Skip to content

fix(ui): prevent timeline auto-scroll when removing badges (#189)#190

Open
VooDisss wants to merge 1 commit intoNeuralNomadsAI:devfrom
VooDisss:issue-187
Open

fix(ui): prevent timeline auto-scroll when removing badges (#189)#190
VooDisss wants to merge 1 commit intoNeuralNomadsAI:devfrom
VooDisss:issue-187

Conversation

@VooDisss
Copy link
Contributor

Summary

This PR fixes an issue #189 where the timeline sidebar would automatically scroll to the bottom (the active message) every time a badge was deleted.

Changes

  • Refined Scroll Logic: Updated the scroll-into-view effect in MessageTimeline.tsx to use Solid's on() helper.
  • Strict Tracking: The effect now explicitly tracks activeMessageId only, ignoring incidental updates to the segments list.
  • Isolated State: Wrapped the segments access in untrack() within the scroll effect to prevent it from triggering during badge deletion or list modifications.

Impact

Users can now delete history items without losing their current scroll position in the sidebar. The sidebar will only auto-scroll if the user explicitly navigates to a different message or a new message is added.

Verification Results

  • Confirmed that deleting a badge maintains the current scroll position.
  • Confirmed that clicking a badge still correctly scrolls the main view.
  • Confirmed that auto-scrolling to the active icon still works when the active message changes.

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.

1 participant

Comments