Skip to content

Fix default values not rendering in backfill options form#14

Draft
Copilot wants to merge 5 commits intomainfrom
copilot/fix-backfill-dry-run-ui
Draft

Fix default values not rendering in backfill options form#14
Copilot wants to merge 5 commits intomainfrom
copilot/fix-backfill-dry-run-ui

Conversation

Copy link
Contributor

Copilot AI commented Feb 17, 2026

Backfill attributes with default values (e.g., attribute :dry_run, :boolean, default: true) were not displaying their defaults in the UI form.

Root Cause

The backfill_option_inputs helper accessed backfill_run.options[name] directly, returning nil for empty options hashes instead of the attribute's default value.

Changes

  • Helper: Instantiate backfill_options_class to leverage ActiveModel::Attributes default value handling

    # Before: raw hash access ignores defaults
    backfill_run.options[name]  # => nil
    
    # After: instance method respects defaults
    options_instance = backfill_run.backfill_class.backfill_options_class.new(backfill_run.options || {})
    options_instance.public_send(name)  # => true (for default: true)
  • Tests: Added coverage for boolean, string, and other attribute types with defaults

Affects all attribute types with defaults (boolean, string, integer, etc.), not just booleans.

Preview

Before After

✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.

Copilot AI and others added 2 commits February 17, 2026 07:09
Co-authored-by: PauloPhagula <6130991+PauloPhagula@users.noreply.github.com>
Co-authored-by: PauloPhagula <6130991+PauloPhagula@users.noreply.github.com>
Copilot AI changed the title [WIP] Fix default state of dry run attribute in backfill UI Fix default values not rendering in backfill options form Feb 17, 2026
Copilot AI requested a review from PauloPhagula February 17, 2026 07:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants