Skip to content

feat(SmartGeneration): mirror backend skip rules in step-2 auto-select#37

Merged
acmeguy merged 1 commit into
masterfrom
feat/smart-gen-field-selection
May 10, 2026
Merged

feat(SmartGeneration): mirror backend skip rules in step-2 auto-select#37
acmeguy merged 1 commit into
masterfrom
feat/smart-gen-field-selection

Conversation

@acmeguy
Copy link
Copy Markdown

@acmeguy acmeguy commented May 10, 2026

Summary

Companion to smartdataHQ/synmetrix smart-gen improvements. The post-profile checkbox state was filtering only by has_values / value_rows, which kept always-zero numerics, constant booleans (e.g. customer_facing Int8 with min=max=0) and constant-empty strings checked even though the backend would skip them at build time.

Auto-select now applies the same cascade as cubeBuilder.processColumns:

  • has_values === false → off
  • NUMBER with min===max===0 → off
  • BOOLEAN with min===max OR unique_values===1 → off
  • STRING/UUID with unique_values===0, or =1 with single LC value being '' / '0' / 0 / null / whitespace-only → off
  • otherwise → on

User can still override individual checkboxes; this only controls the default state on profile completion.

Test plan

  • Profile a table with customer_facing Int8 (min=max=0) → checkbox starts unchecked
  • Profile a table with commerce.products.line_discounted Array(Nullable(Bool)) of all-NULL or all-false → unchecked
  • Profile a column with mixed values → still checked
  • Manually toggling a field still works as before

🤖 Generated with Claude Code

The post-profile checkbox state was filtering only by has_values /
value_rows, which kept always-zero numerics, constant booleans (e.g.
customer_facing Int8 with min=max=0) and constant-empty strings checked
even though the backend would skip them at build time.

Auto-select now applies the same cascade as cubeBuilder.processColumns:
- has_values === false                                                 → off
- NUMBER with min===max===0                                            → off
- BOOLEAN with min===max OR unique_values===1 (constant flag)          → off
- STRING/UUID with unique_values===0, or =1 with lc value '', '0', 0,
  null, or whitespace-only                                             → off
- Anything else                                                        → on

User can still override individual checkboxes in the UI; this only
controls the default state on profile completion.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@acmeguy acmeguy merged commit 93333b0 into master May 10, 2026
@acmeguy acmeguy deleted the feat/smart-gen-field-selection branch May 10, 2026 13:18
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