Skip to content
This repository was archived by the owner on Jan 30, 2026. It is now read-only.

Merge branch 'main' of https://github.com/superdoc-dev/template-build…

cb74d3a
Select commit
Loading
Failed to load commit list.
Merged

feat: implement field filtering in FieldMenu with query support #3

Merge branch 'main' of https://github.com/superdoc-dev/template-build…
cb74d3a
Select commit
Loading
Failed to load commit list.
Cursor / Cursor Bugbot completed Oct 9, 2025 in 2m 11s

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

const cleanup = () => {
const currentPos = e.state.selection.from;
const tr = e.state.tr.delete(triggerStart, currentPos);
e.view.dispatch(tr);
};
triggerCleanupRef.current = cleanup;
menuTriggerFromRef.current = from;

Fix in Cursor Fix in Web