feat(settings): surface push.ntfyUrl in /public/settings for the app #79

Merged
whitlocktech merged 1 commits from feat/settings-push-ntfy-url into main 2026-07-20 20:55:58 +00:00
Member

What & why

The Android app's M7 Part 2 embedded push distributor needs the shard's client-facing ntfy relay URL to build its device topic endpoint — but the M7 Part 1 backend (#78) only used the NTFY_* vars server-side and never surfaced them to a client. This adds the one small, additive field the app needs.

Changes

  • settings.getPublic() now returns a push: { ntfyUrl } block, sourced from NTFY_PUBLIC_URL or the first NTFY_ALLOWED_ORIGINS entry — never the possibly-internal NTFY_BASE_URL. null when unconfigured, so the app simply shows push as unavailable for that shard.
  • Swagger — extended the PublicSettings schema with the push block; regenerated swagger-output.json.
  • TestspublicBrand.test.js covers null / NTFY_PUBLIC_URL wins + trailing-slash trim / NTFY_ALLOWED_ORIGINS fallback (and that NTFY_BASE_URL never leaks).
  • .env.example documents NTFY_PUBLIC_URL (BACKEND_DESIGN.md updated in the docs PR).

Additive, non-sensitive, forward-compatible (an older client just ignores the field; the app decodes a missing push to null). Full server suite green (250 pass), npm run swagger clean.

Companion PRs

  • App: RunicGateway/Android-app M7 Part 2 (consumes this field).
  • Docs: RunicGateway/docs (BACKEND_DESIGN.md + PLAN.md M7 Part 2 landed).

AI disclosure

Authored with Claude Code (Claude Opus). Commits carry a Co-Authored-By: Claude trailer per org policy.

🤖 Generated with Claude Code

## What & why The Android app's **M7 Part 2** embedded push distributor needs the shard's **client-facing ntfy relay URL** to build its device topic endpoint — but the M7 Part 1 backend (#78) only used the `NTFY_*` vars server-side and never surfaced them to a client. This adds the one small, additive field the app needs. ## Changes - **`settings.getPublic()`** now returns a `push: { ntfyUrl }` block, sourced from `NTFY_PUBLIC_URL` or the first `NTFY_ALLOWED_ORIGINS` entry — **never** the possibly-internal `NTFY_BASE_URL`. `null` when unconfigured, so the app simply shows push as unavailable for that shard. - **Swagger** — extended the `PublicSettings` schema with the `push` block; regenerated `swagger-output.json`. - **Tests** — `publicBrand.test.js` covers null / `NTFY_PUBLIC_URL` wins + trailing-slash trim / `NTFY_ALLOWED_ORIGINS` fallback (and that `NTFY_BASE_URL` never leaks). - **`.env.example`** documents `NTFY_PUBLIC_URL` (BACKEND_DESIGN.md updated in the docs PR). Additive, non-sensitive, forward-compatible (an older client just ignores the field; the app decodes a missing `push` to null). Full server suite green (**250 pass**), `npm run swagger` clean. ## Companion PRs - App: `RunicGateway/Android-app` M7 Part 2 (consumes this field). - Docs: `RunicGateway/docs` (BACKEND_DESIGN.md + PLAN.md M7 Part 2 landed). ## AI disclosure Authored with **Claude Code** (Claude Opus). Commits carry a `Co-Authored-By: Claude` trailer per org policy. 🤖 Generated with [Claude Code](https://claude.com/claude-code)
wtclaude added 1 commit 2026-07-20 20:26:18 +00:00
feat(settings): surface push.ntfyUrl in /public/settings for the app
All checks were successful
PR Checks / server-tests (pull_request) Successful in 9m39s
PR Checks / client-build (pull_request) Successful in 9m24s
PR Checks / bot-install (pull_request) Successful in 9m17s
a789ee3ac9
The Android app's embedded push distributor (M7 Part 2) needs the shard's
client-facing ntfy relay URL to build its device topic endpoint, but the M7
Part 1 backend only used the NTFY_* vars server-side and never surfaced them.

Add a `push: { ntfyUrl }` block to settings.getPublic(), sourced from
NTFY_PUBLIC_URL or the first NTFY_ALLOWED_ORIGINS entry (never the possibly
internal NTFY_BASE_URL); null when unconfigured, so the app shows push as
unavailable for that shard. Additive, non-sensitive, forward-compatible.

- Extend the PublicSettings swagger schema; regenerate swagger-output.json.
- publicBrand.test.js: cover null / NTFY_PUBLIC_URL / NTFY_ALLOWED_ORIGINS.
- Document NTFY_PUBLIC_URL in .env.example and (docs PR) BACKEND_DESIGN.md.

Full server suite green (250 pass).

Co-Authored-By: Claude <noreply@anthropic.com>
whitlocktech approved these changes 2026-07-20 20:31:00 +00:00
whitlocktech scheduled this pull request to auto merge when all checks succeed 2026-07-20 20:31:05 +00:00
whitlocktech merged commit 31b72859ce into main 2026-07-20 20:55:58 +00:00
whitlocktech deleted branch feat/settings-push-ntfy-url 2026-07-20 20:55:58 +00:00
Sign in to join this conversation.
No description provided.