Files
superset2/tests/unit_tests/mcp_service
Joe Li c531185d0a fix(subdirectory): align SPA + sibling view routes after Superset.route_base=""
Round-4 follow-up to 756458f031. Four user-reported symptoms on /superset/
deployments — blank welcome, blank dashboard edit mode, doubled explore
copy-permalink, JSON 404 on dashboard discard — all trace to round-2
leftovers:

- superset-frontend/src/views/routes.tsx: six SPA routes still hard-coded
  the /superset/ prefix on top of <Router basename={applicationRoot()}>.
  React Router never matched them post-basename. Drop the prefix on
  welcome, file-handler, dashboard/:idOrSlug, explore/p, all_entities,
  and tags. isFrontendRoute stripAppRoots its input so menu URLs that
  carry the appRoot still resolve.
- Menu.tsx + RightMenu.tsx: SPA-route menu branches handed already-rooted
  URLs to <NavLink>/<Link>, doubling them via basename. Mirror the
  round-3 brand-link stripAppRoot pattern.
- superset/views/{explore,tags,all_entities}.py: three sibling view
  classes still declared route_base = "/superset/...". Mirror
  Superset.route_base="".
- superset/models/dashboard.py: Dashboard.url / get_url returned
  "/superset/dashboard/<id>/", producing doubled DashboardList row hrefs
  that caused the discard-edit 404. Return "/dashboard/<id>/" so
  downstream ensureAppRoot-aware consumers prepend exactly once.
- superset/mcp_service/dashboard/{schemas,tool/*}.py: seven sibling
  hard-codes of "/superset/dashboard/<id>/" updated identically.

Tests pin shapes for ExplorePermalinkView.permalink, TagModelView.list,
TaggedObjectsModelView.list, Dashboard.get_url, and the MCP dashboard
url emission. routes.test.tsx adds appRoot-prefixed lookup coverage and
documents the dict-lookup-no-pattern-match limitation.

UPDATING.md notes the new sibling route_base moves and the model URL
change alongside the round-2 Superset.route_base entry.

Live Playwright re-validation confirmed all four bugs fixed.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-14 15:18:07 -07:00
..