Skip to content

feat(sponsor): add one-time sponsor nudge and install prompt - #61

Merged
Rfluid merged 1 commit into
mainfrom
feat/sponsor-nudge
Sep 25, 2026
Merged

Rfluid merged 1 commit into
mainfrom
feat/sponsor-nudge

Conversation

@Rfluid

@Rfluid Rfluid commented Sep 25, 2026

Copy link
Copy Markdown
Owner

Summary

Aura is free and maintained by one person. This adds a gentle, opt-out way for users to support it.

Installer (install.sh)

  • After install, prints the GitHub Sponsors and Pix (BRL) links and asks Open the sponsor page now? [y/N] (default No).
  • Reads the answer from /dev/tty, so it works under curl | bash. With no terminal attached, it only prints the links.
  • Skipped when AURA_NO_SPONSOR_PROMPT or CI is set. Documented in --help.

In-app card

  • Seven days after the first run, a card appears under the modal header with Sponsor on GitHub and Pix (BRL) buttons and a × to close it.
  • The sponsor buttons only open their link and leave the card up, so someone who paid via Pix can still set up a GitHub sponsorship (or the reverse). Only the × hides it for good.
  • first_run and sponsor_nudge_done live in state.json. Users upgrading from an older build start their seven days on the first launch after the upgrade.
  • Opt out with aura config set sponsor.nudge false. It is listed in aura config describe.
  • The time checks live in aura_core::sponsor, take now as a parameter, and are unit-tested.
  • New heart.svg icon. All colors come from theme tokens. Text exists in both the normal and Goblin voices.

Other

  • Adds .github/FUNDING.yml (GitHub Sponsors + Livepix), which turns on the repo's Sponsor button.
  • SPONSOR.md now lists GitHub Sponsors and Pix.
  • Docs updated: README, docs/configuration.md, docs/cli.md, .design/components.md.

Testing

  • cargo fmt --check, cargo clippy --workspace --all-targets -D warnings: clean
  • cargo test --workspace: 333 passed
  • bash -n install.sh; the sponsor prompt function was tested on its own for the skip variables, no terminal, and yes/no/empty answers.
  • Not yet checked on screen. To preview the card after rebuilding, run:
    f=~/.local/share/aura/state.json
    jq --arg t "$(date -u -d '8 days ago' +%Y-%m-%dT%H:%M:%SZ)" \
      '.first_run = $t | .sponsor_nudge_done = false' "$f" > "$f.tmp" && mv "$f.tmp" "$f"

Aura is free and maintained by one person; give users a gentle,
opt-out way to support it.

- install.sh: after install, print the GitHub Sponsors and Pix links
  and offer to open the sponsor page ([y/N], read from /dev/tty so it
  works under `curl | bash`). Skipped when AURA_NO_SPONSOR_PROMPT or
  CI is set, or no terminal is attached.
- app: seven days after the first run, show a card in the modal with
  "Sponsor on GitHub" and "Pix (BRL)" links. The links leave the card
  up so both can be used; only the × retires it for good. First-run
  time and dismissal live in state.json; `[sponsor] nudge = false`
  opts out.
- Add .github/FUNDING.yml and list GitHub Sponsors and Pix in
  SPONSOR.md.
@Rfluid
Rfluid merged commit 7a46e4c into main Sep 25, 2026
11 checks passed
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