Skip to content

[audit] ModelAdmin.get_urls() custom views open as a same-window popout, not a SPA route #623

Description

@MartinCastroAlvarez

Adoption pain point

The wire contract surfaces `CustomView` (`frontend/packages/api/src/contract.ts:60-78`, #439), but the SPA renders them as plain `` links to the Django-rendered HTML pages. A consumer who has wired custom views via the canonical `ModelAdmin.get_urls()` extension point — and every nontrivial admin has at least one ("Approve report", "Run reconciliation", "Export to CSV", "Set password", "View raw payload") — gets a popout into a context-less Django page outside the SPA.

That breaks the single-page UX promise for the very pattern Django shops use most for custom workflows: there's no shared header, no breadcrumb, no return-to-detail link, no SPA navigation back.

What stock Django gets

The HTML admin gives the custom view full `each_context` integration, breadcrumbs, the same site header, and same-window navigation. The SPA's popout strips all of that.

Suggested fix

Two options, neither blocks the other:

A. Iframe wrap inside a SPA route — keep the custom view's HTML rendering as-is, but display it inside an iframe in a SPA `/admin-react////tool//` route so the SPA chrome / breadcrumb / sidebar stay visible.

B. Document the popout — explicit "Stock-Django extension points that DO NOT carry through to the SPA" table in the README so consumers don't ship a release where every "Reprocess" button suddenly behaves differently.

A is the right long-term answer; B unblocks adoption today.

Filed by

Audit triage 2026-05-30.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions