fix(09.1-01): ProfileChannelsSection QR + subscribe link target company ntfy server

- Add NTFY_BASE const (NEXT_PUBLIC_NTFY_BASE_URL || 'https://ntfy.wulfconsulting.cloud') at module scope
- Subscribe link href and rendered text use NTFY_BASE instead of ntfy.sh
- QRCodeSVG value uses NTFY_BASE — ntfy.sh no longer referenced in file
- Add muted help line 'Topic must start with pulse-me-' between custom-topic Input and error paragraph
This commit is contained in:
lorentz 2026-05-11 06:43:42 -04:00
parent 2ff2dc9904
commit 985728abb6

View file

@ -28,6 +28,12 @@ import { Button } from '@/components/ui/button';
import { Label } from '@/components/ui/label';
import { Separator } from '@/components/ui/separator';
// Personal ntfy channels target the company ntfy instance. The fallback
// matches the server-side default in personal-channels.ts / notify.ts so
// the UI and the publish path stay aligned even when the env var is unset
// in a dev shell (UAT-FIX-01).
const NTFY_BASE = process.env.NEXT_PUBLIC_NTFY_BASE_URL || 'https://ntfy.wulfconsulting.cloud';
// ── Types ────────────────────────────────────────────────────────────────────
interface Channel {
@ -279,12 +285,12 @@ export function ProfileChannelsSection() {
/* State B — topic minted */
<div className="space-y-3">
<a
href={`https://ntfy.sh/${ntfyTopic}`}
href={`${NTFY_BASE}/${ntfyTopic}`}
target="_blank"
rel="noopener noreferrer"
className="text-primary text-sm underline break-all"
>
{`https://ntfy.sh/${ntfyTopic}`}
{`${NTFY_BASE}/${ntfyTopic}`}
</a>
<div
@ -292,7 +298,7 @@ export function ProfileChannelsSection() {
aria-label={`Subscribe to ${ntfyTopic} on ntfy`}
className="flex justify-center"
>
<QRCodeSVG value={`https://ntfy.sh/${ntfyTopic}`} size={200} />
<QRCodeSVG value={`${NTFY_BASE}/${ntfyTopic}`} size={200} />
</div>
<p className="text-xs text-muted-foreground">
@ -315,6 +321,9 @@ export function ProfileChannelsSection() {
setCustomTopicError(null);
}}
/>
<p className="text-xs text-muted-foreground">
Topic must start with <code>pulse-me-</code>.
</p>
{customTopicError && (
<p className="text-xs text-destructive">{customTopicError}</p>
)}