Problem
When there's a red error message in the push/commit modal, users have to manually copy the error. Should be one-click to copy error into chat for debugging.
Priority
🟢 P3 | Quick win | ~1 hour
Implementation Details
Add Copy Button Next to Error
{error && (
<div className="text-red-500 flex items-center gap-2">
<span>{error}</span>
<button
onClick={() => copyErrorToChat(error)}
className="text-xs underline"
>
Ask Cooper about this
</button>
</div>
)}
Copy and Navigate Function
const copyErrorToChat = (error: string) => {
// Close the modal
setModalOpen(false);
// Set the chat input with context
const context = `I got this error while trying to push/commit:
\`\`\`
${error}
\`\`\`
Can you help me fix this?`;
setInputValue(context);
// Focus the input
inputRef.current?.focus();
};
Files to Modify
- Commit/Push modal component (likely in
src/renderer/components/)
- May need to lift state or use context for
setInputValue
Acceptance Criteria
Problem
When there's a red error message in the push/commit modal, users have to manually copy the error. Should be one-click to copy error into chat for debugging.
Priority
🟢 P3 | Quick win | ~1 hour
Implementation Details
Add Copy Button Next to Error
Copy and Navigate Function
Files to Modify
src/renderer/components/)setInputValueAcceptance Criteria