Skip to content

fix: missing selectedModelFields state crashes smart gen#32

Merged
acmeguy merged 3 commits intomasterfrom
feat/map-field-opt-in-ui
Apr 18, 2026
Merged

fix: missing selectedModelFields state crashes smart gen#32
acmeguy merged 3 commits intomasterfrom
feat/map-field-opt-in-ui

Conversation

@acmeguy
Copy link
Copy Markdown

@acmeguy acmeguy commented Apr 15, 2026

Summary

  • setSelectedModelFields was called but never declared via useState
  • Caused ReferenceError that crashed the smart gen UI after dry-run preview
  • No models could be created because the JS error prevented the apply step

One-line fix: add the missing useState declaration.

Test plan

  • Run smart gen → preview appears without JS crash
  • Click "Apply" → model is created

🤖 Generated with Claude Code

acmeguy and others added 3 commits March 31, 2026 09:00
Smart Generation UI improvements:
- Map, nested (ARRAY JOIN), and AI fields default to unchecked (opt-in)
- Count measure and required fields (rewrite rules + filters) always selected
- "Start Over" button on change preview step resets to table selection
- "Skip LLM enrichment" checkbox on column selection step
- AI metrics section starts unchecked (opt-in, not opt-out)
- AI metrics empty selection sends empty array to prevent backend include-all bug
- Source tag support in ChangeField interface (map, nested, ai)

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
The frontend checkbox existed but the GraphQL variable was never declared
in the mutation, so URQL silently dropped it. Now wired end-to-end.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
setSelectedModelFields was called on preview result and start-over
but never declared via useState, causing a ReferenceError that crashed
the smart gen UI and prevented models from being created.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@akshaykumar2505 akshaykumar2505 self-requested a review April 16, 2026 06:07
@acmeguy acmeguy merged commit d5dbb0e into master Apr 18, 2026
@acmeguy acmeguy deleted the feat/map-field-opt-in-ui branch April 18, 2026 09:57
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