Repository navigation
fix(app): match home sessions to projects by id - #50440
Closed
Mattheinrichs wants to merge 1 commit into
Closed
Mattheinrichs wants to merge 1 commit into
Mattheinrichs wants to merge 1 commit into
Conversation
This was referenced Sep 21, 2026
Closed
Contributor
|
The following comment was made by an LLM, it may be inaccurate: |
Author
|
Closing this in favour of #46520 by @SeashoreShi — pre-existing, smaller diff (1 file, +8/−1), same fix for #46444. No need for two PRs competing for the same reactions. @SeashoreShi the offer stands: I have a unit test for the |
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 join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Issue for this PR
Closes #46444
Type of change
What does this PR do?
The web/desktop Home list could show "Nothing here yet" while sessions existed on disk.
buildHomeSessionRecordskept only sessions whosedirectorystring matched a projectworktree/sandbox. Sessions created outside a git repo belong to theglobalproject, whose worktree is forced to/(and which records no sandboxes), so/home/...never matched/and those sessions were dropped — even though they had already been fetched.This matches sessions to the scoped projects by
projectIDfirst, falling back to the existing directory match, and keeps the id map scoped to the selected project so selecting a project still filters the list.How did you verify your code works?
Added
home-session-records.test.tscovering the global-project case, the out-of-scope project case, and the directory fallback.cd packages/app && bun test --conditions=solid --preload ./happydom.ts ./src/pages/home/home-session-records.test.ts→ 3 pass, 0 failcd packages/app && bun typecheck→ passScreenshots or recordings
Not included — verified by unit tests; the empty-list symptom is reproduced in #46444.
Checklist