Skip to content

fix(app): discover server projects in fresh clients - #46565

Closed
marcelokarval wants to merge 1 commit into
anomalyco:devfrom
marcelokarval:fix/web-project-discovery-merge
Closed

marcelokarval wants to merge 1 commit into
anomalyco:devfrom
marcelokarval:fix/web-project-discovery-merge

Conversation

@marcelokarval

@marcelokarval marcelokarval commented Sep 1, 2026 •

Copy link
Copy Markdown

Issue for this PR

Closes #13626

Type of change

  • Bug fix
  • New feature
  • Refactor / code improvement
  • Documentation

What does this PR do?

A fresh web client currently depends on browser-local bookmarks, so projects and their sessions can be missing even though the connected server already knows them.

This change merges server-discovered projects into the local project list while keeping browser organization local: bookmarks retain their order, server projects are appended and path-deduplicated, and closing a discovered project stores a per-server local hidden marker. Hidden state is sanitized, pruned only after a successful project request, and removed when its saved remote server is deleted.

This follows the direction from #41154 and fixes its first-bookmark transition: opening project A no longer makes the remaining server project B disappear. It does not add server-side profile storage, credential transfer, or browser-storage export.

Related: #41412, #44073.

How did you verify your code works?

  • bun run test:unit — 739 passed
  • bun run test:browser — 41 passed
  • bun run typecheck — passed
  • bun run build — passed
  • focused Playwright regression matrix — 10 passed, including separate browser contexts against the same server
  • Prettier, git diff --check, and the repository pre-push monorepo typecheck — passed

Screenshots / recordings

Not applicable: this changes project discovery and persistence behavior without changing visual styling. The cross-client flow is covered by home-server-project-discovery.spec.ts.

Checklist

  • I have tested my changes locally
  • I have not included unrelated changes in this PR

Merge server-discovered projects with browser-local bookmarks while keeping
client organization isolated per server. Preserve explicit bookmarks, prune
hidden discoveries after sync, and sanitize legacy persisted state.

Co-authored-by: Cordtus <[email protected]>
@github-actions github-actions Bot added needs:compliance This means the issue will auto-close after 2 hours. and removed needs:compliance This means the issue will auto-close after 2 hours. labels Sep 1, 2026
@github-actions

github-actions Bot commented Sep 1, 2026

Copy link
Copy Markdown
Contributor

Thanks for updating your PR! It now meets our contributing guidelines. 👍

@alexsoyes

alexsoyes commented Sep 20, 2026 •

Copy link
Copy Markdown

Self-hosted reproduction: OpenCode Web 0.0.0-dev-202609200100, five repos mounted under /workspace, iPhone/PWA over WireGuard. On a fresh origin, Home/recent projects are empty although the server has the repos and persistent state; the current dev build still reproduces this, and our only workaround is a one-time same-origin bootstrap that seeds localStorage. This makes phone use effectively unusable. Please review/merge: this PR’s separate-browser-context tests match the exact fix needed—projects visible from / without /setup.

@github-actions

github-actions Bot commented Oct 1, 2026

Copy link
Copy Markdown
Contributor

Automated PR Cleanup

Thank you for contributing to opencode.

Due to the high volume of PRs from users and AI agents, we periodically close older PRs using automated criteria so maintainers can focus review time on the most active and community-supported contributions.

This PR was closed because it matched the following cleanup criteria:

  • The PR was created more than 1 month ago
  • The PR had fewer than 2 positive reactions
  • Positive reactions are counted as thumbs-up, heart, celebration, or rocket reactions on the PR

PRs created within the last month are not affected by this cleanup.

If you believe this PR was closed incorrectly, or if you are still actively working on it, please leave a comment explaining why it should be reopened. A maintainer can review and reopen it if appropriate.

Thanks again for taking the time to contribute.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[FEATURE]: Auto-sync projects in web UI from server

2 participants