Skip to content

fix: refresh repos after adding a project on iOS home - #34

Merged
leduckhc merged 1 commit into
mainfrom
cursor/fix-add-repo-empty-home-3a57
Jul 13, 2026
Merged

fix: refresh repos after adding a project on iOS home#34
leduckhc merged 1 commit into
mainfrom
cursor/fix-add-repo-empty-home-3a57

Conversation

@leduckhc

@leduckhc leduckhc commented Jul 13, 2026

Copy link
Copy Markdown
Owner

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), but project.add only reliably updated projects.snapshot. The server broadcast repos.snapshot asynchronously via void broadcastReposSnapshot(), so the UI could miss the repo list update.

Fix

  • Server: await broadcastReposSnapshot() before acking project.add / project.remove, so the client always receives an up-to-date repos.snapshot with the command response.
  • Client: Call refreshRepos() after addProject / removeProject completes.
  • Client safety net: When a projects.snapshot arrives with more projects than repos, automatically send repo.refresh to catch late/missed snapshots.
  • FakeServer: Implement project.browse and project.add so the dev/fake loop can exercise the add-repo flow.
  • CI: Allowlist cursoragent in the CLA workflow so Cursor Cloud Agent commits are exempt (same as other bots).

Testing

  • pnpm test in server/ — all tests pass
  • Added store controller tests for auto-refresh on projects growth and post-add repo.refresh
  • CLA Assistant check passes after allowlisting cursoragent
Open in Web Open in Cursor 

@github-actions

github-actions Bot commented Jul 13, 2026

Copy link
Copy Markdown

All contributors have signed the CLA. ✅
Posted by the CLA Assistant Lite bot.

@cursor
cursor Bot force-pushed the cursor/fix-add-repo-empty-home-3a57 branch from 933d8ed to bcd686f Compare July 13, 2026 00:41
@leduckhc
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
cursor Bot force-pushed the cursor/fix-add-repo-empty-home-3a57 branch from 98c585a to 70c4c62 Compare July 13, 2026 00:50
@leduckhc
leduckhc merged commit 0f113aa into main Jul 13, 2026
10 checks passed
@github-actions github-actions Bot locked and limited conversation to collaborators Jul 13, 2026
@leduckhc
leduckhc deleted the cursor/fix-add-repo-empty-home-3a57 branch July 16, 2026 14:05
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant