fix(chat): disambiguate folder mentions - #6804
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub. |
PR SummaryLow Risk Overview
Reviewed by Cursor Bugbot for commit a9a5c7f. Configure here. |
Greptile SummaryThe PR adds display-only folder-family and ancestry labels to flat resource mentions while preserving nested browsing and persisted mention behavior.
Confidence Score: 5/5The PR appears safe to merge. No blocking failure remains.
|
| Filename | Overview |
|---|---|
| apps/sim/app/workspace/[workspaceId]/home/components/user-input/components/plus-menu-dropdown/resource-mention-items.ts | Builds display-only family and ancestor metadata for folder mention rows, including guarded handling of missing and cyclic ancestry. |
| apps/sim/app/workspace/[workspaceId]/home/components/user-input/components/plus-menu-dropdown/mention-row-content.tsx | Adds folder location labels while preserving direct flex children for resource rows without location metadata. |
| apps/sim/app/workspace/[workspaceId]/home/components/user-input/components/plus-menu-dropdown/plus-menu-dropdown.tsx | Integrates folder location metadata into flat mention results and widens the responsive mention dropdown. |
| apps/sim/components/ui/folder-path-label.tsx | Introduces a reusable root-first folder-path label that retains root and leaf segments for deep paths. |
| apps/sim/app/workspace/[workspaceId]/w/components/sidebar/components/search-modal/components/command-items/command-items.tsx | Replaces duplicated search-result folder-path rendering with the shared label component. |
Reviews (3): Last reviewed commit: "fix(chat): keep the log row's timestamp ..." | Re-trigger Greptile
The mention menu's folder location and the cmd-K row's folder receipt were two copies of the same flex-shrink layout. Both now render `FolderPathLabel`, which collapses ancestors past the third into a single `…` segment so a deep path drops whole folders instead of clipping one mid-word. Mention rows also cap the name at 65% and fix the popover at 380px, so the location column keeps a stable right edge and can never be squeezed out by a long resource name.
e218963 to
99a22d8
Compare
|
@cursor review |
The name wrapper added for folder locations was applied to every flat mention row, which broke the log row: it pins its timestamp with `ml-auto`, and that only reaches the right edge while the row button is its flex parent. Inside a content-sized wrapper the timestamp collapsed back beside the workflow name. `MentionRowContent` now wraps only the rows that actually render a location and carries the invariant in one place, with a test that fails if the unwrapped path regresses.
|
@cursor review |
There was a problem hiding this comment.
✅ Bugbot reviewed your changes and found no new issues!
Comment @cursor review or bugbot run to trigger another review on this PR
Reviewed by Cursor Bugbot for commit a9a5c7f. Configure here.

Summary
Type of Change
Testing
Reviewers should focus on the flat @ autocomplete and filtered + menu at narrow widths; nested browsing is intentionally unchanged.
Checklist
Screenshots/Videos
Manually verified in localhost using same-named workflow and file folders; the right-side labels display Files and Workflows.