feat(folders): add resource pinning and generalize the folders contract (#6014)

- Adds per-user pinning for workflows, files, knowledge bases, and tables: new `pinned_item` table, `/api/pinned-items` routes, React Query hooks, and a shared `PinButton` wired into Tables, Knowledge, and Files with pinned-first ordering
- Adds the generic `folder` table with an idempotent, replay-safe, collision-aware backfill from `workflow_folder` and `workspace_file_folders`; no cutover yet, folder reads still go through a documented legacy adapter
- Moves `folderSchema` to the generic vocabulary (`resourceType`, `deletedAt`) and drops the unused `color`/`isExpanded`
This commit is contained in:
Waleed
2026-07-28 14:42:11 -07:00
committed by GitHub
parent b69fdbd17b
commit cb3611bad2
35 changed files with 19957 additions and 108 deletions
+21
View File
@@ -68,6 +68,27 @@ export const schemaMock = {
createdAt: 'createdAt',
updatedAt: 'updatedAt',
},
folder: {
id: 'id',
resourceType: 'resourceType',
name: 'name',
userId: 'userId',
workspaceId: 'workspaceId',
parentId: 'parentId',
locked: 'locked',
sortOrder: 'sortOrder',
createdAt: 'createdAt',
updatedAt: 'updatedAt',
deletedAt: 'deletedAt',
},
pinnedItem: {
id: 'id',
userId: 'userId',
workspaceId: 'workspaceId',
resourceType: 'resourceType',
resourceId: 'resourceId',
pinnedAt: 'pinnedAt',
},
workflowFolder: {
id: 'id',
name: 'name',