Skip to content

Standardize Explorer plots with shared artifact viewer and persistent overrides - #820

Open
Irozuku wants to merge 16 commits into
developfrom
feat/explorer-plot-standardization
Open

Standardize Explorer plots with shared artifact viewer and persistent overrides#820
Irozuku wants to merge 16 commits into
developfrom
feat/explorer-plot-standardization

Conversation

@Irozuku

@Irozuku Irozuku commented Aug 13, 2026

Copy link
Copy Markdown
Collaborator

Summary

Standardizes explorer plots onto the same rendering stack the explainers use, so they follow the app light and dark theme, expose the same download, edit, and fullscreen actions on the plot itself, and persist edits with a restore that recovers the original figure at the database level. Restyles the explorer and converter cards to match the explainer cards (outlined container, status dot, plot actions on the plot, separate info modal), and fixes a set of plot rendering bugs surfaced along the way.

Type of Change

  • Backend change
  • Frontend change
  • CI / Workflow change
  • Build / Packaging change
  • Bug fix
  • Documentation

Changes (by file)

Backend: plot overrides (themed edits plus reset)

  • DashAI/back/core/artifacts.py: adds shared apply_plot_overrides helper and PlotOverrideBody, moved here so explainers and explorers use one implementation.
  • DashAI/back/api/api_v1/endpoints/explainers.py: drops its private override helper, imports the shared one.
  • DashAI/back/api/api_v1/endpoints/explorers.py: applies stored overrides on read; PUT /results/ now writes one override per artifact instead of overwriting the stored figure; new DELETE /results/override/{index} restores the computed figure.
  • DashAI/back/dependencies/database/models.py: Explorer gains a plot_overrides JSON column.
  • DashAI/alembic/versions/f7a4c2e91b60_add_plot_overrides_to_explorer.py: migration for that column.

Frontend: explorer plots on the shared artifact stack

  • components/notebooks/explorer/ExplorerBox.jsx: renders results through ArtifactViewer; owns save and reset; measures the plot to its card; blue status dot while loading.
  • components/notebooks/explorer/ExplorerInfoModal.jsx (new) replaces the tabbed ExplorerDetailsModal.jsx (removed): an info only modal (created, columns, parameters); editing now lives on the plot.
  • components/notebooks/explorer/useExplorerResults.jsx: narrowed to expose the raw artifact; drops the derived visualizer pair.
  • components/notebooks/explorer/tabs/Results.jsx (removed) plus tabs/index.jsx: dead results tab dropped.
  • components/shared/ArtifactViewer.jsx: optional height so a card can size the plot to its container.
  • components/shared/RunStatusDot.jsx: optional colorKey override (blue dot during loading).
  • api/explorer.ts, api/explorer.test.ts, api/__mocks__/api.ts: updateExplorerResults(id, index, figure) plus resetExplorerResults(id, index).

Frontend: card restyle

  • components/notebooks/converter/ConverterBox.jsx: outlined Paper, status dot, plain error delete, matching the explainer card.
  • components/notebooks/notebook/NotebookView.jsx: taller explorer and converter cards (CARD_HEIGHT).

Frontend: plot rendering fixes

  • components/notebooks/explorer/visualizations/PlotlyJsonVisualizer.jsx: backgrounds that follow the theme instead of hardcoded white; uses the margin and axis helpers below.
  • utils/plotlyAxes.js (plus test): axis reset skips figures with no cartesian axes (fixes a crash resetting parallel coordinates plots).
  • utils/plotlyMargin.js (plus test): extra top margin so a title clears parallel coordinates dimension labels.

i18n

  • locales/*/common.json: drop the orphaned infoEdit key.
  • locales/*/datasets.json: keys for the reset snackbars.

Tests

  • tests/back/api/test_explorer_overrides.py (new): PUT stores an override without touching the artifacts file; GET applies it flagged overridden; DELETE restores the computed figure; 404s.
  • tests/back/api/test_explainers_overrides.py: import path plus nested group coverage for the shared helper.

Testing

  • Live round trip against a running server confirmed the override save leaves the stored figure intact and reset recovers it (the old PUT overwrote it).

Notes

  • Explorer plots edited under the old destructive PUT lost their computed figure on disk; reset only recovers originals for edits saved after this change. Reconstructing would mean rerunning the exploration.

@Irozuku Irozuku added the front Frontend work label Aug 13, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

front Frontend work

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant