René's URL Explorer Experiment


Title: feat(folders): add the generic resourceType-driven folder engine by waleedlatif1 · Pull Request #6037 · simstudioai/sim · GitHub

Open Graph Title: feat(folders): add the generic resourceType-driven folder engine by waleedlatif1 · Pull Request #6037 · simstudioai/sim

X Title: feat(folders): add the generic resourceType-driven folder engine by waleedlatif1 · Pull Request #6037 · simstudioai/sim

Description: Summary Extracts the generic, resourceType-driven folder engine that knowledge bases and tables need to have folders. This is the shared layer only — no KB or Tables UI. Two follow-up PRs build on it in parallel. Before this, folder create/update/delete/restore/reorder existed once in code, hardcoded to resourceType: 'workflow'. Rather than adding a switch with four backends, the per-type deltas are captured as data: apps/sim/lib/folders/config.ts — FOLDER_RESOURCES declares, per resource type: the child table, its id / folderId / workspace / soft-delete columns, the TS property key backing that soft-delete column (drizzle's .set() takes property names while .where() takes column objects, and they genuinely differ — archivedAt vs deletedAt), the membership scope, an audit label, and a cascade count key. Every .set() payload is built by a per-resource closure written with satisfies Partial, so a dropped or renamed column is a compile error at the config rather than a silent no-op. apps/sim/lib/folders/cascade.ts — archive/restore under one shared timestamp. Restore matches that timestamp exactly, which is what stops it from reviving resources that were deleted independently before or after. Statement count is fixed regardless of subtree depth: one subtree SELECT, one folder UPDATE, one child UPDATE, one per declared dependent table. apps/sim/lib/folders/lifecycle.ts — the single createFolder / updateFolder / deleteFolder / restoreFolder implementation. lib/workflows/orchestration/folder-lifecycle.ts drops from 620 lines to thin workflow-bound wrappers, so every existing caller (folders API, copilot workflow tools, resource-restore orchestrator) is untouched. Workflow-specific behavior that genuinely cannot be a row update — archiving through archiveWorkflowsByIdsInWorkspace so deployments deactivate, external webhooks tear down, the socket is notified and MCP tool lists republish; the last-workflow-in-workspace delete guard; restoring schedules / webhooks / chats / MCP tools — is declared as data (archiveChildren, guardDelete, restoreDependents) on the workflow entry. Knowledge bases and tables use the default path entirely. The contract widens to workflow | knowledge_base | table, and resourceType is threaded through all four routes and the React Query hooks. Query keys now include it (folders → list → → → ), so the three folder trees stop sharing one cache entry. Behavior change: folder restore no longer reactivates independently-archived dependents This is the highest-risk item in the PR and it touches an already-shipped path. Read this one carefully. Folder restore previously reactivated all schedules, webhooks, chats, and MCP tools belonging to a restored workflow, regardless of each row's own archivedAt. The generic cascade requires an exact timestamp match, consistent with how it treats folders and resources. For the ordinary case nothing changes: archiveWorkflow stamps dependents with options.archivedAt, so everything archived by a folder delete shares the folder's timestamp and comes back together. The difference is a webhook (or schedule, or chat) a user disabled before the folder was deleted — the old code silently re-enabled it on restore; it now stays archived. I believe the new behavior is correct: it preserves a deliberate user action the old code undid, and silently re-enabling a webhook someone turned off is the more dangerous of the two failure modes. But it is a semantic change nobody asked for, so it should be an explicit decision rather than something a reviewer discovers. If you'd rather not take it in this PR, the fallback is small and local: restore dependents unfiltered for the workflow config only, leaving kb/table on the timestamp-matched path. assertFolderMutable is gated to workflow — deliberately Folder locking is a workflow-only feature. folder.locked exists solely because workflow-folder locking shipped before the generic table, and the schema comment already states it is not extended to the other resource types. The routes now call assertFolderMutable only when resourceType === 'workflow'. This is intent, not an oversight: kb and table folders have no lock semantics. Calling the lock check for them would be harmless today (their locked is always false) but would imply a feature that does not exist, and would quietly start enforcing if anything ever wrote the column. If kb/table folders should be lockable, that is a separate feature with its own UI. Unique-index handling on every newly-reachable path The folder table has a partial unique index on active (workspaceId, resourceType, coalesce(parentId,''), name). Every path this PR makes reachable for kb/table follows the established rule — 409 where the user picks the name, deduplicateFolderName where they cannot: Path Handling Create 409 conflict (user chose the name) Rename (PUT) 409 conflict Reparent (PUT) 409 conflict Reparent via reorder 409 conflict — newly added; this path previously fell through to a 500 Restore deduplicateFolderName against the resolved parent (a folder whose parent is still archived is re-rooted first), with a 23505 → 409 fallback for the create-races-restore window The reorder case is a real fix, not just plumbing: PUT /api/folders/reorder accepts parentId, so a drag that moves a folder into a sibling set that already has that name hit the constraint and returned 500 Failed to reorder folders. It now returns a 409 with an actionable message, for workflow folders too. Latent bug fix: the folder cycle check could escape its own tree checkForCircularReference in lib/workflows/utils.ts walked the parent chain with eq(folder.resourceType, 'workflow') hardcoded. Now that folder ids of other resource types exist, that walk could be handed a knowledge-base folder id, find no row, terminate early, and report "no cycle" — or with the filter removed, walk out of one resource's tree into another's. It moves to lib/folders/queries.ts as wouldCreateFolderCycle(folderId, parentId, resourceType), scoped to the caller's type. The old workflow-only copy is deleted, so there is no second implementation to drift. Review round 1 — three divergences from the canonical delete paths, all fixed All three findings said the same thing in different places: the generic row-update path was not a faithful stand-in for what each resource does when deleted on its own. Fixed in 62975bf4c by delegating to the canonical functions rather than replicating their writes. 1. Knowledge bases lost their dependent graph (Bugbot, High). deleteKnowledgeBase also archives the KB's document rows and sets its knowledge_connector rows to archivedAt + status: 'paused'. The bare knowledge_base row update left that graph live — connectors would have kept syncing into a KB the UI reported as deleted. Restore was worse: clearing the tombstone directly would trip kb_workspace_name_active_unique and abort the whole restore transaction on any name collision, where the canonical restore renames. 2. Folder delete bypassed table delete locks (Bugbot, Medium). deleteTable gates archiving on deleteLocked inline in its WHERE, because archiving destroys access to every row. Deleting the folder around a locked table was a way around that control. The table config now declares a guardDelete that refuses the whole folder up front — checked across the entire subtree, so the cascade never archives half the tables and then stops at a locked one — and surfaces 423, matching TableLockedError.statusCode rather than inventing a different status for the same condition. 3. Re-deleting an archived folder stranded its children permanently (Greptile, P1). A second DELETE on an already-archived folder stamped still-active children with a new timestamp while the folder row kept its original (the folder UPDATE is guarded by isNull(deletedAt)). Restore matches the folder's stamp, so those children could never come back. deleteFolder now reuses the folder's existing deletedAt, which also heals the stragglers into the original snapshot instead of orphaning them — and makes a repeated delete idempotent. Supporting changes: deleteKnowledgeBase and deleteTable gained an optional options.archivedAt, so a bulk caller can stamp one shared timestamp. This mirrors archiveWorkflow's existing option of the same name — the precedent the workflow cascade already depends on. Defaulted to now; every existing single-resource caller is unchanged. Added the restoreChildren hook that pairs with archiveChildren. Their asymmetry was the underlying defect: an archive hook exists precisely because archiving touches more than the child row, so it requires a matching restore. cascade.test.ts now asserts that pairing across FOLDER_RESOURCES, so a future resource declaring one without the other fails the suite. Hook-based restores run after the folder transaction commits. The canonical restores open their own transactions (with FOR UPDATE and collision-rename retries); nesting them would hold folder-row locks across a second connection. The default row-update path still runs inside the transaction. One shared folderMutationStatus. The routes had three copies of the code→status mapper and the DELETE handler's was an inline ternary covering only two codes — locked would have returned 500 there even with the guard working. It lives in lib/folders/status.ts, deliberately outside lifecycle.ts so route tests that mock the lifecycle module don't stub out a pure mapping function. resourceType is now a required argument on deduplicateFolderName and listFoldersForWorkspace. Both defaulted to 'workflow', which is exactly the silent-wrong-answer footgun that would bite the KB/Tables follow-ups: forget the argument and you dedup against the wrong tree, then fail on the unique index. Now a compile error. Review round 2 — cascade ordering made partial failures permanent Both round-2 findings were the same defect in opposite directions, and both were introduced by round 1: the hooks that walk resources one at a time through their canonical delete/restore can fail partway, and the cascade was ordered so that a mid-loop failure could never be retried into a correct state. Fixed in 7fe4e0373. Delete stamped children before folders. A failure left some children soft-deleted at T1 with the folder still active, so the retry minted a fresh T2 and the T1 children fell outside every future restore. This is also why the round-1 P1 fix was incomplete on its own — reusing the folder's existing stamp only helps if the folder already has one. Folders are now stamped first, so the retry reuses T1 and sweeps the stragglers into the original snapshot. Restore had the mirror image. Folders came back first, so a later child failure left the root's deletedAt cleared, and every retry short-circuited on the already-restored early return — reporting success with zero counts while the remaining resources stayed archived. Silent partial success is the worst possible shape for this. Hook-driven child restores now run before the folder transaction, so a failure leaves the folder archived and the whole restore retryable. The tradeoff, stated plainly: both orderings now allow a transient window where a folder and its contents disagree — the inverse of what I originally optimized for ("a concurrent reader never sees an active resource inside a folder that has vanished"). That was the wrong thing to optimize for. The window is transient and self-healing on retry; the alternative silently and permanently strands data. The reasoning is written into the TSDoc on archiveFolderCascade and restoreFolder so it doesn't get "fixed" back. Also in this round: the folder DELETE handler now rethrows HttpError instead of flattening it to a 500. deleteTable can still raise a 423 TableLockedError if a lock lands in the window between the subtree guard and the archive, and withRouteHandler already maps HttpError.statusCode correctly — the route's own catch was swallowing it. Review round 3 — two follow-ons from the reordering Nested stragglers were unreachable on retry (Greptile, P1). The delete subtree walk still collected active folders only. Because round 2 made the cascade stamp folders before children, a failure during the child pass leaves intermediate folders archived too — they then fail the IS NULL filter, drop out of the walk, and every resource beneath them becomes permanently unreachable. My round-2 reasoning ("children of the archived root are still found by parentId") only covered direct children of the root. The walk now admits folders that are active or already carry this cascade's own timestamp, which reaches the stragglers while still excluding folders archived independently under a different stamp. On a first delete no folder carries the new timestamp, so it is exactly equivalent to the old walk — the change only has effect on the retry path. Locking was only half-confined to workflows (Bugbot, Medium). I gated assertFolderMutable but left the admin check and the locked write ungated — so an admin could persist locked: true on a kb/table folder (a column nothing reads for those types), and a non-admin update that merely mentioned locked was 403'd on a type where locking doesn't exist. This directly contradicted the invariant stated above, which is the giveaway that it belonged in the config rather than in scattered checks. Locking is now a declared capability (supportsLocking, set only on workflow), enforced at three levels: the routes reject the field outright with a 400, the admin gate and lock checks moved behind the capability, and the engine refuses to write it as a backstop for the copilot tools that bypass the route. This also removes the last three hardcoded resourceType === 'workflow' branches from the routes — that they survived round 1 is exactly how the gap got through. Known follow-up (not fixed here, fails closed) lib/resources/orchestration/restore-resource.ts dispatches its 'folder' arm to the workflow-bound performRestoreFolder, so it cannot restore an archived knowledge-base or table folder. It fails closed — a non-workflow folder id returns "Folder not found" rather than acting on the wrong tree — and the archived-resource listing that feeds it is itself resourceType-scoped, so no broken entry is surfaced today. POST /api/folders/[id]/restore already supports all three types. The KB/Tables follow-ups need to add arms to that union when they surface archived folders in their own recently-deleted lists. Smaller decisions worth a line each file stays in FOLDER_RESOURCES but is refused at the boundary. The config is the complete data set for all four types; servedFolderResourceTypeSchema narrows the API to workflow | knowledge_base | table. File folders still write the legacy workspace_file_folders table — that cutover is separate and still pending, and accepting file here would point the API at the wrong storage. /api/folders/[id]/duplicate stays workflow-only. It duplicates the workflows contained in the folder, which has no kb/table analogue. Untouched, and it still filters resourceType = 'workflow'. resourceType is required on the id-keyed routes (as a query param on PUT/DELETE /api/folders/[id]). Folder ids are UUIDs and cannot collide, but without the filter a caller holding a knowledge-base folder id could drive it through the workflow surface. Every folder query in the PR carries its resourceType filter, including id-keyed lookups. One widened cleanup predicate, not one target per type. background/cleanup-soft-deletes.ts now hard-deletes folder rows for workflow | knowledge_base | table via a single inArray — same table, same soft-delete column, same workspace scoping, so splitting it would only multiply the batched scans. file stays excluded so the pass never touches rows it does not own. Type of Change New feature Bug fix Breaking change Documentation Other: internal refactor + one deliberate behavior change (see above) Testing New: apps/sim/lib/folders/cascade.test.ts (25 tests). The folder engine that preceded this one shipped with no cascade tests at all — that was the single biggest gap and it is closed here. Coverage: Subtree resolution for both the active (delete) and archived (restore) directions, including that a parent cycle terminates the walk instead of recursing forever. Timestamp isolation — every cascade statement is asserted to carry the folder's own soft-delete timestamp, so independently-deleted siblings are provably not swept in or revived. archiveChildren delegation: the hook receives the resolved subtree and the child table is never written directly. Dependent restore keyed by the restored child ids, and skipped entirely when nothing was restored. An explicit "fixed statement count regardless of subtree depth" assertion over a six-folder subtree — this is the regression guard for the N+1 restore. FOLDER_RESOURCES invariants: one entry per type, each keyed consistently with its own resourceType, distinct cascade count keys, and every buildSoftDeleteSet provably writing the property named by its own deletedKey. Plus route tests for the reorder 409 and for a delete-locked resource surfacing as 423, unit tests on folderMutationStatus, a restoreFolderRows timestamp test, two FOLDER_RESOURCES invariants added in review round 1 (every archiveChildren has a restore counterpart; tables declare a delete guard), and two ordering tests added in round 2 — one asserting the folder UPDATE precedes the child UPDATE, and one asserting the folder stamp is already in place at the moment an archiveChildren hook is invoked, which is the property that actually makes the retry safe. Gates: bunx tsc --noEmit clean in apps/sim and packages/testing; bun run lint, check:api-validation, check:migrations, check:react-query, check:client-boundary all pass. Vitest: 386 files / 4784 tests green across lib/folders, app/api/folders, lib/workflows, lib/knowledge, lib/table, hooks, app/workspace, background, lib/copilot, lib/resources, app/api/knowledge, app/api/table. Reviewers should focus on: the restore behavior change above; the FOLDER_RESOURCES entries read as a schema diff (columns, deletedKey vs buildSoftDeleteSet, membership scope); and that no folder query lost its resourceType filter. I also ran a separate sweep of every query against the folder table across the repo — routes, copilot/VFS, logs, forking, admin v1, background — checking each for its resourceType constraint, since kb/table rows becoming real turns a previously-harmless missing filter into a cross-type leak. All scoped; the only unconstrained write is a name update already pinned by primary key inside a scoped transaction. No migration — #6014 already added the folder table, the resourceType enum, and the folder_id columns on knowledge_base and user_table_definitions. Those columns are all-NULL today; this PR is the first writer. KB and Tables folders are greenfield: no legacy table, no existing rows, nothing to backfill. 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 No UI in this PR — it is the shared backend layer. The KB and Tables folder UIs land in the two follow-ups.

Open Graph Description: Summary Extracts the generic, resourceType-driven folder engine that knowledge bases and tables need to have folders. This is the shared layer only — no KB or Tables UI. Two follow-up PRs build on ...

X Description: Summary Extracts the generic, resourceType-driven folder engine that knowledge bases and tables need to have folders. This is the shared layer only — no KB or Tables UI. Two follow-up PRs build on ...

Opengraph URL: https://github.com/simstudioai/sim/pull/6037

X: @github

direct link

Domain: github.com

react-profiling0
react-import-mapreact,react-dom,react-dom/client,react-dom/profiling,react-is,react-reconciler,react/compiler-runtime,react/jsx-dev-runtime,react/jsx-runtime,scheduler@d5750093facf
route-pattern/:user_id/:repository/pull/:id/files(.:format)
route-controllerpull_requests
route-actionfiles
fetch-noncev2:1c13cf29-e791-def3-5a60-52c1de8aab06
current-catalog-service-hashae870bc5e265a340912cde392f23dad3671a0a881730ffdadd82f2f57d81641b
request-idD064:223A5F:6DEA0A:984C88:6AFB4352
html-safe-noncec6883b5bb4cc5809c3db0c2c2cb7cf225ab9dc7c2cbfcdd8ae171595625fc516
visitor-payloadeyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJEMDY0OjIyM0E1Rjo2REVBMEE6OTg0Qzg4OjZBRkI0MzUyIiwidmlzaXRvcl9pZCI6IjEzNzQ1NzY1OTUyMjU0OTQzNTQiLCJyZWdpb25fZWRnZSI6ImlhZCIsInJlZ2lvbl9yZW5kZXIiOiJpYWQifQ==
visitor-hmac0d9c6ff73acb617f5a9d6594706baa3d318c88cf9d9ac7672f7201d26829b9d7
hovercard-subject-tagpull_request:4156290725
github-keyboard-shortcutsrepository,pull-request-list,pull-request-conversation,pull-request-files-changed,copilot
google-site-verificationApib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I
octolytics-urlhttps://collector.github.com/github/collect
analytics-location///pull_requests/show/files
fb:app_id1401488693436528
apple-itunes-appapp-id=1477376905, app-argument=https://github.com/simstudioai/sim/pull/6037/files
twitter:imagehttps://avatars.githubusercontent.com/u/40672544?s=400&v=4
twitter:cardsummary_large_image
og:imagehttps://avatars.githubusercontent.com/u/40672544?s=400&v=4
og:image:altSummary Extracts the generic, resourceType-driven folder engine that knowledge bases and tables need to have folders. This is the shared layer only — no KB or Tables UI. Two follow-up PRs build on ...
og:site_nameGitHub
og:typeobject
hostnamegithub.com
expected-hostnamegithub.com
Noned849b928f455c800985398e7f1b659425adb312a5fa14fba5d9a14e62e9fe5dd
turbo-cache-controlno-preview
diff-viewunified
go-importgithub.com/simstudioai/sim git https://github.com/simstudioai/sim.git
octolytics-dimension-user_id199344406
octolytics-dimension-user_loginsimstudioai
octolytics-dimension-repository_id912559512
octolytics-dimension-repository_nwosimstudioai/sim
octolytics-dimension-repository_publictrue
octolytics-dimension-repository_is_forkfalse
octolytics-dimension-repository_network_root_id912559512
octolytics-dimension-repository_network_root_nwosimstudioai/sim
turbo-body-classeslogged-out env-production page-responsive full-width
disable-turbotrue
browser-stats-urlhttps://api.github.com/_private/browser/stats
browser-errors-urlhttps://api.github.com/_private/browser/errors
releasea6c2f87cbcb6414452377b4967858ed6a66f1109
ui-targetfull
theme-color#1e2327
color-schemelight dark

Links:

Skip to contenthttps://github.com/simstudioai/sim/pull/6037/files#start-of-content
https://github.com/
Sign inhttps://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fsimstudioai%2Fsim%2Fpull%2F6037%2Ffiles
GitHubRepository hosting, code review, and collaborationhttps://github.com/platform
CopilotAI coding agent for tasks, projects, and automated workhttps://github.com/features/copilot
ActionsCI/CD and automationhttps://github.com/features/actions
Code QualityQuality analysis, fixes, and enforcementhttps://github.com/features/code-quality
CodespacesCloud development environmentshttps://github.com/features/codespaces
Code SecurityVulnerability detection and remediationhttps://github.com/security/advanced-security/code-security
Secret ProtectionSecret scanning and leak preventionhttps://github.com/security/advanced-security/secret-protection
All Featureshttps://github.com/features
Documentationhttps://docs.github.com/en
Traininghttps://learn.github.com/skills
Certificationshttps://learn.github.com/credentials
Build with Copilothttps://github.com/features/ai
Customize Copilothttps://docs.github.com/en/copilot/how-tos/copilot-on-github/customize-copilot/customize-copilot-overview
Integrationshttps://github.com/marketplace
Trending reposhttps://github.com/trending
GitHub Sponsorshttps://github.com/open-source/sponsors
Developer articleshttps://github.com/resources/articles
ChangelogYour source for the latest features, improvements, and fixes across GitHub products, all in one place.https://github.blog/changelog/
Enterpriseshttps://github.com/enterprise
Teamhttps://github.com/team
Startupshttps://github.com/enterprise/startups
Nonprofitshttps://github.com/solutions/industry/nonprofits
Healthcarehttps://github.com/solutions/industry/healthcare
Financial serviceshttps://github.com/solutions/industry/financial-services
Manufacturinghttps://github.com/solutions/industry/manufacturing
Governmenthttps://github.com/solutions/industry/government
See all industrieshttps://github.com/solutions/industry
Why GitHubhttps://github.com/why-github
Customer Storieshttps://github.com/customer-stories
Business insightshttps://github.com/solutions/executive-insights
Trust Centerhttps://github.com/trust-center
GitHub Advanced SecurityEnterprise-grade code securityhttps://github.com/security/advanced-security
Copilot for businessEnterprise-grade AI featureshttps://github.com/features/copilot/copilot-business
Premium SupportEnterprise-grade 24/7 supporthttps://github.com/enterprise/premium-support
Documentationhttps://docs.github.com/en
Resource centerhttps://github.com/resources
Bloghttps://github.blog/
Events & webinarshttps://github.com/resources/events
Community Forumhttps://github.com/orgs/community/discussions
Customer Storieshttps://github.com/customer-stories
Integrationshttps://github.com/marketplace
Customer supporthttps://help.github.com/
Traininghttps://learn.github.com/skills
GitHub Statushttps://www.githubstatus.com/
Abouthttps://github.com/about
Partnershttps://github.com/partners
Changeloghttps://github.blog/changelog/
GitHub UniverseThe event for developers, by developers — talks, workshops, and what’s next for GitHub.https://githubuniverse.com/
Pricinghttps://github.com/pricing
Sign inhttps://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fsimstudioai%2Fsim%2Fpull%2F6037%2Ffiles
Sign uphttps://github.com/signup?ref_cta=Sign+up&ref_loc=header+logged+out&ref_page=%2F%3Cuser-name%3E%2F%3Crepo-name%3E%2Fpull_requests%2Fshow%2Ffiles&source=header-repo&source_repo=simstudioai%2Fsim
Reloadhttps://github.com/simstudioai/sim/pull/6037/files
Reloadhttps://github.com/simstudioai/sim/pull/6037/files
Reloadhttps://github.com/simstudioai/sim/pull/6037/files
simstudioaihttps://github.com/simstudioai
simhttps://github.com/simstudioai/sim
Codehttps://github.com/simstudioai/sim
Issues129 (129)https://github.com/simstudioai/sim/issues
Pull requests200 (200)https://github.com/simstudioai/sim/pulls
Actionshttps://github.com/simstudioai/sim/actions
Projectshttps://github.com/simstudioai/sim/projects
Security and qualityhttps://github.com/simstudioai/sim/security
Insightshttps://github.com/simstudioai/sim/pulse
Sign up for GitHub https://github.com/signup?return_to=%2Fsimstudioai%2Fsim%2Fissues%2Fnew%2Fchoose
terms of servicehttps://docs.github.com/terms
privacy statementhttps://docs.github.com/privacy
Sign inhttps://github.com/login?return_to=%2Fsimstudioai%2Fsim%2Fissues%2Fnew%2Fchoose
waleedlatif1https://github.com/waleedlatif1
staginghttps://github.com/simstudioai/sim/tree/staging
feat/generic-folder-enginehttps://github.com/simstudioai/sim/tree/feat/generic-folder-engine
Conversation 30 https://github.com/simstudioai/sim/pull/6037
Commits 5 https://github.com/simstudioai/sim/pull/6037/commits
Checks 19 https://github.com/simstudioai/sim/pull/6037/checks
Files changed https://github.com/simstudioai/sim/pull/6037/files
Please reload this pagehttps://github.com/simstudioai/sim/pull/6037/files
feat(folders): add the generic resourceType-driven folder engine https://github.com/simstudioai/sim/pull/6037/files#top
Show all changes 5 commits https://github.com/simstudioai/sim/pull/6037/files
e9d560a feat(folders): add the generic resourceType-driven folder engine waleedlatif1 Jul 29, 2026 https://github.com/simstudioai/sim/pull/6037/commits/e9d560ad14c1b992b50a791307a5461550523173
a28eb45 fix(folders): route kb and table cascades through their canonical delete waleedlatif1 Jul 29, 2026 https://github.com/simstudioai/sim/pull/6037/commits/a28eb45300558cc253246c42b2d3433a7708d556
84fcd6c fix(folders): order the cascade so a partial failure stays recoverable waleedlatif1 Jul 29, 2026 https://github.com/simstudioai/sim/pull/6037/commits/84fcd6c88a0f6e828fb7b7ca7c1e06c2f463ae61
9f37876 fix(folders): reach nested stragglers on retry and confine locking to… waleedlatif1 Jul 29, 2026 https://github.com/simstudioai/sim/pull/6037/commits/9f3787681e93004d59330294dd3a96894fbdc61d
bda9fc5 fix(folders): route the delete lock check through the locking capability waleedlatif1 Jul 29, 2026 https://github.com/simstudioai/sim/pull/6037/commits/bda9fc50a43e682b953afb40843b01f21baa4965
Clear filters https://github.com/simstudioai/sim/pull/6037/files
Please reload this pagehttps://github.com/simstudioai/sim/pull/6037/files
Please reload this pagehttps://github.com/simstudioai/sim/pull/6037/files
route.ts https://github.com/simstudioai/sim/pull/6037/files#diff-c7e886eb51c1c149b93393fc1208a2fe9db245c17b30dc82f87c1ce215c39600
route.ts https://github.com/simstudioai/sim/pull/6037/files#diff-49a8450a185d27c65921f197d9c767d6240190612c3f09726c215b48a91e1cab
route.test.ts https://github.com/simstudioai/sim/pull/6037/files#diff-ba839ad46f3c78842743b168156d15087cb7c042936d3d989f5cd993ba955f9c
route.ts https://github.com/simstudioai/sim/pull/6037/files#diff-51108c36ee50960410361a72def7ce9c8f71597ed6ffc2c5fccd37382e0c94b6
route.test.ts https://github.com/simstudioai/sim/pull/6037/files#diff-245f9b9a5087ba5edd9c75a5eb69c8c960227edef67abf4cd00e298debe419d7
route.ts https://github.com/simstudioai/sim/pull/6037/files#diff-b21260328f16a6c01500a23b148a64b601fc9c8150991ba38b154e637a3310e6
route.test.ts https://github.com/simstudioai/sim/pull/6037/files#diff-fe3bc258f43a77e381b2ab2f4880f2163866fbb03aace133ae365d098cf60e48
route.ts https://github.com/simstudioai/sim/pull/6037/files#diff-4398b7055f123cbcbc87b1c0928f06630175e24cb39a72f28fe70d8f45766d48
prefetch.ts https://github.com/simstudioai/sim/pull/6037/files#diff-da054228aa79cebe6be900656001205e9f72af11e43b3ca7e6064f01dc9b498c
prefetch.test.ts https://github.com/simstudioai/sim/pull/6037/files#diff-0f96fdbc0043b9049bd7b95533743eec99f8fae0184fd3464b17ed4f5c19e1d5
prefetch.ts https://github.com/simstudioai/sim/pull/6037/files#diff-17f9da631614610a1ed03ff8fad6b917e56b57da971435a4cf7561dfaf7383f3
cleanup-soft-deletes.ts https://github.com/simstudioai/sim/pull/6037/files#diff-0d27a0e21a9e9287bfa78ce2693f0694d417ae9bde9b2379b06f1d7bdd4052d6
folders.ts https://github.com/simstudioai/sim/pull/6037/files#diff-fcd03a08650b2640b95989818e3e89e886aa743ccf2921d90ffd3ec1a689f1b1
folder-cache.ts https://github.com/simstudioai/sim/pull/6037/files#diff-376a2ef7c93a22fb8473472b360e3c12cf9a8c0994f2ef0be569d124093c5033
folder-keys.ts https://github.com/simstudioai/sim/pull/6037/files#diff-7b06b62502a0c091077a81e5260ff6649f9a53cac9be652278451627f73168b3
folders.ts https://github.com/simstudioai/sim/pull/6037/files#diff-9e8771cad5420784bd0df53439724fc197ee48fe567e49e11cff405cfbcb0e1b
cascade.test.ts https://github.com/simstudioai/sim/pull/6037/files#diff-85f0247de40fbad12361aee59e01dbd9d2db3c15935ffc96a9b0d62e3e4e2392
cascade.ts https://github.com/simstudioai/sim/pull/6037/files#diff-5a0bd5e1e62ab534542ac83eab4c17b19f1325cc7ab741756a1db0e5e1d9c3f8
config.ts https://github.com/simstudioai/sim/pull/6037/files#diff-37bb2a7db7c25ee5b9390e2f98c60a0f26ea81448a07e2fb2ee06f278b4a713d
lifecycle.ts https://github.com/simstudioai/sim/pull/6037/files#diff-5549871eaa1033ce9ab06110a45243e09b010842207b25b9bffeaefb843e53ba
naming.ts https://github.com/simstudioai/sim/pull/6037/files#diff-5a9434edcbff55b742df47678bacb13c35eaa16872ac320c5f72fcf13bd8e261
queries.ts https://github.com/simstudioai/sim/pull/6037/files#diff-8c09d4934ac710b9fc5d471563a51c44da290d6daee339c54f2d124faad282e4
status.ts https://github.com/simstudioai/sim/pull/6037/files#diff-493c08ac4e19cf7a9ce694ccef79ab20b883d18a6e1982b5fa7083bf8249c6d3
service.ts https://github.com/simstudioai/sim/pull/6037/files#diff-6978b26968fd05cf5c7635c366c8c806693b6145235f476627302fb402f32d18
events.ts https://github.com/simstudioai/sim/pull/6037/files#diff-249f5961a23a7f79bfb49062a81e3045c4a0c3845c68d7b65f53c0bb05d7dd90
service.ts https://github.com/simstudioai/sim/pull/6037/files#diff-691e9b1dc59be0015a1be5ea6189899b241d4e979a8b40e088dd7d722cfaadb6
folder-lifecycle.ts https://github.com/simstudioai/sim/pull/6037/files#diff-2f72b73aa7690aee6452ed732da12fce707f93e7f21577a80b7a87ee745afd4d
utils.ts https://github.com/simstudioai/sim/pull/6037/files#diff-7b029db7d808b99bfca86f62abe1091505e18af80043833381ad7f439966bf2d
folders-lifecycle.mock.ts https://github.com/simstudioai/sim/pull/6037/files#diff-388a830bfe1ac1b71af97abd544e84faa2b0b736b54f937d91b0c1a661c4f388
index.ts https://github.com/simstudioai/sim/pull/6037/files#diff-38963b775b9a08da9c40dbdf25380b1bd038aa3f9f93e9c657ef549fb39f512c
workflows-utils.mock.ts https://github.com/simstudioai/sim/pull/6037/files#diff-add1e6a261b7b816224f1328ae2bfdff3d9bfd3260100d6d2564e1856bb04051
apps/sim/app/api/folders/[id]/duplicate/route.tshttps://github.com/simstudioai/sim/pull/6037/files#diff-c7e886eb51c1c149b93393fc1208a2fe9db245c17b30dc82f87c1ce215c39600
View file https://github.com/simstudioai/sim/blob/bda9fc50a43e682b953afb40843b01f21baa4965/apps/sim/app/api/folders/%5Bid%5D/duplicate/route.ts
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/simstudioai/sim/pull/6037/{{ revealButtonHref }}
https://github.com/simstudioai/sim/pull/6037/files#diff-c7e886eb51c1c149b93393fc1208a2fe9db245c17b30dc82f87c1ce215c39600
https://github.com/simstudioai/sim/pull/6037/files#diff-c7e886eb51c1c149b93393fc1208a2fe9db245c17b30dc82f87c1ce215c39600
apps/sim/app/api/folders/[id]/restore/route.tshttps://github.com/simstudioai/sim/pull/6037/files#diff-49a8450a185d27c65921f197d9c767d6240190612c3f09726c215b48a91e1cab
View file https://github.com/simstudioai/sim/blob/bda9fc50a43e682b953afb40843b01f21baa4965/apps/sim/app/api/folders/%5Bid%5D/restore/route.ts
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/simstudioai/sim/pull/6037/{{ revealButtonHref }}
https://github.com/simstudioai/sim/pull/6037/files#diff-49a8450a185d27c65921f197d9c767d6240190612c3f09726c215b48a91e1cab
https://github.com/simstudioai/sim/pull/6037/files#diff-49a8450a185d27c65921f197d9c767d6240190612c3f09726c215b48a91e1cab
https://github.com/simstudioai/sim/pull/6037/files#diff-49a8450a185d27c65921f197d9c767d6240190612c3f09726c215b48a91e1cab
apps/sim/app/api/folders/[id]/route.test.tshttps://github.com/simstudioai/sim/pull/6037/files#diff-ba839ad46f3c78842743b168156d15087cb7c042936d3d989f5cd993ba955f9c
View file https://github.com/simstudioai/sim/blob/bda9fc50a43e682b953afb40843b01f21baa4965/apps/sim/app/api/folders/%5Bid%5D/route.test.ts
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/simstudioai/sim/pull/6037/{{ revealButtonHref }}
https://github.com/simstudioai/sim/pull/6037/files#diff-ba839ad46f3c78842743b168156d15087cb7c042936d3d989f5cd993ba955f9c
https://github.com/simstudioai/sim/pull/6037/files#diff-ba839ad46f3c78842743b168156d15087cb7c042936d3d989f5cd993ba955f9c
https://github.com/simstudioai/sim/pull/6037/files#diff-ba839ad46f3c78842743b168156d15087cb7c042936d3d989f5cd993ba955f9c
https://github.com/simstudioai/sim/pull/6037/files#diff-ba839ad46f3c78842743b168156d15087cb7c042936d3d989f5cd993ba955f9c
https://github.com/simstudioai/sim/pull/6037/files#diff-ba839ad46f3c78842743b168156d15087cb7c042936d3d989f5cd993ba955f9c
https://github.com/simstudioai/sim/pull/6037/files#diff-ba839ad46f3c78842743b168156d15087cb7c042936d3d989f5cd993ba955f9c
https://github.com/simstudioai/sim/pull/6037/files#diff-ba839ad46f3c78842743b168156d15087cb7c042936d3d989f5cd993ba955f9c
https://github.com/simstudioai/sim/pull/6037/files#diff-ba839ad46f3c78842743b168156d15087cb7c042936d3d989f5cd993ba955f9c
https://github.com/simstudioai/sim/pull/6037/files#diff-ba839ad46f3c78842743b168156d15087cb7c042936d3d989f5cd993ba955f9c
https://github.com/simstudioai/sim/pull/6037/files#diff-ba839ad46f3c78842743b168156d15087cb7c042936d3d989f5cd993ba955f9c
https://github.com/simstudioai/sim/pull/6037/files#diff-ba839ad46f3c78842743b168156d15087cb7c042936d3d989f5cd993ba955f9c
https://github.com/simstudioai/sim/pull/6037/files#diff-ba839ad46f3c78842743b168156d15087cb7c042936d3d989f5cd993ba955f9c
https://github.com/simstudioai/sim/pull/6037/files#diff-ba839ad46f3c78842743b168156d15087cb7c042936d3d989f5cd993ba955f9c
https://github.com/simstudioai/sim/pull/6037/files#diff-ba839ad46f3c78842743b168156d15087cb7c042936d3d989f5cd993ba955f9c
https://github.com/simstudioai/sim/pull/6037/files#diff-ba839ad46f3c78842743b168156d15087cb7c042936d3d989f5cd993ba955f9c
https://github.com/simstudioai/sim/pull/6037/files#diff-ba839ad46f3c78842743b168156d15087cb7c042936d3d989f5cd993ba955f9c
Please reload this pagehttps://github.com/simstudioai/sim/pull/6037/files
Please reload this pagehttps://github.com/simstudioai/sim/pull/6037/files
https://github.com
Termshttps://docs.github.com/site-policy/github-terms/github-terms-of-service
Privacyhttps://docs.github.com/site-policy/privacy-policies/github-privacy-statement
Securityhttps://github.com/security
Statushttps://www.githubstatus.com/
Communityhttps://github.community/
Docshttps://docs.github.com/
Contacthttps://support.github.com?tags=dotcom-footer

Viewport: width=device-width


URLs of crawlers that visited me.