Skip to content

fix: name the source in the share URL of a Dashboard built without data - #147

Merged
jvdd merged 4 commits into
mainfrom
fix/dashboard-share-url-source
Oct 5, 2026
Merged

jvdd merged 4 commits into
mainfrom
fix/dashboard-share-url-source

Conversation

@jvdd

@jvdd jvdd commented Oct 4, 2026

Copy link
Copy Markdown
Contributor

Dashboard.to_spec() dropped source_name when the dashboard had no data, so share_url(), save_spec() and to_spec() gave figures without a source. The page opened, and every /dashboard/update returned 500.

  • to_spec() now puts source_name in every figure, with or without data. show() without data still passes no source name.
  • source_name is typed str | None, as show() already passed None.
  • The web apps guide drops the rule to build the Dashboard on the same data as the registered source.
  • The standalone Figure.to_spec() has the same condition. It is left as is, because Remove the standalone Figure path and VisualizationSpec; keep Figure as the panel builder #87 removes that path.

Test: a data-less Dashboard shared with a source name loads the expected points from a server that serves that source.

Closes #143

@codspeed

codspeed Bot commented Oct 4, 2026 •

Copy link
Copy Markdown

Merging this PR will not alter performance

✅ 32 untouched benchmarks


Comparing fix/dashboard-share-url-source (49298a5) with main (7e4b61a)

Open in CodSpeed

@jvdd
jvdd merged commit fc50448 into main Oct 5, 2026
19 checks passed
@jvdd
jvdd deleted the fix/dashboard-share-url-source branch October 5, 2026 08:24
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.

Dashboard: share_url() without data gives a URL whose updates fail

1 participant