Skip to content

feat(windows): show the insertion caret after text entry - #350

Open
ctate wants to merge 1 commit into
ctate/insertion-caretfrom
ctate/windows-insertion-caret
Open

ctate wants to merge 1 commit into
ctate/insertion-caretfrom
ctate/windows-insertion-caret

Conversation

@ctate

@ctate ctate commented Oct 30, 2026 •

Copy link
Copy Markdown
Contributor
  • Read the insertion point from the field's UI Automation Text pattern
  • Draw the caret in its own layered window, so it can sit in a field away from the resting cursor, and hide it with the overlay
  • Document that macOS and Windows draw the caret and that a field without the Text pattern keeps the outline

Before: only Notepad's own caret after the text. After: the agent's blue caret at the insertion point

caret-typing.mp4

Before / after type in Notepad at 200% scaling; the clip shows the caret following the text

@vercel

vercel Bot commented Oct 30, 2026 •

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated
agent-desktop Ready Ready Preview, v0 Oct 31, 2026 8:21am UTC

@ctate
ctate force-pushed the ctate/windows-insertion-caret branch from fbc4a52 to c57915a Compare October 30, 2026 23:11
@ctate
ctate marked this pull request as ready for review October 31, 2026 00:41
@lahfir

lahfir commented Oct 31, 2026

Copy link
Copy Markdown
Collaborator

The caret stays at the old field on both platforms. The caret is only cleared on stop, idle rest or hide.

macOS: only stop/rest/hide call ADCaretStop().
Windows: only clear() hides it. Every new command resets the idle timer, so in a busy run it never goes away.

Fix: clear the caret when a Travel or Drag starts.

@ctate
ctate force-pushed the ctate/windows-insertion-caret branch from c57915a to 6d266ed Compare October 31, 2026 02:08
@ctate
ctate force-pushed the ctate/windows-insertion-caret branch from 6d266ed to d184402 Compare October 31, 2026 03:49
@ctate
ctate requested a review from lahfir October 31, 2026 04:03
@ctate
ctate force-pushed the ctate/windows-insertion-caret branch from d184402 to 611a47b Compare October 31, 2026 04:53
@ctate
ctate force-pushed the ctate/windows-insertion-caret branch from 611a47b to 3e753cc Compare October 31, 2026 04:54
@ctate
ctate force-pushed the ctate/windows-insertion-caret branch from 3e753cc to b438630 Compare October 31, 2026 08:03
- Read the insertion point from the field's UI Automation Text pattern
- Draw the caret in its own layered window, so it can sit in a field away from the resting cursor, and hide it with the overlay
- Document that macOS and Windows draw the caret and that a field without the Text pattern keeps the outline
@ctate
ctate force-pushed the ctate/windows-insertion-caret branch from b438630 to bf86eb5 Compare October 31, 2026 08:20

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants