feat: implement field filtering in FieldMenu with query support #3
Bugbot Review
Bugbot Analysis Progress (2m 14s elapsed)
✅ Gathered PR context (3s)
✅ Analyzed code changes (1s)
✅ Completed bug detection — 1 potential bug found (2m 9s)
✅ Validation and filtering completed (0s)
✅ Posted analysis results — 1 bug reported (2s)
✅ Analysis completed successfully (0s)
Final Result: Bugbot completed review and found 1 potential issue
Request ID: serverGenReqId_b79dca47-ee0f-4511-86e0-8088b423f708
Details
Bug: Trigger Cleanup Fails to Remove Query Text
The trigger cleanup function captures the cursor position at trigger detection, causing it to only delete the trigger characters when executed, leaving any typed filter query text in the document. Additionally, menuTriggerFromRef.current is set to the position after the trigger, which causes incorrect menu dismissal when the cursor moves before the trigger.
src/index.tsx#L259-L267
template-builder/src/index.tsx
Lines 259 to 267 in cb74d3a