Skip to content

Restore rider-share "Add to RoadFlare" button (roadflarer: scheme)#5

Draft
variablefate wants to merge 1 commit intomainfrom
feat/roadflarer-rider-scheme
Draft

Restore rider-share "Add to RoadFlare" button (roadflarer: scheme)#5
variablefate wants to merge 1 commit intomainfrom
feat/roadflarer-rider-scheme

Conversation

@variablefate
Copy link
Copy Markdown
Owner

Closes #3.

Summary

Adds a primary "Add to RoadFlare" CTA on /share/r/<npub> rider-share pages that deep-links via the custom roadflarer: URL scheme, intended for a future iOS driver app. Only visible on rider shares — driver shares stay untouched (tracked separately in #2 / #4).

What ships

404.html:

  • New element: <a id="add-rider-btn" class="btn btn-primary" hidden>Add to RoadFlare</a> placed inside .actions, above .store-buttons.
  • In renderSharePage, when isDriver === false: sets add-rider-btn.href = 'roadflarer:' + npub + (name ? '?name=' + encodeURIComponent(name) : '') and unhides it.

Why it's a draft (long-term)

This button points at a roadflarer: URL. There is currently no iOS driver app, so no app on any device will claim this scheme. Do not mark this PR ready until a compatible driver app with roadflarer: support is live on the App Store. This PR may sit open for a long time — that is expected.

Interaction with the removal PR and the roadflared: PR

Independent of both. Adds new elements / new code paths only; doesn't touch the old add-btn or its nostr: JS line. Uses a different element id (add-rider-btn vs add-driver-btn) and a different conditional branch (!isDriver) than #4, so no conflict in any merge order.

Test plan (when ready)

  • A compatible iOS driver app with roadflarer: support is live on the App Store
  • Rebase onto latest main
  • Visit /share/r/<real-npub> → button visible, href is roadflarer:npub1...?name=...
  • Tap on a device with the driver app installed → Add Rider flow opens pre-filled
  • Visit /share/d/<npub> → button is NOT visible

🤖 Generated with Claude Code

variablefate added a commit that referenced this pull request Apr 20, 2026
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: variablefate <variablefate@users.noreply.github.com>
Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
On /share/r/<npub>, render a primary CTA that deep-links via
roadflarer:<npub>?name=<display-name>, intended to be handled by a
future iOS driver app. Button stays hidden on driver shares.

Blocked on: an iOS driver app (e.g. Drivestr iOS) shipping to the App
Store with roadflarer: URL scheme support. Keep this PR as draft
indefinitely — mark ready and merge only once such an app is live.

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.

Restore rider-share "Add to RoadFlare" button with roadflarer: deep link

1 participant