Skip to content

fix(app): show server projects until the first bookmark (#39655) - #41154

Closed
Cordtus wants to merge 2 commits into
anomalyco:devfrom
Cordtus:fix/home-server-projects
Closed

Cordtus wants to merge 2 commits into
anomalyco:devfrom
Cordtus:fix/home-server-projects

Conversation

@Cordtus

@Cordtus Cordtus commented Aug 7, 2026

Copy link
Copy Markdown

Issue for this PR

Closes #39655

Type of change

  • Bug fix

What does this PR do?

The home project list and picker recents only read client-side bookmarks, which opencode web never seeds, so a fresh session showed "Nothing here yet". The list now merges the server /project list alongside bookmarks (bookmarks first, remaining server projects appended and deduplicated by normalized path), so adding the first bookmark no longer hides the other server projects or their sessions. Server projects the user closes stay hidden until reopened.

How did you verify your code works?

  • Added unit tests for the fallback, bookmark-first transition, path deduplication, and the closed/hidden case.
  • App unit suite passes (728 tests); full monorepo typecheck passes.

Screenshots / recordings

None.

Checklist

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

Related: #39732 (New Session flow with no project open) overlaps with the fresh-session case this PR covers.

@github-actions

github-actions Bot commented Aug 7, 2026

Copy link
Copy Markdown
Contributor

Thanks for your contribution!

This PR doesn't have a linked issue. All PRs must reference an existing issue.

Please:

  1. Open an issue describing the bug/feature (if one doesn't exist)
  2. Add Fixes #<number> or Closes #<number> to this PR description

See CONTRIBUTING.md for details.

@github-actions github-actions Bot added the needs:compliance This means the issue will auto-close after 2 hours. label Aug 7, 2026
@Cordtus Cordtus changed the title fix(app): show server projects until the first bookmark fix(app): show server projects until the first bookmark (#41156) Aug 7, 2026
@Cordtus
Cordtus marked this pull request as ready for review August 7, 2026 22:59
@Cordtus Cordtus changed the title fix(app): show server projects until the first bookmark (#41156) fix(app): show server projects until the first bookmark (#39655) Aug 7, 2026
@github-actions github-actions Bot removed the needs:compliance This means the issue will auto-close after 2 hours. label Aug 7, 2026
@github-actions

github-actions Bot commented Aug 7, 2026

Copy link
Copy Markdown
Contributor

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

@Cordtus
Cordtus force-pushed the fix/home-server-projects branch from af1e8ed to d208b7e Compare August 11, 2026 16:56
@foklepoint

Copy link
Copy Markdown

Excited to see this get shipped!

@marcelokarval

Copy link
Copy Markdown

Thanks for tackling the fresh-web-client empty state. I reviewed this against current dev and confirmed the commit still merges cleanly, but found one transition that seems worth covering before merge:

  1. a fresh client has no bookmarks, so projects A and B come from /project;
  2. opening/bookmarking A makes the local bookmark list non-empty;
  3. visibleProjectEntries() then switches entirely to bookmarks, so B disappears.

The Home session index is also filtered by the visible project list, so this can hide otherwise available sessions after the first interaction.

A minimal client-side direction that keeps /project as discovery authority would be a stable merge instead of a binary fallback:

  • local bookmarks first, preserving their order;
  • remaining eligible server projects appended and deduplicated by normalized path;
  • an explicit per-server local hidden set for projects the user closes;
  • no database/API/profile-sync changes.

I am preparing RED cases on current dev for the first-bookmark transition, path deduplication, per-server isolation, server-derived session visibility, and two isolated browser contexts. I will not open a competing PR while coordinating here. Would you prefer an updated patch/test proposal posted here for you to incorporate, or a clearly linked successor PR if rebasing this branch is no longer convenient?

Related context: #13626, #41412, #44073.

@Cordtus

Cordtus commented Sep 1, 2026

Copy link
Copy Markdown
Author

Thanks @marcelokarval , whichever is most convenient for you is fine. I don't wish to create unnecessary additional work on your end, as that defeats the purpose of contributing.

@Cordtus
Cordtus force-pushed the fix/home-server-projects branch from d208b7e to 8744f9d Compare September 10, 2026 17:49
@Cordtus

Cordtus commented Sep 10, 2026

Copy link
Copy Markdown
Author

PR updated: rebased onto current dev and refined the project list logic. Instead of switching entirely to bookmarks once the first one exists, the list now merges the server /project list alongside bookmarks (bookmarks first, server projects appended, deduplicated by normalized path, closed projects hidden until reopened). Description updated to match; app unit suite passes (728 tests) and full monorepo typecheck is green.

@Cordtus

Cordtus commented Sep 10, 2026

Copy link
Copy Markdown
Author

Closing this in favor of @marcelokarval's PR #46565, which builds on this same approach (co-authored with me) and extends it further — dedicated per-server hidden state, pruning after sync, migration/cleanup, and e2e coverage. Thanks @marcelokarval for picking this up and taking it further.

@Cordtus Cordtus closed this Sep 10, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Bug] OpenCode Web shows "No folders found" although projects are returned by the backend API

3 participants