Skip to content

feat: add pretalx override system for JIT talk management#30

Merged
JacobCoffee merged 9 commits intomainfrom
feat/pretalx-overrides
Feb 14, 2026
Merged

feat: add pretalx override system for JIT talk management#30
JacobCoffee merged 9 commits intomainfrom
feat/pretalx-overrides

Conversation

@JacobCoffee
Copy link
Owner

@JacobCoffee JacobCoffee commented Feb 14, 2026

Summary

  • Expands the override system from just TalkOverride to also cover Speakers, Rooms, and Sponsors
  • Changes architecture: synced data stays pristine — overrides are resolved at the view/template layer via effective_* properties instead of mutating during sync
  • Adds AbstractOverride base class for shared metadata (note, created_by, timestamps, conference FK, save/clean logic)
  • Adds management UI with CRUD views for all override types, expandable sidebar sub-nav, and auto-delete-empty behavior
  • Adds select_related("override") to entity views to prevent N+1 queries
  • 100% test coverage

Changes

Area Details
Models SpeakerOverride, RoomOverride (pretalx app), SponsorOverride (sponsors app), AbstractOverride base class, effective_* properties on Talk/Speaker/Room/Sponsor
Sync Removed apply_overrides() from sync pipeline — overrides are no longer applied during sync
Views 9 new CRUD views (list/create/edit × 3 entity types), query param pre-population, auto-delete empty overrides
Templates 6 new override templates, expandable sidebar sub-nav, override buttons on entity list pages
Admin Registered SpeakerOverrideAdmin, RoomOverrideAdmin, SponsorOverrideAdmin
Tests Model tests, effective property tests, view CRUD tests, URL resolution tests

Test plan

  • uv run pytest — all 1313 tests pass
  • uv run coverage report --fail-under=100 — 100% coverage
  • makemigrations --check — no missing migrations
  • Override CRUD for all entity types (create, edit, auto-delete empty)
  • effective_* properties fall back to synced value when no override exists
  • Synced data remains pristine after sync (no mutation)

🤖 Generated with Claude Code

Copilot AI review requested due to automatic review settings February 14, 2026 01:12
@chatgpt-codex-connector
Copy link

You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard.

@JacobCoffee
Copy link
Owner Author

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

Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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 TalkOverride and SubmissionTypeDefault models (+ migration) for post-sync patching/default assignment.
  • Integrates override/default application into PretalxSyncService.sync_all() via apply_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.

@JacobCoffee
Copy link
Owner Author

Missing sidebar in manage/

Copilot AI review requested due to automatic review settings February 14, 2026 02:27
@JacobCoffee JacobCoffee force-pushed the feat/pretalx-overrides branch from eff2a66 to 753a222 Compare February 14, 2026 02:31
@JacobCoffee
Copy link
Owner Author

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

Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

@JacobCoffee JacobCoffee force-pushed the feat/pretalx-overrides branch from 753a222 to 6788a62 Compare February 14, 2026 02:35
Copilot AI review requested due to automatic review settings February 14, 2026 03:02
@JacobCoffee JacobCoffee force-pushed the feat/pretalx-overrides branch from 6788a62 to ff3732d Compare February 14, 2026 03:02
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

@JacobCoffee JacobCoffee force-pushed the feat/pretalx-overrides branch from ff3732d to 31fdef7 Compare February 14, 2026 04:46
JacobCoffee and others added 5 commits February 13, 2026 22:49
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>
Copilot AI review requested due to automatic review settings February 14, 2026 04:50
@JacobCoffee JacobCoffee force-pushed the feat/pretalx-overrides branch from 31fdef7 to 65c1ebd Compare February 14, 2026 04:50
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

…ride_form.html

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Copilot AI review requested due to automatic review settings February 14, 2026 05:03
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

JacobCoffee and others added 2 commits February 13, 2026 23:14
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
…and widget

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Copilot AI review requested due to automatic review settings February 14, 2026 05:22
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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 the effective_* 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 use effective_* 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>
@JacobCoffee JacobCoffee merged commit e630381 into main Feb 14, 2026
16 checks passed
@JacobCoffee JacobCoffee deleted the feat/pretalx-overrides branch February 14, 2026 05:51
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