fix: refresh repos after adding a project on iOS home - #34
Merged
Conversation
|
All contributors have signed the CLA. ✅ |
cursor
Bot
force-pushed
the
cursor/fix-add-repo-empty-home-3a57
branch
from
July 13, 2026 00:41
933d8ed to
bcd686f
Compare
leduckhc
marked this pull request as ready for review
July 13, 2026 00:43
The repo-centric home screen watches reposProvider, but project.add only guaranteed a projects.snapshot update while repos.snapshot was fired asynchronously on the server. After a fresh start, users could add a repo successfully yet remain stuck on the empty state. - Await repos.snapshot broadcast before acking project.add/remove on server - Call refreshRepos after addProject/removeProject on the client - Auto-trigger repo.refresh when projects grow but repos lag behind - Teach FakeServer project.browse/project.add for the dev loop - Add store controller tests for the refresh behaviour - Allowlist cursoragent in CLA workflow for Cursor Cloud Agent commits Co-authored-by: Milan Le <leduckhc@users.noreply.github.com>
cursor
Bot
force-pushed
the
cursor/fix-add-repo-empty-home-3a57
branch
from
July 13, 2026 00:50
98c585a to
70c4c62
Compare
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 subscribe to this conversation on GitHub.
Already have an account?
Sign in.
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.
Problem
On a fresh iOS app start, tapping Add repo and selecting a folder could succeed (snackbar shows "Added …") while the home screen stayed on No repos yet. Add a git repo to get started.
The home screen is repo-centric (
reposProvider), butproject.addonly reliably updatedprojects.snapshot. The server broadcastrepos.snapshotasynchronously viavoid broadcastReposSnapshot(), so the UI could miss the repo list update.Fix
await broadcastReposSnapshot()before ackingproject.add/project.remove, so the client always receives an up-to-daterepos.snapshotwith the command response.refreshRepos()afteraddProject/removeProjectcompletes.projects.snapshotarrives with more projects than repos, automatically sendrepo.refreshto catch late/missed snapshots.project.browseandproject.addso the dev/fake loop can exercise the add-repo flow.cursoragentin the CLA workflow so Cursor Cloud Agent commits are exempt (same as other bots).Testing
pnpm testinserver/— all tests passrepo.refreshcursoragent