(this is generated w/ help from Claude based on the expectations I've given it, super detailed so copilot or other models can have the correct context for the change)
Feature flag detail & list operations remain performant with large (~20k) lists
Context
Feature flags whose inclusion/exclusion lists contain tens of thousands of members previously made the detail page, list edits, and enable/disable toggles slow or unusable. This branch makes those paths lightweight. This story validates the behavior and guards against regressions.
Test data / preconditions
- A feature flag (FLAG-BIG) with one inclusion list and one exclusion list, each with ~20,000 individual members.
- A feature flag (FLAG-SMALL) with small lists (a few members each) for baseline/parity checks.
- A flag with a segment-type list and a group-type list (to cover all list types).
- Browser devtools open (Network tab) for payload/timing checks.
AC1 — Detail page loads quickly for large lists
AC2 — CRUD on lists is quick
AC3 — No duplicate requests / server overload
AC4 — Enable/disable is lightweight
AC5 — UI parity (only the tooltip changes)
AC6 — Error scenarios covered
AC7 — Automated tests pass
AC8 — Isolation / no regressions
Out of scope / known limitations
(do not fail the story for these)
- Experiment detail and standalone segment detail/list pages still eager-load full members — they were not part of this change and remain as on
dev (a separate optimization).
- Editing a list is still a full replace (the whole member list is re-sent and rewritten); this branch only makes the teardown/load cheap, not incremental.
- The exclusion list status-toggle code path exists but is unused (exclusion lists have no enable toggle in the UI) — dead code, not a defect.
- Frontend ngrx changes (reducers/selectors/modal wiring) are not covered by automated tests (no pre-existing specs for these components); verify manually per AC3.
(this is generated w/ help from Claude based on the expectations I've given it, super detailed so copilot or other models can have the correct context for the change)
Feature flag detail & list operations remain performant with large (~20k) lists
Context
Feature flags whose inclusion/exclusion lists contain tens of thousands of members previously made the detail page, list edits, and enable/disable toggles slow or unusable. This branch makes those paths lightweight. This story validates the behavior and guards against regressions.
Test data / preconditions
AC1 — Detail page loads quickly for large lists
GET /flags/:idresponse does not contain the full member arrays for the lists (it returns member counts only).AC2 — CRUD on lists is quick
GET /segments/:id/members) and is usable; the form is populated before it can be submitted.AC3 — No duplicate requests / server overload
AC4 — Enable/disable is lightweight
PATCH /flags/inclusionList/:id/statuscarrying only the enabled flag — it does not re-send the ~20k members.AC5 — UI parity (only the tooltip changes)
devexcept the hover tooltip that previewed the first 10 values on the "Values" column is removed.AC6 — Error scenarios covered
GET /segments/:id/members) fails, an error notification is shown and the modal closes — the user cannot save a list from a partially-loaded state (no accidental member loss).AC7 — Automated tests pass
yarn backend test(unit + integration) passes.findOneForDetails,updateListStatus(incl. not-found),getSegmentByIdWithMembers, the single-DELETE-by-segmentId teardown, and the new controller routes.AC8 — Isolation / no regressions
FeatureFlagService.findOneis unchanged vs base (full-member callers like design/list export still get members).dev; experiment and standalone-segment create/edit still work.Out of scope / known limitations
(do not fail the story for these)
dev(a separate optimization).