Skip to content

Add AI event summary highlights on detail pages#247

Open
chrisballinger wants to merge 5 commits intomasterfrom
ai-event-summary
Open

Add AI event summary highlights on detail pages#247
chrisballinger wants to merge 5 commits intomasterfrom
ai-event-summary

Conversation

@chrisballinger
Copy link
Copy Markdown
Member

Summary

  • Adds AI-generated pro-tip summaries of hosted events on camp, art, and event detail pages
  • Summaries also appear as a header in the "See all N events" list view
  • Uses existing workflow pipeline (retryWithCandidateFiltering + withContextWindowRetry) for graceful handling of guardrail violations and context overflow
  • Loads asynchronously as Phase 3 after hosted events resolve, with a loading spinner placeholder

Test plan

  • Open a camp detail page with hosted events — verify loading spinner then 1-2 sentence highlight appears after "See all N events"
  • Open an art detail page with hosted events — same behavior
  • Open an event detail page with host that has other events — summary appears after host events section
  • Tap "See all N events" — verify summary header appears above the event list
  • Verify no summary cell appears on pre-iOS 26 or when AI is unavailable
  • Verify no crashes when a camp/art has zero events

🤖 Generated with Claude Code

chrisballinger and others added 5 commits April 12, 2026 20:58
Remove hidesBottomBarWhenPushed from detail screens, tracks,
AI guide, recently viewed, and feature flags views for a
consistent Liquid Glass tab bar experience.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Show a concise AI-generated pro-tip summarizing hosted events on camp,
art, and event detail pages, plus the hosted events list view. Uses the
existing workflow pipeline (retryWithCandidateFiltering + withContextWindowRetry)
so summaries work even when individual events trigger guardrails or exceed
the context window.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Instead of regenerating the AI summary, pass it through from the
detail page. Also move the summary into the scrollable list content
so it scrolls away with the rest of the rows.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Split AI summary into Swift-generated schedule tips (factual, from real
occurrence data) and LLM-generated overview (no timing info allowed).
This prevents the on-device model from fabricating event times.

- Schedule tips: group by event name (fixes duplicates), sorted by
  day-of-week, strikethrough for expired (only during festival),
  tappable to navigate to event detail, themed highlight color
- RAM cache (actor-based EventSummaryCache) keyed by host UID
- Model pre-warming at AgentOrchestrator init
- LLM overview: 1-2 sentences, can mention event names, no times/days
- Host camp description passed to LLM for richer context
- Tips show instantly, LLM overview arrives async

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Pass 1 generates the overview with tightened instructions ("only
reference provided data"). Pass 2 validates against the exact source
data (camp description + event names/descriptions) using a separate
LLM session that flags unsupported claims. Swift strips flagged
phrases. If validation fails or strips too much, the overview is
discarded entirely — no unverified text shown.

Each step handles its own retries via withContextWindowRetry /
retryWithCandidateFiltering, matching the pattern used by other
AI workflows.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
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