Skip to content

feat: validate embed set state params upfront with setValidState - #9670

Merged
AdityaHegde merged 6 commits into
mainfrom
feat/embed-setstate-upfront-validation
Jul 13, 2026
Merged

feat: validate embed set state params upfront with setValidState#9670
AdityaHegde merged 6 commits into
mainfrom
feat/embed-setstate-upfront-validation

Conversation

@AdityaHegde

@AdityaHegde AdityaHegde commented Jul 10, 2026

Copy link
Copy Markdown
Collaborator

Adding setValidState({ state, failOnError }) to our embed state API.

  1. Validates the state against the dashboard's metrics view and explore specs before applying it.
  2. Invalid parameters are reported back, and the applied URL is canonicalized the same way it would be if the user navigated there directly.
  3. The applied state is returned in appliedState

Closes APP-918

Checklist:

  • Covered by tests
  • Ran it and it works as intended
  • Reviewed the diff before requesting a review
  • Checked for unhandled edge cases
  • Linked the issues it closes
  • Checked if the docs need to be updated. If so, create a separate Linear DOCS issue
  • Intend to cherry-pick into the release branch
  • I'm proud of this work!

@nishantmonu51 nishantmonu51 added Type:Feature New feature request Size:M Medium change: 100-499 lines labels Jul 10, 2026
@AdityaHegde
AdityaHegde marked this pull request as ready for review July 10, 2026 12:58
@nishantmonu51

Copy link
Copy Markdown
Collaborator

@codex: review

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: df211696db

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread web-admin/src/features/embeds/init-embed-public-api.ts
Comment thread web-admin/src/features/embeds/init-embed-public-api.ts
@AdityaHegde
AdityaHegde merged commit 89064f0 into main Jul 13, 2026
16 checks passed
@AdityaHegde
AdityaHegde deleted the feat/embed-setstate-upfront-validation branch July 13, 2026 05:28
AdityaHegde added a commit that referenced this pull request Jul 14, 2026
* feat: validate embed set state params upfront with setValidState

* Add tests

* Add e2e tests

* fix docs

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

Labels

Size:M Medium change: 100-499 lines Type:Feature New feature request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants