Skip to content

🎨 Improved author selection performance on sites with many staff users#29044

Merged
kevinansfield merged 1 commit into
mainfrom
ber-3760-paginated-authors-input
Jul 13, 2026
Merged

🎨 Improved author selection performance on sites with many staff users#29044
kevinansfield merged 1 commit into
mainfrom
ber-3760-paginated-authors-input

Conversation

@kevinansfield

@kevinansfield kevinansfield commented Jul 2, 2026

Copy link
Copy Markdown
Member

ref https://linear.app/ghost/issue/BER-3760/admin-is-inefficient-on-sites-with-large-numbers-of-staff

On sites with very large staff lists, Admin fetched every user up-front to populate author dropdowns — with 18k+ staff that meant 180+ API requests before the post settings menu or the posts screen were usable.

  • extracted the tags input's paginate-on-scroll + server-side search behaviour into an abstract GhPaginatedOptions component: options load a page at a time when the dropdown opens, search queries the API until every option has been loaded, then switches to client-side filtering
  • added two components on that base: a multi-select GhPaginatedTokenInput and a single-select GhPaginatedFilterSelect
  • rebuilt the post settings menu authors input and the tags input on GhPaginatedTokenInput, so authors load a page at a time and searching queries the API across name, slug, and email
  • rebuilt the posts/pages screens' author and tag filters on GhPaginatedFilterSelect, replacing the eager all-users fetch and the bespoke tag pagination logic that lived in the posts controller; deep-linked ?author= filters now resolve with a single by-slug lookup
  • consolidated the NQL search-term escaping that was duplicated across tags, labels, and resource-select searches into a shared escapeNqlString util

@nx-cloud

nx-cloud Bot commented Jul 2, 2026

Copy link
Copy Markdown

🤖 Nx Cloud AI Fix

Ensure the fix-ci command is configured to always run in your CI pipeline to get automatic fixes in future runs. For more information, please see https://nx.dev/ci/features/self-healing-ci


View your CI Pipeline Execution ↗ for commit d815234

Command Status Duration Result
nx run ghost-admin:test ✅ Succeeded 3m 5s View ↗
nx run @tryghost/admin:build ✅ Succeeded 1m 59s View ↗
nx run ghost-monorepo:lint:boundaries ✅ Succeeded <1s View ↗
nx run-many -t lint -p ghost-admin ✅ Succeeded 13s View ↗
nx run ghost:build:assets ✅ Succeeded 1s View ↗
nx run ghost:build:tsc ✅ Succeeded 8s View ↗
nx run-many --target=build --projects=tag:publi... ✅ Succeeded <1s View ↗

💡 Verify your cache is correct by running tasks in a sandbox. Read docs ↗


☁️ Nx Cloud last updated this comment at 2026-07-13 17:22:38 UTC

Comment thread ghost/admin/app/utils/escape-nql-string.js Fixed
@coderabbitai

coderabbitai Bot commented Jul 2, 2026

Copy link
Copy Markdown
Contributor

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

Run ID: 949c8e7f-a960-475c-bd90-8c22ad5d7732

📥 Commits

Reviewing files that changed from the base of the PR and between e1374bd and 43895a3.

📒 Files selected for processing (1)
  • ghost/admin/app/utils/escape-nql-string.js
👮 Files not reviewed due to content moderation or server errors (1)
  • ghost/admin/app/utils/escape-nql-string.js

Warning

Walkthrough skipped

File diffs could not be summarized.

✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch ber-3760-paginated-authors-input

Comment @coderabbitai help to get the list of available commands.

ref https://linear.app/ghost/issue/BER-3760/admin-is-inefficient-on-sites-with-large-numbers-of-staff

- on sites with very large staff lists, Admin fetched every user up-front to populate author dropdowns — with 18k+ staff that meant 180+ API requests before the post settings menu or the posts screen were usable
- extracted the tags input's paginate-on-scroll + server-side search behaviour into an abstract `GhPaginatedOptions` component: options load a page at a time when the dropdown opens, search queries the API until every option has been loaded, then switches to client-side filtering
- added two components on that base: a multi-select `GhPaginatedTokenInput` and a single-select `GhPaginatedFilterSelect`
- rebuilt the post settings menu authors input and the tags input on `GhPaginatedTokenInput`, so authors load a page at a time and searching queries the API across name, slug, and email
- rebuilt the posts/pages screens' author and tag filters on `GhPaginatedFilterSelect`, replacing the eager all-users fetch and the bespoke tag pagination logic that lived in the posts controller; deep-linked `?author=` filters now resolve with a single by-slug lookup
- consolidated the NQL search-term escaping that was duplicated across tags, labels, and resource-select searches into a shared `escapeNqlString` util
@kevinansfield
kevinansfield force-pushed the ber-3760-paginated-authors-input branch from 43895a3 to d815234 Compare July 13, 2026 17:17
@kevinansfield
kevinansfield enabled auto-merge (squash) July 13, 2026 17:18
@kevinansfield
kevinansfield merged commit 9c3e04b into main Jul 13, 2026
43 checks passed
@kevinansfield
kevinansfield deleted the ber-3760-paginated-authors-input branch July 13, 2026 17:32
vershwal pushed a commit that referenced this pull request Jul 13, 2026
#29044)

closes https://linear.app/ghost/issue/BER-3760/

On sites with very large staff lists, Admin fetched every user up-front
to populate author dropdowns — with 18k+ staff that meant 180+ API
requests before the post settings menu or the posts screen were usable.

- extracted the tags input's paginate-on-scroll + server-side search
behaviour into an abstract `GhPaginatedOptions` component: options load
a page at a time when the dropdown opens, search queries the API until
every option has been loaded, then switches to client-side filtering
- added two components on that base: a multi-select
`GhPaginatedTokenInput` and a single-select `GhPaginatedFilterSelect`
- rebuilt the post settings menu authors input and the tags input on
`GhPaginatedTokenInput`, so authors load a page at a time and searching
queries the API across name, slug, and email
- rebuilt the posts/pages screens' author and tag filters on
`GhPaginatedFilterSelect`, replacing the eager all-users fetch and the
bespoke tag pagination logic that lived in the posts controller;
deep-linked `?author=` filters now resolve with a single by-slug lookup
- consolidated the NQL search-term escaping that was duplicated across
tags, labels, and resource-select searches into a shared
`escapeNqlString` util
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants