Skip to content

feat(plugin-multi-tenant): preserve tenant browsing filters - #19361

Draft
JarrodMFlesch wants to merge 1 commit into
mainfrom
codex/preserve-tenant-browsing-filters
Draft

JarrodMFlesch wants to merge 1 commit into
mainfrom
codex/preserve-tenant-browsing-filters

Conversation

@JarrodMFlesch

@JarrodMFlesch JarrodMFlesch commented Nov 4, 2026 •

Copy link
Copy Markdown
Contributor

Preserves the multi-tenant browsing filter when opening documents and moving between collections.

The nav shows the open document's tenant while keeping the saved browsing selection, including All tenants. Returning to a list uses that selection. Selecting a tenant explicitly updates both contexts. Tenant globals open as a list for All tenants, or directly for a selected tenant.

payload-tenant retains the active tenant for existing server integrations and document operations. The new payload-tenant-filter cookie stores the shared browsing filter. Custom server components that summarize a list can read it explicitly:

const browsingTenant = getTenantFromCookie(headers, idType, {
  useTenantFilter: true,
})

Adds an optional BaseFilter.context to distinguish list filtering from document relationship filtering. Covers document drawers, version views, Lexical links and blocks, and access-controlled global redirects.

Validation: 41 unit tests and 7 provider browser component tests pass. Seven global-redirect integration tests pass. All 43 multi-tenant browser cases have passing evidence across the full run and focused reruns; active-cookie persistence, list reloads, explicit switching, and global navigation were checked again after the final contract change. Targeted lint and formatting pass. Full package type-checking is blocked by missing referenced build declarations; production-build and manual assistive-technology verification remain pending.

Remaining draft work:

  • Show the tenant in global list rows and clarify creation when All tenants is selected.
  • Keep the single-tenant visibility and legacy-document assignment fixes in the separate PYLD-4714 work.

The temporary diagnostic component and local demo video are excluded from this PR.

Preview

tenant-cookie-pr-final-take-1.mp4

@coderabbitai

coderabbitai Bot commented Nov 4, 2026

Copy link
Copy Markdown

Important

Draft PR not reviewed

Draft PRs are not automatically reviewed by default.

  • Trigger a manual review

To automatically review draft PRs, update your CodeRabbit configuration:

reviews:
  auto_review:
    drafts: true
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

Share

@github-actions

github-actions Bot commented Nov 4, 2026

Copy link
Copy Markdown
Contributor

📦 esbuild Bundle Analysis for payload

This analysis was generated by esbuild-bundle-analyzer. 🤖
This PR introduced no changes to the esbuild bundle! 🙌

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant