feat(admin): safe operations, faster management and a problems-first dashboard - #51
Merged
Merged
Conversation
…dashboard Safety: fix the admin 500s (verification code and snapshot search, Redis-down index), drop destructive GET actions, make "Delete all planets" a typed-count POST, make LogEntry immutable with history on, mask the FIO key and never show verification codes, queue every import/refresh as a Celery task, make FIO-sourced and derived models read-only, add an environment badge, the admin path from settings and the full brand theme. Pending planets now hold a 1 h lease, so a dead worker no longer strands them. Management: sidebar and command search, automation status/filters and "Reset & retry", a user support page, User.date_joined, autocomplete and no JSON columns in planning lists, large-table pagination, and summary strips and headers on the main pages. Insight: task health from Celery signals (Redis), AppStatistic WAU and signups, and a cached, fault-isolated dashboard: health chips, headline and engagement tiles, growth and activity charts, feature adoption, top lists, task health and infrastructure. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Up to standards ✅🟢 Issues
|
| Metric | Results |
|---|---|
| Complexity | 335 |
| Duplication | -4 |
🟢 Coverage 94.38% diff coverage · +0.48% coverage variation
Metric Results Coverage variation ✅ +0.48% coverage variation (-1.00%) Diff coverage ✅ 94.38% diff coverage Coverage variation details
Coverable lines Covered lines Coverage Common ancestor commit (7207ec0) 3746 3520 93.97% Head commit (b14f4a8) 4305 (+559) 4066 (+546) 94.45% (+0.48%) Coverage variation is the difference between the coverage for the head and common ancestor commits of the pull request branch:
<coverage of head commit> - <coverage of common ancestor commit>Diff coverage details
Coverable lines Covered lines Diff coverage Pull request (#51) 552 521 94.38% Diff coverage is the percentage of lines that are covered by tests out of the coverable lines that the pull request added or modified:
<covered lines added or modified>/<coverable lines added or modified> * 100%
NEW Get contextual insights on your PRs based on Codacy's metrics, along with PR and Jira context, without leaving GitHub. Enable AI reviewer
TIP This summary will be updated as you push new changes.
…ached-age assignment Creating a user with an email queues a verification code through the user signal; the test now patches that for its whole body, so it passes without a reachable Celery broker (as in CI). The dashboard's cache age no longer assigns inside a conditional expression (Codacy E0601). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
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.
Implements
specs/2026-09-27-admin-ops-dashboard.md(workspace repo). Backend and admin only: no API, serializer or URL change, and there is no paired frontend PR.What changes
Phase 1: safe
.delay().base_site.htmloverride and the conflictingadmin.site.*names are gone.LogEntrycan't be added, edited or deleted, history is on, and every custom action writes oneLogEntry.••••1234) and verification codes are never shown, including in__str__.gamedata_admin_import,gamedata_refresh_single_planet).ADMIN_URL, and the full brand theme ramps.pendingfix: a planet markedpendingnow holds a 1 h lease, so a dead worker no longer strands it.Phase 2: manage
User.date_joined.InfinitePaginatorand dropdown filters.Phase 3: insight
task_prerun/task_postrunreceivers write per-task Redis hashes and daily counters. A Task health page shows each task as Paused, OK, Overdue or Failing, with a 14-day tracker.AppStatistic: gainsusers_active_7dandsignups.?range=7|30|90|365and?refresh=1. Every card is isolated, so a failing card says "unavailable" instead of causing a 500. It shows:Deploy
user/0013,user/0014(date_joined: added nullable, then given its default, so existing users are not backfilled) andanalytics/0007.ADMIN_URL(defaultadmin/),ADMIN_AXIOM_URL(sidebar link),FRONTEND_URL("view on site" for shared plans). Features hide when unset.Verification
ruff check✓,ruff format --check✓,ty check✓,pytest499 passed (was 317),makemigrations --check: no changes.Notes
app_list_badge.htmlis needed because Unfold's lazy badge callback is always truthy.pg_stat_statementsto get the slowest-queries card.🤖 Generated with Claude Code