Skip to content

fix: refresh data app dashboard tiles with the dashboard refresh button#23430

Merged
Spissable merged 1 commit into
mainfrom
feature/prod-7814
May 22, 2026
Merged

fix: refresh data app dashboard tiles with the dashboard refresh button#23430
Spissable merged 1 commit into
mainfrom
feature/prod-7814

Conversation

@Spissable
Copy link
Copy Markdown
Contributor

Relates to: https://linear.app/lightdash/issue/PROD-7814/i-want-to-invalidate-or-refresh-cached-query-results-from-an-app

Description:

The dashboard refresh button re-ran chart queries but left embedded data app tiles untouched. Data apps run their queries inside the sandboxed iframe via the postMessage bridge, so they can't piggyback on the React Query invalidation that refreshes charts.

The dashboard refresh button re-ran chart queries but left embedded data
app tiles untouched. Data apps run their queries inside the sandboxed
iframe via the postMessage bridge, so they can't piggyback on the React
Query invalidation that refreshes charts.

Two pieces, both driven by clearCacheAndFetch:
- Add a monotonic refreshCounter to the tile-status context, baked into
  the iframe URL as &r= to force a reload so mount-time queries re-fire.
- Forward invalidateCache through AppIframePreview to useAppSdkBridge,
  which stamps it onto every metric-query POST — the same flag chart
  tiles send on refresh — so the app's queries bypass the warehouse cache.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@linear-code
Copy link
Copy Markdown

linear-code Bot commented May 22, 2026

PROD-7814

@github-actions
Copy link
Copy Markdown

🧪 Test Selection

✅ Tests that will run

Test Description
Preview Environment Deploys a preview environment for testing
Frontend E2E Tests Runs Cypress app tests

⏭️ Tests skipped (no relevant file changes detected)

Test How to trigger manually
Backend API Tests Add test-backend to PR description
Timezone Tests Add test-timezone to PR description
CLI Tests Add test-cli to PR description

Tip: Add test-all to your PR description to run all tests.

@mintlify
Copy link
Copy Markdown

mintlify Bot commented May 22, 2026

Docs PR opened: lightdash/mintlify-docs#688

Added a section to the Data apps guide explaining how data app tiles behave on dashboards, including refresh behavior.

@github-actions
Copy link
Copy Markdown

Your preview environment pr-23430 has been deployed.

Preview environment endpoints are available at:

@github-actions
Copy link
Copy Markdown

Preview Environment

🌐 URL: https://lightdash-preview-pr-23430.lightdash.okteto.dev

📋 Logs: View in GCP Console

🔧 SSH: ./scripts/okteto-ssh.sh 23430

@Spissable Spissable merged commit 96cb5aa into main May 22, 2026
21 checks passed
@Spissable Spissable deleted the feature/prod-7814 branch May 22, 2026 08:19
lightdash-bot pushed a commit that referenced this pull request May 22, 2026
## [0.3007.2](0.3007.1...0.3007.2) (2026-05-22)

### Bug Fixes

* refresh data app dashboard tiles with the dashboard refresh button ([#23430](#23430)) ([96cb5aa](96cb5aa))
@lightdash-bot
Copy link
Copy Markdown
Collaborator

🎉 This PR is included in version 0.3007.2 🎉

The release is available on:

Your semantic-release bot 📦🚀

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

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants