Skip to content

fix(explore): open new semantic-view charts without the field re-pick banner - #45832

Open
mikebridge wants to merge 2 commits into
apache:masterfrom
mikebridge:sc-130319-semantic-new-chart-version
Open

mikebridge wants to merge 2 commits into
apache:masterfrom
mikebridge:sc-130319-semantic-new-chart-version

Conversation

@mikebridge

Copy link
Copy Markdown
Contributor

SUMMARY

TL;DR: A new chart on a semantic view no longer opens behind the "re-pick your fields" banner. The banner, which saved charts with older field names still see, now uses plain wording.

Background: Semantic views record which naming format a chart's fields use (semantic_selection_version). When a chart's format is missing or older than the view's current one, Explore shows a banner asking the user to re-pick fields, because an old display title can't be safely mapped to a current field ID.

Problem: A brand-new chart has no format recorded yet, so every new chart on a versioned semantic view opened behind that banner, even though it had no fields to lose. The banner copy also used internal terms ("member IDs", "display titles").

What this changes:

  • When Explore loads a new chart (no saved chart, no hidden form data) whose incoming form data holds only identity and empty fields, it records the view's current format before controls and the first query are built. The allowed fields are datasource, viz_type, an empty adhoc_filters, an empty applied_time_extras, and url_params limited to datasource_id, datasource_type, viz_type, slice_id and form_data_key (string values). Anything else, such as a filter, a metric, a column, or a URL parameter that could name a field, leaves today's behaviour in place.
  • Saved charts, datasource switches and the reset action are unchanged, so legacy charts still get the banner.
  • New banner copy:
    • Title: "Re-pick fields for this chart"
    • Body: "This chart was saved with an older format of field names for this semantic view, so the fields it refers to can't be confirmed. Re-pick the metrics and dimensions to keep using it. The saved chart doesn't change until you save."
    • Button: "Re-pick fields"

BEFORE/AFTER SCREENSHOTS OR ANIMATED GIF

Before: opening a new chart on a versioned semantic view shows "Choose current semantic fields" instead of the query controls. After: the controls show straight away. Saved legacy charts show the banner with the new copy.

TESTING INSTRUCTIONS

  • npm run test -- src/explore/actions/hydrateExplore.test.ts src/explore/components/ControlPanelsContainer.test.tsx src/explore/reducers
  • Manually, with SEMANTIC_LAYERS on:
    1. From the semantic view list, create a new chart. No banner; the chart query's extras carry the view's selection version.
    2. Open a saved chart whose selection version is missing or older. The banner shows with the new copy and "Re-pick fields" resets the selections.

ADDITIONAL INFORMATION

  • Has associated issue:
  • Required feature flags: SEMANTIC_LAYERS
  • Changes UI
  • Includes DB Migration (follow approval process in SIP-59)
    • Migration is atomic, supports rollback & is backwards-compatible
    • Confirm DB migration upgrade and downgrade tested
    • Runtime estimates and downtime expectations provided
  • Introduces new feature or API
  • Removes existing feature or API

No backend, provider or migration change. Saved charts are never upgraded automatically.

Mike Bridge added 2 commits October 28, 2026 17:50
Stamp only identity-only unsaved input before hydration builds controls and query snapshots. Keep retained selections and datasource switches behind explicit reselection, and use product-neutral banner copy.
@github-actions github-actions Bot added the i18n Namespace | Anything related to localization label Oct 29, 2026
@codecov

codecov Bot commented Oct 29, 2026 •

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 84.63%. Comparing base (2fbe4e0) to head (4b821fe).
⚠️ Report is 10 commits behind head on master.

Additional details and impacted files
@@             Coverage Diff             @@
##           master   #45832       +/-   ##
===========================================
+ Coverage   65.50%   84.63%   +19.12%     
===========================================
  Files        3070     3069        -1     
  Lines      205500   205444       -56     
  Branches    48306    48313        +7     
===========================================
+ Hits       134614   173874    +39260     
+ Misses      67803    28280    -39523     
- Partials     3083     3290      +207     
Flag Coverage Δ
hive 34.53% <ø> (+0.03%) ⬆️
javascript 80.80% <100.00%> (+0.02%) ⬆️
mysql 52.55% <ø> (+0.04%) ⬆️
postgres 52.56% <ø> (+0.04%) ⬆️
presto 36.26% <ø> (+0.03%) ⬆️
python 87.73% <ø> (+34.94%) ⬆️
sqlite 52.32% <ø> (+0.04%) ⬆️
unit 82.45% <ø> (?)

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@mikebridge
mikebridge marked this pull request as ready for review October 29, 2026 05:59
@codeant-ai-for-open-source

Copy link
Copy Markdown
Contributor

CodeAnt  CodeAnt PR Risk

🟢  Low Risk

  • The PR appears safe to merge; no actionable issues were identified in the review.

Assessed commit: 4b821fe86ed7

@aminghadersohi aminghadersohi 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.

The new-chart stamp excludes saved and field-bearing inputs and runs before the control and query snapshots are built.

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

i18n Namespace | Anything related to localization size/L

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants