Skip to content

Static embed should support diff/compare view #629

@paddymul

Description

@paddymul

Context

The static embed (static-embed.js / to_html()) currently supports two embed types: DFViewer (plain table) and Buckaroo (full widget with summary stats switcher).

The xorq-mcp web UI has a diff/compare view that shows two DataFrames side-by-side using Buckaroo's compare functionality (via the live Buckaroo server as an iframe). This is useful for comparing two revisions of a catalog entry.

Request

Add a Compare or Diff embed type to the static embed pipeline so that two DataFrames can be compared without a running Buckaroo server.

The workflow would be:

from buckaroo.artifact import prepare_compare_artifact, artifact_to_json

artifact = prepare_compare_artifact(df_old, df_new, join_key="id")
json_str = artifact_to_json(artifact)
# -> renders a side-by-side diff table via static-embed.js

This would allow the xorq-cloud catalog viewer (which uses pre-rendered static artifacts, not a live Buckaroo server) to support diff pages.

Current workaround

The cloud viewer has no diff view — it's listed as "not built" because the static embed doesn't support it.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions