Skip to content

Files view keeps its selection and focus across session updates (WI-1682) - #1048

Merged
thedancingdeveloper merged 3 commits into
mainfrom
WI-1682-01M5197TJBPC3BWZ51STERJNDY
Oct 16, 2026
Merged

thedancingdeveloper merged 3 commits into
mainfrom
WI-1682-01M5197TJBPC3BWZ51STERJNDY

Conversation

@thedancingdeveloper

Copy link
Copy Markdown
Contributor

Fixes WI-1682: the left-panel Files view lost its selected file, and focus moved to the Sessions panel, whenever a session sent an update. The cause was the session-created path re-listing sessions and remounting a row in the rail.

The third Opus review found no blockers at 920fa6e (verdict on WI-1682).

🤖 Generated with Claude Code

sprooty added 3 commits October 16, 2026 02:42
… rail (WI-1682)

A session event replaces the rail's session rows, which remounts the file
tree and leaves keyboard focus on the first session row. The selected path
now lives with the tree's other view state, so the highlight and the focus
come back with the tree.

Signed-off-by: sprooty <sprooty@sprooty.com>
…e triggers (WI-1682)

A tree refetch hands back new objects, so the list remounted the selected
row and dropped its focus. Reuse the previous node when the path is
unchanged, which keeps the row, the selection and the focus. The earlier
focus-restore effect moved focus back out of the Sessions list and is gone.

Signed-off-by: sprooty <sprooty@sprooty.com>
…tree (WI-1682)

The refresh behind session-created rebuilds every session object, and the
rail's list replaces a row whose object changed. A focused row then took
the keyboard with it. Reuse the previous object when nothing the row
renders changed, so the row and the focus stay. The test drives that
session-created refresh and checks the selected file row is the same
element; the file-tree comment no longer claims a remount restores focus.

Signed-off-by: sprooty <sprooty@sprooty.com>
@thedancingdeveloper
thedancingdeveloper enabled auto-merge (rebase) October 16, 2026 03:32
@thedancingdeveloper
thedancingdeveloper merged commit e9955e7 into main Oct 16, 2026
20 of 22 checks passed
@thedancingdeveloper
thedancingdeveloper deleted the WI-1682-01M5197TJBPC3BWZ51STERJNDY branch October 16, 2026 03:58
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