@@ -2,13 +2,13 @@
22 id: 1029
33 title: Let's add click to copy to clipboard to the clone link
44 type: feature
5-status: doing
5+status: review
66 priority: p2
77 created: 2026-11-08T04:29:39Z
8-updated: 2026-11-08T04:37:49Z
8+updated: 2026-11-08T04:42:15Z
99 source: devnote
1010 area: site
11-moves: 2026-11-08T04:37:49Z inbox doing drag
11+moves: 2026-11-08T04:37:49Z inbox doing drag; 2026-11-08T04:42:15Z doing review agent
1212 ---
1313
1414 ## Context
@@ -22,3 +22,13 @@ Filed from `http://192.168.122.10:8080/projects/macotron-plugin-caffeinate/`, on
2222 - 2026-11-08 04:34Z (agent): Triage: type feature (it was bug), priority p2, area site. No typos to fix.
2323
2424 The clone box is the <pre> in internal/site/templates/project.html (Clone section), 'git clone https://xonecas.io/<name>.git' since 1015. Today it only has select-all, so one click selects the text but copies nothing. Related: 1015.
25+
26+- 2026-11-08 04:42Z (agent): Done. Clicking the clone box on a project page copies 'git clone https://xonecas.io/<name>.git'. The Clone heading reads 'click to copy' and switches to 'copied' for 1.5 s. The box shows a pointer cursor and a 'Click to copy' tooltip.
27+
28+ The Clipboard API only exists on https or localhost. On plain http, such as http://192.168.122.10:8080, the click selects the text and copies it with execCommand('copy'). So it works both in development and once served over https.
29+
30+ Change: an inline script and the label in internal/site/templates/project.html.
31+
32+ CHECKED (agent-browser): on http://192.168.122.10:8080/projects/irvc/ (not a secure context, no Clipboard API), the click ran copy, which returned true, with 'git clone https://xonecas.io/irvc.git' selected, and the label read 'copied'. On http://localhost:8080 (secure), the click passed the same text to navigator.clipboard.writeText. go test passes.
33+
34+ NOT CHECKED: pasting from the real system clipboard. The headless browser has none I can read, so I stubbed the two copy calls to see what they were given.