Skip to content

Select the sidebar's top site and scroll to top after deleting a site - #4287

Closed
sejas wants to merge 15 commits into
trunkfrom
route-index-sortsites-fix
Closed

Select the sidebar's top site and scroll to top after deleting a site#4287
sejas wants to merge 15 commits into
trunkfrom
route-index-sortsites-fix

Conversation

@sejas

@sejas sejas commented Jul 21, 2026

Copy link
Copy Markdown
Member

Related issues

I noticed that my first site was not selected, in my case it was the second one. Also the sidebar was not scrolled to the top. In this PR I address both issues.

How AI was used in this PR

Used to trace the post-delete redirect path and the sidebar's ordering/scroll behavior, and to draft the fix and test updates. Changes were reviewed, and verified with lint, typecheck, and unit tests.

Proposed Changes

  • After deleting a site, select first site sorted in the sidebar and scroll to the top

Testing Instructions

  1. Create three or more sites named so that creation order differs from alphabetical order (e.g. create "Zebra" first, then "Alpha", then "Mango").
  2. Open a chat on one site, scroll the sidebar down (add enough sites to make it scroll), and delete the currently open site.
  3. Verify the selection lands on the site shown at the top of the sidebar (not a different one), and the sidebar is scrolled to the top.
  4. Repeat the delete from a terminal with the app open: node apps/cli/dist/cli/main.mjs site delete --path <site> — same result.
remove-with-scroll.mp4

Pre-merge Checklist

  • Have you checked for TypeScript, React or other console errors?
bcotrim and others added 15 commits July 8, 2026 21:46
…e-delete

# Conflicts:
#	apps/ui/src/components/site-list/index.test.tsx
#	apps/ui/src/components/site-list/index.tsx
#	apps/ui/src/ui-classic/components/session-view/style.module.css
…e-delete

# Conflicts:
#	apps/ui/src/components/site-list/index.test.tsx
#	apps/ui/src/components/site-list/index.tsx
…e-delete

# Conflicts:
#	apps/ui/src/data/core/connectors/ipc/index.ts
#	apps/ui/src/ui-classic/router/layout-root/index.tsx
@sejas sejas self-assigned this Jul 21, 2026
@sejas
sejas marked this pull request as ready for review July 21, 2026 17:29
@sejas
sejas requested a review from bcotrim July 21, 2026 17:29
Base automatically changed from archive-chats-on-site-delete to trunk July 21, 2026 19:15
@sejas sejas closed this Jul 22, 2026
@sejas
sejas deleted the route-index-sortsites-fix branch July 22, 2026 22:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

2 participants