Skip to content

Add teaser_text support for event cards with fallback + optional AI generation #16

@e-lo

Description

@e-lo

Problem

Event cards currently use description directly (line-clamped), but scraped/source descriptions vary widely in length and quality. We need a dedicated short teaser field for cards while preserving fuller descriptions for detail pages.

Proposal

Add a nullable teaser_text field and use it as the preferred card summary.

Scope

  1. Schema
  • Add nullable teaser_text to events and events_staged.
  • Add length constraint for teaser (e.g. 280-400 chars max).
  • Update public_events view to include teaser_text.
  1. Scraper
  • Populate teaser_text from source teaser fields when available (e.g. listing excerpt / shortdesc).
  • Keep full description for detail/event pages.
  1. App/API/types
  • Update generated DB TS types and API payloads to read/write teaser_text.
  • Ensure staged-event approve flow copies teaser into events.
  1. UI behavior
  • Event cards use teaser_text ?? truncate(description, N) consistently (homepage + event list cards).
  • Event detail pages continue to use full description.
  1. Optional AI phase (phase 2)
  • If teaser is missing and description is long, generate teaser_text with Haiku.
  • Run only for scraper-ingested events or backfill jobs; avoid overriding manual teasers.
  • Optional: add teaser provenance (manual|scraped|ai).

Acceptance Criteria

  • Cards render teaser first, fallback second.
  • Scraper preserves full descriptions while filling teaser when available.
  • Existing records without teaser still render cleanly via fallback.
  • No DB write failures from description/teaser constraints.

Open Decision

Current schema enforces description <= 2000 chars. Decide whether to keep this cap or increase it in the same migration.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions