Skip to content

Paste safety, typed recovery, onboarding completion, dev/release app separation - #5

Merged
brainsparker merged 2 commits into
mainfrom
paste-safety-recovery
Sep 16, 2026
Merged

brainsparker merged 2 commits into
mainfrom
paste-safety-recovery

Conversation

@brainsparker

Copy link
Copy Markdown
Owner

Summary

  • PasteTransaction validates destination and clipboard before/during paste; failures downgrade to copy-only
  • Typed PasteFailure recovery actions (permission panes deep-linked, string sniffing removed), last issue reopenable from menu bar
  • Practice onboarding completes only on verified insertion, with staged progress and explicit continue
  • Per-app capture exclusions, diagnostics page, competing-instance/hotkey status, sleep cancels in-flight paste
  • Dev builds separated as com.superpaste.app.dev so rebuilds never invalidate release TCC grants
  • 21 focused swift-testing tests; integration tests caught a restore-empty-clipboard regression

Verification

  • Focused swift-testing suites pass locally with visible per-test output (21 tests)
  • Plain swift test runner aborts on this machine's CLT 26.x after startup; CI is the referee here
  • Live paste path (AX focus tracking) still needs a manual run of the practice flow

Test plan

  • CI swift-tests green on macos-15 (Xcode)
  • Manual: practice flow completes, wrong-destination paste suppressed
  • Manual: quit/reopen SuperPaste Dev twice; grants persist

…separation

Paste safety:
- PasteTransaction captures destination (PID + AX window/field) and clipboard
  state at hotkey time and revalidates before and during the pre-paste window;
  a changed or unverifiable destination downgrades to copy-only and never
  overwrites a user clipboard change.
- ReadyView practice paste now reports staged progress (hotkey, capture,
  generation, insertion) and completes onboarding only on verified insertion.

Recovery:
- HUD failures carry a typed PasteFailure with explicit recovery actions;
  string-sniffing recovery mapping is gone. Permission failures deep-link
  their System Settings pane; menu bar can reopen the last issue.

Everyday controls:
- Per-app capture exclusions from the menu bar; Settings diagnostics page
  (no screenshots, keys, or window titles); competing-instance and hotkey
  registration states surfaced; sleep cancels in-flight requests.

Dev/release separation:
- Local builds are SuperPaste Dev (com.superpaste.app.dev) so development
  rebuilds cannot invalidate the release app's TCC grants. Dev builds pin the
  stable certificate, disable Sparkle updates, and all dev tooling targets
  the dev bundle. scripts/test-dev-bundle.sh verifies the isolation.

Tests: 21 focused tests covering the paste transaction contract, clipboard
round-trip (caught a restore-empty-clipboard regression), failure mapping,
and practice-state gating. Focused swift-testing runs pass locally; the
plain `swift test` runner aborts on CLT 26.x, so CI (Xcode) is the referee.
run-focused-tests.sh wraps the CLT-specific swift-testing invocation.
verify-clipboard-regression-test.sh temporarily reintroduces the
restore-clears-clipboard bug and proves the suite fails — the trap
restores the source either way. Re-ran the suite against the restored
source: all 21 tests pass.
@brainsparker
brainsparker merged commit d86dc74 into main Sep 16, 2026
1 of 3 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.

1 participant