The AI Setup Guide page (/repo/[owner]/[repo]/setup) shows installation steps with copy-to-clipboard buttons for each command. However, the current "Copy" button has two problems:
- It's invisible by default — it's hidden with
opacity-0 and only appears on hover. On mobile devices, hover doesn't exist, so the button is completely inaccessible.
- No feedback — when clicked, there's no visual confirmation that the text was actually copied.
📍 File to Change
frontend/app/(auth)/repo/[owner]/[repo]/setup/page.tsx
🔍 Current Problem (around line 124)
<Button
className="absolute top-2 right-2 opacity-0 group-hover:opacity-100 transition-opacity text-xs h-8 px-2"
onClick={() => navigator.clipboard.writeText(step.command)}
>
Copy
</Button>
The opacity-0 group-hover:opacity-100 makes the button invisible on mobile and easy to miss on desktop.
✅ What To Do
- Make the button always visible — remove
opacity-0 group-hover:opacity-100
- Add a "Copied!" feedback state — after clicking, briefly show ✓ Copied for ~2 seconds
Suggested implementation:
// Add state at the top of the component:
const [copiedIndex, setCopiedIndex] = useState<number | null>(null);
// Updated copy button inside the map:
<Button
className="absolute top-2 right-2 text-xs h-8 px-2 transition-colors"
onClick={() => {
navigator.clipboard.writeText(step.command);
setCopiedIndex(i);
setTimeout(() => setCopiedIndex(null), 2000);
}}
>
{copiedIndex === i ? '✓ Copied!' : 'Copy'}
</Button>
🏁 Acceptance Criteria
💡 Technical Hints
- Add
const [copiedIndex, setCopiedIndex] = useState<number | null>(null); inside SetupGuidePage
- The installation steps are rendered in a
.map((step, i) => ...) — use i as the index to track per-step copy state
navigator.clipboard.writeText() is already used — just wrap it in the state update
setTimeout with 2000ms is the standard pattern for transient feedback
🚀 Getting Started
- Fork the repository
- Create a branch:
git checkout -b fix/issue-4-copy-button-ux
- Edit
frontend/app/(auth)/repo/[owner]/[repo]/setup/page.tsx
- Run locally:
cd frontend && npm run dev
- Open a Pull Request!
The AI Setup Guide page (
/repo/[owner]/[repo]/setup) shows installation steps with copy-to-clipboard buttons for each command. However, the current "Copy" button has two problems:opacity-0and only appears on hover. On mobile devices, hover doesn't exist, so the button is completely inaccessible.📍 File to Change
frontend/app/(auth)/repo/[owner]/[repo]/setup/page.tsx🔍 Current Problem (around line 124)
The
opacity-0 group-hover:opacity-100makes the button invisible on mobile and easy to miss on desktop.✅ What To Do
opacity-0 group-hover:opacity-100Suggested implementation:
🏁 Acceptance Criteria
"✓ Copied!"for ~2 seconds"Copy"automatically💡 Technical Hints
const [copiedIndex, setCopiedIndex] = useState<number | null>(null);insideSetupGuidePage.map((step, i) => ...)— useias the index to track per-step copy statenavigator.clipboard.writeText()is already used — just wrap it in the state updatesetTimeoutwith 2000ms is the standard pattern for transient feedback🚀 Getting Started
git checkout -b fix/issue-4-copy-button-uxfrontend/app/(auth)/repo/[owner]/[repo]/setup/page.tsxcd frontend && npm run dev