Skip to content

Copy a PRD section as Markdown with opencode's copy button - #38

Merged
TechNomadCode merged 1 commit into
mainfrom
feat/copy-section
Oct 21, 2026
Merged

TechNomadCode merged 1 commit into
mainfrom
feat/copy-section

Conversation

@TechNomadCode

Copy link
Copy Markdown
Owner

Slice 17 in docs/plan.md: each saved PRD section gets opencode's copy button (Design, 2026-10-21 in docs/decisions.md).

  • A 24px icon button without a border beside the section's tally; on a screen with hover it shows while the section is hovered or focused, on a touch screen always. A "Copy section" label shows above it after the pointer rests on it for 0.4s.
  • Copies the section as Markdown in the download's form (sectionMarkdown in src/features/prd/prd-markdown.ts), footnotes numbered within the section.
  • After a copy: a check mark and the name "Copied" for two seconds, announced to screen readers; "Couldn't copy" when the browser refuses the clipboard.

Tests: unit tests for the copied text (confirmed, unverified and visitor-decision statements) and both outcomes; end-to-end tests for the button hidden until hover or focus on a laptop, shown at rest on a phone, and the copied text in the clipboard.

For the measurement lane: changes nothing in src/server or src/lib.

Local checks: verify (472 unit tests) and test:e2e (63) passed.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@TechNomadCode
TechNomadCode merged commit 3b9be95 into main Oct 21, 2026
5 checks passed
@TechNomadCode
TechNomadCode deleted the feat/copy-section branch October 21, 2026 07:38
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