Add knowledge tag ID canonical input - #5983
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub. |
PR SummaryMedium Risk Overview The internal knowledge search route now accepts filters with exactly one of Workflow UX includes copy-tag-ID in the KB Tags modal, Tag ID editing behavior in the editor (preserve in-progress edits until an ID resolves), plus display, search/replace, and migration backfill for the new pair. Fork/promote remapping strips literal definition UUIDs from advanced filters when the KB mapping changes but keeps dynamic tag ID references. Tool/shared parsing and search tool bodies emit Reviewed by Cursor Bugbot for commit f3853ef. Bugbot is set up for automated code reviews on this repo. Configure here. |
|
@greptile-apps please review the corrected feature diff after retargeting this PR to @cursor review |
Greptile SummaryThe PR adds canonical basic/advanced Knowledge tag filters and carries tag IDs through search, serialization, migration, workflow utilities, and workspace forks.
Confidence Score: 5/5The PR appears safe to merge. No blocking failure remains.
|
| Filename | Overview |
|---|---|
| apps/sim/app/api/knowledge/search/route.ts | Resolves tag IDs from accessible knowledge-base definitions and validates resolved filter types, operators, and range values. |
| apps/sim/lib/api/contracts/knowledge/search.ts | Extends the internal search contract with mutually exclusive tag-name and tag-ID filter identifiers. |
| apps/sim/blocks/blocks/knowledge.ts | Defines the tag-name and manual Tag ID controls as a canonical basic/advanced parameter pair. |
| apps/sim/app/workspace/[workspaceId]/w/[workflowId]/components/panel/components/editor/components/sub-block/components/knowledge-tag-filters/knowledge-tag-filters.tsx | Supports editing, resolving, and displaying Tag ID filters in the advanced canonical mode. |
| apps/sim/ee/workspace-forking/lib/remap/remap-references.ts | Preserves dynamic tag-ID references while removing source-workspace literal tag IDs when knowledge bases move across fork boundaries. |
| apps/sim/tools/shared/tags.ts | Parses both tag-name and tag-ID filter representations into the internal structured-filter shape. |
Sequence Diagram
sequenceDiagram
participant User as Workflow editor
participant Serializer as Canonical serializer
participant Tool as Knowledge search tool
participant API as Knowledge search API
participant Tags as KB tag definitions
participant Search as Vector/tag search
User->>Serializer: Configure tag name or manual tag ID
Serializer->>Tool: Emit canonical tagFilters
Tool->>API: Search request with tag filters
API->>Tags: Resolve tag ID/name to slot and field type
Tags-->>API: Tag definition
API->>API: Validate operator and values
API->>Search: Typed structured filters
Search-->>User: Matching knowledge chunks
Reviews (4): Last reviewed commit: "Fix canonical tag filter edge cases" | Re-trigger Greptile
f59952f to
b70fc9e
Compare
|
@greptile-apps please re-review the latest changes addressing both BugBot findings. @cursor review |
|
@greptile-apps please perform a final review of the latest Tag ID editing refinement. @cursor review |
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes using high effort and found 2 potential issues.
❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.
Reviewed by Cursor Bugbot for commit 5e89280. Configure here.
|
@greptile-apps please re-review commit 20a3941, which addresses both latest BugBot findings and adds focused regression coverage. @cursor review |
|
Demo: Screen.Recording.2026-07-27.at.4.15.24.PM.mov |

What changed
Why
Knowledge tag filters previously required selecting a tag by name. Workflows need the same manual-ID alternative used by Slack and other canonical-pair inputs, especially when the ID comes from a workflow reference.
Impact
Users can switch a Knowledge block tag filter between its normal selector and a manual Tag ID input. Existing workflows remain in basic mode, and the public v1 search API is unchanged.
Validation
git diff --check