Repository navigation
feat(desktop): name a session's location in the rail hover card - #5271
Conversation
hqhq1025
left a comment
There was a problem hiding this comment.
Reviewed exact head 95ea260fea99b2bb235332e6aca84532f465e05b. I found no P0-P3 issues in this change.
The implementation resolves a local Session's cwd against the Project catalog only when that Project has multiple registered locations, handles canonical IDs and aliases, and excludes Runtime Host workspaces from the local catalog. The production create/relocate path stores the catalog's exact selected location in the Session header, while relink updates affected Session paths transactionally. The UI carries the matched catalog path into the hover card, keeps long paths bounded with an ellipsis and full title, and includes it in the accessible description.
Validation completed:
npm run build:test- full workspace typecheck, lint, format check, ASF headers, renderer architecture (112/112), E2E budget, and
git diff --check - UI tests: 442/442; Desktop tests: 2460/2460
- focused Session navigation: 8/8; focused hover-card rows: 12/12
- Storybook production build and browser smoke: 357 stories / 386 theme renders, including the Project Groups hover-card location interaction
- clean merge-tree with current
mainat0d4a6ba5f48de6807ab96d6b5aad3635cc6a1f57
GitHub currently reports only the successful label check for this head; no hosted test check is present. I did not exercise a packaged native Windows/macOS build or a real multi-worktree Desktop installation. Since this is a user-facing feature, the merge decision remains with a human maintainer.
Automated review notice: This comment was posted by an automated review agent operated by hqhq1025. It is not an independent human review and does not replace one.
me2seeks
left a comment
There was a problem hiding this comment.
Automated review notice: This comment was posted by an automated review agent operated by me2seeks make. It is not an independent human review and does not replace one.
Summary
Resolves a session's cwd against its project's locations and names the matched location in the rail hover card, only for multi-location projects and never for Host-workspace (remote) sessions. The issue is real: linked worktrees share one Project identity, so the hover card could show a location that isn't the session's working directory. The fix is minimal and at the right layer — it reuses the worktree mark's Host boundary (runtimeHostProfileUsesHostWorkspace), returns the project's canonical path rather than the raw cwd, and is covered by POSIX, Windows mixed-separator/case, drive-root, and remote-exclusion tests that would fail on revert.
Findings
- [P3]
samePathis shared withderiveWorktreeSessionIds, so the new Windows case-folding (apps/desktop/src/renderer/features/session-navigation/model/session-project-grouping.ts:108-113) silently changes the worktree mark's semantics too — previouslyc:/reponever matchedC:\Repo. It is a fix and it is tested, but it is a second behavior change riding in a display PR and deserves a line in the description. - [P3]
isWindowsPathtreats any//-prefixed path as UNC (line 131); POSIX explicitly permits//-leading paths, which would now be case-folded. Vanishingly rare on real sessions.
Verdict
merge-ready — well-scoped display change with honest tests; only the shared samePath side effect is worth a mention.
A repository and its linked worktrees resolve to one Project identity, so the rail showed the worktree path as the project's preferred path and gave no way to tell which location a task actually runs in. When a project has more than one location, resolve the session's own location by matching cwd against project.locations and show it on the hover card, with the full path in the tooltip. Single-location projects stay quiet. The selector mirrors sessionProjectName so the memoized SessionRailData keeps its identity (apache#4109). Generated-by: Codex
Only treat an explicit backslash UNC prefix or drive-absolute path as Windows for case-insensitive comparison. Keep the worktree mark and session location matched by the same rule, with regression tests for POSIX and UNC paths. Generated-by: Codex
c98caa4 to
360b149
Compare
hqhq1025
left a comment
There was a problem hiding this comment.
Reviewed exact head 360b149cb1920f933255817fda41ee6b988fc31c. I found no P0-P3 issues in the current change.
The implementation resolves a Session's location from the Runtime-Host-scoped Project catalog, exposes a path only for local Projects with multiple registered locations, and returns the catalog's canonical path (use-session-navigation-controller.ts:155-193, session-project-grouping.ts:47-54). The hover card renders that path with bounded display, a full title, and the same value in its accessible description (session-history-list.tsx:1116-1129,1169-1178).
The new head also fixes the previous double-slash ambiguity in the shared location/worktree comparison. It folds case only for drive-absolute paths or an explicit backslash UNC source while keeping // POSIX paths case-sensitive (session-project-grouping.ts:57-90). The added regression is discriminating: transplanted onto parent e96bb8f217879b8a0ad026123c4af33f141ece69 while retaining the old comparison, it failed because //repo-feature incorrectly matched //Repo-Feature; the current head passes both that POSIX case and the explicit UNC mixed-separator case.
Validation completed on Node 24.18.1 after a clean npm ci:
npm run build:test- focused Session navigation and hover-card tests: 32/32
- UI tests: 682/682; Desktop tests: 2844/2844
- full workspace typecheck, lint, format check, ASF headers,
git diff --check - renderer architecture: 112/112; E2E budget: 34 tests in 20 files
- Storybook production build and browser smoke: 439 stories / 476 theme renders
- clean merge-tree against current
main542f04a4f328de7a49b96e5146f391fb923fa369; the PR is 2 commits ahead and 0 behind
GitHub currently reports no hosted checks for this head. I did not exercise a packaged native Windows/macOS build or a real multi-worktree Desktop installation. Since this is a user-facing feature, the merge decision remains with a human maintainer.
Automated review notice: This comment was posted by an automated review agent operated by hqhq1025. It is not an independent human review and does not replace one.
|
LGTM |
Summary
Linked worktrees share one Project identity, so the project row can show a preferred location that does not match the session's actual working directory.
When a local project has multiple locations, resolve the session's
cwdagainst its project locations and show the matched path in the session hover card. Single-location projects remain unchanged, and Runtime Host sessions do not use local project locations.The location is displayed as muted supporting text with the full path preserved in the tooltip.
Verification
npm run build:testnpm run format:checknpm --workspace @maka/ui run typechecknpm --workspace @maka/desktop run typecheckgit diff --checkAI use
Tool(s) and scope:
Codex contributed to the implementation review, session-location wiring, styling, tests, and validation.
Checklist
Does this PR entail a change in behavior?