Skip to content

feat(chart-types): allow linking external connections - #28136

Merged
almeidabbm merged 11 commits into
mainfrom
cursor/chart-type-external-connections-315c
Aug 27, 2026
Merged

feat(chart-types): allow linking external connections#28136
almeidabbm merged 11 commits into
mainfrom
cursor/chart-type-external-connections-315c

Conversation

@almeidabbm

@almeidabbm almeidabbm commented Aug 26, 2026

Copy link
Copy Markdown
Contributor

Closes: #28056
Closes: PROD-10583

Description:

Custom chart types render in the same sandboxed iframe as data apps, so images from URL fields are blocked by CSP unless the chart type is linked to an external connection with "Allow public images in linked apps". The chart type builder had no way to attach those connections.

This PR adds connection attachment to the custom chart type generate/iterate flow, matching data apps. The backend already accepted externalConnections on generate/iterate and already injected linked origins into the preview-token CSP.

  • First build and iterate. The composer can attach connections onto the generate/iterate request (uuid + alias only). Selected connections can be removed before submission.
  • Settings copy. Project Settings → Data app connections, the public-images toggle, and the builder-linking label now mention chart types as well as data apps.

chart-type-build-only-connection-attach.mp4

Risk assessment:

  • This is a high-risk change

@linear-code

linear-code Bot commented Aug 26, 2026

Copy link
Copy Markdown
Contributor

PROD-10583

@github-actions

github-actions Bot commented Aug 26, 2026

Copy link
Copy Markdown

🛡️ Upgrade safety for self-hosted customers

Comparing against main (4ddd02c84a).

  • Safe to upgrade normally. No downtime needed.
  • No database changes in this release.

What we looked at

What Result
Database changes none
REST API no breaking changes
MCP tools no breaking changes
Config / environment no breaking changes
Declared breaking changes none
Upgrade notes none
Technical details (raw JSON)
{
  "schemaVersion": "2",
  "version": "pr-28136",
  "previousVersion": "4ddd02c84a",
  "releaseDate": "2026-08-27T16:30:20.152Z",
  "migrations": {
    "present": false,
    "count": 0,
    "coreCount": 0,
    "eeCount": 0,
    "files": []
  },
  "compatibility": {
    "rollingUpdateSafe": true,
    "recommendedStrategy": "RollingUpdate"
  },
  "api": {
    "rest": {
      "checked": true,
      "breaking": false,
      "changes": [],
      "breakingCount": 0,
      "advisories": [],
      "advisoryCount": 0
    },
    "mcp": {
      "checked": true,
      "breaking": false,
      "changes": [],
      "breakingCount": 0,
      "advisories": [],
      "advisoryCount": 0
    }
  },
  "config": {
    "checked": true,
    "breaking": false,
    "changes": []
  },
  "upgrade": {
    "minPreviousVersion": null,
    "requiredStops": []
  },
  "declaredBreaks": []
}

Automated upgrade-safety check. Once merged, it ships a small release-safety.json with the release so customers’ upgrade automation can read it. It covers database, API, and config/environment changes.

@github-actions

github-actions Bot commented Aug 26, 2026

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
Backend API Tests Runs Vitest API tests
CLI Tests Runs CLI integration and dbt version tests

⏭️ Tests skipped (no relevant file changes detected)

Test How to trigger manually
Timezone Tests Add test-timezone to PR description

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

@github-actions

github-actions Bot commented Aug 26, 2026

Copy link
Copy Markdown

Your preview environment pr-28136 has been deployed.

Preview environment endpoints are available at:

@github-actions

Copy link
Copy Markdown

Preview Environment

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

📋 Logs: View in GCP Console

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

cursoragent and others added 10 commits August 27, 2026 15:51
Custom chart types can now attach project external connections, the same
way data apps already do. Linking a connection with public images enabled
adds its origin to the sandbox CSP so image URL fields can render.

The builder header manages links on an existing type without a rebuild.
The composer still sends connections on generate and iterate so the
build agent sees them.

Co-authored-by: Bruno Almeida <almeidabbm@users.noreply.github.com>
The GET returns alias plus the connection, not the write-body uuid/alias pair.

Co-authored-by: Bruno Almeida <almeidabbm@users.noreply.github.com>
The typecheck fix landed, but Actions did not start a new pull_request run.

Co-authored-by: Bruno Almeida <almeidabbm@users.noreply.github.com>
Co-authored-by: Bruno Almeida <almeidabbm@users.noreply.github.com>
Co-authored-by: Bruno Almeida <almeidabbm@users.noreply.github.com>
Co-authored-by: Bruno Almeida <almeidabbm@users.noreply.github.com>
Co-authored-by: Bruno Almeida <almeidabbm@users.noreply.github.com>
Co-authored-by: Bruno Almeida <almeidabbm@users.noreply.github.com>
Co-authored-by: Bruno Almeida <almeidabbm@users.noreply.github.com>
The trigger tooltip rendered on top of the open picker and covered its Done
button, so the popover could not be closed from the footer. Cancelling the
clarifier only handed the prompt back, silently dropping the attached
connections. After a first build the picker gave no sign of which
connections were already linked, and the app-links hook was typed against
the link request body rather than the read shape the list endpoint returns.

The description no longer leads with public images: linking is the feature,
images are one use of it.
After a first build the indicator dropped back to nothing, although the
connections just linked were still attached to the chart type. Linked and
newly selected connections now count together, and the count refreshes when
a build lands.
@almeidabbm
almeidabbm merged commit 28acba6 into main Aug 27, 2026
41 of 49 checks passed
@almeidabbm
almeidabbm deleted the cursor/chart-type-external-connections-315c branch August 27, 2026 17:10
lightdash-bot pushed a commit that referenced this pull request Aug 27, 2026
# [2.37.0](2.36.1...2.37.0) (2026-08-27)

### Features

* **chart-types:** allow linking external connections ([#28136](#28136)) ([28acba6](28acba6))
* **chart-types:** unlink connections from the attach picker ([#28235](#28235)) ([83d87a9](83d87a9))
@lightdash-bot

Copy link
Copy Markdown
Collaborator

🎉 This PR is included in version 2.37.0 🎉

The release is available on GitHub release

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.

Allow external connections in custom chart types

3 participants