Skip to content

Scaffolding for canvas component validation in the runtime#9152

Merged
begelundmuller merged 7 commits intomainfrom
begelundmuller/canvas-components-backend-validation
Apr 3, 2026
Merged

Scaffolding for canvas component validation in the runtime#9152
begelundmuller merged 7 commits intomainfrom
begelundmuller/canvas-components-backend-validation

Conversation

@begelundmuller
Copy link
Copy Markdown
Contributor

@begelundmuller begelundmuller commented Mar 31, 2026

This PR adds scaffolding for validating canvas component properties on the backend. This enables us to give AI agents better feedback when they develop canvas components.

Next steps not handled in this PR:

  • Validation can now be implemented in runtime/canvas/component.go and tested in runtime/canvas/component_test.go
  • We may want to refactor the runtime/ai/create_chart.go file to use the runtime/canvas package for validation

Closes https://linear.app/rilldata/issue/PLAT-451/scaffolding-for-canvas-validation-on-the-backend

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!

@begelundmuller begelundmuller self-assigned this Mar 31, 2026
@begelundmuller begelundmuller marked this pull request as ready for review April 1, 2026 09:28
@begelundmuller begelundmuller requested a review from pjain1 April 1, 2026 09:28
// TODO: Implement
case "leaderboard":
// TODO: Implement
default:
Copy link
Copy Markdown
Member

@pjain1 pjain1 Apr 3, 2026

Choose a reason for hiding this comment

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

is vega_lite a renderer? If yes then should be added otherwise previously valid canvas will now have error.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

vega_lite is not a valid component renderer. We used to have it in our initial version of canvas. It's not used anymore.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

@pjain1 I understand the confusion, here's a PR to remove the old code: #9179

@begelundmuller begelundmuller merged commit 6a76124 into main Apr 3, 2026
19 of 20 checks passed
@begelundmuller begelundmuller deleted the begelundmuller/canvas-components-backend-validation branch April 3, 2026 12:57
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.

3 participants