Repository navigation
fix(web): show sessions in home list for subpaths and case-insensitive Windows paths - #48146
titaniummachine1 wants to merge 1 commit into
Conversation
…e Windows paths buildHomeSessionRecords used exact Set.has(pathKey(directory)) so sessions in C:/gitProjects/AIA_tennis were dropped when only C:/gitProjects was open, and unselected 'all sessions' still required open-project membership. Use prefix matching via isSubpath, keep sessions visible with fallback project instead of returning []. Normalize Windows paths case-insensitively in pathKey and use pathKey comparisons for project selection/toggle.
|
This PR doesn't fully meet our contributing guidelines and PR template. What needs to be fixed:
Please edit this PR description to address the above within 2 hours, or it will be automatically closed. If you believe this was flagged incorrectly, please let a maintainer know. |
|
Thanks for your contribution! This PR doesn't have a linked issue. All PRs must reference an existing issue. Please:
See CONTRIBUTING.md for details. |
|
The following comment was made by an LLM, it may be inaccurate: Based on my search results, I found one potentially related PR: PR #46520: fix(app): show global-project sessions in web Home This PR appears related as it also addresses showing sessions in the web Home interface, though it specifically focused on global-project sessions rather than subpath/Windows path normalization issues. No other duplicate PRs were found with similar scope (subpath matching, Windows path normalization, or |
Home session list in 'opencode web' was empty even with project unselected. Root cause: buildHomeSessionRecords filtered by exact Set.has(pathKey(session.directory)), so sessions in C:/gitProjects/AIA_tennis were dropped when only C:/gitProjects was open, and sessions with no exact project match were dropped via return []. Also pathKey did not normalize Windows case (C: vs c:) or slashes consistently, and project selection used strict ===. This changes filtering to prefix matching via isSubpath, keeps sessions visible with fallback project, normalizes Windows paths case-insensitively, and uses pathKey comparisons for selection. Verified via code inspection; CLI session list already worked per-directory.