Skip to content

fix(app): show global-project sessions in web Home - #46520

Closed
SeashoreShi wants to merge 1 commit into
anomalyco:devfrom
SeashoreShi:fix/web-home-global-sessions
Closed

SeashoreShi wants to merge 1 commit into
anomalyco:devfrom
SeashoreShi:fix/web-home-global-sessions

Conversation

@SeashoreShi

Copy link
Copy Markdown
Contributor

Issue for this PR

Closes #46444

Type of change

  • Bug fix

What does this PR do?

The web Home page silently hides sessions created outside any git repo (e.g. C:\Users\Raphael, C:/, I:/Projetos) when launched from a non-git directory. buildHomeSessionRecords filters sessions by matching session.directory against the selected project's projectDirectories() (= worktree + sandboxes). Sessions outside a git repo belong to the global project, whose worktree is forced to / in project.ts fromDirectory and which never accumulates sandboxes — so the session's real directory never matches and it's dropped from the Home list. The CLI doesn't hit this because it lists by project_id.

Fix: keep global-project sessions visible in the Home filter (their projectID is "global"). The directory-based filter still applies to all git-backed projects; the follow-up projectForSession lookup still resolves the correct project for display.

Changes:

  • packages/app/src/pages/home/home-sessions-controller.tsx: skip the directory filter for sessions whose projectID === "global".

How did you verify your code works?

  • Ran the Home session index unit suite (bun test --conditions=solid ./src/context/global-sync/home-session-index.test.ts): 7 pass, 0 fail.
  • The change is a one-line filter guard; git-backed session filtering is unchanged.

Checklist

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

@SeashoreShi
SeashoreShi force-pushed the fix/web-home-global-sessions branch from 07326a1 to f7a2b8f Compare September 5, 2026 23:10
@SeashoreShi

Copy link
Copy Markdown
Contributor Author

Rebased onto latest dev and cleaned the branch — it was accidentally carrying the unrelated Cloudflare provider fix (from a shared base); the PR now contains only the web Home global-sessions fix (+8/-1).

@Mattheinrichs

Copy link
Copy Markdown

Heads up: I opened #50440 for the same issue (#46444) before finding this PR — sorry for the overlap, not trying to duplicate work.

Difference: this PR is the smaller change (1 file, +8/−1); mine matches by projectID first with the existing directory check as a fallback, and adds a unit test for the global case.

Happy to consolidate onto whichever you prefer. If you'd rather keep this one, say so and I'll close #50440 and hand over the test file so you can fold it in. If it's easier, I can also put your approach and my test into a single PR. Either way, no hard feelings.

@SeashoreShi

Copy link
Copy Markdown
Contributor Author

Closing this — it has not seen review since September and I want to keep my contribution queue focused. Thanks for the time; happy to reopen or rework if it is still wanted.

@SeashoreShi SeashoreShi closed this Oct 7, 2026
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.

Web Home hides global-project sessions (empty list for sessions created outside git repos)

2 participants