Add org workspace tags and combine Files picker - #8304
BillLeoutsakosvl346 wants to merge 1 commit into
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub. |
There was a problem hiding this comment.
2 issues found across 19 files
Confidence score: 3/5
- In
plus-menu-dropdown.tsx, flattening every foldered resource family removes folder navigation for tables, knowledge bases, and workflows in organization chats; preserve their tree sections. - In
chip-clipboard-codec.ts, globally recognizing organization workspace links can activate unsupported contexts in ordinary workspace chats and cause send-time errors; scope workspace-link recognition to supported organization chats.
Prompt for AI agents (unresolved issues)
Check if these issues are valid — if so, understand the root cause of each and fix them. If appropriate, use sub-agents to investigate and fix each issue separately.
<file name="apps/sim/app/workspace/[workspaceId]/home/components/user-input/components/plus-menu-dropdown/plus-menu-dropdown.tsx">
<violation number="1" location="apps/sim/app/workspace/[workspaceId]/home/components/user-input/components/plus-menu-dropdown/plus-menu-dropdown.tsx:462">
P2: Organization chats now flatten every foldered resource family, so tables, knowledge bases, and workflows lose their existing folder navigation. Preserve their tree sections and apply the flat rendering only to the combined Files family.</violation>
</file>
<file name="apps/sim/app/workspace/[workspaceId]/home/components/user-input/components/chip-clipboard-codec.ts">
<violation number="1" location="apps/sim/app/workspace/[workspaceId]/home/components/user-input/components/chip-clipboard-codec.ts:26">
P2: This global addition lets organization workspace links become active contexts in ordinary workspace chats, where workspace-context processing is not supported and send-time errors are rethrown. Scope workspace-link rehydration to organization composers, or explicitly discard unsupported workspace links before sending.</violation>
</file>
Reply with feedback, questions, or to request a fix.
Fix all with cubic | Re-trigger cubic
| groups={ | ||
| organizationId ? visibleResources.filter(isNativeResourceGroup) : visibleResources | ||
| } | ||
| flat={Boolean(organizationId)} |
There was a problem hiding this comment.
P2: Organization chats now flatten every foldered resource family, so tables, knowledge bases, and workflows lose their existing folder navigation. Preserve their tree sections and apply the flat rendering only to the combined Files family.
Prompt for AI agents
Check if this issue is valid — if so, understand the root cause and fix it. At apps/sim/app/workspace/[workspaceId]/home/components/user-input/components/plus-menu-dropdown/plus-menu-dropdown.tsx, line 462:
<comment>Organization chats now flatten every foldered resource family, so tables, knowledge bases, and workflows lose their existing folder navigation. Preserve their tree sections and apply the flat rendering only to the combined Files family.</comment>
<file context>
@@ -405,21 +433,36 @@ export const PlusMenuDropdown = React.memo(
- groups={
- organizationId ? visibleResources.filter(isNativeResourceGroup) : visibleResources
- }
+ flat={Boolean(organizationId)}
+ combineFileFolders={Boolean(organizationId)}
+ sections={organizationId ? [] : treeSections}
</file context>
| * no single portable id (an array / two ids / none) and degrade to plain text. | ||
| */ | ||
| const PORTABLE_KIND_TO_ID_FIELD = { | ||
| workspace: 'workspaceId', |
There was a problem hiding this comment.
P2: This global addition lets organization workspace links become active contexts in ordinary workspace chats, where workspace-context processing is not supported and send-time errors are rethrown. Scope workspace-link rehydration to organization composers, or explicitly discard unsupported workspace links before sending.
Prompt for AI agents
Check if this issue is valid — if so, understand the root cause and fix it. At apps/sim/app/workspace/[workspaceId]/home/components/user-input/components/chip-clipboard-codec.ts, line 26:
<comment>This global addition lets organization workspace links become active contexts in ordinary workspace chats, where workspace-context processing is not supported and send-time errors are rethrown. Scope workspace-link rehydration to organization composers, or explicitly discard unsupported workspace links before sending.</comment>
<file context>
@@ -23,6 +23,7 @@ const CHIP_LINK_SCHEME = 'sim'
* no single portable id (an array / two ids / none) and degrade to plain text.
*/
const PORTABLE_KIND_TO_ID_FIELD = {
+ workspace: 'workspaceId',
table: 'tableId',
file: 'fileId',
</file context>
|
superseded by #8302 |
|
| if (!organizationId || !chatId) | ||
| throw new OrchestrationError('validation', 'Workspace tags require an organization chat') |
There was a problem hiding this comment.
A workspace chip copied from an organization chat can be pasted into a workspace-scoped chat, where it appears as a valid chip. Sending that message then fails with “Workspace tags require an organization chat” because paste accepts the chip in any chat, but this server path rejects the entire turn. Reject the chip on paste or make the unsupported scope clear before send.
Knowledge Base Used: Web application and product surfaces
| <ResourceMenuSections | ||
| sections={treeSections} | ||
| groups={ | ||
| organizationId ? visibleResources.filter(isNativeResourceGroup) : visibleResources | ||
| } | ||
| flat={Boolean(organizationId)} | ||
| combineFileFolders={Boolean(organizationId)} | ||
| sections={organizationId ? [] : treeSections} | ||
| groups={visibleResources} |
There was a problem hiding this comment.
The organization picker now passes no folder-tree sections for Tables, Knowledge bases, or Workflows. Browsing those categories shows flat items instead, so users lose the folder hierarchy and must look in a separate Folders list to select a folder. Preserve those categories’ folder browsing while combining the two file kinds.
Knowledge Base Used: Web application and product surfaces
Note: If this suggestion doesn't match your team's coding style, reply to this and let me know. I'll remember it for next time!
| .filter( | ||
| (workspace) => | ||
| !q || workspace.name.toLowerCase().includes(q) || 'workspaces'.includes(q) | ||
| ) |
There was a problem hiding this comment.
Short searches match every workspace
Typing @w or @s matches every workspace because each letter occurs in “workspaces,” even when the workspace name does not match. Those unrelated rows appear before matching resources, making keyboard selection less reliable. Limit workspace matches to relevant names or a more precise category query.
| ) : ( | ||
| <> | ||
| <Workspaces className='size-[14px] shrink-0 text-[var(--text-icon)]' /> | ||
| <span className='truncate'>{item.name}</span> |
There was a problem hiding this comment.
Workspace label bypasses menu component
The new search row uses a truncated span for the workspace name beside its icon. The repository requires DropdownMenuItemLabel for ordinary menu labels beside icons, as the browse row already uses. Please satisfy that requirement before merging so long names also retain the shared label treatment.
| <span className='truncate'>{item.name}</span> | |
| <DropdownMenuItemLabel label={item.name} /> |
Context Used: Tailwind CSS and styling conventions (source)
Note: If this suggestion doesn't match your team's coding style, reply to this and let me know. I'll remember it for next time!
Summary
Adds workspace tags to organization Mothership chats through the existing
+and@pickers. The tag carries a stable workspace ID through drafts, queued sends, clipboard links, and persisted chat messages. Send-time context resolution authorizes each target through the existing workspace-target path and supplies the agent with the current workspace name and ID as a focus cue.The organization picker shows files and file folders together in one flat Files submenu and one search section. Each row keeps its own resource kind and ID, with its workspace name alongside it. Workspace chats and other folder categories retain their existing behavior.
Implementation plan
Verification
bun run type-checkinapps/simbun run check:api-validation+and@, confirmed workspace/file/file-folder clipboard links retain distinct IDs, and confirmed a sent workspace tag persisted with its ID. The local agent response stops at the existing outbound Sim transport requirement (400), after the tag is accepted and stored.Port 3001 was occupied by another local app, so this worktree ran on 3002. Screenshots use local demo data.
Screenshots
Organization resource menu
Combined Files submenu
Workspace chip in composer