Skip to content

Conversation

@tomstockton
Copy link
Member

Problem

The Cursor button was not rendering properly in GitHub and the validation script was failing after the format change.

Issues

  • ❌ Cursor button not visible in GitHub README
  • ❌ CI validation failing: "Failed to decode Cursor deeplink config: Incorrect padding"
  • ❌ Generation script not handling multiline HTML

Solution

🔧 Button Rendering Fix

Before (single line, not rendering):

<a href="cursor://very-long-url..." style="...">🚀 Add to Cursor</a>

After (multiline, renders properly):

<a href="cursor://anysphere.cursor-deeplink/mcp/install?name=capsule-crm&config=..."
   style="display: inline-block; background-color: #007AFF; color: white; padding: 10px 20px; text-decoration: none; border-radius: 6px; font-weight: 500;">
   🚀 Add to Cursor (One-Click Install)
</a>

🔍 Validation Script Fix

  • Added support for both markdown and HTML link formats
  • Uses multiple regex patterns to find deeplink in any format
  • Maintains backward compatibility

🔧 Generation Script Fix

  • Updated to handle multiline HTML anchors
  • Added multiple pattern matching for better reliability

Testing

  • Local validation: python scripts/validate-configs.py passes
  • Link generation: node scripts/generate-cursor-link.js works correctly
  • Format compatibility: Supports both HTML and markdown deeplink formats

Expected Results

  • 🎯 Cursor button now renders as a blue styled button in GitHub
  • 🎯 CI validation tests should pass
  • 🎯 Automation scripts continue to work correctly
  • 🎯 One-click Cursor installation remains functional

🤖 Generated with Claude Code

tomstockton and others added 4 commits June 13, 2025 12:08
## Issues Fixed
- Cursor button not rendering in GitHub due to long single-line HTML
- Validation script breaking after format change from HTML to markdown
- Generation script not handling multiline HTML format

## Changes Made
- **README.md**: Reformatted button as multiline HTML for better GitHub rendering
- **validate-configs.py**: Added support for both markdown and HTML link formats
- **generate-cursor-link.js**: Updated to handle multiline HTML anchors

## Testing
- ✅ Validation script passes with new format
- ✅ Generation script works with multiline HTML
- ✅ Button should now render properly in GitHub

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
- Replace HTML button with shields.io badge format
- GitHub reliably renders shields.io badges with custom styling
- Update validation and generation scripts to support badge format
- Maintains same deeplink functionality with better visual presentation

The badge uses:
- Blue color (#007AFF) matching Cursor branding
- VS Code logo icon
- for-the-badge style for prominence
- Rocket emoji and clear call-to-action text

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
- Ensure proper closing parenthesis for badge URL
- GitHub was showing trailing text due to malformed markdown link
- Badge should now render cleanly without extra text

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
## Problem
- Browser-based GitHub README can't handle cursor:// protocol scheme
- Badge button just opened new tab instead of triggering Cursor
- Custom protocol links don't work from web browsers for security reasons

## Solution
- Replace clickable button with copy-paste instructions
- Display deeplink in code block for easy copying
- Clear step-by-step instructions for users
- This actually works: paste cursor:// URL in browser → opens Cursor

## Updated Scripts
- Validation script supports new code block format
- Generation script handles code block deeplinks
- Maintains compatibility with all previous formats

## User Experience
1. User copies the cursor:// URL from code block
2. Pastes it in their browser address bar
3. Browser recognizes protocol and opens Cursor
4. Cursor prompts to install MCP server automatically

This approach actually works vs the previous non-functional button.

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
@tomstockton tomstockton merged commit aa12310 into main Jun 13, 2025
1 check passed
@tomstockton tomstockton deleted the fix-cursor-button-rendering branch June 13, 2025 12:26
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.

2 participants