Skip to content

Conversation

@ariane-emory
Copy link
Contributor

@ariane-emory ariane-emory commented Jan 14, 2026

What does this PR do?

This PR attempts to ensure that the initially selected session when the session_list is opened is always within the viewport when opening the session list by trying to center it within the viewport.

Resolves #8558

Before (after following the procedure described in the issue)

Screenshot 2026-01-14 at 6 40 43 PM

After

Screenshot 2026-01-14 at 6 41 35 PM

How did you verify your code works?

A/B testing and running all tests in the project to ensure that no failures were introduced.

- Add 'center' parameter to moveTo() function for viewport centering
- Use setTimeout to defer scroll until component is rendered
- Pass center=true from filter/current effect for initial positioning
- Keyboard navigation retains edge-scroll behavior for smooth UX

This fixes an issue where the selected item could be outside the visible
viewport when opening dialogs like the session list.
@ariane-emory ariane-emory marked this pull request as ready for review January 14, 2026 23:55
@github-actions
Copy link
Contributor

The following comment was made by an LLM, it may be inaccurate:

No duplicate PRs found

@ariane-emory
Copy link
Contributor Author

If desired, I do also have another branch in my pocket that automatically recenters the viewport as the selection is moved using the keyboard in all of the modal selection list windows that use dialog-select.ts, but that seems more like a new feature rather than something that is part of this specific fix.

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.

Currently active session not always visible when opening the session_list

1 participant