Skip to content

Social card: Chat and Message cards #667

Open

Description

@HMarzban

Part of #663 (slice 5). Needs slice 4 for the heading label.

Goal

The Chat card and the Message card on the fixed conversation panel (R14, R-G, R-H, R-J). Both kinds stay off.

Scope

  • One anon PostgREST read in parallel with the owner read. RLS decides what the anon role can see, so a private channel gives no card. Never the service role.
  • Selected columns only. Chat: the channel and up to 10 live message ids, for the bucketed count. Message: created_at, type, reactions, the reply count and the channel. Never the message text or the author.
  • Guards. An id shape pre-filter, a 60 s memo of definite answers, a cap of 4 reads per replica, and a 300 ms abort. A timeout, an error or a full cap gives the Document card and is never memoized.
  • Chat card. Pad name, the room name as the title, and the base-200 panel with "N messages" (1 to 9, then 10+) and 4 fixed bubbles. No bubble follows data.
  • Message card. The same panel. The date sits in the header. The linked message is lit with the deep-link wash, with its top reaction (no person emoji, R-H) and its reply count, both bucketed.
  • Page head. og:title "Chat: {room} — {pad}". Legacy chat links (act=ch) give the same cardVersion.

Not in this slice

An attachment pill (no noun is ruled). Outline row pills (R-B).

Owed by the maintainer

  • Production REST to Supabase round trip, p95 well under 300 ms for a week before Message turns on.

Acceptance checks

  • A random c makes no read. 10 slow reads give fallback cards within 300 ms.
  • Each card matches its approved r4c PNG.

Activity

  1. added
    enhancement
    on Nov 1, 2026
  2. HMarzban commented on Nov 1, 2026

    @HMarzban
    CollaboratorAuthor

    Built on main and checked locally, not committed yet. Status and the checks owed before switch-on are in #663 (comment of 2026-11-01).

  3. HMarzban commented on Nov 3, 2026

    @HMarzban
    CollaboratorAuthor

    Status, 2026-11-03. The Chat and Message cards and the anon chat read are pushed and deployed on 2026-11-03, in 34116d296. Both kinds are off. Left:

    • maintainer: one week of production REST to Supabase p95, well under 300 ms, before Message turns on. The "Social preview card" dashboard row shows social_card_chat_read_seconds.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Featureenhancement

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions