René's URL Explorer Experiment


Title: fix(knowledge): send tag filters as a JSON string so the document filter works by waleedlatif1 · Pull Request #5259 · simstudioai/sim · GitHub

Open Graph Title: fix(knowledge): send tag filters as a JSON string so the document filter works by waleedlatif1 · Pull Request #5259 · simstudioai/sim

X Title: fix(knowledge): send tag filters as a JSON string so the document filter works by waleedlatif1 · Pull Request #5259 · simstudioai/sim

Description: Summary The Knowledge Base document-list tag filter never reached the database — it returned empty for every filter, regardless of operator or value. (Earlier #5221 fixed the backend matching, but the request never got there.) Root cause: the tagFilters query field was a Zod .transform() that JSON.parsed the string into an array of objects. The client's requestJson parses the query schema before serializing, so appendQuery received the array and emitted tagFilters=[object Object] into the URL. The route's JSON.parse then threw → 400 → the list came back empty (or stale via keepPreviousData, which is why the document still appeared in the reporter's screenshots even though the filter "did nothing"). Changes Contract: tagFilters is now modeled as the wire string it actually is. Decoding into typed filters happens server-side via a new exported parseDocumentTagFiltersParam helper; the route maps a malformed value to a 400. Client hardening: appendQuery now throws on an array-of-objects query param instead of silently serializing [object Object] — this whole bug class now fails loudly at the boundary. UX: the text tag-filter operator now defaults to contains (a partial value matches), instead of exact equals. Tests: requestJson serializes a JSON-string query param verbatim and the guard throws on array-of-objects; the query schema keeps tagFilters a string (guards against reintroducing the transform); the decode helper round-trips and rejects malformed input. Scope / "is this anywhere else?" A full sweep of every GET/DELETE contract query field across lib/api/contracts/** confirmed tagFilters was the only field of this class. Explicitly verified safe: the logs filters (level/workflowIds/folderIds/triggers are plain comma-joined strings), table filter/sort (non-array objects, round-tripped via JSON.stringify), and the JSON.parse cases in tables/credentials/mcp (all request bodies, not query). Type of Change Bug fix Testing New unit tests (requestJson serialization + guard, contract schema, decode helper) pass; existing documents route tests (16) pass; typecheck + biome + check:api-validation clean. 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 The Knowledge Base document-list tag filter never reached the database — it returned empty for every filter, regardless of operator or value. (Earlier #5221 fixed the backend matching, but ...

X Description: Summary The Knowledge Base document-list tag filter never reached the database — it returned empty for every filter, regardless of operator or value. (Earlier #5221 fixed the backend matching, but ...

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

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:e0aa40ea-6c19-520e-18f3-d44a88405b66
current-catalog-service-hashae870bc5e265a340912cde392f23dad3671a0a881730ffdadd82f2f57d81641b
request-idE2DC:2B9F:FC142:162068:6AFB4BD8
html-safe-nonceddcf2acc16ecc2a668ccc8e1e74d34c652703283639ccb18c2cd903cda8740d5
visitor-payloadeyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJFMkRDOjJCOUY6RkMxNDI6MTYyMDY4OjZBRkI0QkQ4IiwidmlzaXRvcl9pZCI6IjYzODMwMjAxMDAzNDA2MzI1MzYiLCJyZWdpb25fZWRnZSI6ImlhZCIsInJlZ2lvbl9yZW5kZXIiOiJpYWQifQ==
visitor-hmac87a9e9bdbbf6f80628faf8d3a58696c7d7540840273471ae5072986bfcd5060a
hovercard-subject-tagpull_request:3953889410
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/5259/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 The Knowledge Base document-list tag filter never reached the database — it returned empty for every filter, regardless of operator or value. (Earlier #5221 fixed the backend matching, but ...
og:site_nameGitHub
og:typeobject
hostnamegithub.com
expected-hostnamegithub.com
Noneacf7616d06cc051644705b379878c9bb13dc5e70ecf4ffd9b34140f8ac01d7e1
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
release26504db649b58525278f77a52b80ba5f10d5f4de
ui-targetfull
theme-color#1e2327
color-schemelight dark

Links:

Skip to contenthttps://github.com/simstudioai/sim/pull/5259/files#start-of-content
https://github.com/
Sign inhttps://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fsimstudioai%2Fsim%2Fpull%2F5259%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%2F5259%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/5259/files
Reloadhttps://github.com/simstudioai/sim/pull/5259/files
Reloadhttps://github.com/simstudioai/sim/pull/5259/files
simstudioaihttps://github.com/simstudioai
simhttps://github.com/simstudioai/sim
Codehttps://github.com/simstudioai/sim
Issues129 (129)https://github.com/simstudioai/sim/issues
Pull requests197 (197)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
kb-tag-filter-recheckhttps://github.com/simstudioai/sim/tree/kb-tag-filter-recheck
Conversation 26 https://github.com/simstudioai/sim/pull/5259
Commits 6 https://github.com/simstudioai/sim/pull/5259/commits
Checks 15 https://github.com/simstudioai/sim/pull/5259/checks
Files changed https://github.com/simstudioai/sim/pull/5259/files
Please reload this pagehttps://github.com/simstudioai/sim/pull/5259/files
fix(knowledge): send tag filters as a JSON string so the document filter works https://github.com/simstudioai/sim/pull/5259/files#top
Show all changes 6 commits https://github.com/simstudioai/sim/pull/5259/files
1d33330 fix(knowledge): send tag filters as a JSON string so the document fil… waleedlatif1 Jun 29, 2026 https://github.com/simstudioai/sim/pull/5259/commits/1d33330fa4f42fde1933602bc57c1774a4cadd9f
00d4872 fix(knowledge): reject tag-filter operators invalid for the field type waleedlatif1 Jun 29, 2026 https://github.com/simstudioai/sim/pull/5259/commits/00d4872f289135f873abef60b261685fa1c6d18d
7a68802 fix(knowledge): validate tag-filter type against the slot, not the cl… waleedlatif1 Jun 29, 2026 https://github.com/simstudioai/sim/pull/5259/commits/7a68802137dbc6d40d926aa48f605593d7daddfd
f44afb5 fix(knowledge): validate tag-filter values against the field type waleedlatif1 Jun 29, 2026 https://github.com/simstudioai/sim/pull/5259/commits/f44afb5ac14bf3dbc18fd05c112fa6e52d43f68b
5f4fe13 fix(knowledge): only send a between tag filter once both bounds are set waleedlatif1 Jun 29, 2026 https://github.com/simstudioai/sim/pull/5259/commits/5f4fe136968164c5fa436cc823f99dec71d51c17
de73d43 fix(knowledge): reject impossible calendar dates in tag filters waleedlatif1 Jun 29, 2026 https://github.com/simstudioai/sim/pull/5259/commits/de73d4338939aee54c87362e6f438b99301c4017
Clear filters https://github.com/simstudioai/sim/pull/5259/files
Please reload this pagehttps://github.com/simstudioai/sim/pull/5259/files
Please reload this pagehttps://github.com/simstudioai/sim/pull/5259/files
route.ts https://github.com/simstudioai/sim/pull/5259/files#diff-8ba835fc554235c6cdcaf93dfa804d06aecafbe8ecf2de4a04ea97bcf094cf33
base.tsx https://github.com/simstudioai/sim/pull/5259/files#diff-9b1c8365e920c2c33ce67896c76e98caf6c8535794de2ce1d01ea707bb2b2161
request.test.ts https://github.com/simstudioai/sim/pull/5259/files#diff-4bb5f7fb500cc055c5851e6c7b5b6e8d3ebe63dce6247618927ad44596597f58
request.ts https://github.com/simstudioai/sim/pull/5259/files#diff-5eb4bccc6b684606613ee934e4c17789dc16a3e00da85be6d638d9bf8b1dc8cb
documents.test.ts https://github.com/simstudioai/sim/pull/5259/files#diff-fc3ebf2124ec2d4900d9b34c63238d209cf0e512517f1f92b0b112899ed92f58
documents.ts https://github.com/simstudioai/sim/pull/5259/files#diff-5fc1dd43e7e48f04aac58010b417d279c66b714c91f3960831d5276725495645
types.ts https://github.com/simstudioai/sim/pull/5259/files#diff-2689c2d9a81dbf9c894c9b09e5fe1d42409fb183b5b6904d9dd14145f957a980
apps/sim/app/api/knowledge/[id]/documents/route.tshttps://github.com/simstudioai/sim/pull/5259/files#diff-8ba835fc554235c6cdcaf93dfa804d06aecafbe8ecf2de4a04ea97bcf094cf33
View file https://github.com/simstudioai/sim/blob/de73d4338939aee54c87362e6f438b99301c4017/apps/sim/app/api/knowledge/%5Bid%5D/documents/route.ts
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/simstudioai/sim/pull/5259/{{ revealButtonHref }}
https://github.com/simstudioai/sim/pull/5259/files#diff-8ba835fc554235c6cdcaf93dfa804d06aecafbe8ecf2de4a04ea97bcf094cf33
https://github.com/simstudioai/sim/pull/5259/files#diff-8ba835fc554235c6cdcaf93dfa804d06aecafbe8ecf2de4a04ea97bcf094cf33
https://github.com/simstudioai/sim/pull/5259/files#diff-8ba835fc554235c6cdcaf93dfa804d06aecafbe8ecf2de4a04ea97bcf094cf33
https://github.com/simstudioai/sim/pull/5259/files#diff-8ba835fc554235c6cdcaf93dfa804d06aecafbe8ecf2de4a04ea97bcf094cf33
https://github.com/simstudioai/sim/pull/5259/files#diff-8ba835fc554235c6cdcaf93dfa804d06aecafbe8ecf2de4a04ea97bcf094cf33
apps/sim/app/workspace/[workspaceId]/knowledge/[id]/base.tsxhttps://github.com/simstudioai/sim/pull/5259/files#diff-9b1c8365e920c2c33ce67896c76e98caf6c8535794de2ce1d01ea707bb2b2161
View file https://github.com/simstudioai/sim/blob/de73d4338939aee54c87362e6f438b99301c4017/apps/sim/app/workspace/%5BworkspaceId%5D/knowledge/%5Bid%5D/base.tsx
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/simstudioai/sim/pull/5259/{{ revealButtonHref }}
https://github.com/simstudioai/sim/pull/5259/files#diff-9b1c8365e920c2c33ce67896c76e98caf6c8535794de2ce1d01ea707bb2b2161
https://github.com/simstudioai/sim/pull/5259/files#diff-9b1c8365e920c2c33ce67896c76e98caf6c8535794de2ce1d01ea707bb2b2161
https://github.com/simstudioai/sim/pull/5259/files#diff-9b1c8365e920c2c33ce67896c76e98caf6c8535794de2ce1d01ea707bb2b2161
https://github.com/simstudioai/sim/pull/5259/files#diff-9b1c8365e920c2c33ce67896c76e98caf6c8535794de2ce1d01ea707bb2b2161
https://github.com/simstudioai/sim/pull/5259/files#diff-9b1c8365e920c2c33ce67896c76e98caf6c8535794de2ce1d01ea707bb2b2161
https://github.com/simstudioai/sim/pull/5259/files#diff-9b1c8365e920c2c33ce67896c76e98caf6c8535794de2ce1d01ea707bb2b2161
apps/sim/lib/api/client/request.test.tshttps://github.com/simstudioai/sim/pull/5259/files#diff-4bb5f7fb500cc055c5851e6c7b5b6e8d3ebe63dce6247618927ad44596597f58
View file https://github.com/simstudioai/sim/blob/de73d4338939aee54c87362e6f438b99301c4017/apps/sim/lib/api/client/request.test.ts
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/simstudioai/sim/pull/5259/{{ revealButtonHref }}
apps/sim/lib/api/client/request.tshttps://github.com/simstudioai/sim/pull/5259/files#diff-5eb4bccc6b684606613ee934e4c17789dc16a3e00da85be6d638d9bf8b1dc8cb
View file https://github.com/simstudioai/sim/blob/de73d4338939aee54c87362e6f438b99301c4017/apps/sim/lib/api/client/request.ts
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/simstudioai/sim/pull/5259/{{ revealButtonHref }}
https://github.com/simstudioai/sim/pull/5259/files#diff-5eb4bccc6b684606613ee934e4c17789dc16a3e00da85be6d638d9bf8b1dc8cb
https://github.com/simstudioai/sim/pull/5259/files#diff-5eb4bccc6b684606613ee934e4c17789dc16a3e00da85be6d638d9bf8b1dc8cb
apps/sim/lib/api/contracts/knowledge/documents.test.tshttps://github.com/simstudioai/sim/pull/5259/files#diff-fc3ebf2124ec2d4900d9b34c63238d209cf0e512517f1f92b0b112899ed92f58
View file https://github.com/simstudioai/sim/blob/de73d4338939aee54c87362e6f438b99301c4017/apps/sim/lib/api/contracts/knowledge/documents.test.ts
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/simstudioai/sim/pull/5259/{{ revealButtonHref }}
Please reload this pagehttps://github.com/simstudioai/sim/pull/5259/files
Please reload this pagehttps://github.com/simstudioai/sim/pull/5259/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.