Skip to content

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

@variablefate

Description

@variablefate

Goal

On /share/r/<npub> (rider share), restore the "Add to RoadFlare" primary CTA with an href pointing at roadflarer:<npub>?name=<display-name>, so drivers tapping the button on a device with a compatible driver app installed open straight into the Add Rider flow.

Context

The "Add to RoadFlare" button was removed from 404.html (the SPA router for /share/d/<npub> and /share/r/<npub>) because its nostr:<npub> href didn't actually open any app. See the earlier removal PR for context.

We're restoring the button only on rider shares, using a custom scheme (roadflarer:) that a future driver-side iOS app (Drivestr iOS or similar) will claim. The rider-side roadflared: work is tracked separately.

Blocking on

  • An App Store release of a compatible iOS driver app that registers the roadflarer: URL scheme. None currently planned — this PR sits dormant until then.

Changes

404.html:

  • Re-add an <a> element with id="add-rider-btn", class btn btn-primary, initially hidden, label "Add to RoadFlare", placed above .store-buttons inside .actions.
  • In renderSharePage, when isDriver === false, set add-rider-btn.href = 'roadflarer:' + npub + (name ? '?name=' + encodeURIComponent(name) : '') and hidden = false.

How to merge

Keep this PR as a draft indefinitely. Mark ready and merge only once a compatible driver app with roadflarer: support is live on the App Store.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions