Commit Graph

19975 Commits

Author SHA1 Message Date
Joe Li
7aee4fb7bd fix(subdirectory): unblock CI on subdirectory-helpers PR
Three concrete failures from the first CI run on 0e98228aa8, addressed:

1. Jest hoisting (sharded-jest-tests shard 3): the Layer 5 mock factory
   referenced `APPLICATION_ROOT_MOCK` from outer scope. Jest hoists
   `jest.mock()` above all top-level statements, so the variable was
   undefined when the factory ran, producing
   "module factory of jest.mock() is not allowed to reference any
   out-of-scope variables". Renamed to `mockApplicationRoot` — Jest
   carves out an exception for variables prefixed with `mock`. Comment
   added so the next contributor doesn't lose ten minutes to the
   rename rule.

2. oxlint (pre-commit): two errors in normalizeBackendUrls.ts.
   - "walk was used before it was defined": moved the `walk` helper
     above its caller `normalizeBackendUrls`. The hoisting was valid JS
     but oxlint enforces textual order.
   - "Do not use `new Array(singleArgument)`": replaced
     `new Array(value.length)` with a `[]` + push pattern. Same
     allocation cost, no surprise sparse-array semantics.

3. prettier (pre-commit): line-wrap the React type imports in
   navigationUtils.ts and tighten the conditional layout in
   normalizeBackendUrls.ts to match prettier's expected output.

Outstanding: the `playwright-tests (chromium, /app/prefix)` failures
look like infrastructure flakiness — the failing tests (bulk export
dashboards, create dataset wizard, duplicate dataset) all hit
`page.goto: Test timeout of 30000ms exceeded` and
`apiRequestContext.post: socket hang up`, and don't exercise the one
production code path this PR touches (SliceHeaderControls Cmd-click).
Watching the next run before treating it as a real failure.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-14 15:16:35 -07:00
Joe Li
7ca048a0eb feat(subdirectory): implement application root URL helpers and backend normaliser
Green commit for the subdirectory deployment refactor. All five layers of
the test suite scaffolded in 13f56f710e are now actionable:

- Layers 1, 3, 5 (previously red) now pass against real implementations.
- Layer 2 (invariant) remains green — no new ensureAppRoot/makeUrl imports.
- Layer 4 (contract) remains green — SupersetClient applies the root once.

Implementations
- src/utils/navigationUtils.ts:
  - openInNewTab(path) — window.open with noopener noreferrer
  - redirect(path) — window.location.href assignment
  - redirectReplace(path) — window.location.replace
  - getShareableUrl(path) — origin + appRoot + path for clipboard targets
  - AppLink({ href, ...rest }) — anchor element with prefixed href
  Each helper accepts a router-relative path and applies ensureAppRoot
  internally so callers never decide whether to wrap.

- packages/superset-ui-core/src/connection/normalizeBackendUrls.ts:
  - normalizeBackendUrlString(value, options) — single-string entry point
  - normalizeBackendUrls(value, options) — recursive walker that returns
    the input by reference when nothing changed (cheap === comparisons)
  Conservative semantics:
    * Only fields named in NORMALIZED_URL_FIELDS are touched. Initial set:
      `explore_url`. Follow-up commits expand it after per-endpoint audit.
    * Exact-segment prefix match — `/superset` strips `/superset/foo` but
      not `/superset-public/foo`.
    * Absolute and protocol-relative URLs pass through unchanged.
    * Empty applicationRoot is a no-op.
    * Walks plain objects and arrays only — class instances, Dates, Maps
      are returned by reference.

Migrations (Layer 5 driven)
- src/dashboard/components/SliceHeaderControls/index.tsx:267 swaps
  `window.open(props.exploreUrl, '_blank')` for
  `openInNewTab(props.exploreUrl)`. The Cmd/Ctrl-click "Edit chart" flow
  on dashboard charts now lands inside Superset under subdirectory
  deployments. The Layer 5 regression test at
  SliceHeaderControls.subdirectory.test.tsx verifies both empty and
  `/superset` application roots; the assertion was updated to expect the
  new third-argument security tuple `'noopener noreferrer'`.

Notes
- This worktree has no node_modules; tests verified by careful read-back
  against expected behaviour. CI on the open draft PR is the source of
  truth.
- Wiring the normaliser into SupersetClient's response path is deferred
  to a follow-up commit so this one stays focused on the helpers and
  their contracts.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-14 15:16:35 -07:00
Joe Li
438031cbc4 style: apply prettier line-wrapping in skeleton modules
Pure formatting follow-up to 13f56f710e. No behaviour change.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-14 15:16:35 -07:00
Joe Li
88231f2b41 test(subdirectory): scaffold red/green tests for application root URL helpers
Skeleton commit for the subdirectory deployment refactor. Adds the test
framework and one example test per layer; the helpers themselves are
stubbed so the suite is meaningfully red until the green commit lands.

Frameworks
- spec/helpers/withApplicationRoot.ts: fixture that rewrites #app data
  and resets the module cache so getBootstrapData() returns the requested
  application root inside the callback. Replaces the inline ritual that
  pathUtils.test.ts currently repeats per test.
- spec/helpers/sourceTreeScanner.ts: line-by-line regex scanner over the
  source tree with allow-list support. Backs the static-invariant tests
  in Layer 2 with workspace-relative file:line locations on failure.

Stubs
- src/utils/navigationUtils.ts: openInNewTab, redirect, redirectReplace,
  getShareableUrl, AppLink. Each throws a "not implemented" error with a
  doc comment describing the channel rule it enforces. Existing
  navigateTo / navigateWithState are kept untouched and called out as
  legacy multi-mode helpers scheduled for replacement.
- packages/superset-ui-core/src/connection/normalizeBackendUrls.ts:
  conservative URL field normaliser. Ships the curated NORMALIZED_URL_FIELDS
  set (initially empty pending per-endpoint audit) and a documented
  NORMALIZER_EXCLUSIONS list explaining why bug_report_url, thumbnail_url,
  user_login_url, etc. are deliberately not normalised.

Layered tests (one example each; full suite expands per layer in
subsequent commits on this PR)
- Layer 1 unit: navigationUtils.test.ts exercises openInNewTab under
  empty / single / nested application roots, plus absolute-URL and
  mailto passthrough. Red until the helper is implemented.
- Layer 2 invariant: navigationUtils.invariants.test.ts asserts that
  ensureAppRoot / makeUrl are not imported outside navigationUtils.ts.
  Allow-list seeded with the 19 current call sites so the test is GREEN
  on day one; migration commits delete entries from the list.
- Layer 3 normaliser: normalizeBackendUrls.test.ts pairs a positive
  strip case with negative passthrough cases (non-allow-listed field,
  absolute URL, similar-but-different prefix segment, empty root).
  Red until the normaliser is implemented.
- Layer 4 contract: SupersetClientAppRootContract.test.ts pins the
  channel-2 invariant (root applied exactly once, never doubled).
  Documents the double-prefix symptom in a regression assertion.
- Layer 5 regression: SliceHeaderControls.subdirectory.test.tsx
  asserts Cmd-click "Edit chart" opens a prefixed URL when the app
  is deployed under a subdirectory. Red until index.tsx:266 is
  migrated to openInNewTab.

Strategy: each subsequent commit on this PR fans out one layer to its
full coverage and migrates the corresponding call sites, shrinking the
Layer 2 allow-list in lockstep.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-14 15:16:35 -07:00
JUST.in DO IT
2b71d964cc fix(sqllab): missing estimate action button (#40101) 2026-05-14 14:43:07 -07:00
dependabot[bot]
f02e5b7e83 chore(deps-dev): bump babel-jest from 30.3.0 to 30.4.1 in /superset-frontend (#40090)
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-05-14 13:52:53 -07:00
dependabot[bot]
5fa9657528 chore(deps): update @ant-design/icons requirement from ^6.2.2 to ^6.2.3 in /superset-frontend/packages/superset-ui-core (#40092)
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: sadpandajoe <jcli38@gmail.com>
Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-14 13:52:37 -07:00
dependabot[bot]
d853930840 chore(deps): bump react-syntax-highlighter from 16.1.0 to 16.1.1 in /superset-frontend (#40107)
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-05-14 13:52:14 -07:00
Evan Rusackas
4e09889607 test(datasets): regression coverage for #16141 (export with same table name, different schemas) (#40123)
Co-authored-by: Superset Dev <dev@superset.apache.org>
Co-authored-by: Claude Opus 4.7 <noreply@anthropic.com>
2026-05-14 11:08:23 -07:00
Evan Rusackas
672e9a1477 fix(docs): tighten onBrokenLinks to throw and fix surfaced broken links (#40102)
Co-authored-by: Claude Code <noreply@anthropic.com>
2026-05-14 11:07:18 -07:00
Richard Fogaca Nienkotter
8fa5a75c70 fix(mcp): apply cached adhoc filters to chart retrieval (#40099) 2026-05-14 14:21:54 -03:00
Mafi
144dae7c43 fix(dashboard): use datasetUuid instead of datasetId in display controls export/import (SC-104655) (#40008)
Co-authored-by: Matt Fitzgerald <matt.fitzgerald@preset.io>
Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-14 10:18:57 -07:00
Arpit Jain
62dc237014 chore(ci): add explicit permissions to additional workflows (#40067) 2026-05-14 23:24:46 +07:00
Sandesh Devaraju
823eb905d3 fix(mcp): JSON-serialize order_by_cols and support sort direction (#39952)
Co-authored-by: Amin Ghadersohi <amin.ghadersohi@gmail.com>
2026-05-14 11:19:37 -04:00
Alexandru Soare
966e97989b chore(mcp): Standardize error response shapes across chart tools (#39905) 2026-05-14 18:07:31 +03:00
Mehmet Salih Yavuz
8b0e63b58c fix(rls): prevent double-apply when converting physical dataset to virtual (#39725)
Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-14 18:05:48 +03:00
dependabot[bot]
64dae07675 chore(deps): bump markdown-to-jsx from 9.7.16 to 9.8.0 in /superset-frontend (#40111)
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-05-14 21:39:48 +07:00
Evan Rusackas
e56883baef fix(ci): handle schedule event in change_detector and actually trigger all-changed (#40105)
Co-authored-by: Claude Code <noreply@anthropic.com>
2026-05-14 21:39:07 +07:00
Mehmet Salih Yavuz
a62bf2b0bb fix: chart rendering race condition and homepage connection reset (#40065)
Co-authored-by: Geidō <60598000+geido@users.noreply.github.com>
2026-05-14 17:10:11 +03:00
Mafi
01224007da fix(mixed-timeseries): preserve all-NaN metric columns after pivot when Jinja evaluates to NULL (#40005)
Co-authored-by: Matt Fitzgerald <matt.fitzgerald@preset.io>
Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-14 07:46:34 -03:00
Evan Rusackas
d1e9a5df06 chore(docs): clean up version-cutting tooling and finish developer_portal rename (#39837)
Co-authored-by: Claude Code <noreply@anthropic.com>
2026-05-13 20:14:52 -07:00
dependabot[bot]
48530cb888 chore(deps-dev): bump @babel/register from 7.28.6 to 7.29.3 in /superset-frontend (#39818)
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-05-13 19:17:21 -07:00
dependabot[bot]
676979643f chore(deps-dev): bump @babel/preset-env from 7.29.3 to 7.29.5 in /superset-frontend (#39934)
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-05-13 16:11:01 -07:00
dependabot[bot]
21e62d594e chore(deps-dev): bump wait-on from 9.0.6 to 9.0.10 in /superset-frontend (#40087)
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-05-13 16:09:03 -07:00
dependabot[bot]
5bad4f55fb chore(deps-dev): bump @playwright/test from 1.59.1 to 1.60.0 in /superset-frontend (#40088)
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-05-13 16:01:26 -07:00
dependabot[bot]
17a5f69339 chore(deps): bump chrono-node from 2.9.0 to 2.9.1 in /superset-frontend (#39939)
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-05-13 15:59:36 -07:00
dependabot[bot]
d690aa7eb4 chore(deps): bump immer from 11.1.4 to 11.1.7 in /superset-frontend (#39941)
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-05-13 15:58:20 -07:00
dependabot[bot]
d6c458abd4 chore(deps-dev): bump oxlint from 1.62.0 to 1.63.0 in /superset-frontend (#39937)
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Claude <claude@anthropic.com>
2026-05-13 15:57:30 -07:00
dependabot[bot]
c233bf6171 chore(deps-dev): bump baseline-browser-mapping from 2.10.24 to 2.10.29 in /superset-frontend (#39903)
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-05-13 15:56:30 -07:00
dependabot[bot]
992f561ab9 chore(deps): bump mapbox-gl from 3.23.0 to 3.23.1 in /superset-frontend (#39879)
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-05-13 15:55:54 -07:00
Joe Li
d7fa9301cc fix(dashboard): restore top-level tab drop target for dashboards with content (#39423)
Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-05-13 15:31:29 -07:00
Elizabeth Thompson
958d4aa3de fix(export): fix double app-root prefix in chart/drill-detail export URLs (#39710)
Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-13 15:17:13 -07:00
Richard Fogaca Nienkotter
2a1dcb79e3 fix(mcp): expose table chart type labels in chart responses (#40060) 2026-05-13 16:38:31 -03:00
Michael S. Molina
817814d4f6 chore: Bump core packages to 0.1.0 (#40029) 2026-05-13 16:32:19 -03:00
Jean-Baptiste Braun
1a7a14c357 fix(explore): remove leftover debug console.log in ZoomConfigControl (#39991)
Co-authored-by: Claude Code <noreply@anthropic.com>
2026-05-13 10:55:29 -07:00
dependabot[bot]
85c4411041 chore(deps-dev): bump @babel/plugin-transform-modules-systemjs from 7.25.0 to 7.29.4 in /superset-embedded-sdk (#39983)
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-05-13 10:10:38 -07:00
Mayank Aggarwal
a50de459ae fix(dashboard): restore spacing for charts inside Tabs layout (#38729) 2026-05-13 09:44:05 -07:00
dependabot[bot]
6216e57490 chore(deps): bump react-syntax-highlighter from 16.1.0 to 16.1.1 in /superset-frontend (#39698)
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Claude <claude@anthropic.com>
Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-13 09:35:42 -07:00
dependabot[bot]
cdddb99e9a chore(deps): bump yeoman-generator from 8.1.2 to 8.2.2 in /superset-frontend (#39880)
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-05-13 09:34:42 -07:00
dependabot[bot]
803fed28b8 chore(deps): update react requirement from ^19.2.5 to ^19.2.6 in /superset-frontend/plugins/legacy-plugin-chart-chord (#39929)
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Claude <claude@anthropic.com>
Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-13 09:34:26 -07:00
dependabot[bot]
8074ae2e38 chore(deps): bump fast-uri from 3.1.0 to 3.1.2 in /superset-frontend/cypress-base (#39974)
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-05-13 09:34:11 -07:00
dependabot[bot]
577085eece chore(deps-dev): bump fast-uri from 3.0.1 to 3.1.2 in /superset-embedded-sdk (#39978)
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-05-13 09:33:57 -07:00
dependabot[bot]
5d40d8aeac chore(deps): bump actions/dependency-review-action from 4.9.0 to 5.0.0 (#40016)
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-05-13 09:33:14 -07:00
dependabot[bot]
b4cb780e74 chore(deps): update ace-builds requirement from ^1.43.6 to ^1.44.0 in /superset-frontend/packages/superset-ui-core (#40017)
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Claude <claude@anthropic.com>
Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-13 09:32:35 -07:00
dependabot[bot]
aebc6fbf34 chore(deps-dev): bump @types/node from 25.6.0 to 25.7.0 in /superset-websocket (#40052)
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-05-13 09:32:19 -07:00
dependabot[bot]
9e749da93c chore(deps): bump ws from 8.20.0 to 8.20.1 in /superset-websocket (#40085)
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-05-13 09:32:05 -07:00
dependabot[bot]
2c7e418d7b chore(deps): bump @ant-design/icons from 6.2.2 to 6.2.3 in /docs (#40086)
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-05-13 09:31:51 -07:00
dependabot[bot]
6a1305fe53 chore(deps): update zod requirement from ^4.4.1 to ^4.4.3 in /superset-frontend/plugins/plugin-chart-echarts (#40091)
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-05-13 09:12:39 -07:00
Amin Ghadersohi
726d83d758 fix(mcp): remove stale created_by_fk filter references from MCP privacy layer (#39955) 2026-05-13 11:27:10 -04:00
jesperct
6cebba49ca fix(AlertReportModal): TypeError when pasting text into the Alerts content form search field (#39298)
Co-authored-by: codeant-ai-for-open-source[bot] <244253245+codeant-ai-for-open-source[bot]@users.noreply.github.com>
2026-05-13 17:38:55 +03:00