Recents sidebar: focus is dropped to app default position after Pin/Archive/Delete instead of staying on the list
Environment
Claude Code Desktop app. Keyboard + screen reader (VoiceOver, macOS).
Summary
When I open the action menu for a chat in the Recents sidebar and take an action (Pin, Archive, Delete, etc.), keyboard/screen reader focus is not retained in the Recents list. Instead it jumps back to the app's default load position. Every single action throws my focus out of the sidebar.
Steps to reproduce
- Open the Recents sidebar.
- Move focus to a chat in the list.
- Open that chat's action menu.
- Invoke an action (e.g. Archive, Pin, or Delete).
- Observe where focus lands afterward.
Expected behavior
After the action completes, focus stays in the Recents list at a sensible place:
- If the chat still exists (e.g. Pin), focus returns to that same chat.
- If the chat is removed from the current view (e.g. Archive or Delete), focus moves to the next closest chat in Recents (the following item, or the previous one if it was last).
Actual behavior
Focus is dropped entirely from the Recents list and returns to the app's default position on load. I have to navigate all the way back into the sidebar and re-find my place before I can act on the next chat.
Impact
This is a significant friction point for keyboard-first and screen reader users. I frequently do batch cleanup: archiving several chats in a row, or applying a mix of actions across multiple recents. Right now each action resets my position, so a 5-chat cleanup means re-traversing the sidebar 5 times. Proper focus management (return focus to the acted-on item, or the nearest surviving neighbor) would eliminate the disorientation and make batch actions fast. This is a well-understood ARIA/focus-management pattern for list item removal, so it should be a contained fix.
Suggested fix
On completion of a Recents item action, set focus to the originating row if it persists, otherwise to its nearest sibling (next, falling back to previous). Avoid resetting focus to a global default.