Skip to content

Studio: Replace assistant UI shared autoscroll with per-panel scrolling - #5127

Merged
rolandtannous merged 8 commits into
unslothai:mainfrom
Imagineer99:fix/sidebar-animations-scroll
Apr 22, 2026
Merged

rolandtannous merged 8 commits into
unslothai:mainfrom
Imagineer99:fix/sidebar-animations-scroll

Conversation

@Imagineer99

Copy link
Copy Markdown
Member

Summary

Replaces assistant-ui’s built-in thread autoscroll (shared viewport store) with an intent-aware, per-thread implementation so scroll state does not race layout/sidebar changes.

Chat scrolling is handled locally per conversation instead of by the shared default, and the compare layout was adjusted so panes don’t jump around when the screen size changes.

Custom autoscroll per thread (useIntentAwareAutoScroll + IntentAwareScrollProvider), viewport autoScroll={false}, and compare shell as flex (not grid) for stable panes.

By @Sneakr

Sneakr added 2 commits April 21, 2026 19:18
…ane state

- assistant-ui's useThreadViewportAutoScroll uses shared state that causes random scrolling issues on the compare page
- Replaced with independent per-pane autoscroll implementation
…ons and UI

- Fix middle-click scroll not responding to very slow movements
- Add animations to sidebar navigation icons; font adjustments
- Align app menu styling for consistency
- Fix rare lag on sidebar expand/collapse
- Smooth right sidebar (parameter tuning) animations and expand/collapse lag

@gemini-code-assist gemini-code-assist Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Code Review

This pull request introduces a custom intent-aware autoscroll mechanism to replace the default assistant-ui behavior, preventing viewport snapping during message streaming. It also includes extensive UI refinements, such as updated typography, icon animations, and layout adjustments across the sidebar and chat components. Feedback points out that the renamed _SuggestionItem appears to be dead code, notes a loss of observability due to removed error logging, and identifies the use of the non-standard "instant" scroll behavior.

@Imagineer99
Imagineer99 marked this pull request as ready for review April 21, 2026 20:05
@Imagineer99

Copy link
Copy Markdown
Member Author

Tested, works as expected, no sign of regression. Ready to merge when Eyera confirms @rolandtannous

- Remove unused _SuggestionItem component and its dependencies (SuggestionPrimitive import, SUGGESTION_TOOLS, toolIconMap)
- Log delete-message errors to console before showing toast for better observability
- Further sidebar menu design adjustments
@Sneakr

Sneakr commented Apr 21, 2026

Copy link
Copy Markdown
Collaborator

/gemini review

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

Copy link
Copy Markdown

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: 32970740d3

ℹ️ About Codex in GitHub

Codex has been enabled to automatically 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 👍.

When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".

@gemini-code-assist gemini-code-assist Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Code Review

This pull request introduces a custom intent-aware autoscroll mechanism for the chat thread to prevent viewport snapping during streaming, replacing the default assistant-ui implementation. It also includes significant UI refinements to the sidebar and dropdown menus, such as updated dimensions, spacing, and a new icon-pop animation. Review feedback highlighted a redundant ternary operator in the sidebar styling and recommended replacing the non-standard "instant" scroll behavior with "auto" to ensure cross-browser compatibility and type safety.

- Prevent auto-follow from breaking on short threads: gate wheel/touch detach on scrollTop > 0 so no-op upward gestures on non-scrollable viewports don't flip userDetachedRef
- Simplify NavItem: collapse identical-branch ternary and drop unused variant prop

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

Copy link
Copy Markdown

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: 2ef0e7385b

ℹ️ About Codex in GitHub

Codex has been enabled to automatically 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 👍.

When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".

- Adjust model selector to be consistent with the sidebar
- Fix auto-follow breaking when user scrolls inside nested scrollable regions (reasoning/tool panels): gate wheel/touch detach on innerScrollWillConsumeUpward(target) so bubbled events from inner scrollers don't flip viewport intent (Codex review)

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

Copy link
Copy Markdown

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: 1285d0d3d8

ℹ️ About Codex in GitHub

Codex has been enabled to automatically 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 👍.

When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".

Accumulator now counts distanceFromBottom growth instead of raw -scrollTop delta, so browser scroll-anchoring on auto-collapsing panels (reasoning, tool outputs) no longer falsely detaches auto-follow mid-stream.
@Sneakr

Sneakr commented Apr 21, 2026 •

Copy link
Copy Markdown
Collaborator

@Imagineer99 Could you please run some new tests to verify changes and the behavior is working on your end as well

@Imagineer99

Copy link
Copy Markdown
Member Author

Tested on windows via chrome and firefox, working as expected, no regression detected.

@rolandtannous rolandtannous left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

behaves as expected. tested by both @Imagineer99 and @Sneakr . merging

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.

3 participants