Skip to content

Latest commit

 

History

History
55 lines (42 loc) · 2.87 KB

CLAUDE.md

File metadata and controls

55 lines (42 loc) · 2.87 KB

OnePaw

One-handed trackpad cursor for Android, aimed at foldables. Kotlin, Compose for settings, plain custom View for the overlay. Package ai.lykos.onepaw.

Read docs/architecture.md before changing anything in service/ — the window split, the pure reducer and the continued-stroke drag chain each exist for a stated reason.

Toolchain

  • JDK 21 (JAVA_HOME points at Android Studio's JBR)
  • Android SDK 36, minSdk 26
  • Gradle wrapper 9.7.1, AGP 9.3.1, Kotlin 2.4.10; versions live in gradle/libs.versions.toml
./gradlew :app:testDebugUnitTest
./gradlew :app:assembleDebug

Rules that are easy to break by accident

  • No INTERNET permission, ever. The privacy claim in the README and ADR-2 is the reason users should be willing to grant an accessibility service. A dependency that pulls in analytics breaks it as surely as a fetch would.
  • The service must not request window content. No accessibilityEventTypes, no canRetrieveWindowContent.
  • Keep gesture logic in the pure reducer. TriggerStateMachine and core/ import no Android types, which is what keeps them testable without a device. Side effects belong in OnePawService.
  • The cursor window stays FLAG_NOT_TOUCHABLE. Make it touchable and it swallows the taps the service injects.

Verifying

grep -c "^e:" returning zero is not evidence that the code compiles. AGP fails the AAR metadata and manifest checks before the Kotlin compiler runs, so a build can die with no compiler diagnostics at all. Check for BUILD SUCCESSFUL, or that app/build actually contains .class files, rather than for the absence of errors.

adb shell input cannot drive the trigger strips. Injected touches do not reach a TYPE_ACCESSIBILITY_OVERLAY window: measured three ways on a Pixel 11 Pro Fold, the cursor overlay is never added and no cursor pixels appear in a screencap. The gesture layer is only exercisable with a real finger, so on-device checks need a person. Instrument the service and read logcat rather than trying to synthesise the gesture.

Two traps when reading a device that is not in the state you assume:

  • A sleeping or locked device swallows injected input silently, and a screencap of it looks like a working screenshot that simply lacks your overlay. Check dumpsys power | grep mWakefulness and isKeyguardShowing before believing a negative result.
  • screencap -d <id> on a fold can capture the inner panel while the device is closed and running on the cover display, returning a plausible image of the wrong screen at the wrong resolution.

A green build in turn says nothing about whether the cursor feels right. Behaviour changes want a real device: install, enable the service, and check the gesture end to end. Unfolding mid-drag and rotating mid-drag are the two paths that historically leave a cursor or a held press stranded.