fix: show full file path in edit tool view#1599
Merged
charlesvien merged 9 commits intoApr 23, 2026
Merged
Conversation
FileMentionChip now displays the relative directory path (muted) before the filename, so users can see which file was edited at a glance without expanding the diff. Before: 📄 ActionSelector.tsx After: 📄 src/renderer/components/action-selector/ActionSelector.tsx The directory portion uses text-gray-9 for visual hierarchy, keeping the filename prominent. Fixes PostHog#1194
adboio
reviewed
Apr 9, 2026
| > | ||
| <Text size="1"> | ||
| <FileIcon filename={filename} size={12} /> | ||
| {directory && ( |
Contributor
adboio
reviewed
Apr 9, 2026
Contributor
adboio
left a comment
There was a problem hiding this comment.
left a small comment, otherwise looks great :)
adboio
requested changes
Apr 9, 2026
Wrap directory and filename in a single span to eliminate whitespace gap between them.
Contributor
Author
|
Good catch! Tightened the spacing by wrapping directory and filename in a single span. Pushed the fix 👍 |
Use inline-flex on the wrapper span to collapse whitespace text nodes between directory and filename, eliminating the visible gap.
Contributor
Author
Contributor
Author
|
Good catch — tightened the gap between the icon and filename ( |
Contributor
Author
|
@adboio thanks for catching that! Tightened up the gap by putting the spans on one line and adding gap-0 to the inline-flex container. Also removed all unrelated changes — the PR now only touches FileMentionChip.tsx. |
adboio
approved these changes
Apr 13, 2026
Contributor
adboio
left a comment
There was a problem hiding this comment.
thanks for fixing!! can you please just remove the .github/evidence from the commit? i'll get this merged asap :)
Reorders FileMentionChip so the bold filename renders before the gray directory path, matching the diff panel header style. Directory truncates with an ellipsis on overflow while the filename stays visible in full. Nudges the whole chip down 1px and uses inline-flex with baseline alignment so it sits cleanly inline with surrounding text. Also restores .gitignore entries and removes the PR evidence image that leaked onto the branch. Generated-By: PostHog Code Task-Id: 97371512-63be-4a27-be52-b007a53795a4
Adds flex sizing and overflow containment so the chip shrinks to its parent's width and the directory path clips with an ellipsis when there isn't enough room, instead of pushing layout. Generated-By: PostHog Code Task-Id: 97371512-63be-4a27-be52-b007a53795a4
Contributor
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.



Problem
When the agent edits a file, the edit tool view only shows the filename (e.g.
ActionSelector.tsx), not the full path. When working across many files with the same name in different directories, this makes it hard to know which file was changed.Fixes #1194
Solution
Updated
FileMentionChipto show the relative directory path before the filename:📄 ActionSelector.tsx📄 src/renderer/components/action-selector/ActionSelector.tsxThe directory portion uses
text-gray-9(muted) for visual hierarchy, keeping the filename prominent. Uses the existingtoRelativePathutility already in the same file.Files Changed
apps/code/src/renderer/features/sessions/components/session-update/FileMentionChip.tsx— 9 lines added