feat(home): add folders to resource menu#4000
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub. |
PR SummaryMedium Risk Overview This extends resource/type enums and request schemas to accept It also adds an embedded folder tab view (with a new Reviewed by Cursor Bugbot for commit 1d702eb. Configure here. |
apps/sim/app/workspace/[workspaceId]/home/components/user-input/components/constants.ts
Show resolved
Hide resolved
Greptile SummaryThis PR adds folders as a selectable resource type in the workspace resource menu (plus menu and add-resource dropdown), embedding a live folder view that lists contained workflows as clickable links opening in a new tab. Key changes:
Confidence Score: 5/5Safe to merge — workspace scoping is correctly applied in resolveFolderResource, all type unions are consistently extended across every layer, and the embedded UI follows established component patterns. No P0 or P1 issues found. The previously flagged workspace-scoping security concern has been addressed: both DB queries in resolveFolderResource filter on workspaceId. Type extensions are complete and consistent (Zod schemas, TypeScript unions, Zustand store types, React Query interfaces). EmbeddedFolder follows the exact same structure as EmbeddedWorkflow and EmbeddedFile. Cache invalidation and name-lookup hooks are properly updated. No files require special attention. Important Files Changed
Sequence DiagramsequenceDiagram
participant U as User
participant RT as ResourceTabs
participant DD as AddResourceDropdown
participant API as /api/copilot/chat/resources
participant PC as processContextsServer
participant DB as Database
U->>DD: Clicks + → Folders → selects folder
DD->>RT: onAdd({type:'folder', id, title})
RT->>API: POST /add {type:'folder', id, title}
API-->>RT: 200 OK (persisted to chat.resources)
U->>U: Sends chat message with folder context
Note over PC: ctx.kind='folder' && ctx.folderId && currentWorkspaceId
PC->>DB: SELECT folder WHERE id=folderId AND workspaceId=wsId
PC->>DB: SELECT workflows WHERE folderId=folderId AND workspaceId=wsId
DB-->>PC: folder + workflow list
PC-->>U: AgentContext with folder name and workflow inventory
Reviews (5): Last reviewed commit: "fix(home): add workspace scoping to fold..." | Re-trigger Greptile |
|
@greptile |
|
@cursor review |
apps/sim/app/workspace/[workspaceId]/home/components/user-input/components/constants.ts
Show resolved
Hide resolved
|
Fixed in 6471057 — added |
|
@greptile |
|
@cursor review |
|
@greptile |
|
@cursor review |
apps/sim/app/workspace/[workspaceId]/home/components/user-input/user-input.tsx
Outdated
Show resolved
Hide resolved
|
@greptile |
|
@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 1d702eb. Configure here.
* feat(home): add folders to resource menu * fix(home): add folder to API validation and dedup logic * fix(home): add folder context processing and generic title dedup * fix(home): add folder icon to mention chip overlay * fix(home): add folder to AgentContextType and context persistence * fix(home): add workspace scoping to folder resolver, fix folderId type and dedup * user message
Summary
Foldericon, resource registry config, embedded folder view showing contained workflowsType of Change
Testing
Tested manually
Checklist