Skip to content

Keep private-browsing clippings; skip only real password types#8

Open
MiMoHo wants to merge 1 commit into
haad:masterfrom
MiMoHo:keep-private-browsing-clippings
Open

Keep private-browsing clippings; skip only real password types#8
MiMoHo wants to merge 1 commit into
haad:masterfrom
MiMoHo:keep-private-browsing-clippings

Conversation

@MiMoHo

@MiMoHo MiMoHo commented Jul 10, 2026

Copy link
Copy Markdown

Problem

With Don't copy from password fields enabled at its defaults, nothing copied from a private/incognito browser window could be stored.

The default skipPboardTypesList lumped genuine password markers together with the advisory nspasteboard.org hint types:

PasswordPboardType, org.nspasteboard.TransientType, org.nspasteboard.ConcealedType,
org.nspasteboard.AutoGeneratedType, com.agilebits.onepassword

Private/incognito browser windows tag everything they copy with org.nspasteboard.ConcealedType / TransientType, so the whole clipboard was skipped — not just passwords. Reported by a user who wanted passwords kept out of history but everything else (incl. private-window copies) retained.

Fix

Split the two concerns so passwords and "concealed/transient" content are controlled independently:

  • skipPboardTypesList now defaults to real password markers only: PasswordPboardType, com.agilebits.onepassword.
  • New skipConcealedTypes (bool, default off) + skipConcealedTypesList (ConcealedType, TransientType, AutoGeneratedType) — opt in to also drop concealed/transient content (e.g. private browsing).
  • shouldSkip: checks both lists through a small helper availableTypes:matchListForKey:; concealed list only when the new toggle is on. Both keys added to settingsSyncList.

Result: with defaults, real password types (password managers / password fields) are still skipped, while private-window / concealed / transient clippings are kept. Users who want the old aggressive behaviour just tick the new checkbox.

Preferences UI

Plain-language titles + tooltips for the whole password section (the raw UTI list and the length/diagnostic sub-options were not self-explanatory), plus the new checkbox "Also skip private-browsing & temporary clipboards" bound to skipConcealedTypes.

The main-app MainMenu is now a source .xib compiled at build time (it was a checked-in compiled .nib), so the UI change is reviewable as an XML diff.

Verification

  • Standalone unit test of the decision logic — all cases pass (passwords skip; plain/concealed/transient kept at defaults; all skipped when the concealed toggle is on).
  • Runtime test (real app, default settings): PasswordPboardType & com.agilebits.onepassword skipped; plain text, ConcealedType, TransientType captured.
  • Prefs panel loads with no NSUnknownKeyException / unsatisfiable-constraint warnings.
  • Built with Xcode 26.5 (macOS deployment target 13.5).

Out of scope (noted for users)

Web password managers and copying from web forms (e.g. Nextcloud Passwords, Auth0 login pages) put passwords on the pasteboard as plain text with no type marker at all — no clipboard manager can auto-detect those by type. The length/complexity heuristic is the only (imperfect) lever for those.

🤖 Generated with Claude Code

The default skipPboardTypesList mixed genuine password markers
(PasswordPboardType, com.agilebits.onepassword) with the advisory
nspasteboard.org hint types (ConcealedType, TransientType,
AutoGeneratedType). Private/incognito browser windows tag every copy
with ConcealedType/TransientType, so with "Don't copy from password
fields" enabled at defaults, nothing copied from a private window
could be stored.

Split the two concerns:
- skipPboardTypesList now defaults to real password markers only
  (PasswordPboardType, com.agilebits.onepassword).
- New skipConcealedTypes (default off) + skipConcealedTypesList
  (ConcealedType, TransientType, AutoGeneratedType) let users opt in
  to also dropping concealed/transient content (e.g. private browsing).
- shouldSkip: checks both lists via a small helper; both keys join
  settingsSyncList.

Preferences: plain-language labels + tooltips and a new checkbox bound
to skipConcealedTypes. The main-app MainMenu is now a source .xib
compiled at build time (previously a checked-in compiled .nib).

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
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