Add knowledge tag ID canonical input - #5983
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
PR SummaryMedium Risk Overview Editor & UX: Advanced mode uses a connected Tag ID input (references, paste/focus behavior) that resolves definitions from the active knowledge base; collapsed headers show resolved names or raw IDs. Knowledge tag management rows get a copy tag ID control with tooltip feedback. API & resolution: Internal search accepts exactly one of Fork/remap/migration: Workspace fork remap strips literal tag-definition UUIDs from advanced filters when the parent KB is remapped; dynamic references stay. Basic name-based filters remain portable. Migrations backfill Reviewed by Cursor Bugbot for commit ff8f1b2. 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 |
f3853ef to
5b1500b
Compare
5b1500b to
ff8f1b2
Compare

Summary
Adds a canonical advanced Tag ID input for Knowledge Search while preserving the existing basic tag-name selector and existing workflows.
The internal Knowledge search contract now accepts exactly one
tagNameortagId. Tag IDs are resolved in the shared Knowledge filter resolver against the selected knowledge base, and the server derives the authoritative display name, storage slot, and field type. The thin search route remains unchanged, and the public v1/v2 schemas remain name-only.This also adds a copy-ID control to Knowledge tag rows and preserves advanced values through canonical migration, nested tools, execution, display, search/replace, and workspace forks. Literal definition UUID filters are removed when their parent knowledge base is remapped; dynamic references remain portable.
Type of Change
Testing
bun run check:audits— 29/29 audits passedbun run lint:check— 24/24 tasks passedbun run type-check— 24/24 tasks passedbun run test— 17/17 tasks passedbunx turbo run build --filter=@sim/app— passedgit diff --check— passedReviewers should focus on switching Knowledge Search tag filters between basic and advanced modes, dynamic Tag ID references, and the single-knowledge-base restriction for ID filters.
Checklist
Screenshots/Videos
Browser screenshots were not captured because this agent session had no controllable browser attached. Focused jsdom tests cover first-input focus/paste behavior, canonical knowledge-base context, collapsed resolved/raw labels, and the copy-ID interaction.