Add weekly idea gallery page with generated images#32
Conversation
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
ℹ️ 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".
| selected_week = st.selectbox("Pick a week to revisit", week_options, index=0) | ||
| week_entries = [entry for entry in gallery_entries if entry["week"] == selected_week] | ||
| week_entries.sort(key=lambda item: parse_date(item.get("created_at", "")), reverse=True) | ||
|
|
||
| for entry in week_entries: |
There was a problem hiding this comment.
Prevent duplicate vote buttons per entry across sections
When a week with recent entries is selected (the default selectbox choice), each entry is rendered first in the “This week's spotlight” loop (lines 185‑188) and again in the week view loop (this block) while render_entry uses a fixed st.button key vote_{entry['id']}. Streamlit requires unique widget keys per page, so the duplicate rendering of the same entry triggers a DuplicateWidgetID exception and stops the page once any idea exists. Consider using distinct keys per section or skipping one section for the currently selected week.
Useful? React with 👍 / 👎.
Summary
Testing
Codex Task