Connor JohnstoneandClaude Opus 5 0812b7b2e7 Toggle from the cursor offset, not from pointer coordinates
PLAN.md section 7 specifies getOffsetForPosition on a pointer position.
That cannot work: it expects layout coordinates while pointerInput reports
viewport coordinates, and BasicTextField scrolls internally without
exposing the offset. On a 1561 character note every tap resolved to an
offset of 253 or less, so it worked at the top and nowhere else.

The field is the thing that knows its own scroll, so it now places the
cursor and that offset is read back from onValueChange. The press is
watched only to distinguish a tap from any other cursor move, and is never
consumed, so scrolling and ordinary cursor placement are untouched. That
also retires the earlier trade off where a scroll starting on a box would
not scroll.

After toggling, the cursor is parked past the box. Left inside, a second
tap resolves to the offset it already holds, and an unchanged selection
reports nothing, so a box could not be unticked by tapping it twice.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01PU5ZFfQFtDTFqqhvMTWdGH
2026-09-09 20:36:04 -04:00
S
Description
Mobile app for syncing with my todo system
351 KiB
0 Stars 1 Watchers 0 Forks
Languages
Kotlin 66.8%
Python 18.7%
Shell 14.5%