feat: Added scroll state support for chat-session-list navigation#4360
Merged
zanesq merged 2 commits intoblock:mainfrom Aug 28, 2025
Merged
feat: Added scroll state support for chat-session-list navigation#4360zanesq merged 2 commits intoblock:mainfrom
zanesq merged 2 commits intoblock:mainfrom
Conversation
0e9c9bc to
19216df
Compare
zanesq
suggested changes
Aug 27, 2025
Contributor
zanesq
left a comment
There was a problem hiding this comment.
Thanks for doing this! Couple of notes:
- It doesn't seem to respect the scroll after searching, it just goes back to the top when I hit back (see below). I don't think this is a blocker since the general back scroll position without search is a valuable feature but if that was the intent just wanted to point it out.
Kapture.2025-08-27.at.08.54.53.mp4
- Using mutation observer is not ideal, we'd rather stick with react way of doing things. MutationObserver is typically a workaround for situations where you don’t have direct control over the DOM updates (such as with third-party libraries or dynamic content outside React’s control).
Can you change it to use refs instead something like
import React, { useEffect, useRef } from "react";
function SessionListView({ sessions, selectedSessionId, ...props }) {
const sessionRefs = useRef({});
useEffect(() => {
if (selectedSessionId && sessionRefs.current[selectedSessionId]) {
sessionRefs.current[selectedSessionId].scrollIntoView({
block: "center",
behavior: "smooth",
});
}
}, [selectedSessionId, sessions]); // or filteredSessions if applicable
return (
<div>
{sessions.map(session => (
<Card
key={session.id}
ref={el => {
// Store ref for each session card
sessionRefs.current[session.id] = el;
}}
// ...other props
>
{/* ... */}
</Card>
))}
</div>
);
}
Contributor
Author
|
Thank you for the review! I'll go ahead and make your suggested changes.
I actually wanted to have a separate follow up to preserve the search-filter on back which would make it easier to reuse this scroller.
Got it! I'm still getting a handle on react so I appreciate the heads up. |
Contributor
Author
|
I went ahead and pushed up the suggested changes:
|
c331f3d to
c1eeb6c
Compare
zanesq
approved these changes
Aug 28, 2025
michaelneale
added a commit
that referenced
this pull request
Aug 28, 2025
* main: (38 commits) feat: linux computer control for android (termux) (#3890) feat: Added scroll state support for chat-session-list navigation (#4360) docs: typo fix (#4376) blog: goose janitor (#4131) Fix eleven labs audio transcription and added more logging (#4358) feat: re-introduce session sharing (#4370) remove duplicate blog post (#4369) fix focus ring under form submits (#4332) Trigger docs deployment update tetrate blog date to today (#4368) tetrate signup: blog/launch post (#4313) Implement graceful recipe error handling with filename display (#4363) docs: airgapped operation by bypassing hermit for desktop app (#4063) remove Ollama card from welcome screen (#4348) feat: initial implementation of extension malware check (#4272) Add Tetrate Agent Router Service to Provider Registry (#4354) Goose Simple Compact UX (#4202) Refactor Extensions Install Modal (#4328) fix: url path trailing slash for custom-providers (#4345) docs: update available and onboarding providers list (#4356) ...
lifeizhou-ap
added a commit
that referenced
this pull request
Aug 29, 2025
* main: (40 commits) new recipe to lint-check my code (#4416) removing a leftover syntax error (#4415) Iand/updating recipe validation workflow (#4413) Iand/updating recipe validation workflow (#4410) Fix (Ollama provider): Unsupported operation: streaming not implemented (#4303) change databricks default to claude sonnet 4 (#4405) Iand/updating recipe validation workflow (#4406) Add metrics for recipe metadata in scheduler, UI, and CLI (#4399) Iand/updating recipe validation workflow (#4403) making small updates to recipe validation workflow (#4401) Automate OpenRouter API Key Distribution for External Recipe Contributors (#3198) Enhance `convert_path_with_tilde_expansion` to handle Windows (#4390) make sure all cookbook recipes have a title and version, but no id (#4395) Nest TODO State in session data (#4361) Fast model falls back to regular (#4375) Update windows instructions (#4333) feat: linux computer control for android (termux) (#3890) feat: Added scroll state support for chat-session-list navigation (#4360) docs: typo fix (#4376) blog: goose janitor (#4131) ...
dorien-koelemeijer
pushed a commit
to dorien-koelemeijer/goose
that referenced
this pull request
Sep 2, 2025
…ock#4360) Signed-off-by: Dorien Koelemeijer <[email protected]>
1 task
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Added scroll state memory when navigating back from session view. This works for filtered search results as well.
Changes
showSessionHistoryto SessionsView to replace reliance onselectedSessionbeing nullselectedSessionas a new prop toSessionListViewso that it can scroll to a selected sessionuseEffectwithMutationObserverto detect and scroll to selected session when loaded.Request
#3664
After Changes
Screen.Recording.2025-08-26.at.2.03.27.PM.mov
NOTE
Previous PR was closed out due to staleness. Comments were addressed in this pr