Skip to content

feat: Social-Basics (Likes, Kommentare, klickbare Links, Link-Vorschau, Teilen) + Profil-Einstellungen - #8

Merged
cubetribe merged 3 commits into
mainfrom
feat/social-basics
Nov 10, 2026
Merged

cubetribe merged 3 commits into
mainfrom
feat/social-basics

Conversation

@cubetribe

Copy link
Copy Markdown
Collaborator

Worum es geht

Die ersten Nutzer haben gemeldet, dass Grundfunktionen fehlen. Dieser PR bringt die Social-Media-Basics und enthält außerdem die bisher nicht gemergten Profil-Einstellungen (Commit b095824).

Social-Basics (Migration 0004_social_basics.sql)

  • Klickbare Links: http/https und www.-Adressen in Beiträgen und Kommentaren werden zu Links (neuer Tab, nofollow ugc). @name verlinkt auf das Profil.
  • Link-Vorschau für den ersten Link eines Beitrags (Titel, Beschreibung, Bild), auch schon im Composer. Der Server holt die Daten über GET /api/link-preview. Schutz gegen SSRF: keine privaten Netze, DNS-gepinnte Verbindung, 5 s Timeout, 600 KB, max. 3 Weiterleitungen, im Live-Betrieb nur mit Sitzung.
  • Spotify und YouTube: Karte mit Cover und Play-Knopf; der echte Player wird erst nach dem Klick geladen (Zwei-Klick-Lösung, vorher keine Verbindung zu Spotify/Google).
  • Likes: Tabelle post_likes + posts.likes_count, RPC toggle_post_like. Eigene Beiträge können nicht geliked werden. Anzeige „Gefällt Mira, Jonas und 3 weiteren“ mit Liste der Personen. Unabhängig von der Community-Prüfung (ändert slop_status nicht).
  • Kommentare: Kommentarfeld direkt am Beitrag, Kommentare als Sprechblasen mit eigenen Likes, Bild/Sprachnotiz über den Composer, „Alle N Kommentare ansehen“.
  • Teilen: Einzelseite /p/<id> (nur für Mitglieder mit Lesezugriff), natives Teilen-Menü auf Touch-Geräten, sonst Link kopieren.
  • Löschen von Beiträgen/Kommentaren: RPC delete_post für Autor, Gastgeber/Moderation des Raums und Admins, mit Bestätigung.
  • Profil: Sprachvorstellung neu aufnehmen (RPC set_voice_intro), Beiträge und erhaltene Herzen auf dem Profil.
  • Feed lädt 150 Beiträge der obersten Ebene plus deren Kommentare und Likes (vorher 100 inkl. Antworten).

Profil-Einstellungen (Migration 0003_profile_settings.sql, aus b095824)

/einstellungen mit Profil (Avatar, Bio, Ort, Pronomen, Links), Privatsphäre, Mitteilungen und Konto (E-Mail ändern, Konto löschen), öffentliches Profil unter /u/<name>.

Prüfung

  • npm run lint, npm run typecheck, npm test (46/46, 14 neue) und npm run build grün.
  • SQL-Vertrag python3 supabase/tests/contract.py auf isoliertem PostgreSQL: 136/136 (25 neue Prüfungen zu Likes, Löschen, Raumgrenzen, parallelen Taps, Sprachvorstellung).
  • Link-Vorschau gegen echte Seiten geprüft; localhost, 127.0.0.1, 169.254.169.254 und DNS-Namen auf private Adressen werden abgewiesen.
  • Demo-Modus im Browser (Desktop + 375 px): Links, Spotify-Player, Like, Kommentar schreiben/löschen, Einzelseite, Einstellungen. Keine Konsolenfehler.

Ausrollen (nicht Teil dieses PRs)

Am Live-Projekt zuerst 0003_profile_settings.sql, dann 0004_social_basics.sql anwenden, danach die Web-Version bauen. Ohne 0004 lädt die neue Version nicht. Der VPS braucht ausgehendes HTTPS für die Link-Vorschau. Details: docs/DEPLOYMENT.md.

Nicht nachgewiesen

Migrationen und /api/link-preview am gehosteten Projekt mit echter Sitzung, Realtime für post_likes, natives Teilen auf echten Geräten. E-Mail-Benachrichtigungen für Kommentare/Likes sind noch nicht umgesetzt (die Einstellung wird nur gespeichert).

🤖 Generated with Claude Code

cubetribe and others added 3 commits November 9, 2026 13:05
…ccount tools

- New /einstellungen page: profile (avatar, bio, location, pronouns, links),
  privacy (members / public / hidden, show posts and trust tree),
  notification preferences and account (email change, delete account).
- Migration 0003: new profile columns, profile_settings table, RPCs
  update_profile, set_avatar, update_notification_settings,
  get_public_profile, delete_my_account, anon read policy for public avatars.
- Public profile at /u/<name> for visibility = public, served via RPC only.
- Auth callback honors an allow-listed next=/einstellungen redirect.
- Tests: 11 new unit tests, SQL contract extended to 111 checks.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
…ring

- Clickable links (http/https, www.) and @mentions in posts and comments.
- Link previews via /api/link-preview: server fetches Open Graph/oEmbed
  data with SSRF guards (no private networks, DNS-pinned lookup, 5 s,
  600 KB, max 3 redirects), members only in live mode.
- Spotify and YouTube links show a cover card; the real player loads
  on click (two-click privacy).
- Likes: migration 0004 adds post_likes + posts.likes_count, RPC
  toggle_post_like (no self-likes), "Gefällt X, Y und …" with liker list.
  Likes are independent from the community check.
- Comments: inline comment form, comment bubbles with likes, image and
  voice replies via the composer, "Alle N Kommentare ansehen".
- Sharing: permalink page /p/<id>, native share sheet on touch devices,
  copy link elsewhere.
- Delete posts/comments: RPC delete_post for author, room host/moderator
  and admins, with confirmation dialog.
- Profile: re-record voice intro (RPC set_voice_intro), post and heart
  counts on the profile page.
- Feed loads 150 top-level posts plus their comments and likes.
- Tests: 14 new unit tests (46 total), SQL contract 136 checks.
- Docs: Flutter contract, deployment order 0003 -> 0004, validation.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@cubetribe
cubetribe merged commit 625877a into main Nov 10, 2026
2 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