Skip to content

Paginate enrolled users and stage changes across pages - #46

Merged
michal-granec merged 5 commits into
masterfrom
feature/paginated-rollout-users
Oct 15, 2026
Merged

michal-granec merged 5 commits into
masterfrom
feature/paginated-rollout-users

Conversation

@michal-granec

@michal-granec michal-granec commented Oct 14, 2026 •

Copy link
Copy Markdown
Contributor

Stack

Depends on #45. This PR targets fix/rollout-form-conflicts so review shows only pagination changes. Merge #45 first, then retarget this PR to master.

The companion web cache-isolation change is https://github.com/fetlife/web/pull/46518. Local integration uses that checkout with a path dependency on this gem; no machine-specific paths or local setup files are committed.

Summary

  • Replace the 150-user count-only cutoff and chip wall with an enrollment table. Fixed 25 rows per page, stable user-ID ordering and visible total/page ranges.
  • Keep description, groups and percentage in the same form. AJAX page changes preserve those drafts and pending additions/removals; one Update saves everything.
  • Stage Remove/Undo and nickname additions across pages, with a pending-changes summary and user-only Discard action. Missing accounts remain rows and IDs are never silently dropped.
  • Resolve nicknames only for the visible enrollment page; the separate history lookup remains bounded. Add mount-aware paginated enrollment and feature-scoped nickname-search endpoints, with no-store responses and off-page enrolled flags.
  • Submit deltas, not a replacement list from the visible page. Apply them to full mutation state only after fingerprint validation. Delta requests require a valid marker and fingerprint; reject malformed IDs/markers without writes. Legacy scalar full-list submissions remain supported.
  • Preserve ID-based add and visible-row checkbox removal without JavaScript. The fallback explicitly asks users to Update before following page links.
  • Keep keyboard focus through Remove/Undo, announce loaded pages, skip disabled search options, and preserve drafts/original token on failed or stale requests.
  • Run test CI on pull requests to stacked branches as well as master.

Verification

  • bundle exec rspec --format progress: 119 examples, 0 failures.
  • Randomized suite, seed 37181: 119 examples, 0 failures.
  • JavaScript syntax, workflow YAML parsing, staged diff whitespace checks: passed.
  • Gem build succeeded; pagination JavaScript and partial are included in the package.
  • 32 local browser checks passed for cross-page deltas, all other form fields, unknown users, keyboard/focus behavior, fixed page sizing, request failures, stale-token preservation, DOM escaping, and no-JavaScript editing.
  • 17 real fetlife-web development/ActiveRecord integration checks passed using the local gem, including all-field saves, preserved 151-user membership, page-aware redirects, malformed/stale request rejection, and unchanged global search contract.
  • Independent correctness and interaction reviews were re-run after fixes; no confirmed findings remain. Correctness review additionally verified 22 invalid/stale cases preserve full state, history and write counts.

Limits

No adapter/schema/dependency changes or gem release. Atomic mutation protection still depends on the adapter (AR locks existing rows; Redis gains no new CAS semantics). Paging bounds nickname resolution and rendered rows, not the underlying adapter's full feature-state read. No-JavaScript page links require saving pending changes first.

@michal-granec
michal-granec requested a balanced review from Copilot October 15, 2026 10:35

Copilot AI 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.

Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.

An organization owner can choose the repository organization as the billing source for reviews requested by members with a paid Copilot license. Learn about Copilot code review billing.

@michal-granec
michal-granec changed the base branch from fix/rollout-form-conflicts to master October 15, 2026 10:59
@michal-granec
michal-granec merged commit 746160a into master Oct 15, 2026
1 check passed
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