payloadcms / payloadcms/payload
[plugin-multi-tenant] isGlobal collection nav link flashes list view before redirecting to singleton edit view
Nobody has claimed this yet.
- Dominant language
- TypeScript
- Stars
- 44.8k
- Forks
- 4.2k
- Avg merge
- 2d 21h
- Merged PRs (30d)
- 53
Description
Describe the Bug
When using @payloadcms/plugin-multi-tenant with collections marked isGlobal: true, clicking the collection's entry in the admin sidebar produces a visible flash before landing on the correct page. The list view appears to render briefly, and then the page transitions to the tenant's singleton edit view (/admin/collections/{slug}/{docId}). The final destination is correct — the intermediate paint is the problem.
A few observations about when the flash does and doesn't happen:
- In-app click (flashes): clicking the nav entry from anywhere in the admin shows the brief list-view paint before the edit view loads.
- Right-click → "Open in new tab" (no flash): the URL is resolved from scratch by the server and lands on the edit view cleanly.
- Clicking the nav entry while already on the singleton's edit view: still causes a full browser-tab reload of the CMS — even though the user is already on the correct destination, the click triggers the same intermediate list-view render and the admin reloads.
From a consumer's perspective, every click on an isGlobal collection in the sidebar looks like a reload, including when it's a no-op navigation and our users keep raising this.
Link to the code that reproduces this issue
https://github.com/harmochiky/payload-singleton-nav-flash
Reproduction Steps
- Register a collection with isGlobal: true in the multi-tenant plugin config:
multiTenantPlugin({
collections: {
'my-singleton': { isGlobal: true },
},
})
- Seed one document of that collection per tenant.
- Log in to /admin, select a tenant via the tenant selector.
- Click the singleton collection's entry in the sidebar.
- Observe: the list view paints briefly, then the page jumps to /admin/collections/{slug}/{docId}. This is the flash.
- For contrast: right-click the same nav item → "Open in new tab". No flash — the server redirect handles it cleanly.
Expected: clicking the nav entry navigates directly to the active tenant's document edit view, with no intermediate list-view render.
Actual: list view paints, then redirects to the edit view.
Which area(s) are affected?
plugin: multi-tenant
Environment Info
Binaries:
Node: 22.22.0
npm: 10.9.4
Yarn: 1.22.22
pnpm: 10.30.1
Relevant Packages:
payload: 3.84.1
next: 15.4.11
@payloadcms/db-mongodb: 3.84.1
@payloadcms/graphql: 3.84.1
@payloadcms/next/utilities: 3.84.1
@payloadcms/plugin-multi-tenant: 3.84.1
@payloadcms/richtext-lexical: 3.84.1
@payloadcms/translations: 3.84.1
@payloadcms/ui/shared: 3.84.1
react: 19.1.0
react-dom: 19.1.0
Operating System:
Platform: linux
Arch: x64
Version: #1 SMP PREEMPT_DYNAMIC Thu Jun 5 18:30:46 UTC 2025
Available memory (MB): 19812
Available CPU cores: 20
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reproducing the issue with @payloadcms/plugin-multi-tenant and an isGlobal collection, then trace the admin sidebar navigation and the tenant document redirect. Verify the behavior from the provided reproduction repository and confirm that clicking the entry reaches the singleton edit view without an intermediate list-view paint or unnecessary reload.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- nextjs, react, typescript
- Domain
- frontend
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Quiet
- Clarity
- Mostly clear
- Newbie friendliness
- 52/100