You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@superset.apache.org by "sadpandajoe (via GitHub)" <gi...@apache.org> on 2026/08/14 00:11:36 UTC

[PR] fix(explore): clear stale custom time-shift date error [superset]

sadpandajoe opened a new pull request, #43146:
URL: https://github.com/apache/superset/pull/43146

   ### SUMMARY
   On a chart's Explore control panel (Table chart and others sharing the
   `timeComparisonControls` section), selecting **Custom date** for **Time shift**
   and then clicking the `x` on **Shift start date** to clear it correctly raises
   a "date required" validation error. However, switching **Time shift** to a
   different preset afterward (e.g. *1 week ago*) did not clear that error — it
   stayed stuck, blocking further chart updates until a full page refresh.
   
   The `start_date_offset` control's `mapStateToProps` derives its validation
   error from a sibling control's value (`time_compare`), but the control config
   never declared `validationDependencies: ['time_compare']`. The Explore
   reducer's `SET_FIELD_VALUE` handler only re-runs a control's `mapStateToProps`
   for the control that changed or for controls that declare it as a
   `validationDependencies` entry, so `start_date_offset` was never re-validated
   when `time_compare` changed.
   
   This adds the missing `validationDependencies: ['time_compare']` declaration,
   mirroring the existing `validationDependencies: ['server_pagination']`
   pattern already used for a different control in the Table chart's control
   panel.
   
   ### BEFORE/AFTER SCREENSHOTS OR ANIMATED GIF
   Before: Time shift = Custom date → clear Shift start date (error appears,
   correctly) → change Time shift to a preset (e.g. "1 week ago") → error
   persists and the chart cannot be updated until the page is refreshed.
   
   After: same steps → the error clears as soon as Time shift changes away from
   "Custom date", and the chart can be updated immediately.
   
   (Evidence to follow as a PR update.)
   
   ### TESTING INSTRUCTIONS
   1. Create or open a Table chart in Explore.
   2. Expand **Time Comparison**, set **Time shift** to **Custom date**.
   3. Click the `x` on **Shift start date** to clear it — a "date required" error
      appears (expected).
   4. Change **Time shift** to any other preset (e.g. "1 week ago").
   5. Confirm the error clears immediately and the chart can be updated without a
      page refresh.
   
   A reducer-level regression test covering this exact clear-then-switch sequence
   was added at `superset-frontend/src/explore/reducers/exploreReducer.test.ts`.
   
   ### ADDITIONAL INFORMATION
   - [ ] Has associated issue:
   - [ ] Required feature flags:
   - [x] Changes UI
   - [ ] Includes DB Migration (follow approval process in [SIP-59](https://github.com/apache/superset/issues/13351))
     - [ ] 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
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org


Re: [PR] fix(explore): clear stale custom time-shift date error [superset]

Posted by "bito-code-review[bot] (via GitHub)" <gi...@apache.org>.
bito-code-review[bot] commented on PR #43146:
URL: https://github.com/apache/superset/pull/43146#issuecomment-5298494542

   AI Code Review is in progress (usually takes 3 to 15 minutes unless it's a very large PR).
   
   <details>
   <summary>
   Bito Usage Guide
   </summary>
   
   **Commands**
         
   Type the following command in the pull request comment and save the comment.
         
   - `/review` - Manually triggers a full AI review.
   
   - `/pause` - Pauses automatic reviews on this pull request.
   - `/resume` - Resumes automatic reviews.
   - `/resolve` - Marks all Bito-posted review comments as resolved.
   - `/abort` - Cancels all in-progress reviews.
   
         
   Refer to the <a href="https://docs.bito.ai/bito-dev-agents/ai-code-review-agent/available-commands" target="_blank" rel="noopener noreferrer">documentation</a> for additional commands.
         
   **Configuration**
   
   This repository uses `Superset` You can customize the agent settings <a href="https://alpha.bito.ai/home/ai-agents/code-review-agent" target="_blank" rel="noopener noreferrer">here</a> or contact your Bito workspace admin at evan@preset.io.
         
   **Documentation & Help**
   - <a href="https://docs.bito.ai/bito-dev-agents/ai-code-review-agent/getting-started/install-run-using-bito-cloud/create-or-customize-an-agent-instance" target="_blank" rel="noopener noreferrer">Customize agent settings</a>
   - <a href="https://docs.bito.ai/bito-dev-agents/ai-code-review-agent/implementing-custom-code-review-rules" target="_blank" rel="noopener noreferrer">Review rules</a>
   - <a href="https://docs.bito.ai/bito-dev-agents/ai-code-review-agent" target="_blank" rel="noopener noreferrer">General documentation</a>
   - <a href="https://docs.bito.ai/bito-dev-agents/ai-code-review-agent/faqs" target="_blank" rel="noopener noreferrer">FAQ</a>
   
   </details>
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org


Re: [PR] fix(explore): clear stale custom time-shift date error [superset]

Posted by "codecov[bot] (via GitHub)" <gi...@apache.org>.
codecov[bot] commented on PR #43146:
URL: https://github.com/apache/superset/pull/43146#issuecomment-5287915678

   ## [Codecov](https://app.codecov.io/gh/apache/superset/pull/43146?dropdown=coverage&src=pr&el=h1&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) Report
   :white_check_mark: All modified and coverable lines are covered by tests.
   :white_check_mark: Project coverage is 66.68%. Comparing base ([`537f0fd`](https://app.codecov.io/gh/apache/superset/commit/537f0fd2dbe19e6d0fbf136c484150e567b0961f?dropdown=coverage&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache)) to head ([`5a95474`](https://app.codecov.io/gh/apache/superset/commit/5a95474610b967dca39549bce466bf70dc24bcdd?dropdown=coverage&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache)).
   :warning: Report is 1 commits behind head on master.
   
   <details><summary>Additional details and impacted files</summary>
   
   
   
   ```diff
   @@           Coverage Diff           @@
   ##           master   #43146   +/-   ##
   =======================================
     Coverage   66.67%   66.68%           
   =======================================
     Files        2871     2871           
     Lines      163328   163328           
     Branches    37674    37674           
   =======================================
   + Hits       108904   108915   +11     
   + Misses      52296    52285   -11     
     Partials     2128     2128           
   ```
   
   | [Flag](https://app.codecov.io/gh/apache/superset/pull/43146/flags?src=pr&el=flags&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | Coverage Δ | |
   |---|---|---|
   | [javascript](https://app.codecov.io/gh/apache/superset/pull/43146/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | `73.74% <ø> (+0.01%)` | :arrow_up: |
   
   Flags with carried forward coverage won't be shown. [Click here](https://docs.codecov.io/docs/carryforward-flags?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache#carryforward-flags-in-the-pull-request-comment) to find out more.
   </details>
   
   [:umbrella: View full report in Codecov by Harness](https://app.codecov.io/gh/apache/superset/pull/43146?dropdown=coverage&src=pr&el=continue&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache).   
   :loudspeaker: Have feedback on the report? [Share it here](https://about.codecov.io/codecov-pr-comment-feedback/?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache).
   <details><summary> :rocket: New features to boost your workflow: </summary>
   
   - :snowflake: [Test Analytics](https://docs.codecov.com/docs/test-analytics): Detect flaky tests, report on failures, and find test suite problems.
   - :package: [JS Bundle Analysis](https://docs.codecov.com/docs/javascript-bundle-analysis): Save yourself from yourself by tracking and limiting bundle sizes in JS merges.
   </details>


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org


Re: [PR] fix(explore): clear stale custom time-shift date error [superset]

Posted by "rusackas (via GitHub)" <gi...@apache.org>.
rusackas merged PR #43146:
URL: https://github.com/apache/superset/pull/43146


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org


Re: [PR] fix(explore): clear stale custom time-shift date error [superset]

Posted by "bito-code-review[bot] (via GitHub)" <gi...@apache.org>.
bito-code-review[bot] commented on PR #43146:
URL: https://github.com/apache/superset/pull/43146#issuecomment-5287839511

   AI Code Review is in progress (usually takes 3 to 15 minutes unless it's a very large PR).


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org