Skip to content

fix(InstallWizard): show auto-discovered optional fields on Additional page#1600

Draft
dionlow wants to merge 1 commit intomainfrom
fix/install-wizard-optional-fields-auto
Draft

fix(InstallWizard): show auto-discovered optional fields on Additional page#1600
dionlow wants to merge 1 commit intomainfrom
fix/install-wizard-optional-fields-auto

Conversation

@dionlow
Copy link
Copy Markdown
Contributor

@dionlow dionlow commented Apr 27, 2026

Closes #1599.

Summary

  • getSubPages() and useSubPageNavigation now consider an object to have optional fields when either the explicit optionalFields list OR the auto-discovered customer fields (from optionalFieldsAuto: all) are non-empty. Auto-discovered fields surface via manifest.getCustomerFieldsForObject(objectName).allFields.
  • optionalFieldItems on the Additional page merges both sources, deduping by field name. Explicit optionalFields entries win on conflict so the amp.yaml-configured display names are preserved.

Why

Before this change, an object whose amp.yaml declared only optionalFieldsAuto: all (no explicit optionalFields, no required fields, no mappings) would land on the empty Fields sub-page with "No configuration needed for X" — even though the user should have been able to pick from auto-discovered customer fields on the Additional sub-page.

Test plan

  • Object with only optionalFieldsAuto: all → wizard lands on Additional fields, all auto-discovered fields render as toggleable checkboxes.
  • Object with explicit optionalFields: list → unchanged: lands on Additional, shows the explicit list.
  • Object with both optionalFields: and optionalFieldsAuto: all → both render, explicit display names take precedence on duplicates.
  • Object with only required fields (no optional, no auto) → unchanged: lands on Fields, no Additional tab.
  • Object with only field mappings → unchanged from [ENG-3882] fix(InstallWizard): land on correct sub-page when object has only mappings #1598: lands on Mappings.
  • Genuinely empty object → unchanged: falls back to Fields with the "No configuration needed" message.

🤖 Generated with Claude Code

When an amp.yaml object uses optionalFieldsAuto: all (without an explicit
optionalFields list), the auto-discovered customer fields surface via
manifest.getCustomerFieldsForObject(objectName).allFields rather than
object.optionalFields. Sub-page routing and the Additional checkbox list
both ignored that source, so the user landed on an empty Fields page and
the Additional page itself was empty.

- Update getSubPages() and useSubPageNavigation to treat an object as
  having optional fields when either the explicit list or auto-discovered
  customer fields are non-empty.
- Merge auto-discovered customer fields into optionalFieldItems on the
  Additional page, deduping by field name and preferring explicit
  optionalFields so amp.yaml display names win.

Closes #1599

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
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.

InstallWizard: optionalFieldsAuto: all not recognized as configurable in getSubPages()

1 participant