Skip to content

Offer explicit Copy when an extension cannot paste on Android - #104

Merged
moikdev merged 8 commits into
mainfrom
enhancement/explicit-paste-copy-fallback
Nov 4, 2026
Merged

moikdev merged 8 commits into
mainfrom
enhancement/explicit-paste-copy-fallback

Conversation

@moikdev

@moikdev moikdev commented Nov 4, 2026

Copy link
Copy Markdown
Owner

Fixes #101.

When a foreground extension tries to paste, a successful service response can end in generic failure feedback because Android insertion is unavailable. Droidcast now keeps that paste rejected and offers Copy result instead and Return in the existing palette. The clipboard changes only after the explicit Copy action; the resulting screen reports Copy, and Return preserves the original source and selection.

Output is bounded, private, invocation-owned and single-use. Replacement, source changes, cancellation, return and disposal clear it; stale callbacks cannot consume a newer offer. Actual window focus and current route/lifetime guard Copy. Unsupported content fails without an offer. Both action labels retain natural height and complete 48 dp targets across tablet, phone and short landscape at 100%/200%.

Implementation, identities, limitations and full evidence · Checkpoint

Real Android before / after

Tinycast_Tablet_API_36, Android 16/API 36. Phone is the 1080×2340/420 dpi emulator override at 100%. The unchanged frozen Translate paste command uses owned hello input. Old app: 56134f31 / 2a41ea14…; current app: 08210fa2 / a5b1ccb1…; identical workflow instrumentation: 6bd62608….

Old generic paste failure Explicit Copy offered Actual Copy destination Original source/range restored
Phone100 old generic failure Phone100 pending explicit Copy Phone100 result copied Phone100 source hello selection zero to five
Phone 200% Short landscape 200% Owned uncaught rejection still offers explicit Copy
Phone200 complete Copy and Return labels Landscape200 complete Copy and Return labels Tablet100 owned uncaught rejection offer

The last frame is an owned real-runtime error protocol, not a Store/service observation. Enlarged profiles are functional/label evidence, not broad accessibility certification.

Validation

  • 78 current-app positives / 18 whole cohorts / 346 successful restoration checks: six real frozen Translate workflows, 26 owned lifecycle/Unicode cases, six enlarged keyboard/Unicode cases and 40 affected review/Form/Detail/handoff regressions.
  • Two old-app intended failures, zero passes / 38 checks, using the identical workflow APK and witnessing successful service output before the missing-Copy assertion.
  • Separate matched gesture control: same app and 0dc614d4… test APK; the legacy four-pixel path starts outside the rounded palette and dismisses it, zero passes / 20 checks. The interior continuation passes. This corrects the test helper and earns no app-repair credit.
  • All retained evidence: 95 executions / 88 passes / seven failures / 478 checks. Historical notification-count, dialog-thread, ambiguous invalid-input-marker and original reveal failures stay excluded; the original failed pipeline remains failed, with its later cohorts completed separately.
  • JVM298, with zero failures/errors/skips, on frozen unchanged production/JVM sources; current Python115 per normal/optimized mode; both build variants and final instrumentation compilation; lint 0 errors/55 warnings per variant. Benchmark build receipts use the default local stamp and earn no benchmark-device credit.
  • 360 indexed public files plus checkpoint, 40 actual triplets, 875 retained capture hashes and 223 current source hashes. Private clipboard originals/backups are excluded; lease-held independent restoration and same-boot checks preserve 12 durable files and 528 pre-existing evidence files. All ten packaged assets/notices remain unchanged.

The installed app remains frozen at 08210fa2. Instrumentation cohorts retain their distinct 08210fa2, 5f8875b2 and 51de2cab identities; no final-head runtime rerun or stamp-only binary equivalence is implied.

Actual exact-head hosted Android CI and the two independent gpt-6.1-sol/high audits remain pending. Local/emulator checks do not clear those gates. Merge only after all gates pass, using the expected-head guard.

Clipboard.paste remains partial with an explicit Copy fallback. Arbitrary insertion, whole-Store/Raycast parity, physical/OEM/TalkBack, production signing/migration and #89 remain open.

moikdev commented Nov 4, 2026

Copy link
Copy Markdown
Owner Author

Root local gate verified at exact head 3b5ec1918c5fe36a8f75a66e601d74da0e3c4b00 (clean checkout). All 360 indexed public files match committed Git bytes; 310 original/public bindings and 50 allowlisted projections reconstruct exactly; 223 current source hashes match the frozen source and HEAD. Verified 40 CRLF-preserved raw XML triplets, 75 parseable public XMLs, 875 retained capture hashes, and separately bound app/test APKs.

