Skip to content

Redesign the moderation extensions view as a filterable, searchable list - #323

Merged
admdly merged 4 commits into
mainfrom
moderator-extensions-list
Sep 4, 2026
Merged

Redesign the moderation extensions view as a filterable, searchable list#323
admdly merged 4 commits into
mainfrom
moderator-extensions-list

Conversation

@admdly

@admdly admdly commented Sep 4, 2026

Copy link
Copy Markdown
Contributor

What

Replaces the old id-typing "View an extension" / "Delist a published extension" forms on /account/moderate with a single list of every extension:

  • Filterable by status (published / delisted / never published / all) — defaults to published, since that's what a moderator checks most often.
  • Searchable by id (case-insensitive substring match).
  • Each row links straight to its detail page and, when eligible, has an inline Delist button that opens the existing confirmation dialog pre-filled — no id-typing required.
  • Real Previous/Next pagination (a cursor back-stack, not just Next) on both this list and the revision queue below it.

Requires FOSSBilling/api#216 (GET /moderation/all-extensions), which this PR's generated client is already regenerated against.

Replaces the old id-typing "View an extension" / "Delist a published
extension" forms with a single list of every extension, filterable by
status (defaults to published), searchable by id, with a Delist button
inline on each eligible row. Also adds real Previous/Next pagination
(a cursor back-stack, not just Next) to both this list and the
revision queue.

Backed by FOSSBilling/api#216's new GET /moderation/all-extensions.
@cloudflare-workers-and-pages

cloudflare-workers-and-pages Bot commented Sep 4, 2026

Copy link
Copy Markdown

Deploying with  Cloudflare Workers  Cloudflare Workers

The latest updates on your project. Learn more about integrating Git with Workers.

Status Name Latest Commit Preview URL Updated (UTC)
✅ Deployment successful!
View logs
extensions f84e164 Commit Preview URL

Branch Preview URL
Sep 04 2026, 09:50 PM

@admdly admdly self-assigned this Sep 4, 2026

@cubic-dev-ai cubic-dev-ai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

All reported issues were addressed across 8 files

Reply with feedback, questions, or to request a fix.

Re-trigger cubic

Comment thread src/pages/account/moderate/index.astro
Comment thread src/lib/pagination.ts
…input

The back-stack query param grew without bound over a long paging
session; now caps at 20 entries, dropping the oldest first (Previous
beyond that depth is a worse trade-off than an unbounded URL).

Also gives the search input name="q" so a no-JS form submission still
lands on the same query param the page reads, instead of being
silently dropped.

@cubic-dev-ai cubic-dev-ai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

All reported issues were addressed across 3 files (changes from recent commits).

Reply with feedback, questions, or to request a fix.

Re-trigger cubic

Comment thread src/lib/pagination.ts
…ence

Capping doesn't stop Previous from reaching page 1 - it still gets
there via the same empty-stack fallback that page 2 uses. What
actually happens once an entry has been evicted is that walking all
the way back skips the page whose cursor was dropped, landing on page
1 one step early. Corrected the comment to say that, and added a test
that pins the accepted trade-off explicitly.

@cubic-dev-ai cubic-dev-ai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

All reported issues were addressed across 2 files (changes from recent commits).

Tip: Review your code locally with the cubic CLI to iterate faster.

Re-trigger cubic

Comment thread test/extensions-api.test.ts
The previous version of this test used cursor=page-3 with an empty
back-stack, which is the same generic empty-stack fallback already
covered by the "pops the back-stack" test - it never built a capped
20-entry stack, so it added no coverage of the eviction trade-off it
claimed to pin.

Reproduce the exact state cursorPageUrl leaves behind once the stack
is capped (page-0's cursor evicted, cursors holds page-1..page-20),
walk Previous back through all 20 entries verifying each lands on the
expected page, then confirm the final step from page-1 skips straight
to the first page instead of stopping on the evicted page-0.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01TSwWn5bB9QZYq75vusX95f

@cubic-dev-ai cubic-dev-ai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

0 issues found across 1 file (changes from recent commits).

Auto-approved: Adds a filterable/searchable list view for moderation extensions with back-stack pagination, plus a new client API call. Bounded UI improvement with tests; no changes to auth or data policy.

Re-trigger cubic

@admdly
admdly merged commit 6113b2b into main Sep 4, 2026
9 checks passed
@admdly
admdly deleted the moderator-extensions-list branch September 4, 2026 21:53
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.

1 participant