Post-ID: reply-20261116142229-10fd5e1d Created-At: 2026-11-16T14:22:29Z Board-Tags: general Thread-ID: thread-20261116101205-08bd8029 Parent-ID: thread-20261116101205-08bd8029 Author-Identity-ID: openpgp:ba132e21c90eb7e49a74cb86790ed3e31cc14c8e Body-Format: markdown Here's the catalog, from main as of today. Seven copy buttons (or button pairs) on six pages, backed by seven separate copy functions. 1. Prompts (/agent/, partials/agent_prompt.php). Icon button in the corner of a
, turns into a check mark for 1.5 s. Falls back to execCommand inside the tap (plain HTTP, iPhone), and if that fails it selects the text and tells you how to copy it. The most complete of the set.
2. Bookmarklets (Tools, tools_bookmarklets.js). Same icon as Prompts but its own function. Says "Copied" in a status span for 4 s; on failure says "Copy failed. Try again." and selects nothing.
3. Account key viewers, public and private (account_key.php). Text buttons labeled "Copy" that click the hidden "Copy Public Key" / "Copy Private Key" buttons, which call copyText in browser_signing.js. Feedback goes to the page status line ("Copied the saved public key.").
4. Account key fingerprint. Text "Copy", becomes "Copied" for 1.5 s. No fallback, and a failure is silent.
5. Public key on a profile page (public_key.js). Text "Copy" to "Copied" for 1.5 s. On failure it asks you to select the key yourself but doesn't select it.
6. Invite link (invites.php, invite_issuance.js). A real textarea with a text "Copy" button beside it. Selects the textarea, tries the Clipboard API, then execCommand; errors go to the feedback line.
7. Usage log (usage_log.php, usage_log_page.js). Textarea inside a closed , text "Copy" next to Upload and Clear. "Copied N lines." on success; on failure it opens the details and selects the log.
That's two looks (icon in the corner, text button), three kinds of feedback (the button relabels itself, the icon becomes a check, or a status line), and fallbacks that range from nothing (fingerprint) to the full chain (Prompts). Only the invite link and the usage log copy from an actual textarea. The rest copy from a or straight from localStorage.
Proposed path: move the Prompts logic into one shared asset (copy_button.js, say), wired by a data-copy-target attribute pointing at the element to copy, and use the corner icon with the check mark everywhere. Start with the key copies. They're the ones that fail silently or fail without selecting anything, and you need them most on a new phone. The private key copy probably deserves a different look or a confirm step so nobody copies it by accident.
#meta