Skip to content

feat(config): allow iframe embedding from trusted domains - #15

Merged
dinesh-git17 merged 7 commits into
mainfrom
dev
Jan 8, 2026
Merged

feat(config): allow iframe embedding from trusted domains#15
dinesh-git17 merged 7 commits into
mainfrom
dev

Conversation

@dinesh-git17

Copy link
Copy Markdown
Owner

Summary

  • Replace X-Frame-Options: DENY with CSP frame-ancestors directive
  • Enable iframe embedding from dineshd.dev, subdomains, and localhost dev servers
  • More flexible and modern approach to frame control

Test plan

  • Verify app loads normally without iframe
  • Test embedding in allowed origins (dineshd.dev, localhost:3000/3001)
  • Confirm embedding blocked from unauthorized domains

Judge Analysis:
- Add Redis-backed judge-store.ts for persistent quick score and analysis caching
- Round all scores to whole percentages (no decimals)
- Add two-tier loading: quick scores first, then full analysis
- Preload judge analysis in background when debate completes

Summary Page:
- Persist reveal models state in localStorage across navigation
- Add "How this works" help modal explaining scoring categories
- Match help icon style with evidence review section

Misc:
- Update judge API route for async cache checks
- Add QuickScore type and progressive loading states
Caching:
- Add jury-store.ts with Redis/Upstash persistence (7-day TTL)
- AES-256-GCM encryption matching judge-store pattern
- Update jury-service to use persistent cache instead of in-memory Map
- Make isDeliberationCached async for proper cache checks

UI Improvements:
- Replace raw deliberation log with human-readable "Juror Conclusion" panel
- Add deliberationSummary field to ArbiterResolution type
- Update arbiter prompt to generate plain-language bullet points
- No internal claim IDs, no emojis, formal arbiter tone
- Delete unused deliberation-log.tsx component
- Remove buildDeliberationPrompt and DELIBERATION_SYSTEM_PROMPT from jury-prompts
- Replace runDeliberation with lightweight identifyDisagreements function
- Arbiter now handles resolution directly without intermediate deliberation API calls
- Add botid package for bot detection
API Cost Optimization:
- Switch moderator to Gemini 2.0 Flash (from GPT-5.1)
- Use Gemini 2.0 Flash for topic classification
- Use Gemini 2.0 Flash-Lite for topic polish
- Use GPT-5-mini for rule validation

Provider Updates:
- Add 'gemini' to TurnProvider type
- Add gemini to getDebateProvider factory
- Update llm-service to handle gemini provider

Prompt Redesigns (Gemini-optimized):
- Intro: Apple keynote + friction/escalation structure
- Transition: UFC commentator energy with spotlight phrases
- Summary: Cinematic podcast finale with heat indicators

All prompts include explicit Gemini formatting rules for proper line breaks
- Change judge full analysis model for ~98% cost reduction
- Both quick score and full analysis now use same lightweight model
- Quality remains close to baseline (30pt vs 55pt deviation)
- Estimated savings: ~$0.02 per judge call
- Switch claim extraction to cost-efficient mini model
- Switch arbiter resolution to Gemini Flash
- ~98% cost reduction on jury deliberation
- Faster response times (no reasoning overhead)
Replace X-Frame-Options with CSP frame-ancestors directive to enable
embedding from dineshd.dev and localhost development servers.
@vercel

vercel Bot commented Jan 8, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Review Updated (UTC)
llm-debate-arena Ready Ready Preview, Comment Jan 8, 2026 6:18pm

@dinesh-git17
dinesh-git17 merged commit b12886e into main Jan 8, 2026
14 checks passed
@github-actions

github-actions Bot commented Jan 8, 2026

Copy link
Copy Markdown

🚀 Preview Deployment

Name Status URL
Preview ✅ Ready Visit Preview

Deployed with commit e96928e

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