Skip to content

feat: add IME composition to TextField - #228

Draft
besmpl wants to merge 3 commits into
gogpu:mainfrom
besmpl:agent/p4u-ime
Draft

feat: add IME composition to TextField#228
besmpl wants to merge 3 commits into
gogpu:mainfrom
besmpl:agent/p4u-ime

Conversation

@besmpl

@besmpl besmpl commented Aug 14, 2026

Copy link
Copy Markdown
Contributor

Summary

  • add backend-neutral IME events and bridge optional gpucontext v2 controllers into UI windows
  • keep TextField preedit separate from committed text, render marked ranges/underline/cursor geometry, and publish candidate cursor rectangles
  • support UTF-8-safe delete-surrounding, exactly-once commit echo suppression, focus/cancel/disabled ordering, and legacy fallback
  • prevent password/sensitive fields from enabling composition, accepting IME mutations, or publishing surrounding text
  • harden stale callbacks, duplicate ends, visibility/enabled/root changes, controller capability discovery, and teardown

Dependencies

This PR depends on:

  1. gpucontext #30, the optional versioned IME interface contract.
  2. gogpu #462, the integrated platform IME event/controller implementation.

The branch contains no committed replace directives and intentionally remains draft until both dependencies are merged and released. After releases are available, update go.mod, run go mod tidy, rerun the matrix below, and mark this PR ready.

Verification

Dependency validation used temporary modfile replacements only; none are committed.

  • focused app/TextField/event tests: PASS
  • go test -count=1 ./...: PASS
  • focused changed IME race tests: PASS
  • go build ./... and focused go vet: PASS
  • supported Linux/Windows/macOS/browser builds and test compilation: PASS
  • gofmt and git diff --check: PASS

The full app race suite still reproduces the pre-existing animation-pumper mock RequestRedraw race outside this diff. Live native compositor/locale testing requires target hosts.

Refs gogpu/gogpu#331. Depends on gogpu/gpucontext#30 and gogpu/gogpu#462.

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.

1 participant