Caret position is incorrect after inserting a skill reference

Author: shangxinyu1Created May 22, 2026Updated Sep 28, 2026
Labelsbughelp wantedpriority:p1

Summary

After referencing a skill, the text cursor/caret appears in the wrong position in the input area.

Current behavior

When a skill is inserted as a reference/mention in the conversation input, the caret does not appear where the user would expect.

This can make the input feel misaligned or confusing when continuing to type after the inserted skill reference.

Expected behavior

After inserting a skill reference, the caret should appear in the correct logical typing position.

This means:

  • the cursor should align with the visible text flow
  • typing should continue from the expected insertion point
  • the reference chip/text should not cause caret placement glitches

Steps to reproduce

  1. Open a conversation input that supports skill references.
  2. Insert or reference a skill in the input.
  3. Look at the caret position after the reference is added.
  4. Notice that the cursor appears in the wrong place relative to the visible content.

Notes

  • The screenshot highlights the caret appearing at an incorrect position near the referenced skill chips/text.
  • This looks like an input/editor caret positioning issue related to inline references.
  • The problem may involve chip rendering, inline element measurement, or selection range restoration after insertion.

Why this matters

If the caret lands in the wrong place, typing becomes confusing and error-prone. Fixing cursor placement would make referenced-skill workflows feel much more stable and polished.

Image