Skip to content

Fix edit list modal population for legacy list types - #3288

Open
zackcl wants to merge 1 commit into
devfrom
feature/3285-fix-edit-list-modal-population
Open

Fix edit list modal population for legacy list types#3288
zackcl wants to merge 1 commit into
devfrom
feature/3285-fix-edit-list-modal-population

Conversation

@zackcl

@zackcl zackcl commented Aug 13, 2026

Copy link
Copy Markdown
Collaborator

Resolves #3285

Some list responses use lowercase individual or segment values, while the Edit List modal expects their canonical casing, leaving the Type and Values fields empty.

Changes

  • Normalize built-in Individual and Segment list types across frontend and backend write paths.
  • Correctly populate edit forms for lists with lowercase standard types.
  • Populate Segment list forms with the referenced public segment instead of the private wrapper.
  • Preserve context-specific group types and count-only member loading.
  • Validate Feature Flag list types and add focused regression coverage.

@zackcl zackcl self-assigned this Aug 13, 2026
@zackcl
zackcl requested review from bcb37 and danoswaltCL and a balanced review from Copilot August 13, 2026 13:40

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

Fixes legacy list editing by canonicalizing built-in list types and correctly populating modal values.

Changes:

  • Adds shared normalization for Individual and Segment.
  • Correctly loads members and referenced public segments during editing.
  • Validates write paths and adds regression tests.

Reviewed changes

Copilot reviewed 17 out of 17 changed files in this pull request and generated no comments.

Show a summary per file
File Description
packages/types/src/index.ts Exports normalization utilities.
packages/types/src/Experiment/enums.ts Defines canonical list types and normalization.
packages/frontend/.../common-details-participant-list-table.component.ts Normalizes list-type display and checks.
packages/frontend/.../common-details-participant-list-table.component.html Uses normalized segment detection.
packages/frontend/.../upsert-private-segment-list-modal.component.ts Populates edit forms from normalized data.
packages/frontend/.../segments.model.ts Allows context-defined list types in forms.
packages/frontend/.../segment-list.helper.ts Builds edit data and detects missing members.
packages/frontend/.../segment-list.helper.spec.ts Covers normalization and edit-data behavior.
packages/backend/test/unit/services/SegmentService.test.ts Tests persistence normalization.
packages/backend/test/unit/services/FeatureFlagService.test.ts Tests feature-flag list normalization.
packages/backend/test/unit/services/ExperimentService.test.ts Tests canonical legacy inference.
packages/backend/test/unit/controllers/validators/FeatureFlagListValidator.test.ts Tests list-type validation.
packages/backend/src/api/services/SegmentService.ts Normalizes segment list types before saving.
packages/backend/src/api/services/FeatureFlagService.ts Normalizes feature-flag list writes.
packages/backend/src/api/services/ExperimentService.ts Canonicalizes inferred experiment list types.
packages/backend/src/api/controllers/validators/FeatureFlagListValidator.ts Requires string list types.
packages/backend/src/api/controllers/validators/FeatureFlagImportValidator.ts Validates imported list types as strings.

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

@zackcl
zackcl marked this pull request as ready for review August 13, 2026 14:58
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.

Edit list modal shows blank Type and Values for non-canonical list types

3 participants