feat: add pretalx override system for JIT talk management#30
feat: add pretalx override system for JIT talk management#30JacobCoffee merged 9 commits intomainfrom
Conversation
|
You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard. |
|
Not sure what this came up with yet, but ideally theres a dropdown of active talks, activities, etc. and we select this / search this with fuzzy search, then patch based off of that so that future pretalx syncs dont mess anyhting up |
There was a problem hiding this comment.
Pull request overview
Adds a local override/defaulting layer on top of synced Pretalx talk data, plus management-dashboard CRUD screens, so organizers can patch schedules (cancel/move/reschedule) and auto-assign room/times for unscheduled submission types after each sync.
Changes:
- Introduces
TalkOverrideandSubmissionTypeDefaultmodels (+ migration) for post-sync patching/default assignment. - Integrates override/default application into
PretalxSyncService.sync_all()viaapply_overrides()/apply_type_defaults(). - Adds management dashboard views/templates and routes under
/<conference>/overrides/for CRUD.
Reviewed changes
Copilot reviewed 11 out of 11 changed files in this pull request and generated 5 comments.
Show a summary per file
| File | Description |
|---|---|
src/django_program/pretalx/sync.py |
Applies overrides and submission-type defaults after Pretalx sync; extends sync_all() result metadata. |
src/django_program/pretalx/models.py |
Adds new override/default models and a TalkOverride.apply() helper. |
src/django_program/pretalx/migrations/0006_talkoverride_submissiontypedefault.py |
Creates DB tables for overrides and type defaults. |
src/django_program/manage/views_overrides.py |
Adds management CRUD views for overrides and type defaults. |
src/django_program/manage/forms_overrides.py |
Adds ModelForms for the new CRUD views with conference-scoped querysets. |
src/django_program/manage/urls_overrides.py |
Defines management URL routes for overrides/type-defaults. |
src/django_program/manage/urls.py |
Mounts the overrides URL module under /<conference>/overrides/. |
src/django_program/manage/templates/django_program/manage/*.html |
Adds list/form templates for overrides and type defaults. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
|
Missing sidebar in manage/ |
eff2a66 to
753a222
Compare
|
a lot of duplication and opportunities to optimize.. and too much inline css just everywhere, along with CDN links. but it's good enough for now. can fix later |
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 32 out of 32 changed files in this pull request and generated 9 comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
src/django_program/manage/templates/django_program/manage/override_form.html
Outdated
Show resolved
Hide resolved
src/django_program/manage/templates/django_program/manage/speaker_override_form.html
Outdated
Show resolved
Hide resolved
src/django_program/manage/templates/django_program/manage/room_override_form.html
Outdated
Show resolved
Hide resolved
src/django_program/manage/templates/django_program/manage/sponsor_override_form.html
Outdated
Show resolved
Hide resolved
753a222 to
6788a62
Compare
6788a62 to
ff3732d
Compare
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 33 out of 33 changed files in this pull request and generated no new comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
ff3732d to
31fdef7
Compare
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
… global capacity Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
31fdef7 to
65c1ebd
Compare
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 33 out of 33 changed files in this pull request and generated 6 comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
src/django_program/manage/templates/django_program/manage/override_form.html
Outdated
Show resolved
Hide resolved
…ride_form.html Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 33 out of 33 changed files in this pull request and generated 3 comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
…and widget Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 34 out of 34 changed files in this pull request and generated 4 comments.
Comments suppressed due to low confidence (1)
src/django_program/pretalx/models.py:200
- The PR description states "overrides are resolved at the view/template layer via
effective_*properties", but a search across all templates shows no usage of these properties. The management UI templates access entity properties directly (e.g.,talk.title,speaker.name) without using theeffective_*accessors. This means the override system may not actually be working in the frontend—users will see the synced data, not the overridden values. Either update templates to useeffective_*properties throughout, or clarify the intended usage pattern.
def __str__(self) -> str:
return self.name
@property
def effective_name(self) -> str:
"""Return the overridden value if set, otherwise the synced value."""
try:
o = self.override
if o.override_name:
return o.override_name
except SpeakerOverride.DoesNotExist:
pass
return self.name
@property
def effective_biography(self) -> str:
"""Return the overridden value if set, otherwise the synced value."""
try:
o = self.override
if o.override_biography:
return o.override_biography
except SpeakerOverride.DoesNotExist:
pass
return self.biography
@property
def effective_avatar_url(self) -> str:
"""Return the overridden value if set, otherwise the synced value."""
try:
o = self.override
if o.override_avatar_url:
return o.override_avatar_url
except SpeakerOverride.DoesNotExist:
pass
return self.avatar_url
@property
def effective_email(self) -> str:
"""Return the overridden value if set, otherwise the synced value."""
try:
o = self.override
if o.override_email:
return o.override_email
except SpeakerOverride.DoesNotExist:
pass
return self.email
class Talk(models.Model):
"""A talk submission synced from the Pretalx API.
Represents a conference submission (talk, tutorial, workshop, etc.) with its
scheduling details. Speakers are linked via a many-to-many relationship since
a talk can have multiple presenters.
"""
conference = models.ForeignKey(
"program_conference.Conference",
on_delete=models.CASCADE,
related_name="talks",
)
pretalx_code = models.CharField(max_length=100)
title = models.CharField(max_length=500)
abstract = models.TextField(blank=True, default="")
description = models.TextField(blank=True, default="")
submission_type = models.CharField(max_length=200, blank=True, default="")
track = models.CharField(max_length=200, blank=True, default="")
tags = models.JSONField(blank=True, default=list)
duration = models.PositiveIntegerField(null=True, blank=True)
state = models.CharField(max_length=50, blank=True, default="")
speakers = models.ManyToManyField(
Speaker,
related_name="talks",
blank=True,
)
room = models.ForeignKey(
Room,
on_delete=models.SET_NULL,
null=True,
blank=True,
related_name="talks",
)
slot_start = models.DateTimeField(null=True, blank=True)
slot_end = models.DateTimeField(null=True, blank=True)
synced_at = models.DateTimeField(null=True, blank=True)
created_at = models.DateTimeField(auto_now_add=True)
updated_at = models.DateTimeField(auto_now=True)
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Summary
TalkOverrideto also cover Speakers, Rooms, and Sponsorseffective_*properties instead of mutating during syncAbstractOverridebase class for shared metadata (note, created_by, timestamps, conference FK, save/clean logic)select_related("override")to entity views to prevent N+1 queriesChanges
SpeakerOverride,RoomOverride(pretalx app),SponsorOverride(sponsors app),AbstractOverridebase class,effective_*properties on Talk/Speaker/Room/Sponsorapply_overrides()from sync pipeline — overrides are no longer applied during syncSpeakerOverrideAdmin,RoomOverrideAdmin,SponsorOverrideAdminTest plan
uv run pytest— all 1313 tests passuv run coverage report --fail-under=100— 100% coveragemakemigrations --check— no missing migrationseffective_*properties fall back to synced value when no override exists🤖 Generated with Claude Code