fix(tasks): use autocomplete for creator in loop admin - #73067
Merged
Conversation
|
😎 This pull request was merged. |
charlesvien
marked this pull request as ready for review
July 23, 2026 05:18
Contributor
|
Reviews (1): Last reviewed commit: "add creator autocomplete to loop admin" | Re-trigger Greptile |
There was a problem hiding this comment.
Trivial one-line Django admin autocomplete fix by an owning-team author with strong familiarity; no risky territory, no outstanding concerns.
- Author wrote 100% of the modified lines and has 11 merged PRs in these paths (familiarity STRONG).
- 👍 on the PR from greptile-apps[bot], hex-security-app[bot].
Gate mechanics and policy version
| Gate | Result | |
|---|---|---|
| prerequisites | ✓ | all clear |
| deny-list | ✓ | no deny categories matched |
| size | ✓ | 2L, 1F substantive — within ceiling |
| tier | ✓ | T1-agent / T1a-trivial (2L, 1F, single-area, fix) |
| stamphog 2.0.0b3 | .stamphog/policy.yml @ 54df693 · reviewed head 6c5f33e |
charlesvien
enabled auto-merge (squash)
July 23, 2026 05:29
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.
Problem
Opening a Loop's change page in Django admin never finishes loading.
LoopAdminconfigures widgets forteam,created_byandsandbox_environment, but thecreatorFK (added alongside the admin in #70604) was never listed inautocomplete_fields,raw_id_fieldsorreadonly_fields.Django falls back to a plain
<select>for it, which queries every row ofposthog_userand renders each one as an<option>, so the page hangs on any install with a real user table.Changes
Adds
creatortoautocomplete_fieldsonLoopAdmin, matching howcreated_by(same target model) is already handled.Kept it editable rather than readonly so an admin can repair a creator nulled out by
SET_NULLafter a user deletion.How did you test this code?
I (or, actually Claude) verified
UserAdmindefines thesearch_fieldsthat autocomplete requires and ranmanage.py check --tag admin, which passes with no issues.No manual load of a production admin page was done.
No test added: a one-line admin widget config isn't a realistic regression target beyond Django's own system checks.
👉 Stay up-to-date with PostHog coding conventions for a smoother review.
Automatic notifications
Docs update
N/A, internal admin only.
🤖 Agent context
Autonomy: Human-driven (agent-assisted)
Diagnosed and authored with Claude Code.
Starting from a report that the Loop admin page loads forever, Claude enumerated the FKs on
Loop, foundcreatorwas the only one without a widget config and confirmed via git history that it shipped in the same PR asLoopAdmin.Considered making
creatorreadonly since the model treats it as immutable, but chose autocomplete so support can still fix a nulled creator.No skills were invoked.