xonecas.io
8356
Wx

www-xonecas-io / commit 1cfbf06

click the clone box to copy the clone command (1029)

Co-Authored-By: Claude Opus 5.5

Sean Caetano Martin2026-11-08 1cfbf06feafe65084cfef85b5d12ae912ab8a10e parent 657db29

3 files changed

internal/site/templates/project.html+9−2
@@ -36,8 +36,15 @@
3636 </div>{{end}}
3737 </section>
3838 <section>
39- <h2 class="font-bold border-b-[3px] border-ink pb-1 mb-2">Clone</h2>
40- <pre class="bg-pre text-pre-fg rounded-[2px] px-4 py-3 font-mono text-[12.5px] whitespace-nowrap overflow-x-auto [scrollbar-width:thin] select-all">git clone https://xonecas.io/{{.P.Name}}.git</pre>
39+ <h2 class="flex items-baseline justify-between font-bold border-b-[3px] border-ink pb-1 mb-2">Clone <span id="copied" class="text-xs font-normal text-soft">click to copy</span></h2>
40+ <pre id="clone" title="Click to copy" class="bg-pre text-pre-fg rounded-[2px] px-4 py-3 font-mono text-[12.5px] whitespace-nowrap overflow-x-auto [scrollbar-width:thin] select-all cursor-pointer">git clone https://xonecas.io/{{.P.Name}}.git</pre>
41+ <script>/* The Clipboard API needs https or localhost; elsewhere, copy the selection. */
42+ clone.addEventListener("click", async () => {
43+ try { await navigator.clipboard.writeText(clone.textContent); } catch { getSelection().selectAllChildren(clone); document.execCommand("copy"); }
44+ copied.textContent = "copied";
45+ setTimeout(() => copied.textContent = "click to copy", 1500);
46+ });
47+ </script>
4148 </section>
4249 </aside>
4350 </div>
tickets/1029-let-s-add-click-to-copy-to-clipboard-to-the.md+13−3
@@ -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.
tickets/1031-tags-need-to-be-much-more-specific-use.md+3−2
@@ -2,11 +2,12 @@
22 id: 1031
33 title: Tags need to be much more specific. use dependencies files and other leads to augment this. Even keyworrds from readmes or agents/claudes.
44 type: bug
5-status: inbox
5+status: doing
66 priority: p2
77 created: 2026-11-08T04:40:26Z
8-updated: 2026-11-08T04:40:26Z
8+updated: 2026-11-08T04:42:03Z
99 source: devnote
10+moves: 2026-11-08T04:42:03Z inbox doing drag
1011 ---
1112
1213 ## Context