Atmosphere triptych — 3 curated picks with variety engine - #76
Merged
Conversation
Replaces single-recommendation Atmosphere modal with a 3-card triptych: Backend: - New ATMOSPHERE_PROMPT requesting 3 ranked picks with lateral-thinking guidance - Recommendation history file (atmosphere_history.json) tracking picks over time - Inverse-frequency weighted pre-filter samples ~20 candidates, avoiding repeats - random.shuffle() eliminates insertion-order bias in LLM context - temperature 0.9 and max_tokens 600 for atmosphere calls only - Fallback padding ensures 3 recommendations even if LLM returns fewer Frontend: - 3-card triptych layout (820px max-width, responsive stack at <=600px) - First card marked Curators pick with accent top-border - Staggered reveal animation (150ms intervals) - Each card: thumbnail, wiki-linked title, curator note, vibe pills, Display button - Explored N of M counter below cards - atmosphereRetry() excludes all 3 picks at once - localStorage persistence with 24h TTL for exclusion list - closeAtmosphere() no longer clears exclusions Tests: - Updated test_full_pipeline for 3-recommendation response schema - New test_fallback_padding and test_history_persistence - Updated XSS test for safeTitle variable in pick cards Closes #65
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: fb607cc0a7
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
Track used_ids during LLM result parsing to skip duplicate content_ids before the padding step. Prevents duplicate cards when the model returns the same artwork more than once. Adds test_dedup_repeated_ids to verify 3 unique picks are returned even when the LLM repeats an ID.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Replaces the single-recommendation Atmosphere modal with a 3-card triptych layout. Closes #65.
What changed
Backend (
server.py)ATMOSPHERE_PROMPTto request 3 ranked picks with lateral-thinking guidanceatmosphere_history.json) tracking picks over timerandom.shuffle()eliminates insertion-order bias in LLM contexttemperature: 0.9andmax_tokens: 600for atmosphere calls onlyFrontend (
index.html)atmosphereRetry()excludes all 3 picks at oncecloseAtmosphere()no longer clears exclusions — reopening continues where you left offTests
test_full_pipelinefor 3-recommendation response schematest_fallback_padding— LLM returns 1 valid pick, response padded to 3test_history_persistence— verifies history file accumulates across callssafeTitlevariable in pick cardsAll 122 tests pass (6 xfailed).