René's URL Explorer Experiment


Title: feat(tables): folder tools for the Table block, and folders as picker scope by mzxchandra · Pull Request #7496 · simstudioai/sim · GitHub

Open Graph Title: feat(tables): folder tools for the Table block, and folders as picker scope by mzxchandra · Pull Request #7496 · simstudioai/sim

X Title: feat(tables): folder tools for the Table block, and folders as picker scope by mzxchandra · Pull Request #7496 · simstudioai/sim

Description: Summary Adds the six folder tools to the Table block, so an agent can organize tables and not just read them. Rebased onto staging now that the File folder work has landed (#7393). Tables already had the folder machinery — the five folder operations, their application use cases, and a public v2 route — but no agent-callable tools, so a run could query a table's rows and could not file the table anywhere. Six tools: table_list_folders, table_create_folder, table_update_folder, table_delete_folder, table_restore_folder, table_move. Restore is addressed by the path the folder held when it was deleted rather than by id, because that is what restoreTableFolderUseCase takes. The response reports where the folder actually landed, which differs when its old parent is still archived or a live sibling has taken its name. Executor admission The folder operations delegated to Copilot only, so every one of these tools would have 403'd. Widened to toolReadOperation / toolWriteOperation(id, 'tables.use'): Operation Caller tables.folders.list table_list_folders tables.folders.create table_create_folder tables.folders.update table_update_folder tables.folders.delete table_delete_folder tables.folders.restore table_restore_folder tables.update table_move table_move reuses updateTableUseCase with only folderPath set rather than growing a second way to move a table. It never sets name or description, so no executor path gains rename powers. check:actorless-executor-operations and check:capability-subject both pass: neither the folder use cases nor updateTableUseCase requires a human subject, so an actorless run (schedule, webhook, deployed API) reaches them without an opaque 500. Dispatch In-process, as new cases in executeTableTool. The dispatcher keyed every case to a routed contract, which these have no business inventing — there is no HTTP route for them — so it now carries a response schema, and the folder cases pass standalone schemas through parseInternalOperationInput, the path the Knowledge handler already takes. Reusing the public v2 folder contracts was the alternative and was rejected: recursive there is a z.stringbool() shaped by URL query encoding, and this flag is the guard between deleting one empty folder and deleting a subtree. None of the tools sends a workspaceId. The executor mints a delegated principal bound to the run's workspace and the operations read it from there, so accepting one would declare a field the server ignores. table_move is still scoped to its table, but through its own schema: getTableContract, which the older scoped tools use, requires the workspaceId these deliberately omit. Agent-tool param mapping A block used as an Agent tool is handed the tool's schema, not its own subblock ids (createLLMToolSchema(toolConfig, ...)), so a model answers with path / folderPath while the canvas stores folderRef / moveTargetRef. Reading only the canvas id dropped the model's answer — and because providers/utils.ts:664 merges with a spread ({ ...result, ...transformed }), returning undefined overwrites the model's value rather than leaving it alone. On move the tool then substituted the workspace root, turning "move into /Reports" into "move to the root" with a success result. Canvas value wins where the author set one; the model's answer is the fallback, matching what columns already does in this block. update_folder branches on the canvas source instead, because its destination is composed rather than picked and an unset parent is a real destination (the root), not a missing one. Block surface Each folder path is a tree selector paired with a manual text entry so a can be typed on a text surface. The exception is the Folder that narrows the table picker: it never travels, because a folder cannot stand in for a table the way it stands in for a file, so it is basic-mode only. It renders above the picker it narrows — below reads as a second choice rather than a filter. Selecting a folder that excludes the current table clears the selection, so the picker never shows a placeholder while the block still runs against a hidden table. Scope comparison is by decoded segment, never by string prefix: /a/bc starts with /a/b and is not inside it, and a folder genuinely named Q3/Q4 is one level. Type of Change New feature Testing 567 test files / 10037 tests pass across the touched areas. 8 new test files. All 45 audits pass, plus check:api-validation, check:client-boundary, biome. Tests deliberately cover the seam between "the schema accepted the field" and "the use case received it" — a tool option that parses and is then dropped looks identical to one that works from both ends. End-to-end, driven through the real UI as real workflow runs and verified in Postgres: Step Result create folder Folder created; audit reads Created table folder "/Q3 Results" — the canonical percent-encoded path composed from the typed name move table Q3_Pipeline moved from Reports into Q3 Results delete folder, cascade off, non-empty Refused with Folder is not empty; both folders intact delete folder, cascade on Folder and the table inside it both archived Picker narrowing No folder → ["leads","q3_pipeline"]; Folder = Reports → ["q3_pipeline"] Reviewers should focus on: the tables.update widening for table_move, and the delete cascade guard. The guard that keeps a model out of the cascade is the tool param's visibility: 'user-only' — it drives both the omission from the model's schema and modelBlockedParams, which stripModelBlockedParams removes from the model's arguments before merge. The subblock's paramVisibility is also set, but that governs the tool-input row UI, not the model schema. Known issue, pre-existing and not from this PR table_restore_folder throws in local dev only. restoreFolder (lib/folders/orchestration.ts) wraps its body in withFolderTreeLock but drops the tx, so the body queries the global db pool inside the transaction and trips packages/db/tx-tripwire.ts. That tripwire is throw when NODE_ENV !== 'production' and warn in production — re-running the same restore with DB_TX_TRIPWIRE=warn returns {"success":true,"restoredItems":{"folders":1,"tables":1}}. Still present on staging as of this PR, and not introduced here: the Recently-deleted restore path in lib/resources/orchestration/restore-resource.ts hits it the same way for workflow and knowledge folders. The sibling transitions (create, relocate) both thread tx; restore is the odd one out. Fixing it means threading a tx through restoreFolderWithoutTreeLock and its per-resource restoreChildren hooks across four resource types, so it belongs in its own PR. 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)

Open Graph Description: Summary Adds the six folder tools to the Table block, so an agent can organize tables and not just read them. Rebased onto staging now that the File folder work has landed (#7393). Tables already h...

X Description: Summary Adds the six folder tools to the Table block, so an agent can organize tables and not just read them. Rebased onto staging now that the File folder work has landed (#7393). Tables already h...

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

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:606df988-d00d-403b-4614-5b8bd650fbeb
current-catalog-service-hashae870bc5e265a340912cde392f23dad3671a0a881730ffdadd82f2f57d81641b
request-id9674:2F3575:48C45F:6880C6:6AFB3EBD
html-safe-nonce438d0345ba194105dc8f1ff1ba9e534796169b1549e932f96f611220491b6f16
visitor-payloadeyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiI5Njc0OjJGMzU3NTo0OEM0NUY6Njg4MEM2OjZBRkIzRUJEIiwidmlzaXRvcl9pZCI6IjgxNDIzOTAxODM5ODM3OTE4MDUiLCJyZWdpb25fZWRnZSI6ImlhZCIsInJlZ2lvbl9yZW5kZXIiOiJpYWQifQ==
visitor-hmac494a41d4fc72b2a38576959c8fdcc3339839ebdf9b572bb18adc1fb006dab385
hovercard-subject-tagpull_request:4447918663
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/7496/files
twitter:imagehttps://avatars.githubusercontent.com/u/129460234?s=400&v=4
twitter:cardsummary_large_image
og:imagehttps://avatars.githubusercontent.com/u/129460234?s=400&v=4
og:image:altSummary Adds the six folder tools to the Table block, so an agent can organize tables and not just read them. Rebased onto staging now that the File folder work has landed (#7393). Tables already h...
og:site_nameGitHub
og:typeobject
hostnamegithub.com
expected-hostnamegithub.com
None2169b0dfbef67ed6b128074a5ed45bb7d5d1859783b10178b09a7765ad5f3693
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
release3b4fc8df5ef1c6757e733a23e6b81b6725021823
ui-targetfull
theme-color#1e2327
color-schemelight dark

Links:

Skip to contenthttps://github.com/simstudioai/sim/pull/7496/files#start-of-content
https://github.com/
Sign inhttps://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fsimstudioai%2Fsim%2Fpull%2F7496%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%2F7496%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/7496/files
Reloadhttps://github.com/simstudioai/sim/pull/7496/files
Reloadhttps://github.com/simstudioai/sim/pull/7496/files
simstudioaihttps://github.com/simstudioai
simhttps://github.com/simstudioai/sim
Codehttps://github.com/simstudioai/sim
Issues129 (129)https://github.com/simstudioai/sim/issues
Pull requests202 (202)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
mzxchandrahttps://github.com/mzxchandra
staginghttps://github.com/simstudioai/sim/tree/staging
feat/table-folder-toolshttps://github.com/simstudioai/sim/tree/feat/table-folder-tools
Conversation 6 https://github.com/simstudioai/sim/pull/7496
Commits 6 https://github.com/simstudioai/sim/pull/7496/commits
Checks 28 https://github.com/simstudioai/sim/pull/7496/checks
Files changed https://github.com/simstudioai/sim/pull/7496/files
Please reload this pagehttps://github.com/simstudioai/sim/pull/7496/files
feat(tables): folder tools for the Table block, and folders as picker scope https://github.com/simstudioai/sim/pull/7496/files#top
Show all changes 6 commits https://github.com/simstudioai/sim/pull/7496/files
b770dc8 feat(tables): folder tools for the Table block, and folders as picker… mzxchandra Sep 2, 2026 https://github.com/simstudioai/sim/pull/7496/commits/b770dc81767a7f49efcd385ed0915962dc4f2a1a
2f10911 Update apps/sim/blocks/blocks/table_v2.ts mzxchandra Sep 2, 2026 https://github.com/simstudioai/sim/pull/7496/commits/2f109117e5ad02184e92adb2794e02da66891eb9
8530364 fix(tables): keep a model's folder destination, and clear a hidden ta… mzxchandra Sep 2, 2026 https://github.com/simstudioai/sim/pull/7496/commits/85303645d12fd2113cacb0e21854145d073b1e32
e72a0ec fix(tables): follow the folder selector consolidation, and name the r… mzxchandra Sep 5, 2026 https://github.com/simstudioai/sim/pull/7496/commits/e72a0ecb25174d8ae1582a05ba98edabfc96b63b
93e234e test(tables): pin the folder scope to single-select mzxchandra Sep 5, 2026 https://github.com/simstudioai/sim/pull/7496/commits/93e234ea690e43a5d5c7c0a2838714bbb48aa767
5d3c11c docs(tables): mark the canonical-pair seam on the folder scope read mzxchandra Sep 5, 2026 https://github.com/simstudioai/sim/pull/7496/commits/5d3c11c09bb502324356cf673e8bd8c1a8108af2
Clear filters https://github.com/simstudioai/sim/pull/7496/files
Please reload this pagehttps://github.com/simstudioai/sim/pull/7496/files
Please reload this pagehttps://github.com/simstudioai/sim/pull/7496/files
table.mdx https://github.com/simstudioai/sim/pull/7496/files#diff-dcfb6df85c1ff11c62d9e5ea29d89e940dc6ae276e07954b6d6a277f97e16c96
scope.test.ts https://github.com/simstudioai/sim/pull/7496/files#diff-4526898a8867b1de41c2aea246795a9583236445f3766abd219369c8c47c0d25
scope.ts https://github.com/simstudioai/sim/pull/7496/files#diff-e6a775c43e8c7115da7f5474aa17438ca87c3b297e5cfd5f2d4f688d4241a349
table-selector.tsx https://github.com/simstudioai/sim/pull/7496/files#diff-744a5e281051142603aa17e9da58c42f85212cc3c82728c6459f692df86d876d
table-folders.test.ts https://github.com/simstudioai/sim/pull/7496/files#diff-f4085fd933fe5d0cf082f57c736e7610a1db6199b8be6e8b3864a7101213203e
table_v2.ts https://github.com/simstudioai/sim/pull/7496/files#diff-c278ef96da6dc48093682830623f75af4722ccffa247b36d6e43e43ecfff5abd
table.ts https://github.com/simstudioai/sim/pull/7496/files#diff-8b41450ec9910b3ab1f97dcbc4cbbd0856f82e8fe71686122e9555220ae4402e
execute-tool.test.ts https://github.com/simstudioai/sim/pull/7496/files#diff-e1687bbdf61f4713a55c658ae59223b122c800c8d29a0cc95b1fad4d1b354627
execute-tool.ts https://github.com/simstudioai/sim/pull/7496/files#diff-60fe7e8f9767f9d742f09c2e97c88fdcaf298746741be71ab42bb27b1dd626b3
operations.test.ts https://github.com/simstudioai/sim/pull/7496/files#diff-2cb20f5f1ee5afe024d2d4d0691decc6cae19966f0a1e510d670fdc248b74fe4
operations.ts https://github.com/simstudioai/sim/pull/7496/files#diff-c3412f405ceb9cc684b37c8a9eb0ac6a7f6535746e79fec99f360418bf855203
registry.server.ts https://github.com/simstudioai/sim/pull/7496/files#diff-01625b66b2caf94157a2ed823d198dc3663f6d6dbf4bec6a6aa76d8e780adce5
folders.test.ts https://github.com/simstudioai/sim/pull/7496/files#diff-cd55c94d95b8b5b915cd484f4beee3133e1b3e6f2344e550f580aa70380f13b8
folders.ts https://github.com/simstudioai/sim/pull/7496/files#diff-60daad05f8d98dbee48af3e7f272189c0f96825895865595f129047130077004
operations.test.ts https://github.com/simstudioai/sim/pull/7496/files#diff-015a2cf67b00f6fefc1b73c908edc24a6db5a18d79f9b8fb8b9971c7bbd62fba
operations.ts https://github.com/simstudioai/sim/pull/7496/files#diff-7ac22c9f7a2f7d3c72584c0226da5b5523e52f1bff56e1c5362fc336b1326024
tool-ids.ts https://github.com/simstudioai/sim/pull/7496/files#diff-fde8cbb4483aa4a8015ca3e576ab1c9b472d1c97c521fa67e81b469a5297bdfb
tool-metadata.ts https://github.com/simstudioai/sim/pull/7496/files#diff-3a953213cad2b14799015043b75c22cd4815397d3a43ccbf138816bedfdfccd7
tool-outputs.ts https://github.com/simstudioai/sim/pull/7496/files#diff-9fd709d7ce13d883503da15dae272e6c0a0a4fc25d7ec475f4ce6875c097b6aa
registry.ts https://github.com/simstudioai/sim/pull/7496/files#diff-a05e54887bf05477726b00df4183dd4a3fa0fd1f82b867bbf156e1b6a6d7e3fa
folders.test.ts https://github.com/simstudioai/sim/pull/7496/files#diff-2f55f1788dc85780bd1ce783ba56e575f138a2c69ac5a3fc4189546ff4dd8fea
folders.ts https://github.com/simstudioai/sim/pull/7496/files#diff-a1d3cb3a3394bf84c57500c1c3f88eb530be02da48b3faa20d74c145d04708af
index.ts https://github.com/simstudioai/sim/pull/7496/files#diff-bd5a93ca23a48e657649369e96f5df11d91456c41e758bc0791083c2ec9aed2c
apps/docs/content/docs/integrations/table.mdxhttps://github.com/simstudioai/sim/pull/7496/files#diff-dcfb6df85c1ff11c62d9e5ea29d89e940dc6ae276e07954b6d6a277f97e16c96
View file https://github.com/simstudioai/sim/blob/5d3c11c09bb502324356cf673e8bd8c1a8108af2/apps/docs/content/docs/integrations/table.mdx
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/simstudioai/sim/pull/7496/{{ revealButtonHref }}
https://github.com/simstudioai/sim/pull/7496/files#diff-dcfb6df85c1ff11c62d9e5ea29d89e940dc6ae276e07954b6d6a277f97e16c96
https://github.com/simstudioai/sim/pull/7496/files#diff-dcfb6df85c1ff11c62d9e5ea29d89e940dc6ae276e07954b6d6a277f97e16c96
...ents/panel/components/editor/components/sub-block/components/table-selector/scope.test.tshttps://github.com/simstudioai/sim/pull/7496/files#diff-4526898a8867b1de41c2aea246795a9583236445f3766abd219369c8c47c0d25
View file https://github.com/simstudioai/sim/blob/5d3c11c09bb502324356cf673e8bd8c1a8108af2/apps/sim/app/workspace/%5BworkspaceId%5D/w/%5BworkflowId%5D/components/panel/components/editor/components/sub-block/components/table-selector/scope.test.ts
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/simstudioai/sim/pull/7496/{{ revealButtonHref }}
...omponents/panel/components/editor/components/sub-block/components/table-selector/scope.tshttps://github.com/simstudioai/sim/pull/7496/files#diff-e6a775c43e8c7115da7f5474aa17438ca87c3b297e5cfd5f2d4f688d4241a349
View file https://github.com/simstudioai/sim/blob/5d3c11c09bb502324356cf673e8bd8c1a8108af2/apps/sim/app/workspace/%5BworkspaceId%5D/w/%5BworkflowId%5D/components/panel/components/editor/components/sub-block/components/table-selector/scope.ts
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/simstudioai/sim/pull/7496/{{ revealButtonHref }}
Please reload this pagehttps://github.com/simstudioai/sim/pull/7496/files
Please reload this pagehttps://github.com/simstudioai/sim/pull/7496/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.