Final current-app credit is 78 passes / 18 whole cohorts / 346 successful restoration checks. Two old-app intended negatives and the separate same-APK gesture control have zero JUnit passes; historical failed cohorts remain excluded. All retained accounting is 95 executions / 88 passes / seven failures / 478 checks. Same-boot preservation still verifies 12 original durable files and 528 pre-existing evidence files. JVM298 uses unchanged frozen production/JVM sources; current Python115 per mode, builds and lint0 errors/55 warnings pass. Native test/production identities remain split as documented.

local/android is successful separately from hosted CI. Actual exact-head pull_request Android run 41910473628 was in progress at the root snapshot; no hosted success is claimed. Two independent gpt-6.1-sol/high audits are being requested. No merge clearance yet.

moikdev commented Nov 4, 2026

Copy link
Copy Markdown
Owner Author

Independent correctness/security audit complete at exact head 3b5ec1918c5fe36a8f75a66e601d74da0e3c4b00: scoped no actionable findings. Reviewer used gpt-6.1-sol / high, worked independently without delegation, read AGENTS.md, reviewed the full base-to-head change and affected callers, and confirmed the exact clean checkout at startup and completion.

The audit traced bounded parsing/conversions, foreground/session ownership, single consumption and release, error/input revocation, clipboard failure handling, stale callbacks, affected menu/key/Return/handoff callers and guarded recovery ordering. It independently reconciled 223 source hashes, 360 indexed public files, 310 bindings/transforms, 50 projections, 875 retained capture hashes, 40 CRLF triplets/75 parseable XMLs, exact APK distinctions and all accounting. Seven representative real PNGs were viewed. All ten packaged assets/notices match.

The reviewer inspected retained receipts rather than executing tests/builds/device commands and made no mutations. Clipboard-write exceptions, private originals, final-document-head runtime execution, physical/OEM/accessibility, signing and #89 remain outside this clearance. Companion review and root gates are separate.

moikdev commented Nov 4, 2026

Copy link
Copy Markdown
Owner Author

Independent UX/test/provenance audit complete at exact head 3b5ec1918c5fe36a8f75a66e601d74da0e3c4b00: scoped no actionable findings. Reviewer used gpt-6.1-sol / high, worked independently without delegation or consulting the companion audit, reviewed the full change/affected callers, and confirmed the exact clean checkout at startup and completion.

All 40 actual public PNGs were viewed at original detail with XML/frame/case pairings and PR captions/commit-pinned embeds. The audit supports complete Copy/Return labels and 48dp targets across six frozen profiles, actual explicit Copy/source return, IME hiding/focused Enter, and the stated cancellation/ownership guards. It independently matched the 223 sources, 360 public files plus checkpoint, 310 bindings/transforms, 50 projections, 875 retained hashes, 75 XMLs, frozen APK/stamp boundaries and unchanged assets.

Accounting remains 78 final passes /18 cohorts /346 checks; 95 retained executions /88 passes /7 failures /478 checks. Fresh post-Copy sentinel setup, raw null versus normalization, distinct V6/V7 DEX payloads, the common-APK gesture control and excluded failed pipeline remain accurately qualified. This was read-only inspection, with no tests/builds/adb or mutations. Private originals, induced write failure, physical typing, broader accessibility/OEM/signing and #89 remain uncertified.

moikdev commented Nov 4, 2026

Copy link
Copy Markdown
Owner Author

Root final gate verification: exact PR head remains 3b5ec1918c5fe36a8f75a66e601d74da0e3c4b00, base 987b78a7256e7fa3c6356f6699afc23d1f451a74, clean checkout; reviewed tree 4d7815c1ea1feef8516e30ec0029592a81600acc. Both independent gpt-6.1-sol/high full-change audits are scoped no-findings and recorded above.

The actual Android run 41910473628 now reports completed/success, exact head SHA and pull_request event. Separate exact-head local/android status 58087988929 reports success. Frozen runtime/harness identities, unchanged-source reuse, historical failures and all exclusions remain as documented; no new runtime rerun is claimed.

Proceeding with the normal merge API and the exact expected-head guard. Broader parity, arbitrary insertion, #89 and production readiness remain open.

@moikdev
moikdev merged commit c882c08 into main Nov 4, 2026
2 checks passed
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.

Offer an explicit Copy fallback for unsupported extension paste

1 participant