Repository navigation
fix(session-ui): show the folder a search or listing ran in, not its parent - #65460
Merged
Merged
Conversation
Contributor
There was a problem hiding this comment.
Looks good. I checked the new displayFolder logic in isolation, since the timeline is desktop/web only and I couldn't render it here. No folder and the project folder (with or without a trailing slash) both show /. Relative and absolute subfolders show their own path relative to the project. On the base, src showed as / and an absolute subfolder showed as an empty subtitle. tsc --noEmit passes in packages/session-ui.
The public API is unchanged: this only touches session UI rendering.
No concerns.
1 task
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.
Screenshots
A session's tool group, expanded, in the desktop app on Windows (dev build; the same view on every platform). The agent called Glob with no folder and Grep with
path: "src".srcGlob shows
/in both: it searched the project itself.Issue for this PR
No linked issue.
Type of change
What does this PR do?
The subtitle of a search or listing (Grep, Glob, List, and the grouped context rows) named the parent of the folder the tool ran in.
displayDirectorytakes a file path and drops its last part, but these tools pass a folder, sosrcbecame/andsrc/libbecamesrc.A new
displayFoldershows the folder itself, relative to the project, and/for the project or no folder. The search and listing subtitles in both timelines use it; file rows (patches, edits) keepdisplayDirectory.How did you verify your code works?
devand of this branch, the same session.bun typecheckinpackages/session-ui,bun run lint:changed origin/devclean. No unit test:tool-renderer.tsxhas no test beside it, and the new function reads the session's directory from its context.Checklist