Skip to content

feat(ui): show folder path in search modal#4138

Merged
TheodoreSpeaks merged 2 commits intostagingfrom
fix/search-modal-file-path
Apr 13, 2026
Merged

feat(ui): show folder path in search modal#4138
TheodoreSpeaks merged 2 commits intostagingfrom
fix/search-modal-file-path

Conversation

@TheodoreSpeaks
Copy link
Copy Markdown
Collaborator

Summary

Currently the search modal doesn't show folders, meaning that workflows with the same name have no distinguishing features. Added folder path to the right side of the modal.

Type of Change

  • Bug fix
  • New feature
  • Breaking change
  • Documentation
  • Other: ___________

Testing

  • Tested search modal in local

Checklist

  • Code follows project style guidelines
  • Self-reviewed my changes
  • Tests added/updated and passing
  • No new warnings introduced
  • I confirm that I have read and agree to the terms outlined in the Contributor License Agreement (CLA)

Screenshots/Videos

image

@vercel
Copy link
Copy Markdown

vercel bot commented Apr 13, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

1 Skipped Deployment
Project Deployment Actions Updated (UTC)
docs Skipped Skipped Apr 13, 2026 11:33pm

Request Review

@TheodoreSpeaks TheodoreSpeaks marked this pull request as ready for review April 13, 2026 23:13
@cursor
Copy link
Copy Markdown

cursor bot commented Apr 13, 2026

PR Summary

Low Risk
Low risk UI-only change that extends search modal workflow data to include folder paths; no backend or persistence logic is modified.

Overview
Search modal workflow results now display an optional folder path on the right, helping distinguish workflows with identical names.

Workflow search metadata is extended with folderPath, computed in sidebar.tsx via getFolderPath(folderMap, workflow.folderId) and included in the cmdk value string so queries can match on folder context as well.

Reviewed by Cursor Bugbot for commit a5f4a17. Bugbot is set up for automated code reviews on this repo. Configure here.

@greptile-apps
Copy link
Copy Markdown
Contributor

greptile-apps bot commented Apr 13, 2026

Greptile Summary

This PR adds folder path display to the search modal so workflows with the same name can be distinguished by their location. The implementation correctly uses the existing getFolderPath utility, updates the useMemo dependency array, and follows the established right-aligned label pattern from MemoizedPageItem. All P2 findings are minor style/layout suggestions.

Confidence Score: 5/5

Safe to merge — all findings are P2 style suggestions with no functional impact on correctness

The logic is correct: getFolderPath is properly called, folderMap is added to memo deps, and the memo comparator is updated. Only two minor P2 issues exist — a cosmetic double-space in the search value string and a flex-shrink-0 truncate combo that won't clip very long paths. Neither blocks functionality.

apps/sim/app/workspace/[workspaceId]/w/components/sidebar/components/search-modal/components/command-items.tsx — layout consideration for long folder paths

Important Files Changed

Filename Overview
apps/sim/app/workspace/[workspaceId]/w/components/sidebar/components/search-modal/components/command-items.tsx Adds folderPath prop to MemoizedWorkflowItem and renders it right-aligned; flex-shrink-0 truncate combo may not truncate long paths properly
apps/sim/app/workspace/[workspaceId]/w/components/sidebar/components/search-modal/components/search-groups.tsx Passes folderPath to MemoizedWorkflowItem and includes it in the search value; double space produced when folderPath is undefined
apps/sim/app/workspace/[workspaceId]/w/components/sidebar/components/search-modal/utils.ts Adds optional folderPath to WorkflowItem interface — clean, no issues
apps/sim/app/workspace/[workspaceId]/w/components/sidebar/sidebar.tsx Correctly computes folder path via getFolderPath in searchModalWorkflows memo; deps array properly updated to include folderMap

Flowchart

%%{init: {'theme': 'neutral'}}%%
flowchart TD
    A[sidebar.tsx\nregularWorkflows] -->|useMemo| B{workflow.folderId?}
    B -->|yes| C[getFolderPath\nfolderMap, folderId]
    C --> D[map folder.name\njoin ' / ']
    D --> E[folderPath string]
    B -->|no| F[folderPath = undefined]
    E --> G[WorkflowItem\nfolderPath = string]
    F --> G
    G --> H[search-groups.tsx\nWorkflowsGroup]
    H -->|value includes folderPath| I[cmdk Command.Item\nenables folder search]
    H -->|folderPath prop| J[command-items.tsx\nMemoizedWorkflowItem]
    J -->|folderPath truthy| K[render right-aligned\nsubtitle span]
    J -->|folderPath undefined| L[no subtitle rendered]
Loading

Comments Outside Diff (1)

  1. apps/sim/app/workspace/[workspaceId]/w/components/sidebar/components/command-items.tsx, line 79-81 (link)

    P2 flex-shrink-0 truncate won't truncate without a max-width

    truncate (overflow: hidden; text-overflow: ellipsis; white-space: nowrap) only clips text within the element's own box. Because flex-shrink-0 prevents the span from shrinking, the span always expands to its full text content width and is never constrained — so truncate has no effect here. For a deeply-nested folder like A / B / C / D, this can push the workflow name entirely off screen.

    Consider adding a max-w-[40%] (or similar) to cap the folder path width:

Reviews (1): Last reviewed commit: "feat(ui): show folder path in search mod..." | Re-trigger Greptile

Copy link
Copy Markdown

@cursor cursor bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Cursor Bugbot has reviewed your changes and found 1 potential issue.

Fix All in Cursor

❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.

Reviewed by Cursor Bugbot for commit 7f905cb. Configure here.

@TheodoreSpeaks TheodoreSpeaks merged commit d238052 into staging Apr 13, 2026
12 checks passed
@TheodoreSpeaks TheodoreSpeaks deleted the fix/search-modal-file-path branch April 13, 2026 23:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant