Skip to content

Restore driver-share "Add to RoadFlare" button with roadflared: deep link #2

@variablefate

Description

@variablefate

Goal

On /share/d/<npub> (driver share), restore the "Add to RoadFlare" primary CTA with an href pointing at roadflared:<npub>?name=<display-name>, so riders tapping the button on a device with RoadFlare iOS installed open straight into the Add Driver flow.

Context

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

We're restoring the button only on driver shares, using a custom scheme (roadflared:) that RoadFlare iOS will claim once variablefate/roadflare-ios#64 ships in an App Store release.

A separate issue/PR tracks the rider-share equivalent with roadflarer: (handled by a future driver-side iOS app).

Blocking on

Changes

404.html:

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

How to merge

Keep this PR as a draft until the matching iOS App Store build is live. Then rebase on latest main, mark ready, merge. GitHub Pages deploys on merge.

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