Skip to content

Remove non-functional "Add to RoadFlare" share-page button#6

Merged
variablefate merged 1 commit intomainfrom
chore/remove-placeholder-add-btn
Apr 20, 2026
Merged

Remove non-functional "Add to RoadFlare" share-page button#6
variablefate merged 1 commit intomainfrom
chore/remove-placeholder-add-btn

Conversation

@variablefate
Copy link
Copy Markdown
Owner

Summary

The "Add to RoadFlare" primary CTA on /share/d/<npub> and /share/r/<npub> set its href to nostr:<npub>, but RoadFlare iOS does not register the nostr: URL scheme — so tapping the button either errored in Safari or dispatched to some unrelated Nostr client. Either way, it never opened RoadFlare. This PR removes the placeholder element and the JS that sets its href.

Users already have two functional paths for adding a driver/rider:

  • The "Account ID" copy button next to the npub (then paste into the app)
  • The QR code shown on the share page (then scan from the Add Driver sheet)

The button's behavior on the live site has never been useful in a way those two flows don't already cover.

Follow-up

Two draft PRs are already open with scheme-specific replacements, each waiting on matching app-side support:

  • #4 — restores the button on driver shares with roadflared:<npub>, blocked on variablefate/roadflare-ios#64 (RoadFlare iOS registering the scheme)
  • #5 — restores the button on rider shares with roadflarer:<npub>, blocked on a future iOS driver app

Both draft PRs are designed to cleanly rebase onto the post-merge state of this PR (they add new elements with new IDs rather than modifying the ones deleted here — non-conflicting in any merge order).

Diff

404.html:

  • Remove <a class="btn btn-primary" id="add-btn" href="#">Add to RoadFlare</a> from .actions
  • Remove the JS block // Deep link / document.getElementById('add-btn').href = 'nostr:' + npub;

4 lines deleted, 0 added. No CSS / config / CNAME touched.

Test plan

  • Visit /share/d/<real-npub> — profile renders, QR + copy button work, App Store button routes correctly, no "Add to RoadFlare" button present
  • Visit /share/r/<real-npub> — same as above
  • Console is clean (no document.getElementById('add-btn') null-ref errors)
  • Non-share 404 path still renders the not-found state

🤖 Generated with Claude Code

The button set href to nostr:<npub>, but RoadFlare iOS does not
register any URL scheme today, so tapping it never opened the app —
best case it errored in Safari, worst case some unrelated Nostr client
handled it. The copy button on Account ID and the QR code already
provide the working paths for adding a driver/rider; the broken CTA
only created confusion.

A driver-only replacement using a future roadflared: scheme is drafted
in #4 (pairs with variablefate/roadflare-ios#64). A rider-only
replacement using roadflarer: is drafted in #5, waiting on a future
iOS driver app. This commit clears the way for both by removing the
placeholder element and its JS handler.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
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