recent_projects: Fix read ssh server index always being 0 (#59817)

# Objective

Fixes https://github.com/zed-industries/zed/issues/59676

## Solution

Right now the queue / fetch logic is mixing async and sync flows. A task
might append something to the queue, but the queue fetching does not
respect/wait on that. Making this synchronous and in-memory fixes this.

`add_ssh_server` also appends it to the end of the queue, so we need to
get the last index, not index 0.

## Testing

I manually tested it before and after by reproducing the steps in the
original issue. Added a regression test afterwards.

## Self-Review Checklist:

- [x] I've reviewed my own diff for quality, security, and reliability
- [x] Unsafe blocks (if any) have justifying comments
- [x] The content adheres to Zed's UI standards
([UX/UI](https://github.com/zed-industries/zed/blob/main/CONTRIBUTING.md#uiux-checklist)
and
[icon](https://github.com/zed-industries/zed/blob/main/crates/icons/README.md)
guidelines)
- [x] Tests cover the new/changed behavior
- [x] Performance impact has been considered and is acceptable

---

Release Notes:

- N/A

---------

Co-authored-by: Yara <git@yara.blue>
a1d0015e70Ramon committed on 6/24/2026, 4:44:08 PM· committed by GitHubparent9ac1176
1 file changedLine totals unavailable